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AyH,IACD5mB,SA1DC8vB,MACA3tB,KACArC,GACAoC,GACAgsB,GACAzsB,MACAsuB,KACAztB,MACAC,MACAT,KACAhB,KACAiB,KACA5N,GACAqO,KACAX,aAAwB,CACtBnqC,OAAQ,CACNu3D,QAASe,KACTb,WAAYc,GACZb,KAAM,CAACC,OAETa,0BAA2B,CACzBjB,QAASkB,KACTV,SAAUhB,MAIdxsB,cAAsB,oCAiCdnB,QAGCiuB,CAAb,KAEM,SAAUkB,GAAkBt/E,GAChC,OAAO,IAAIy/E,KAAoBz/E,EAChC,CCjPGd,iBACFwgF,oBAGFC,OACGC,gBAAgBxB,IAChB1jB,MAAOtQ,GAAQpsC,QAAQrd,MAAMypD,GAFhC,mBCVA,OACA,YACA,eACA,YACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,cACA,iBACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,YACA,eACA,YACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,WACA,cACA,YACA,eACA,kBACA,qBACA,kBACA,qBACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,eACA,kBACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,WACA,cACA,YACA,eACA,YACA,eACA,WACA,cACA,WACA,cACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,WACA,cACA,WACA,cACA,YACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,kBACA,eACA,YACA,eACA,gBACA,mBACA,eACA,kBACA,YACA,eACA,YACA,eACA,kBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,iBACA,oBACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,YACA,eACA,aACA,gBACA,YACA,eACA,YACA,eACA,YACA,eACA,eACA,kBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,kBACA,qBACA,gBACA,eACA,kBACA,YACA,eACA,YACA,eACA,YACA,gBACA,mBACA,eACA,YACA,eACA,kBACA,qBACA,YACA,eACA,eACA,kBACA,eACA,kBACA,eACA,kBACA,eACA,mBAIA,cACA,aACA,YACA,CACA,eACA,cACA,+CACA,iCACA9iC,EACA,CACA,WACA,CACAu4D,kBACA,qBACA,EACAA,aACAC,aACAD","names":["UserServiceModal","constructor","this","stageURL","LiveURL","environment","production","apiUrl","location","host","match","hostname","includes","productUrl","imageUrl","linkTracking","isAllowed","companyName","RestApiService","http","cookieService","BehaviorSubject","hasToken","getheaders","httpOptions","get","headers","HttpHeaders","Authorization","handleError","error","errorMessage","ErrorEvent","message","status","throwError","isLoggedIn","loginStatus","asObservable","check","getActiveCountries","sessionStorage","getItem","JSON","parse","pipe","catchError","getRegionID","retry","getStates","countryCode","getCompanyDetails","postCustomData","post","stringify","postCustomDatatoExtension","addCustomerRewardPoints","calculateCustomerOrderTotal","request","createProspect","createCustomer","createCustomerAutoshipOrder","createCustomerOrder","createCustomerOrderAndAutoship","createCustomerServiceLogEntry","createPaymentMethod","deductCustomerRewardPoints","deleteCustomerAutoship","autoshipid","requestquery","params","HttpParams","fromString","deleteCustomer","deletePaymentMethod","fromObject","getCustomer","customerID","getSearchCustomerDetail","getCustomerAutoships","getCustomerCountries","getCustomerCustomFields","getCustomerDownlineIds","getCustomerIDs","getCustomerIDsbyFilter","getCustomerOrders","customerId","getCustomerOrderDetail","getCustomerParties","getCustomerPartyTotals","getCustomerRewardPoints","getCustomerSavedPaymentMethods","getCustomerServices","getCustomerStats","getCustomersByParameter","getCustomersDataPoints","getCustomersToPlaceTo","getDataPointCategories","getNotificationEvents","getPaymentMerchants","getPaymentMethodIFrame","getPaymentMethodIFrameTempUser","getUnplacedCustomers","getWebsiteInformation_V1","getWebsiteInformation","Webalias","placeNode","resetPassword","put","searchAssociate","req","searchTerm","includeWebAliases","submitEnrollmentForm","updateAutoShipDateandAmount","updateCustomer","updateCustomerByParameter","patch","usernameAvailabilityCheck","sendWelComeEmail","ping","pingDeep","getMediaResources","getNotificationSettings","getTrainingDetailsandProgress","triggerForgotPasswordProcess","cancelOrder","deleteAutoship","enqueueStats","getAutoship","autoorderid","getOrder","orderId","getOrderIds","getOrderIdsFilter","getOrderPackageDetails","getOrderRMAs","getOrderType","getOrderTypes","getPriceGroup","getPriceGroups","getShippingMethod","getShippingMethods","getUnshippedPackages_Deprecated","importExternalOrder","insertPayments","refundPayment","sendOrderReceipt","setOrderShipped_Deprecated","setPackageReturned_Deprecated","setPackageShipped_Deprecated","splitPackage","updateAutoship","updatePackageStatus","updatePackageStatusBatch","deleteItem","getItembyId","getItembySKU","getItems","getItemsbyFilter","getItemsrequest","getRegions","getStockLevel","getStores","getSubCategories","getWarehouses","getTopSellingProducts","getTopSellingrequest","updateStockLevel","createRMA","deleteRMA","getRMA","getRMAs","markRMAReceived","markRMAShipped","getCustomerBySSOToken","getAdminBySSOToken","getCustomerSSOURL","getCustomerSSOURLByExternalId","clearCache","getError","getStatus","validateEmailAddress","EmailAddress","Login","observe","tap","resp","set","Logout","validateTaxId","taxId","validateUsername","username","validateWebAlias","webAlias","getCompanyCountryLanguages","GetCategories","storeId","i0","factory","UtilityService","route","birthDays","BirthYear","BirthMonth","year","Number","moment","month","num","Date","getDate","i","days","String","length","push","birthYears","years","currentyear","text","value","reverse","birthMonths","getSortKey","id","name","lname","sortby","sorttype","getParameterByName","url","window","href","replace","results","RegExp","exec","decodeURIComponent","getDefaultTranslation","translated","key","defaultValue","getQueryParam","param","search","snapshot","queryParams","Object","keys","newObject","_","toLowerCase","getQueryParamKey","parmKey","isEmptyObject","obj","localStorage","regionsData","data1","Regions","region","CountryList","some","country","CountryCode","ID","withCredentials","subscribe","data","setAutoshipEditFlag","setItem","getAutoshipEditFlag","showSimplifiedheader","isShowSimplifiedheader","isEnrollment","UserService","activatedRoute","apiService","utilityService","_a","DefaultWebalias","userServiceModal","init","service","customerTypeID","parseInt","type","DefaultCustomerType","enrollerInfo","guestUserLogin","customerData","guestUserData","shippingAddress","mailingAddress","newshippingAddress","personalInfo","birthDay","birthMonth","birthYear","toString","phoneNumber","webOffice","couponInfo","DynamicCouponCode","IsAppliedcode","_b","paymentMethods","referralURL","ref","restrictedStates","restrictedShipStates","selectedShippingMethod","shippingMethods","autoshipCardDetail","cardDetail","commissionPayment","licenseNumber","legName","enrollerId","sponsorId","doNotWishAutoship","checkItems","autologin","regionMainState","newUser","TotalSteps","noOfStepsVerified","availableRewards","WebAlias","webalias","setDefault","clearData","removeItem","clearCustomerData","setEnrollerInfo","websiteinfo","Email","CardExpirationYear","getFullYear","CardExpirationMonth","getMonth","CardNumber","defaultState","promoCodeValid","undefined","promoCode","Allcoupons","RewardsForUse","FreeShipping","activated","coupon","OrderAllowCoupons","setShippingAddress","cloneDeep","PrimaryAddress","FullName","FirstName","LastName","Street1","DefaultShippingAddress","_d","_c","Street2","_e","_g","_f","Street3","_h","_k","_j","Region","_l","_o","_m","PostalCode","_p","_r","_q","_s","_u","_t","City","_v","_x","_w","Phone","_y","_0","_z","checkIfUserAuthenticatedOrNot","CompanyService","userService","CurrencyCode","DecimalLength","Description","ExchangeRate","Symbol","selectedCountry","setCurrencyDetail","getRegionIDbyPromise","Promise","resolve","reject","sortingAscendingOrder","getCurrencyDetail","Currency","defaultCurrency","selectedCurrency","Array","j","temp","ShoppingCartService","user","setShoppingCart","customerType","shoppingCart","Carts","cart","CartConfiguration","filter","carts","CustomerType","then","getShoppingCart","orderType","packs","orders","OrderTypeID","find","ItemID","Name","LanguageID","PriceTypeID","StoreID","NotificationService","snackBar","dialog","translate","showSnackBar","title","className","from","align","icon","animIn","animOut","delay","openSnackBar","action","duration","open","instant","verticalPosition","horizontalPosition","panelClass","success","warning","info","ConfigService","notificationService","companyService","shoppingCartService","EventEmitter","commonData","selectedLanguage","language","commonSettings","allowedCountries","setSelectedCountry","countrycode","Data","countryLanguageCode","setInitRegionsIDs","CommonSettings","toPromise","ClientRegionsSetSuccessfully","emit","isSettingClientRegionsDone","getConfig","getLocalConfig","localSettings","res","getCommonSetting","languageCode","setRegionsDataAgain","setCommonSettingData","updateLocale","SelectedLanguage","result","reg","finally","locale","Language","lang","ISOCode","use","ex","console","warn","getLanguageId","languageData","LanguageCode","item","CountryLanguages","AddressVerification","Countries","CountryCodeISO2","selectedCountryDescription","CountryName","comon","checkGlCountryAvailable","checkGlLanguageAvailable","setWebsiteInfo","websiteInfo","PersistentService","getRetailData","retailData","isNewAutoship","CurrentSelectedAutoOrder","isChanged","AddMoreItemInAutoshipFlag","AddMoreItemInAutoshipData","editAutoshipItems","uniqueCategoryId","IsPaid","SelectedAutoshipPayment","PaymentTypeID","Ending","PaymentDisplay","ExpireMonth","ExpireYear","BillingAddress","BillingAddress2","BillingCity","BillingCountry","BillingState","BillingZip","Autoship","Frequency","FrequencyTypeDescription","FrequencyTypeID","autoshipDate","isNewAddress","isAddresschanged","IsMailingAddressVerified","AutoOrderShippingAddress","setRetailData","getBaseLocation","registerRoute","pathname","test","paths","split","splice","ConfirmDialogModel","noaction","takeaction","ConfirmDialogComponent","dialogRef","ngOnInit","onConfirm","close","onDismiss","MAT_DIALOG_DATA","selectors","ImagePreloadDirective","updateUrl","src","default","load","ctx","$event","ctx_r14","ctx_r16","FindEnrollerComponent","configService","router","SelectionModel","MatTableDataSource","FormControl","selection","changed","isButtonEnable","selected","filteredOptions","myControl","valueChanges","startWith","map","_filter","searchEnroller","searchText","filterData","showSponsorTable","AssociateTypeId","WebAliases","dataSource","sort","itemCount","pageSize","paginator","applyFilter","filterValue","trim","options","option","singleSelection","checked","SelectedSponsor","setSponsor","CustomerId","baseurl","confirmDialog","dialogData","maxWidth","afterClosed","dialogResult","dialogClose","handleNoSponsor","origin","MatSort","MatPaginator","MarketSelectorComponent","customerTypes","CustomerTypes","selectedCustomerTypeID","selectedUserType","changeAffiliate","autoFocus","continue","closeAll","reload","selectCustomerType","changeLang","code","LoaderService","OnIFrameSave","OnIFrameError","HostedpaymentDialogComponent","sanitizer","loader","elementRef","paymentData","isCheckout","Script","IFrameUrl","onMessage","e","log","event","isTestCardEvent","handleIframeMessage","setUpIframeMethods","executePaymentScripts","iFrameUrl","bypassSecurityTrustResourceUrl","button","document","getElementById","styles","forEach","style","addEventListener","isFormValid","nativeElement","querySelector","eventData","eventType","display","setTimeout","handleIframeEvent","cleanupCustomJS","getIframeHeight","Height","getIframeUrl","getIframeWidth","Width","html","externalScripts","getExternalScripts","removeExternalScriptTags","runExternalScripts","inlineScripts","getInlineScripts","runInlineScripts","srcAttrRegex","scriptTags","tag","link","inlineScriptTagRegex","script","urlArray","promise","firstScript","scriptArray","eval","join","UniquePipe","transform","collection","keyname","output","indexOf","pure","AccountService","userSubject","userValue","login","loginrequest","body","next","createGuestUser","createGuestRequest","logout","delete","deleteAll","navigate","clear","register","getCustomerData","val","ErrorDescription","PaymentService","accountService","getPaymentType","statecode","getPaymentTypePromise","storeid","getPaymentMerchantsLastRequest","PaymentTypeResponse","Status","AllowedMethods","Message","all","getPaymentData","paymentdata","paymentMethod","IsApplication","dialogConfig","MatDialogConfig","role","width","merchantid","MerchantId","PaymentDataResponse","iframe","newPayment","editingPaymentMethod","CardType","cardType","Last4","lastFour","token","expireMonth","card","expirationMonth","expireYear","expirationYear","selectedPaymentTypeName","isPaymentChanged","afterOpened","isModalOpen","savePaymentMethod","payment","PaymentToken","NameOnAccount","billingInfo","fullName","Expires","day","format","response","clearPayment","SelectedPaymentTypes","OldSelectedPaymentType","SaveMethods","products","CartService","cartItems","Observable","observer","complete","addToCart","product","quantity","items","index","Id","qty","stock","calculateStockCounts","Languages","ProductName","removeFromCart","getTotalAmount","reduce","prev","curr","price","updateCartQuantity","ProductService","httpClient","compareProducts","saveItems","internalRequest","PriceGroup","isPriceGroupStoreIDDataAvailableInStorage","DataItems","RegionID","CategoryId","newResult","InsertItemsIntoSessionStorage","allItems","allPriceGroupAndStoreData","priceGroup","getProductByCategory","banners","getBanners","getProducts","previousRequest","getRelatedProducts","NumberOfProducts","customStoreID","topSellingItems","previousRequestForTopSellingItems","getProduct","customRequest","getComapreProducts","hasProduct","getProductBySlug","slug","addToCompare","removeFromCompare","selectedPacks","selectedOrderItems","selectedAutoOrderItems","OrderService","cartService","itemsService","appInit","donePromise","onInit","getstoreId","shoppingCartItems","calculateOrder","calculateAutoOrder","showNotification","ordertype","skipResolve","productdetails","kititems","ItemId","Quantity","IsReward","SKU","endsWith","autoshipDiscountCouponString","autoshipItemIDs","currentItem","findIndex","AllCouponsCodes","Global","unshift","calculateOrderRequest","OrderId","ShipMethodId","StoreId","ShippingAddress","AddressId","OrderType","KitItems","Items","PartyId","CouponCodes","CustomShippingAddress","Line1","Line2","Zip","StateCode","lastRequest","calculateOrderResponse","updateProductDetailPricing","calculateOrderCall","abandonedCart","Total","CouponResults","Code","isInCart","IsValid","ShippingMethods","selectedShipmethod","shipMethod","packTotal","packBusinessVolume","Price","BusinessVolume","PV","orderTotal","orderRewardTotal","orderBusinessVolume","item1","UsePoints","PriceEach","BusinessVolumeTotal","Cv","Qv","getMessage","getItemName","getItemCode","getItemDetails","concat","PreventTaxJarCalculation","IsKitItem","autoshipstoreId","lastAutoOrderRequest","calculateAutoOrderResponse","autoorderBusinessVolume","autoitem","CV","QV","ShipMethods","ShipMethodID","total","element","itemId","productName","sku","Sku","qv","cv","bonus","Bonus","currencyCode","cartItem","backOfficeId","BackOfficeId","firstName","lastName","PrimaryPhone","emailAddress","Country","customerInfo","tempData","ZTM","setStats","resetLastRequests","getStoreIdForRetailCustomers","ctx_r15","ProductDialogComponent","productsService","callbackService","itemType","OrderQuantityCount","itemTypes","pack","getItemsCall","itemQuantity","itemserviceCall","order","autoship","setUpOrderOptions","path","ImageUrl","changeimage","buyButtonEnabled","HasOptions","ItemOptions","isOptionsSelected","currentQuantity","CustomItemCode","addToCartOrShowDetails","increment","counter","decrement","increaseQuantity","decreaseQuantity","orderOptions","dict","optionsMap","OptionsMap","OptionNames","Key","selectedOptions","optMap","optionMapNames","optionVal","optionValues","prototype","hasOwnProperty","call","itemIndex","Values","getOptionValueName","getOrderOptionKey","Option","setActiveImage","image","activeImage","setActiveChildImage","activeChildImage","getPrice","Prices","getVolume","transformItem","Images","LargeImageUrl","Path","Image","itemInCart","getKitItemDetails","kitItem","childItem","defaultImage","selectOption","tempOptData","optdata","itemOptdata","tempimgurl","SmallImageUrl","substr","lastIndexOf","setInitialItemOption","defaultOption","getOptionsText","optionValArray","mapping","HasKitOptions","KitGroups","kitGroup","Error","getValidValues","values","currentOption","otherOptions","validOptionValues","optNames","optionValue1","arr","optionName","optionValue","isAvailable","itm","openSelect","screen","availWidth","checkOptions","count","ItemsListService","orderService","allAutoshipList","Custom","Field5","viewAll","totalItem","buttonText","checkSelect","selectedCategories","categoryList","checkselectall","productList","getItemsByCategory","selectedCategory","Category","isShowViewButton","selectedCategoryType","CategoryDescription","groupByKeepOrder","prop","newArr","wrapObj","propName","checkRestrictedState","countrycall","CheckoutCall","swalcheck","uniqueCategoryIdCheck","productCall","newRegionCall","isRedirect","isReload","preOrderLength","preAutoOrderLength","selectedOrder","itemDetails","optionItem","rewardQuantity","swalErrorMsg","selectedAutoOrder","AllowAutoship","allProductList","restrictedStateSwal","redirection","errorMsg","clearcart","destory","datatitle","disableClose","AutoshipConfigurationService","persistentService","add","autoshipConfigData","CustomerTypeId","NewAutoshipRestrictedDates","StartDate","NewAutoshipEndDate","AutoshipNotPaidRestrictedDates","AutoshipNotPaidEndDate","AutoshipPaidEndDate","AutoshipPaidRestrictedDates","setting","allowEdit","disableEdit","isfreqcall","configDate","configRestrictedDate","endOf","currentMonthOnly","InvalidEndDate","getDefaultFrequency","setAutoshipDate","getNextRemainingDate","assignDate","selecteddate","currentdate","getDefaultDate","autoshipSettings","defaultDate","isRestricted","dates","today","endofmonth","daysInMonth","restrictCurrentMonth","existCurrentMonth","maxCurrentMonth","exist","currentAutoshipdate","getDisableDays","disableDatesArr","dateStart","dateEnd","timeValues","restricteddates","addYear","y","frequencyTypes","FrequencyTypes","frequencies","autoshipFrequencies","frequency","frequencyTypeID","autoshipFrequency","selectedFrequencyID","IsMultipleFrequency","frequencyList","date","toDate","getAutoshipDate","SideNavBarService","triggerOpen","showsideBarSummary","closeSidePanel","Cart1Service","paymentService","itemsListService","sideNavBarService","autoshipConfigurationService","ItemsMapping","PeriodMapping","increaseQuantiy","isAutoship","isPack","autoshipQuantity","packQuantity","orderRewardQuantity","orderQuantity","x","decreaseQuantiy","autoAddedCoupon","IsAllowDynamicCouponcode","isShowNotification","customOrderCode","fromDialog","fromApplication","fromPointbtn","isPackMultipleQuantity","addPack","itemCode","addOrderToCart","showProductDetail","hasOptions","isKitAdded","selectedItems","clearCart","ReplacementsItemsInCart","getItemPrice","p","getOrderItems","Boolean","itemQuantities","getKitInfo","OriginalPrice","OptionsImage","HasKitGroups","kitItemNames","group","kitItemName","selectedItem","selectedKitOptions","alreadyPackItems","setQuantiy","updateCountry","languagecode","sideNavCall","shippingCall","oldRestrictedState","oldRegionMainState","countrySwal","marketSwalCheckItems","getRestrictedItems","OrderItem","item2","setRestrictItemsSwal","swalMessage","restrictedOrderItems","logNumber","restrictedAutoOrderItems","swalText","checkRestriction","confirm","updateCountryLanguage","toUpperCase","clearItems","getCartItems","Order","Packs","resetItemQuantities","packtemp","ordertemp","orderRewardtemp","autoordertemp","isAnyInstallmentItemInCart","isAnInstallmentItem","getAllReferenceOfInstallmentItems","mainSKU","Replicaitems","ReplacementsItems","skuName","removeInstallmentItemFromCart","installmentItem","autoshipItem","getAutoshipDiscountPrice","isAutoshipItemExist","NgInitDirective","ngInit","RegexService","getRegex","regex","ValidateDirective","renderer","regexService","onFocus","windowBlur","onFocusout","elemntonFocus","target1","target","$","closest","removeClass","remove","parent","elemntonFocusout","elemntonBlur","checkForm","elemntonFocusin","elementonkeypress","attr","altkeypress","altKey","which","customErrorMessgae","showError","showSuccess","listen","parents","ev","preventDefault","not","each","successFun","animate","scrollTop","offset","top","errorExist","click","sectiontype","pw1","pw2","ctrlGrps","addClass","bottom","height","n","element1","localName","textContent","validateEmail","validateAlphaNumericDash","currentPw","on","hasClass","regexValidate","regexValidateZip","regxExp","msg","container","after","parentsUntil","ctx_r29","item_r23","ctx_r32","ctx_r34","ctx_r36","ctx_r38","ctx_r42","ctx_r47","ctx_r61","item_r51","ctx_r67","ctx_r70","ctx_r72","ctx_r74","ctx_r78","ctx_r81","ctx_r98","item_r88","ctx_r104","ctx_r107","ctx_r109","ctx_r111","ctx_r115","ctx_r118","item_r146","ctx_r158","ctx_r160","ctx_r180","item_r163","ctx_r183","SideBarSummaryCartComponent","cart1Service","itemListService","platform","selectedfrequencyTypeID","AutoshipMinDate","AutoshipMaxDate","currentState","isMac","IOS","showTaxMessage","getPacksQuanity","getOrderQuanity","getAutoOrderQuanity","removePromo","getCustomerTypeName","custmerType","dateFilter","disableDates","submitApplication","querySelectorAll","checkitem","navigateToNextStep","backStep","navigateToApplication","application","ConfigurableCheckout","queryParamsHandling","showLogincheckoutBtn","useCoupons","checkRewardStatus","reward","currentReward","toggleCoupon","goToSignUp","OrderItemRequired","showNewCustomerBtn","isAutoshipChanged","isSame","isAddressChanged","isShipMethodChanged","cancelAutoship","autoShipId","setFrequency","freq","saveEditAutoship","NavigateToAutoship","getAutoshipNumber","canCheckOut","getImage","Disco","DiscoUrl","view","isShow","getQuantityModel","updateQuantity","closeCart","frequencyDescription","checkQuantity","getLastQuantity","lastQuantity","NewCartEvents_handleSubscribeAndSave","sidebarItem","orderCartItem","currentAutoorderItem","NewCartEvents_UpdateQuantity","autoshipCartItem","NewCartEvents_isInAutoshipCart","NewCartEvents_DeleteItem","inInCart","inInAutoshipCart","modelQty","currentQty","modelQuantity","NewCartEvents_UpdateGlabalQuantities","productID","GoToCheckout","SidebarMenuService","Settings","theme","rtl","AppSettings","ShoppingWidgetsComponent","productService","Subject","getTotal","getQuanity","HeaderComponent","appSettings","viewportScroller","settings","events","currentRouterPath","run","uniqueRequireProduct","CategoriesToFetch","HomeProductlist","note","parentElement","currency","currencies","welcmtext","toggleMobileMenu","sildeMobileNavEvent","changeCurrency","flag","navigateByUrl","onScroll","isTop","scrollY","selectFlagCountry","OpenLanguageSelector","updatecountry","scrollToEventsSection","fragment","anchorElement","scrollIntoView","behavior","FooterComponent","bind","docHeight","winHeight","scrollPercentRounded","Math","round","bottomfooter","css","position","right","left","logoutHandler","SidebarComponent","sidenavMenuService","depth","currentUrl","expanded","onItemSelected","children","displayName","closeDialog","trigger","state","transition","MainComponent","iconName","langMenuTrigger","openMenu","typeOfId","sildeMobileNav","sideBarMenu","toggle","navigateToChangeAffiliate","changeCustomerType","relativeTo","closed","customerTypeDescription","setNavItemCategories","categoriesList","navItems","handleTopHeader","actioN","showTopHeader","MyLoaderComponent","loaderService","isLoading","v","loading","AppComponent","persistent","activateroute","setDefaultLang","unloadHandler","scroll","queryparam","isshort","cartitems","handleCartLinkSharing","evt","NavigationEnd","pathArray","urlAfterRedirects","pageName","pageURL","scrollTo","showMarketSelector","queryItems","ItemsArray","orderItems","autoOrderItems","QI","itemcode","orderqty","autoshipqty","APP_INITIALIZER","LoyaltyProgramComponent","save","HomeComponent","titleService","sidebarNavService","cacheSeconds","el","clickable","nextEl","prevEl","itemID","subtitle","env","getAllCategories","BundlesConfig","direction","slidesPerView","spaceBetween","keyboard","navigation","pagination","grabCursor","loop","preloadImages","lazy","breakpoints","setTitle","contentLoaded","slides","Home","PrimaryBanner","config","retailStoreCategories","getImageUrlFromDescription","translationsArray","englishTranslation","t","mouseEnter","classList","opacity","mouseOut","getAllProductsCategories","uniqueItems","object","slice","healthBeautyProducts","quarterlyPacksProducts","shopPacksProducts","healthBeautyProduct","quarterlyPacksProduct","shopPacksProduct","goToShop","handleProduct","goToItem","itemtype","openLoyaltyPopup","addPackToCart","addPackFromEnrollStore","packItem","packItemCode","alltems","appRoutes","redirectTo","pathMatch","component","AppRoutingModule","RouterModule","useHash","relativeLinkResolution","scrollPositionRestoration","FlickityComponent","CartType","images","onItemsSucces","isItemExists","isNaN","isShowShareOptions","KitCustomItemCode","Flickity","require","carouselMain","carouselNav","pageDots","bgLazyLoad","asNavFor","contain","UnsafePipe","content","bypassSecurityTrustHtml","ctx_r24","ctx_r44","ProductDetailsComponent","refreshProduct","itemPurchaseSelectionType","setProductsDetails","ngAfterViewInit","updateGallerySwiper","GalleryThumbImages","freeMode","watchSlidesVisibility","watchSlidesProgress","slideActiveClass","GalleryTopImages","thumbs","swiper","assign","ready","queryparams","replaceUrl","PurchaseCustomerType","CUSTOMER","PurchaseStore","RETAIL","Specifications","fetchAndParseTabs","AllImagesUrls","shortDescription","innerHTML","dialogresult","selectImage","bigProductImageIndex","relatedProducts","pop","purchaseMode","addToBothCart","buyItemWithInstallment","filterItemOptionID","optionMap","buyNow","onMouseMove","innerWidth","currentTarget","offsetX","offsetWidth","offsetY","offsetHeight","zoomer","zoomViewer","backgroundPosition","onMouseLeave","AutoshipPrice","ezpModel","small","large","isKitItem","hideAddToCart","isAutoShip","isOrderAllow","isAllowOrder","addProduct","goToslider","isInstallmentAllowed","Field1","Field2","getInstallmentsNumber","RedirectToDetailPage","ProductCode","paramMap","ngOnDestroy","todaysInstallmentAmount","copyProductLink","navigator","clipboard","writeText","AddSuggestedProductToCart","SerializedHTML","tabSections","DOMParser","parseFromString","tabData","section","innerText","ProductSpecification","err","SwiperDirective","ProductSearchPipe","filterOptions","new","filteredItems","searchedItems","isBestsellerChecked","isNewChecked","Field3","Field4","removeDuplicates","ctx_r5","ctx_r8","VariantSelectionComponent","sidenavBarService","productOptions","ProductOrderByPipe","array","orderByComparator","a","b","parseFloat","isFinite","ProductNoSidebarComponent","noBuilderPageForUrl","ProductWrapperList","context","fetchProductsAndInitialize","rotateImages","sortByOrder","showIsLoading","showNoProductsError","RegionIDForRequest","category","isProductsFetched","highLightSelectedCategory","MappedProductsByCategory","MapProductsForBuilder","BuilderConfigurations","Product","sortKeys","productsArray","WrapperList","isCategoryExist","BannerSlider","desktopImage","tabletImage","mobileImage","button1","allowed","button2","button3","shopBannerConfig","autoplay","speed","searchtext","productSearchText","compareObjects","o1","o2","onChangeSorting","onPageChanged","page","onChange","isAllunselect","k","checkBoxParentClicked","checkboxId","matCheckboxes","checkbox","_elementRef","getAttribute","handleProductSearch","Products","productFilters","MatCheckbox","routes","ShopRoutingModule","SharedModule","MatDatepickerModule","imports","CommonModule","MatButtonModule","MatSnackBarModule","MatNativeDateModule","MatToolbarModule","MatListModule","MatSliderModule","MatExpansionModule","MatBadgeModule","MatMenuModule","MatTableModule","MatSortModule","MatRadioModule","MatDialogModule","MatChipsModule","MatInputModule","MatIconModule","MatTooltipModule","MatSidenavModule","MatSelectModule","MatTabsModule","MatDividerModule","MatCardModule","FlexLayoutModule","NgxSkeletonLoaderModule","MatAutocompleteModule","MatPaginatorModule","MatCheckboxModule","TranslateModule","FormsModule","ReactiveFormsModule","OrderModule","BuilderModule","ShopModule","BrowserModule","SwiperModule","NgxPaginationModule","BrowserAnimationsModule","NoopAnimationsModule","NgxImageZoomModule","LoaderInterceptor","removeRequest","requests","intercept","handle","HttpResponse","finalize","AddSymbolWithNumberPipe","symbol","lastdigitcount","symbolcount","substring","maskLength","mask","AllowCvvComponent","cvvCode","PaymentTranslatePipe","ChangeDateFormatPipe","item_r61","ctx_r69","ctx_r71","autoorderitem_r76","ctx_r82","ctx_r84","ctx_r85","CheckoutComponent","cartService1","orderPipe","of","buyProducts","amount","selectedAutoship","updateAddressWithAutoshipAddress","autoshipPayment","getPaymentByDisplayText","Token","PaymentMethodID","setDefaultPayment","getAutoOrders","getfrequencyName","Address","Address2","State","ZipCode","addSavePayment","paymentmethodid","matchingPayment","method","ending","CreditCardNumberDisplay","DisplayName","CanSavePayments","oldSelectedPaymentTypeName","selectpay","PaymentMethodId","getPaymentDescription","CreditCardTypeDescription","removeCardDetail","messageText","deleteCreditCard","getCvv","placeOrder","isDisabledCreateOrder","checkPlaceOrder","showCvv","isStateRestrict","userData","autoshipproductdetails","createOrderRequest","createOrder","Payments","OnFileCard","OrderCreditCard","CardToken","NameOnCard","ExpirationMonth","ExpirationYear","SavePayment","SavePaymentMethodId","createAutoOrder","PaymentMerchantId","ShipAddress","AutoShipId","ErrorMessage","Index","Amount","AutoOrder","AutoorderId","OrderID","AutoOrderId","AutoOrderID","autoshipItems","ele","SponsorId","orderDetail","subTotal","SubTotal","totalAmount","Payment","PaymentUrl","iframeData","getpaymentMethodIframe","Redirect","RedirectUrl","showBirthWarnings","orderItem","FlagCancer","FlagBirthDefects","ShowBirthWarning","showCancerWarnings","ShowCancerWarning","getAutoships_WithoutInstallment","AutoOrdersData","AutoShipID","changeSelectedAutosipId","validatePromoCode","avlreward","promoShowHide","isExitCoupon","Coupon","isCouponCode","updateShipmethod","shipmethodID","LoginComponent","cartsService","password","guestemail","previousType","checkoutpage","manageflow","guest","signin","isguest","clearStorage","issignin","loginFunction","granttype","scope","userInfo","loginredirect","catch","successEx","alias","newUrl","subdomain","getSubdomain","navLoginPath","redirectToForgotPassword","skipLocationChange","isMobile","createGuestCustomer","randomPassword","Username","Password","showLogin","showLoginSection","FaqComponent","ErrorPageComponent","filterdata","json","KitLevel","DisplayIndex","ParentId","ProductLineId","ShortDescription","StoreIds","HasChildren","ChargeShipping","Disabled","Length","LengthUnitOfMeasure","ManufacturerPartNum","OutOfStockStatus","PackCount","PackageGroupId","PreferedVendorId","SortOrder","TaxClassId","ProductClass","TrackStock","UnitOfMeasure","Upc","Weight","WeightUnitOfMeasure","HsCode","FastStart","Gen1","Gen2","Gen3","Gen4","Gen5","Gen6","Gen7","Gen8","Gen9","Gen10","SeoKeywords","Options","Discounts","End","PriceCurrency","RewardPointsEarned","Start","Type","Stores","PriceGroups","poiDataArray","discount","ValidateKeywordService","searchStringInArray","str","strArray","wordlist","strg","re","WordsObject","val1","CheckValidation","isvalid","SignupComponent","validateKeywordService","email","confirmpassword","UserNameCheck","EmailCheck","loadingDetails","verifyUsername","isValidPost","blockword","userName","pass","validEmailData","verifyUserNameAndEmail","back","product_r1","ctx_r3","ctx_r6","PackCarouselComponent","openProductDialog","addAOScanToCart","isAOScanInCart","CustomerTypeCarouselComponent","haveScroll","getMenuSize","outerWidth","paddleMargin","setScrollPosition","typeSelected","scrollPosition","scrollLeft","scrollDuration","slideSectionRight","scrollSize","selectType","preventCartItemsOnSelectionChange","collapseSection","sponsorSectionPanel","selectedCustomerType","AO","removeCartItems","CartItems","RetailStoreItems","EnrollStoreItems","AllItems","orderItemsNotExist","autoshipItemsNotExist","packItemsNotExist","ctx_r63","ctx_r66","item_r106","ctx_r121","ctx_r126","ctx_r128","ctx_r132","item_r140","ctx_r152","ctx_r157","ctx_r159","ctx_r163","item_r175","ctx_r188","ctx_r193","ctx_r195","ctx_r199","ApplicationComponent","validateKeyword","selectedState","GetReplicatedSiteDomain","selectedLanguageCode","userType","URL","searchParams","handlePaymentMethodServices","handleProductsFetching","enrollmentForm","ApplicantAddress","billingAddressSame","setFormData","itemsForCustomerPC","itemsForCustomerIBO","_handleMembershipFee","saveFormData","_handleAOScanWithBundle","months","setSteps","slideDown","$target","slideToggle","isShowUpDown","finalStep","CurrentSection","countDefault","updateStickyCart","MatExpansionPanels","panel","retailPriceComparison","productskitStore","productsRetailPriceKit","RetailPrice","productsAutoshipStore","productsRetailPriceAutoship","productswholesaleStore","productsRetailPriceWholesale","requestForkit","requestforInitial","fetchProductsFromAllStores","promise1","promise3","AllEnrollmentKitItems","MembershipItemCode","AllProducts","_getSmartServicesItems","AoScanCode","scrollToTop","itemsForCustomerRetail","ApplicationSteps","step1","currentStep","step2","step3","step4","step5","saveApplicationDetail","Result","Errors","getShipName","clearApplicationData","is","countPaymentMethods","scrollToSection","collapseExpendSteps","isStepValidated","slideUp","stepCollapsed","required","validated","field","hasAttribute","readyForCheckout","cvv","itemList","isMembershipItemAvailable","AutoshipItemRequired","IsSubmitDisable","IsKit","autoshipEligibleItems","installmentAutoshipEligibleItems","submitApplicationRequest","AssociateID","AcceptTerms","RomanizedFirstName","RomanizedLastName","LegalFirstName","LegalLastName","TaxID","BirthDate","BirthDay","SecondaryPhone","TextNumber","AssociateTypeID","AssociateBaseType","SponsorID","WebPageURL","WebPageItemID","SendEmails","AssociateCustom","PlacementOverrides","OrderRewardPoints","AuthorizationNumber","RequireSuccess","AutoShip","UserName","OrderStatus","OrderNumber","setAttribute","cardNumberText","cardNumberIndex","cardNumber","cardAmountText","cardAmountIndex","cardAmountEndIndex","cardAmount","currencyFilter","SubmitApplicationResponse","togglePanel","getShippingTypes","statecall","isMailingAddress","zipCode","checkAddress","shipM","shipmethod","StatesResponse","states","excludedStates","StateName","StateNameToggel","getStateName","DeleteItemFromBothCarts","checkPayment","checkCvvModal","awailablereward","__awaiter","promises","_processInstallmentAutoships","autoOrders","emailaddress","customerStatus","CustomerStatus","EnrollerId","signupDate","SignupDate","primaryAddress","line1","line2","line3","Line3","city","zip","defaultShippingAddress","externalReferenceId","ExternalReferenceId","doberror","dateString","birthDate","age","m","ageError","productsSmartServices","isSmartItem","installmentEligibleItems","field5","installmentsPeriod","_hideautoshipitemcloseBtn","itemid","source","customer","MatExpansionPanel","AuthGuard","canActivate","canActivateChild","ResponseStatus","OrderHistoryResult","ResponseBase","Success","OrderInvoiceComponent","matDialogRef","modelData","getOrderDetail","OrderData","CheckValidDatePipe","datePipe","DatePipe","toISOString","checkDate","nullDate","invalidDate","OrderHistoryComponent","initOrders","ngOnChanges","viewOrderInvoice","ShipMethodsComponent","shipMethods","updateShipMethod","ShippingAddressDialogComponent","defaultAddress","getCountryState","newShipping","onClickDifferentAddress","differentAddressShow","newAddressSelected","saveNewAddress","address","isReplacement","ctx_r22","item_r18","ctx_r25","AutoshipEditComponent","getAutoshipOrderDetail","getAutoOrderDetailsByID","editingAutoship","editAutoship","isPaid","autoshipDetail","NextProcessDate","FrequencyString","bvTotal","LineItems","ItemDescription","ItemName","BVEach","BusinessVolumeEach","SmallPicture","ShortDetail","BV","listItem","selectedAutoOrderPay","setDefaultAutoshipPayment","TotalCV","editAutoshipFrequency","getAddress","addressChanged","Address1","replaceDefault","AutoshipSetting","IsShowDeleteAutoship","isAutoshipEdit","getAutoshipFrequency","getAutoshipStartDate","getShipMethodName","selectedShipMethods","selectedShipMethodName","ItemCode","editAutoshipShippingMethod","getShipMethod","editAutoshipShippingAddress","newShippingMethod","getDisplayValue","addAutoshipItem","autoshipText","autoshipChanged","placeAutoOrder","updateAutoOrder","AllowCVVModel","IsFrameReload","updateAutoOrderRequest","ManageAutoshipComponent","setAutoshipId","submitapp","TotalQuantity","showAutoship","documentElement","canAddAutoship","AllowMultipleAutoship","isEditAutoshipAddressChanged","createAutoship","ForgotPasswordComponent","apiServie","description","emailSentForgotPassword","forgotpasswordtype","selectedForgotPasswordOption","forgotPasswordData","valType","sentEmail","ShippingAddressComponent","nextStep","CompleteComponent","matDailog","userEnrollmentDetail","userDetails","Response","AutoOrderStatus","passwordLength","resetUserService_updateEnrollerInfo","goToProduct","showOrderInvoice","showAutoOrderInvoice","selectedAutoshipID","LoggedInAuthGuard","ContactComponent","domSanitizer","getCustomerSite","getRandom","reloadCaptcha","captchaRequired","captchaError","numbers","floor","random","checkCaptch","contact","contactUser","NewProspect","Rating","StageID","BackOfficeID","MobilePhone","HomePhone","WorkPhone","Notes","ImgUrl","CreatedDate","LastUpdatedDate","CommandKey","trustHtml","AboutnewComponent","BecomeADistributorComponent","serviceName","dummyName","servicecontextName","changeName","toFixed","trimValidator","control","startsWith","trimError","StarterPackCheckoutComponent","fb","CommonData","paymentDetails","formInitialization","getregion","checkoutForm","checkpassword","Validators","streetAddress1","streetAddress2","postcode","phone","confirmPassword","differentAddress","userWebalias","orderNotes","diffCountry","diffStreetAddress1","diffStreetAddress2","diffCity","diffState","diffPostcode","validators","passwordMatchValidator","loginForm","UserNameEmail","loginPassword","rememberPass","setErrors","passwordMismatch","loginUser","invalid","togglePasswordVisibility","showPassword","toggleConfirmPasswordVisibility","showConfirmPassword","toggleloginPasswordVisibility","showloginPassword","showlogint","loginDiv","controls","setValue","reset","getcategory","getItembyFilter","itemData","calculateCustomerTotalOrder","verifyUserName","checkZipValidate","customerTotalOrder","productname","productSubTotal","productShippingTotal","ShippingTotal","productTaxTotal","TaxTotal","productTotal","getMerchantId","MerchantData","addMerchantPayment","merchantId","selectionPaymentSave","getPaymentMethodIFrameAPI","onsubmitCreateCustomer","diffShipAddress","toDateString","openDiffBillAddress","valid","validatewebalias","datas","credantials","toggleDiffBillAddress","addValidators","removeValidators","form","setValidators","updateValueAndValidity","clearValidators","PagesRoutingModule","PagesModule","NgxPrintModule","FlickityModule","ApiInterceptor","HttpErrorResponse","initializeConfig","notification","MyMissingTranslationHandler","interpolateParams","Default","LowerCaseUrlSerializer","DefaultUrlSerializer","super","AppModule","bootstrap","provide","APP_BASE_HREF","useFactory","deps","HttpClient","MatDialog","multi","UrlSerializer","useClass","HTTP_INTERCEPTORS","Title","Router","CookieService","NgxSpinnerModule","HttpClientModule","TranslateLoader","HttpLoaderFactory","missingTranslationHandler","MissingTranslationHandler","TranslateHttpLoader","enableProdMode","__NgCli_bootstrap_1","bootstrapModule","webpackContext","module"],"sourceRoot":"webpack:///","sources":["./src/app/modals/userservice.modal.ts","./src/environments/environment.ts","./src/app/components/shared/services/restapi.service.ts","./src/app/components/shared/services/utility.service.ts","./src/app/components/shared/services/user.service.ts","./src/app/components/shared/services/company.service.ts","./src/app/components/shared/services/shopping-cart.service.ts","./src/app/components/shared/services/notification.service.ts","./src/app/components/shared/services/config.service.ts","./src/app/components/shared/services/persistent.service.ts","./src/app/baseUrl.ts","./src/app/components/shared/model/confirm-dialog/confirm-dialog.component.html","./src/app/components/shared/model/confirm-dialog/confirm-dialog.component.ts","./src/app/components/shared/directive/default-img.directive.ts","./src/app/components/shared/model/findenroller/findenroller.component.html","./src/app/components/shared/model/findenroller/findenroller.component.ts","./src/app/components/shared/model/market-selector/market-selector.component.html","./src/app/components/shared/model/market-selector/market-selector.component.ts","./src/app/components/shared/services/loader.service.ts","./src/app/components/shared/model/hostedpayment-dialog/hostedpayment-dialog.component.ts","./src/app/components/shared/model/hostedpayment-dialog/hostedpayment-dialog.component.html","./src/app/components/shared/pipes/Unique.pipe.ts","./src/app/components/shared/services/account.service.ts","./src/app/components/shared/services/payment.service.ts","./src/app/components/shared/services/cart.service.ts","./src/app/components/shared/services/product.service.ts","./src/app/components/shared/services/order.service.ts","./src/app/components/shop/products/product-dialog/product-dialog.component.html","./src/app/components/shop/products/product-dialog/product-dialog.component.ts","./src/app/components/shared/services/itemsList.service.ts","./src/app/components/shared/services/autoshipConfiguration.service.ts","./src/app/components/shared/services/sidenavbar.service.ts","./src/app/components/shared/services/cart1.service.ts","./src/app/components/shared/directive/ng-init.ts","./src/app/components/shared/services/regex.service.ts","./src/app/components/shared/directive/validation.directive.ts","./src/app/components/shared/sidebar-summary-cart/sidebar-summary-cart.component.html","./src/app/components/shared/sidebar-summary-cart/sidebar-summary-cart.component.ts","./src/app/components/shared/sidebar/sidebar-menu.service.ts","./src/app/components/shared/services/color-option.service.ts","./src/app/components/shared/shopping-widgets/shopping-widgets.component.ts","./src/app/components/shared/shopping-widgets/shopping-widgets.component.html","./src/app/components/shared/header/header.component.html","./src/app/components/shared/header/header.component.ts","./src/app/components/shared/footer/footer.component.html","./src/app/components/shared/footer/footer.component.ts","./src/app/components/shared/sidebar/sidebar.component.html","./src/app/components/shared/sidebar/sidebar.component.ts","./src/app/components/main/main.component.html","./src/app/components/main/main.component.ts","./src/app/components/my-loader/my-loader.component.ts","./src/app/components/my-loader/my-loader.component.html","./src/app/app.component.ts","./src/app/app.component.html","./src/app/components/shared/model/loyalty-program/loyalty-program.component.ts","./src/app/components/shared/model/loyalty-program/loyalty-program.component.html","./src/app/components/pages/home/home.component.html","./src/app/components/pages/home/home.component.ts","./src/app/app-routing.module.ts","./src/app/components/pages/flickity/flickity.component.html","./src/app/components/pages/flickity/flickity.component.ts","./src/app/components/shared/pipes/Unsafe.pipe.ts","./src/app/components/shop/products/product-details/product-details.component.html","./src/app/components/shop/products/product-details/product-details.component.ts","./src/app/components/shared/pipes/product-search.pipe.ts","./src/app/components/shared/model/variant-selection/variant-selection.component.html","./src/app/components/shared/model/variant-selection/variant-selection.component.ts","./src/app/components/shared/pipes/order-by.pipe.ts","./src/app/components/shop/products/product-no-sidebar/product-no-sidebar.component.html","./src/app/components/shop/products/product-no-sidebar/product-no-sidebar.component.ts","./src/app/components/shop/shop-routing.module.ts","./src/app/components/shared/shared.module.ts","./src/app/components/shop/shop.module.ts","./src/app/components/shared/services/interceptors/loader-interceptor.service.ts","./src/app/components/shared/pipes/add-symbol-with-number.pipe.ts","./src/app/components/shared/model/allow-cvv/allow-cvv.component.ts","./src/app/components/shared/model/allow-cvv/allow-cvv.component.html","./src/app/components/shared/pipes/payment-translate.pipe.ts","./src/app/components/shared/pipes/date-format.pipe.ts","./src/app/components/pages/checkout/checkout.component.html","./src/app/components/pages/checkout/checkout.component.ts","./src/app/components/pages/login/login.component.ts","./src/app/components/pages/login/login.component.html","./src/app/components/pages/faq/faq.component.ts","./src/app/components/pages/faq/faq.component.html","./src/app/components/pages/error-page/error-page.component.ts","./src/app/components/pages/error-page/error-page.component.html","./src/app/components/shared/services/validatekeyword.service.ts","./src/app/components/pages/signup/signup.component.ts","./src/app/components/pages/signup/signup.component.html","./src/app/components/shared/pack-carousel/pack-carousel.component.html","./src/app/components/shared/pack-carousel/pack-carousel.component.ts","./src/app/components/shared/customer-type-carousel/customer-type-carousel.component.html","./src/app/components/shared/customer-type-carousel/customer-type-carousel.component.ts","./src/app/components/pages/application/application.component.html","./src/app/components/pages/application/application.component.ts","./src/app/components/shared/services/auth.guard.service.ts","./src/app/modals/responsebase.modal.ts","./src/app/modals/orderhistory.modal.ts","./src/app/components/pages/order-invoice/order-invoice.component.html","./src/app/components/pages/order-invoice/order-invoice.component.ts","./src/app/components/shared/pipes/check-valid-date.pipe.ts","./src/app/components/pages/order-history/order-history.component.html","./src/app/components/pages/order-history/order-history.component.ts","./src/app/components/shared/model/ship-methods/ship-methods.component.html","./src/app/components/shared/model/ship-methods/ship-methods.component.ts","./src/app/components/shared/model/shipping-address-dialog/shipping-address-dialog.component.html","./src/app/components/shared/model/shipping-address-dialog/shipping-address-dialog.component.ts","./src/app/components/shared/autoship-edit/autoship-edit.component.html","./src/app/components/shared/autoship-edit/autoship-edit.component.ts","./src/app/components/pages/manage-autoship/manage-autoship.component.html","./src/app/components/pages/manage-autoship/manage-autoship.component.ts","./src/app/components/pages/forgot-password/forgot-password.component.html","./src/app/components/pages/forgot-password/forgot-password.component.ts","./src/app/components/pages/shippingaddress/shippingaddress.component.html","./src/app/components/pages/shippingaddress/shippingaddress.component.ts","./src/app/components/pages/complete/complete.component.html","./src/app/components/pages/complete/complete.component.ts","./src/app/components/shared/services/loggedin.guard.service.ts","./src/app/components/pages/contacts/contacts.component.ts","./src/app/components/pages/contacts/contacts.component.html","./src/app/components/pages/aboutnew/aboutnew.component.ts","./src/app/components/pages/aboutnew/aboutnew.component.html","./src/app/components/pages/become-a-distributor/become-a-distributor.component.html","./src/app/components/pages/become-a-distributor/become-a-distributor.component.ts","./src/app/components/pages/starter-pack-checkout/starter-pack-checkout.component.html","./src/app/components/pages/starter-pack-checkout/starter-pack-checkout.component.ts","./src/app/components/pages/pages-routing.module.ts","./src/app/components/pages/pages.module.ts","./src/app/components/shared/services/interceptors/http-interceptor.service.ts","./src/app/app.module.ts","./src/main.ts","./node_modules/moment/locale/ sync ^\\.\\/.*$"],"sourcesContent":["export interface PersonalInfo {\r\n birthDay: number;\r\n birthMonth: number;\r\n birthYear: number;\r\n phoneNumber: string;\r\n Email: string;\r\n}\r\nexport interface FreeShipping {\r\n activated: boolean;\r\n coupon: string;\r\n}\r\nexport interface CouponInfo {\r\n IsAppliedcode: boolean;\r\n promoCodeValid: boolean;\r\n promoCode: string;\r\n Allcoupons: Array;\r\n RewardsForUse: Array;\r\n FreeShipping: FreeShipping;\r\n availableRewards: Array;\r\n OrderAllowCoupons: [];\r\n}\r\nexport interface CardDetail {\r\n CardExpirationYear: number;\r\n CardExpirationMonth: number;\r\n CardNumber: string;\r\n}\r\nexport interface DynamicCouponCode {\r\n promoCode: string;\r\n}\r\nexport interface ShippingAddress {\r\n AddressId: number;\r\n City: string;\r\n CountryCode: string;\r\n PostalCode: string;\r\n Region: string;\r\n Street1: string;\r\n Street2: string;\r\n Street3: string;\r\n Phone: string;\r\n FirstName: string;\r\n LastName: string;\r\n // StateName: string;\r\n FullName: string;\r\n}\r\nexport interface WebOffice {\r\n UserName: string;\r\n Password: string;\r\n DomainName: string;\r\n ConfirmPassword: string;\r\n}\r\n\r\nexport class UserServiceModal {\r\n selectedLanguageCode: string;\r\n selectedCountry: string;\r\n WebAlias: string;\r\n customerTypeID: number;\r\n enrollerInfo: any;\r\n guestUserLogin: boolean;\r\n customerData: any;\r\n guestUserData: any;\r\n shippingAddress: ShippingAddress;\r\n mailingAddress: any;\r\n newshippingAddress: any;\r\n personalInfo: PersonalInfo;\r\n webOffice: WebOffice;\r\n couponInfo: CouponInfo;\r\n DynamicCouponCode: DynamicCouponCode;\r\n paymentMethods: Array;\r\n referralURL: string;\r\n restrictedStates: Array;\r\n restrictedShipStates: string;\r\n selectedShippingMethod: number;\r\n shippingMethods: Array;\r\n autoshipCardDetail: any;\r\n cardDetail: CardDetail;\r\n commissionPayment: any;\r\n licenseNumber: string;\r\n legName: string;\r\n enrollerId: number;\r\n sponsorId: number;\r\n doNotWishAutoship: boolean;\r\n checkItems: boolean;\r\n autologin: boolean;\r\n regionMainState: string;\r\n newUser: boolean;\r\n TotalSteps: number;\r\n noOfStepsVerified: number;\r\n defaultState: string;\r\n isAddressChanged: boolean = false;\r\n isEditAutoshipAddressChanged: boolean = false;\r\n isPaymentChanged: boolean = false;\r\n isShipMethodChanged: boolean = false;\r\n sponsorSectionPanel: boolean = true;\r\n constructor() {}\r\n}\r\n","// This file can be replaced during build by using the `fileReplacements` array.\r\n// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.\r\n// The list of file replacements can be found in `angular.json`.\r\n\r\nconst stageURL = \"https://pillarsapi.ziplingo.com/\";\r\nconst LiveURL = \"https://pillarsapi.ziplingo.com/\";\r\n\r\nexport const environment = {\r\n production: false,\r\n apiUrl: (location.host.match(/stage/) || location.hostname === \"localhost\" || location.hostname.includes('ziplingo.com')) ? stageURL : LiveURL,\r\n productUrl: (location.host.match(/stage/) || location.hostname === \"localhost\" || location.hostname.includes('ziplingo.com')) ? stageURL : LiveURL,\r\n imageUrl: \"https://ds.corpadmin.directscale.com/CMS/Images/Inventory\",\r\n linkTracking: {\r\n isAllowed: false,\r\n companyName: \"companyKey\",\r\n },\r\n};\r\n\r\n/*\r\n * For easier debugging in development mode, you can import the following file\r\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\r\n *\r\n * This import should be commented out in production mode because it will have a negative impact\r\n * on performance if an error is thrown.\r\n */\r\n// import 'zone.js/dist/zone-error'; // Included with Angular CLI.\r\n","import { Injectable } from \"@angular/core\";\r\nimport { Observable, BehaviorSubject } from \"rxjs\";\r\nimport {\r\n HttpClient,\r\n HttpHeaders,\r\n HttpParams,\r\n HttpResponse,\r\n} from \"@angular/common/http\";\r\nimport { throwError } from \"rxjs/internal/observable/throwError\";\r\nimport { retry, catchError, tap } from \"rxjs/internal/operators\";\r\nimport { environment } from \"src/environments/environment\";\r\nimport { Enrollment } from \"src/app/modals/enrollment.model\";\r\nimport { FindEnrollerResponse } from \"src/app/modals/findenroller.modal\";\r\nimport { GetWebSiteInformationResult } from \"src/app/modals/getwebsiteinfo.modal\";\r\nimport { CookieService } from \"ngx-cookie-service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class RestApiService {\r\n public loginStatus = new BehaviorSubject(this.hasToken());\r\n constructor(\r\n private http: HttpClient,\r\n private cookieService: CookieService,\r\n ) {\r\n this.getheaders();\r\n }\r\n\r\n getheaders(): any {\r\n let httpOptions: any;\r\n if (this.cookieService.get(\"X-Auth\")) {\r\n httpOptions = {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n Authorization: \"Bearer \" + this.cookieService.get(\"X-Auth\"),\r\n }),\r\n };\r\n } else {\r\n httpOptions = {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n };\r\n }\r\n return httpOptions;\r\n }\r\n // Error handling\r\n handleError(error) {\r\n let errorMessage = \"\";\r\n if (error.error instanceof ErrorEvent) {\r\n // Get client-side error\r\n errorMessage = error.error.message;\r\n } else {\r\n // Get server-side error\r\n errorMessage = `Error Code: ${error.status}\\nMessage: ${error.message}`;\r\n }\r\n // window.alert(errorMessage);\r\n return throwError(errorMessage);\r\n }\r\n\r\n isLoggedIn(): Observable {\r\n return this.loginStatus.asObservable();\r\n }\r\n private hasToken(): boolean {\r\n return this.cookieService.check(\"X-Auth\");\r\n }\r\n // Address Controller\r\n getActiveCountries(): Observable {\r\n if (sessionStorage.getItem(\"allowedCountries\")) {\r\n const a = JSON.parse(sessionStorage.getItem(\"allowedCountries\"));\r\n return a;\r\n } else {\r\n const response = this.http\r\n .get(\r\n `${environment.apiUrl}api/Address/GetActiveCountries`,\r\n this.getheaders(),\r\n )\r\n .pipe(catchError(this.handleError));\r\n return response;\r\n }\r\n }\r\n\r\n getRegionID(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Address/GetRegionID`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n getStates(countryCode: string): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Address/GetStates?countryCode=${countryCode}`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n // Company Controller\r\n getCompanyDetails(): Observable {\r\n return this.http\r\n .get(`${environment.apiUrl}api/Company/Details`, this.getheaders())\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n postCustomData(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Custom/PostCustomData`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n postCustomDatatoExtension(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Custom/PostCustomDatatoExtension`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n // Customers Controller\r\n\r\n addCustomerRewardPoints(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Customers/AddCustomerRewardPoints`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n calculateCustomerOrderTotal(request): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Customers/CalculateCustomerOrderTotal`,\r\n JSON.stringify(request),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n createProspect(request): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/DiscoApi/CreateProspect`,\r\n JSON.stringify(request),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n createCustomer(request: any): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Customers/CreateCustomer`,\r\n JSON.stringify(request),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n createCustomerAutoshipOrder(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Customers/CreateCustomerAutoshipOrder`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n createCustomerOrder(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Customers/CreateCustomerOrder`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n createCustomerOrderAndAutoship(request: any): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Orders/CreateOrderAutoOrder`,\r\n JSON.stringify(request),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n createCustomerServiceLogEntry(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Customers/CreateCustomerServiceLogEntry`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n createPaymentMethod(request): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Customers/CreatePaymentMethod`,\r\n JSON.stringify(request),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n deductCustomerRewardPoints(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/DeductCustomerRewardPoints`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n deleteCustomerAutoship(autoshipid: any): Observable {\r\n const requestquery = this.getheaders();\r\n requestquery[\"params\"] = new HttpParams({\r\n fromString: \"autoshipId=\" + autoshipid,\r\n });\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/DeleteAutoship`,\r\n requestquery,\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n deleteCustomer(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/DeleteCustomer`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n deletePaymentMethod(request: any): Observable {\r\n const requestquery = this.getheaders();\r\n requestquery[\"params\"] = new HttpParams({ fromObject: request });\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Customers/DeletePaymentMethod`,\r\n \"\",\r\n requestquery,\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomer(customerID?: any): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomer?customerId=${customerID}`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n getSearchCustomerDetail(customerID: number): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetSearchCustomerDetail?customerId=${customerID}`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerAutoships(customerID?): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerAutoships?customerId=${customerID}&includeServiceAutoships=true`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerCountries(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerCountries`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerCustomFields(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerCustomFields`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerDownlineIds(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerDownlineIds`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerIDs(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerIDs`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerIDsbyFilter(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerIDsbyFilter`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerOrders(customerId): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerOrders?customerId=${customerId}`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerOrderDetail(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerOrderDetail`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerParties(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerParties`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerPartyTotals(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerPartyTotals`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerRewardPoints(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerRewardPoints`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerSavedPaymentMethods(request: any): Observable {\r\n const requestquery = this.getheaders();\r\n requestquery[\"params\"] = new HttpParams({ fromObject: request });\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerSavedPaymentMethods`,\r\n requestquery,\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerServices(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerServices`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerStats(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomerStats`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomersByParameter(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomersByParameter`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomersDataPoints(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Customers/GetCustomersDataPoints`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomersToPlaceTo(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetCustomersToPlaceTo`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getDataPointCategories(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetDataPointCategories`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getNotificationEvents(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetNotificationEvents`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getPaymentMerchants(request): Observable {\r\n const requestquery = this.getheaders();\r\n requestquery[\"params\"] = new HttpParams({ fromObject: request });\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetPaymentMerchants`,\r\n requestquery,\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getPaymentMethodIFrame(request): Observable {\r\n const requestquery = this.getheaders();\r\n requestquery[\"params\"] = new HttpParams({ fromObject: request });\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetPaymentMethodIFrame`,\r\n requestquery,\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getPaymentMethodIFrameTempUser(request): Observable {\r\n const requestquery = this.getheaders();\r\n requestquery[\"params\"] = new HttpParams({ fromObject: request });\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetPaymentMethodIFrameTempUser`,\r\n requestquery,\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getUnplacedCustomers(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetUnplacedCustomers`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getWebsiteInformation_V1(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetWebsiteInformation_V1`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getWebsiteInformation(Webalias): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetWebsiteInformation?webAlias=${Webalias}`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n placeNode(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/PlaceNode`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n resetPassword(): Observable {\r\n return this.http\r\n .put(\r\n `${environment.apiUrl}api/Customers/ResetPassword`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n searchAssociate(req: any): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/SearchAssociate?searchTerm=${req.searchTerm}&includeWebAliases=${req.includeWebAliases}`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n submitEnrollmentForm(request: any): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Customers/SubmitEnrollmentForm`,\r\n JSON.stringify(request),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n updateAutoShipDateandAmount(): Observable {\r\n return this.http\r\n .put(\r\n `${environment.apiUrl}api/Customers/UpdateAutoShipDateandAmount`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n updateCustomer(): Observable {\r\n return this.http\r\n .put(\r\n `${environment.apiUrl}api/Customers/UpdateCustomer`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n updateCustomerByParameter(): Observable {\r\n return this.http\r\n .patch(\r\n `${environment.apiUrl}/api/Customers/UpdateCustomerByParameter`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n usernameAvailabilityCheck(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Customers/UsernameAvailabilityCheck`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n sendWelComeEmail(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Customers/SendWelComeEmail`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n // Echo Controller\r\n\r\n ping(): Observable {\r\n return this.http\r\n .get(`${environment.apiUrl}api/Echo/Ping`, this.getheaders())\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n pingDeep(): Observable {\r\n return this.http\r\n .get(`${environment.apiUrl}api/Echo/PingDeep`, this.getheaders())\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n // Office Controller\r\n\r\n getMediaResources(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Office/GetMediaResources`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getNotificationSettings(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Office/GetNotificationSettings`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getTrainingDetailsandProgress(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Office/GetTrainingDetailsandProgress`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n triggerForgotPasswordProcess(request): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Office/TriggerForgotPasswordProcess`,\r\n JSON.stringify(request),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n // Orders Controller\r\n\r\n cancelOrder(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Orders/CancelOrder`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n deleteAutoship(autoshipid: number): Observable {\r\n const requestquery = this.getheaders();\r\n requestquery[\"params\"] = new HttpParams({\r\n fromString: \"autoshipId=\" + autoshipid,\r\n });\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Orders/DeleteAutoship`,\r\n \"\",\r\n requestquery,\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n enqueueStats(): Observable {\r\n return this.http\r\n .put(\r\n `${environment.apiUrl}api/Orders/EnqueueStats`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n getAutoship(autoorderid): Observable {\r\n const requestquery = this.getheaders();\r\n requestquery[\"params\"] = new HttpParams({\r\n fromString: \"autoshipId=\" + autoorderid,\r\n });\r\n return this.http\r\n .get(`${environment.apiUrl}api/Orders/GetAutoship`, requestquery)\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n getOrder(orderId: number): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Orders/GetOrder?orderId=${orderId}`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getOrderIds(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Orders/GetOrderIds`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getOrderIdsFilter(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Orders/GetOrderIdsFilter`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getOrderPackageDetails(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Orders/GetOrderPackageDetails`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getOrderRMAs(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Orders/GetOrderRMAs`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getOrderType(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Orders/GetOrderType`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getOrderTypes(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Orders/GetOrderTypes`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getPriceGroup(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Orders/GetPriceGroup`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getPriceGroups(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Orders/GetPriceGroups`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getShippingMethod(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Orders/GetShippingMethod`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getShippingMethods(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Orders/GetShippingMethods`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getUnshippedPackages_Deprecated(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Orders/GetUnshippedPackages_Deprecated`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n importExternalOrder(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Orders/ImportExternalOrder`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n insertPayments(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Orders/InsertPayments`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n refundPayment(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Orders/RefundPayment`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n sendOrderReceipt(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Orders/SendOrderReceipt`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n setOrderShipped_Deprecated(): Observable {\r\n return this.http\r\n .put(\r\n `${environment.apiUrl}api/Orders/SetOrderShipped_Deprecated`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n setPackageReturned_Deprecated(): Observable {\r\n return this.http\r\n .put(\r\n `${environment.apiUrl}api/Orders/SetPackageReturned_Deprecated`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n setPackageShipped_Deprecated(): Observable {\r\n return this.http\r\n .put(\r\n `${environment.apiUrl}api/Orders/SetPackageShipped_Deprecated`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n splitPackage(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Orders/SplitPackage`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n updateAutoship(autoshipid: number, request: any): Observable {\r\n return this.http\r\n .put(\r\n `${environment.apiUrl}api/Orders/UpdateAutoship/${autoshipid}`,\r\n JSON.stringify(request),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n updatePackageStatus(): Observable {\r\n return this.http\r\n .put(\r\n `${environment.apiUrl}api/Orders/UpdatePackageStatus`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n updatePackageStatusBatch(): Observable {\r\n return this.http\r\n .put(\r\n `${environment.apiUrl}api/Orders/UpdatePackageStatusBatch`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n // Products Controller\r\n\r\n deleteItem(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Products/DeleteItem`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getItembyId(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Products/GetItembyId`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getItembySKU(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Products/GetItembySKU`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getItems(): Observable {\r\n return this.http\r\n .get(`${environment.apiUrl}api/Products/GetItems`, this.getheaders())\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getItemsbyFilter(request: any): Observable {\r\n const getItemsrequest = this.getheaders();\r\n getItemsrequest[\"params\"] = new HttpParams({ fromObject: request });\r\n return this.http\r\n .get(\r\n `${environment.productUrl}api/Products/GetItemsByFilter`,\r\n getItemsrequest,\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getRegions(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Products/GetRegions`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getStockLevel(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Products/GetStockLevel`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getStores(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Products/GetStores`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getSubCategories(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Products/GetSubCategories`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getWarehouses(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Products/GetWarehouses`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getTopSellingProducts(request: any): Observable {\r\n const getTopSellingrequest = this.getheaders();\r\n getTopSellingrequest[\"params\"] = new HttpParams({ fromObject: request });\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Products/GetTopSellingProducts`,\r\n getTopSellingrequest,\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n updateStockLevel(): Observable {\r\n return this.http\r\n .put(\r\n `${environment.apiUrl}api/Products/UpdateStockLevel`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n // RMAs Controller\r\n\r\n createRMA(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/RMAs/CreateRMA`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n deleteRMA(): Observable {\r\n return this.http\r\n .get(`${environment.apiUrl}api/RMAs/DeleteRMA`, this.getheaders())\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n getRMA(): Observable {\r\n return this.http\r\n .get(`${environment.apiUrl}api/RMAs/GetRMA`, this.getheaders())\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getRMAs(): Observable {\r\n return this.http\r\n .get(`${environment.apiUrl}api/RMAs/GetRMAs`, this.getheaders())\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n markRMAReceived(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/RMAs/MarkRMAReceived`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n markRMAShipped(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/RMAs/MarkRMAShipped`,\r\n JSON.stringify({}),\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n // SSO Controller\r\n\r\n getCustomerBySSOToken(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/SSO/GetCustomerBySSOToken`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getAdminBySSOToken(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/SSO/GetAdminBySSOToken`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerSSOURL(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/SSO/GetCustomerSSOURL`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCustomerSSOURLByExternalId(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/SSO/GetCustomerSSOURLByExternalId`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n // Utilities Controller\r\n\r\n clearCache(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Utilities/ClearCache`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getError(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Utilities/GetError`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getStatus(): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Utilities/GetStatus`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n // Validate Controller\r\n validateEmailAddress(request): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Validate/EmailAddress?EmailAddress=${request.EmailAddress}`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n Login(request: any): Observable> {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Validate/Login`,\r\n JSON.stringify(request),\r\n {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n observe: \"response\",\r\n },\r\n )\r\n .pipe(\r\n retry(1),\r\n tap((resp: HttpResponse) => {\r\n if (resp.headers && resp.headers.get(\"X-Auth\")) {\r\n this.cookieService.set(\r\n \"X-Auth\",\r\n resp.headers.get(\"X-Auth\"),\r\n null,\r\n \"/\",\r\n );\r\n this.getheaders();\r\n }\r\n return resp;\r\n }),\r\n catchError(this.handleError),\r\n );\r\n }\r\n\r\n Logout(): Observable {\r\n return this.http\r\n .post(\r\n `${environment.apiUrl}api/Validate/Logout`,\r\n \"\",\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n validateTaxId(taxId: string) {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Validate/TaxId?taxId=${taxId}`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n validateUsername(username: string): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Validate/Username?username=${username}`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n validateWebAlias(webAlias: string) {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Validate/WebAlias?webAlias=${webAlias}`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n getCompanyCountryLanguages() {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Common/GetCompanyCountryLanguages`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n\r\n GetCategories(storeId: any): Observable {\r\n return this.http\r\n .get(\r\n `${environment.apiUrl}api/Products/GetCategories?storeId=${storeId}`,\r\n this.getheaders(),\r\n )\r\n .pipe(retry(1), catchError(this.handleError));\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { HttpClient, HttpHeaders } from \"@angular/common/http\";\r\nimport * as moment from \"moment\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport * as _ from \"lodash\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class UtilityService {\r\n constructor(\r\n public route: ActivatedRoute,\r\n public http: HttpClient,\r\n ) {}\r\n isPackMultipleQuantity = true;\r\n isShowSimplifiedheader = false;\r\n // /**\r\n // *Get utility\r\n // * @method birthDays\r\n // * @method birthYears\r\n // * @method birthMonths\r\n // * @method getSortKey\r\n // */\r\n birthDays(BirthYear?: number, BirthMonth?: number) {\r\n const year = BirthYear ? Number(BirthYear) : moment().year() - 18;\r\n const month = BirthMonth ? Number(BirthMonth) : Number(\"01\");\r\n const num = new Date(year, month, 0).getDate();\r\n let i;\r\n const days = [];\r\n for (i = 1; i <= num; i++) {\r\n if (String(i).length === 1) {\r\n days.push(\"0\" + String(i));\r\n } else {\r\n days.push(String(i));\r\n }\r\n }\r\n return days;\r\n }\r\n\r\n birthYears() {\r\n let years = [];\r\n const currentyear = moment().year();\r\n\r\n for (let i = currentyear - 100; i <= currentyear - 18; i++) {\r\n years.push({ text: String(i), value: String(i) });\r\n }\r\n\r\n years = years.reverse();\r\n return years;\r\n }\r\n\r\n birthMonths() {\r\n const months = [\r\n { text: \"January\", value: \"01\" },\r\n { text: \"February\", value: \"02\" },\r\n { text: \"March\", value: \"03\" },\r\n { text: \"April\", value: \"04\" },\r\n { text: \"May\", value: \"05\" },\r\n { text: \"June\", value: \"06\" },\r\n { text: \"July\", value: \"07\" },\r\n { text: \"August\", value: \"08\" },\r\n { text: \"September\", value: \"09\" },\r\n { text: \"October\", value: \"10\" },\r\n { text: \"November\", value: \"11\" },\r\n { text: \"December\", value: \"12\" },\r\n ];\r\n return months;\r\n }\r\n\r\n getSortKey() {\r\n return [\r\n {\r\n id: 1,\r\n name: \"item_name\",\r\n lname: \"A-Z\",\r\n sortby: \"ProductName\",\r\n sorttype: \"desc\",\r\n },\r\n {\r\n id: 2,\r\n name: \"item_name\",\r\n lname: \"Z-A\",\r\n sortby: \"ProductName\",\r\n sorttype: \"asc\",\r\n },\r\n {\r\n id: 3,\r\n name: \"global_qv\",\r\n lname: \"high_to_low\",\r\n sortby: \"QV\",\r\n sorttype: \"asc\",\r\n },\r\n {\r\n id: 4,\r\n name: \"global_qv\",\r\n lname: \"low_to_high\",\r\n sortby: \"QV\",\r\n sorttype: \"desc\",\r\n },\r\n {\r\n id: 5,\r\n name: \"price\",\r\n lname: \"high_to_low\",\r\n sortby: \"Price\",\r\n sorttype: \"asc\",\r\n },\r\n {\r\n id: 6,\r\n name: \"price\",\r\n lname: \"low_to_high\",\r\n sortby: \"Price\",\r\n sorttype: \"desc\",\r\n },\r\n ];\r\n }\r\n\r\n getParameterByName(name, url) {\r\n if (!url) {\r\n url = window.location.href;\r\n }\r\n name = name.replace(/[\\[\\]]/g, \"\\\\$&\"); /*eslint no-useless-escape:0*/\r\n const regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\"),\r\n results = regex.exec(url);\r\n if (!results) {\r\n return null;\r\n }\r\n if (!results[2]) {\r\n return \"\";\r\n }\r\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\r\n }\r\n getDefaultTranslation(translated, key, defaultValue) {\r\n if (translated == key) {\r\n return defaultValue;\r\n } else {\r\n return translated;\r\n }\r\n }\r\n getQueryParam(param) {\r\n if (param != null) {\r\n const search = this.route.snapshot.queryParams;\r\n if (Object.keys(search).length > 0) {\r\n const newObject = {};\r\n _.each(search, (value, key) => {\r\n newObject[key.toLowerCase()] = value;\r\n });\r\n return newObject[param.toLowerCase()] || \"\";\r\n } else {\r\n return null;\r\n }\r\n }\r\n }\r\n getQueryParamKey(param) {\r\n if (param != null) {\r\n const search = this.route.snapshot.queryParams;\r\n if (Object.keys(search).length > 0) {\r\n let parmKey;\r\n _.each(search, (value, key) => {\r\n if (key.toLowerCase() == param.toLowerCase()) {\r\n parmKey = key;\r\n }\r\n });\r\n return parmKey;\r\n } else {\r\n return null;\r\n }\r\n }\r\n }\r\n isEmptyObject(obj) {\r\n return obj && Object.keys(obj).length === 0;\r\n }\r\n getRegionID(countryCode: string) {\r\n if (!localStorage.getItem(\"CommonSettings\")) {\r\n this.http\r\n .get(\"assets/data/clientsetting.json\", {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n withCredentials: true,\r\n })\r\n .subscribe(\r\n (data) => {\r\n const data1 = _.filter(data.Regions, (region) => {\r\n return region.CountryList.some((country) => {\r\n return (\r\n country.CountryCode.toLowerCase() == countryCode.toLowerCase()\r\n );\r\n });\r\n });\r\n if (data1.length > 0) {\r\n return data1[0].ID;\r\n } else {\r\n return 1;\r\n }\r\n },\r\n () => {\r\n return 1;\r\n },\r\n () => {\r\n return 1;\r\n },\r\n );\r\n } else {\r\n const regionsData = JSON.parse(localStorage.getItem(\"CommonSettings\"));\r\n const data1 = _.filter(regionsData.Regions, (region) => {\r\n return region.CountryList.some((country) => {\r\n return country.CountryCode.toLowerCase() == countryCode.toLowerCase();\r\n });\r\n });\r\n if (data1.length > 0) {\r\n return data1[0].ID;\r\n } else {\r\n return 1;\r\n }\r\n }\r\n }\r\n setAutoshipEditFlag(value) {\r\n localStorage.setItem(\"isEditAutoshipFlag\", value);\r\n }\r\n\r\n getAutoshipEditFlag() {\r\n return localStorage.getItem(\"isEditAutoshipFlag\") == \"true\" ? true : false;\r\n }\r\n showSimplifiedheader(value = false) {\r\n this.isShowSimplifiedheader = value;\r\n }\r\n isEnrollment() {\r\n return !!JSON.parse(sessionStorage.getItem(\"IsEnrollment\"));\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { cloneDeep } from \"lodash\";\r\nimport * as moment from \"moment\";\r\nimport { CookieService } from \"ngx-cookie-service\";\r\nimport { BehaviorSubject, Observable, Subscriber } from \"rxjs\";\r\nimport {\r\n UserServiceModal,\r\n PersonalInfo,\r\n WebOffice,\r\n ShippingAddress,\r\n} from \"src/app/modals/userservice.modal\";\r\nimport { RestApiService } from \"./restapi.service\";\r\nimport { UtilityService } from \"./utility.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class UserService {\r\n // Called after the constructor, initializing input properties, and the first call to ngOnChanges.\r\n // Add 'implements OnInit' to the class.\r\n isLoggedIn: Observable;\r\n public webalias = JSON.parse(localStorage.getItem(\"CommonSettings\"))\r\n ?.DefaultWebalias;\r\n public userServiceModal: UserServiceModal;\r\n public userServiceSubject: BehaviorSubject;\r\n public userServiceSubscriber: Subscriber;\r\n constructor(\r\n public activatedRoute: ActivatedRoute,\r\n public apiService: RestApiService,\r\n public utilityService: UtilityService,\r\n public cookieService: CookieService,\r\n ) {\r\n this.userServiceModal = new UserServiceModal();\r\n this.isLoggedIn = this.apiService.isLoggedIn();\r\n this.isLoggedIn.subscribe(() => {});\r\n }\r\n public service: any = {};\r\n DefaultCustomerType = 2;\r\n dummyName = \"Abhishek\";\r\n\r\n /** * init * @method init */\r\n public init(): void {\r\n if (localStorage.getItem(\"userService\")) {\r\n this.service = JSON.parse(\r\n localStorage.getItem(\"userService\"),\r\n ) as UserServiceModal;\r\n this.userServiceModal.customerTypeID =\r\n parseInt(this.activatedRoute.snapshot.queryParams.type, 10) ||\r\n this.service.customerTypeID ||\r\n this.DefaultCustomerType;\r\n this.userServiceModal.enrollerInfo = this.service.enrollerInfo || {};\r\n this.userServiceModal.guestUserLogin =\r\n this.service.guestUserLogin || false;\r\n this.userServiceModal.customerData = this.service.customerData || {};\r\n this.userServiceModal.guestUserData = this.service.guestUserData || {};\r\n this.userServiceModal.shippingAddress =\r\n this.service.shippingAddress || {};\r\n this.userServiceModal.mailingAddress = this.service.mailingAddress || {};\r\n this.userServiceModal.newshippingAddress =\r\n this.service.newshippingAddress || {};\r\n this.userServiceModal.personalInfo =\r\n this.service.personalInfo || ({} as PersonalInfo);\r\n this.userServiceModal.personalInfo.birthDay =\r\n this.service.personalInfo?.birthDay || \"01\";\r\n this.userServiceModal.personalInfo.birthMonth =\r\n this.service.personalInfo.birthMonth || \"01\";\r\n this.userServiceModal.personalInfo.birthYear =\r\n this.service.personalInfo.birthYear ||\r\n (moment().year() - 18).toString();\r\n this.userServiceModal.personalInfo.phoneNumber =\r\n this.service.personalInfo.phoneNumber || {};\r\n this.userServiceModal.webOffice = this.service.webOffice || {};\r\n this.userServiceModal.couponInfo = this.service.couponInfo || {};\r\n this.userServiceModal.DynamicCouponCode =\r\n this.service.DynamicCouponCode || {};\r\n this.userServiceModal.couponInfo.IsAppliedcode =\r\n this.service.couponInfo?.IsAppliedcode || false;\r\n this.userServiceModal.paymentMethods = this.service.paymentMethods || [];\r\n this.userServiceModal.referralURL =\r\n this.activatedRoute.snapshot.queryParams.ref;\r\n this.userServiceModal.restrictedStates =\r\n this.service.restrictedStates || [];\r\n this.userServiceModal.restrictedShipStates =\r\n this.service.restrictedShipStates || \"\";\r\n this.userServiceModal.selectedShippingMethod =\r\n this.service.selectedShippingMethod || 0;\r\n this.userServiceModal.shippingMethods =\r\n this.service.shippingMethods || [];\r\n this.userServiceModal.autoshipCardDetail =\r\n this.service.autoshipCardDetail || {};\r\n this.userServiceModal.cardDetail = this.service.cardDetail || {};\r\n this.userServiceModal.commissionPayment =\r\n this.service.commissionPayment || \"\";\r\n this.userServiceModal.licenseNumber = this.service.licenseNumber || \"\";\r\n this.userServiceModal.legName =\r\n this.activatedRoute.snapshot.queryParams.legName;\r\n this.userServiceModal.enrollerId =\r\n Number(\r\n this.activatedRoute.snapshot.queryParams.enrollerId ||\r\n this.service.enrollerId,\r\n ) || 0;\r\n this.userServiceModal.sponsorId =\r\n Number(\r\n this.activatedRoute.snapshot.queryParams.sponsorId ||\r\n this.service.sponsorId,\r\n ) || 0;\r\n this.userServiceModal.doNotWishAutoship =\r\n this.service.doNotWishAutoship || false;\r\n this.userServiceModal.checkItems = this.service.checkItems || false;\r\n this.userServiceModal.autologin =\r\n this.service.autologin ||\r\n this.activatedRoute.snapshot.queryParams.autologin ||\r\n false;\r\n this.userServiceModal.regionMainState =\r\n this.service.regionMainState || \"\";\r\n this.userServiceModal.newUser = this.service.newUser || false;\r\n this.userServiceModal.TotalSteps = 6;\r\n this.userServiceModal.noOfStepsVerified =\r\n this.service.noOfStepsVerified || 0;\r\n this.userServiceModal.couponInfo.availableRewards =\r\n this.service.couponInfo.availableRewards || [];\r\n // this.userServiceModal.selectedLanguageCode = this.activatedRoute.snapshot.queryParams.LanguageCode || this.service.selectedLanguageCode || 'en';\r\n // this.userServiceModal.selectedCountry = this.userServiceModal.selectedCountry || this.activatedRoute.snapshot.queryParams.countrycode || 'US';\r\n this.userServiceModal.WebAlias =\r\n this.userServiceModal.WebAlias || this.webalias;\r\n } else {\r\n this.setDefault();\r\n }\r\n }\r\n\r\n /*** clear Data of application * @method clearData ***/\r\n public clearData() {\r\n localStorage.removeItem(\"userService\");\r\n this.service = {};\r\n this.init();\r\n }\r\n\r\n public clearCustomerData() {\r\n this.userServiceModal.customerData = {};\r\n }\r\n\r\n public setEnrollerInfo(websiteinfo) {\r\n this.userServiceModal.enrollerInfo = websiteinfo;\r\n localStorage.setItem(\"userService\", JSON.stringify(this.userServiceModal));\r\n }\r\n /** * Set Default * @method setDefault */\r\n public setDefault() {\r\n this.userServiceModal.customerTypeID =\r\n parseInt(this.activatedRoute.snapshot.queryParams.type, 10) ||\r\n this.service.customerTypeID ||\r\n this.DefaultCustomerType;\r\n this.userServiceModal.enrollerInfo = {};\r\n this.userServiceModal.guestUserLogin = false;\r\n this.userServiceModal.shippingAddress = {} as ShippingAddress;\r\n this.userServiceModal.mailingAddress = {};\r\n this.userServiceModal.newshippingAddress = {};\r\n this.userServiceModal.personalInfo = {\r\n birthDay: 1,\r\n birthMonth: 1,\r\n birthYear: Number((moment().year() - 18).toString()),\r\n phoneNumber: \"\",\r\n Email: \"\",\r\n };\r\n this.userServiceModal.webOffice = {} as WebOffice;\r\n this.userServiceModal.paymentMethods = [];\r\n this.userServiceModal.referralURL =\r\n this.activatedRoute.snapshot.queryParams.ref;\r\n this.userServiceModal.autoshipCardDetail = {};\r\n this.userServiceModal.cardDetail = {\r\n CardExpirationYear: new Date().getFullYear(),\r\n CardExpirationMonth: new Date().getMonth() + 1,\r\n CardNumber: \"\",\r\n };\r\n this.userServiceModal.commissionPayment = \"\";\r\n this.userServiceModal.licenseNumber = \"\";\r\n this.userServiceModal.legName =\r\n this.activatedRoute.snapshot.queryParams.legName;\r\n this.userServiceModal.enrollerId =\r\n Number(this.activatedRoute.snapshot.queryParams.enrollerId) || 0;\r\n this.userServiceModal.sponsorId =\r\n Number(this.activatedRoute.snapshot.queryParams.sponsorId) || 0;\r\n this.userServiceModal.doNotWishAutoship = false;\r\n this.userServiceModal.defaultState = \"\";\r\n this.userServiceModal.couponInfo = {\r\n IsAppliedcode: false,\r\n promoCodeValid: undefined,\r\n promoCode: \"\",\r\n Allcoupons: [],\r\n RewardsForUse: [],\r\n FreeShipping: {\r\n activated: false,\r\n coupon: undefined,\r\n },\r\n availableRewards: [],\r\n OrderAllowCoupons: [],\r\n };\r\n // this.userServiceModal.autoshipDate = moment().add(1, 'months').toDate();\r\n this.userServiceModal.customerData = {};\r\n this.userServiceModal.guestUserData = {};\r\n this.userServiceModal.restrictedShipStates = \"\";\r\n this.userServiceModal.restrictedStates = [];\r\n this.userServiceModal.selectedShippingMethod = 0;\r\n this.userServiceModal.shippingMethods = [];\r\n this.userServiceModal.checkItems = false;\r\n this.userServiceModal.autologin =\r\n this.activatedRoute.snapshot.queryParams.autologin || false;\r\n this.userServiceModal.regionMainState = \"\";\r\n this.userServiceModal.newUser = false;\r\n this.userServiceModal.TotalSteps = 6;\r\n this.userServiceModal.noOfStepsVerified = 0;\r\n this.userServiceModal.WebAlias = this.webalias;\r\n localStorage.setItem(\"userService\", JSON.stringify(this.userServiceModal));\r\n }\r\n\r\n /**\r\n * set user shipping address\r\n * @method setShippingAddress\r\n */\r\n public setShippingAddress() {\r\n this.userServiceModal.shippingAddress =\r\n this.userServiceModal.shippingAddress ||\r\n cloneDeep(this.userServiceModal.customerData?.PrimaryAddress);\r\n this.userServiceModal.shippingAddress.FullName =\r\n (this.userServiceModal.shippingAddress.FirstName ||\r\n this.userServiceModal.customerData.FirstName) +\r\n (this.userServiceModal.shippingAddress.LastName ||\r\n this.userServiceModal.customerData.LastName);\r\n this.userServiceModal.shippingAddress.FirstName =\r\n this.userServiceModal.shippingAddress.FirstName ||\r\n this.userServiceModal.customerData.FirstName;\r\n this.userServiceModal.shippingAddress.LastName =\r\n this.userServiceModal.shippingAddress.LastName ||\r\n this.userServiceModal.customerData.LastName;\r\n this.userServiceModal.shippingAddress.Street1 =\r\n this.userServiceModal.shippingAddress.Street1 ||\r\n (!this.utilityService.isEmptyObject(\r\n this.userServiceModal.customerData?.DefaultShippingAddress,\r\n )\r\n ? this.userServiceModal.customerData?.DefaultShippingAddress?.Street1\r\n : \"\");\r\n this.userServiceModal.shippingAddress.Street2 =\r\n this.userServiceModal.shippingAddress.Street2 ||\r\n (!this.utilityService.isEmptyObject(\r\n this.userServiceModal.customerData?.DefaultShippingAddress,\r\n )\r\n ? this.userServiceModal.customerData?.DefaultShippingAddress?.Street2\r\n : \"\");\r\n this.userServiceModal.shippingAddress.Street3 =\r\n this.userServiceModal.shippingAddress.Street3 ||\r\n (!this.utilityService.isEmptyObject(\r\n this.userServiceModal.customerData?.DefaultShippingAddress,\r\n )\r\n ? this.userServiceModal.customerData?.DefaultShippingAddress?.Street3\r\n : \"\");\r\n this.userServiceModal.shippingAddress.Region =\r\n this.userServiceModal.shippingAddress.Region ||\r\n (!this.utilityService.isEmptyObject(\r\n this.userServiceModal.customerData?.DefaultShippingAddress,\r\n )\r\n ? this.userServiceModal.customerData?.DefaultShippingAddress?.Region\r\n : \"\");\r\n this.userServiceModal.shippingAddress.PostalCode =\r\n this.userServiceModal.shippingAddress.PostalCode ||\r\n (!this.utilityService.isEmptyObject(\r\n this.userServiceModal.customerData?.DefaultShippingAddress,\r\n )\r\n ? this.userServiceModal.customerData?.DefaultShippingAddress?.PostalCode\r\n : \"\");\r\n this.userServiceModal.shippingAddress.CountryCode =\r\n this.userServiceModal.shippingAddress.CountryCode ||\r\n (!this.utilityService.isEmptyObject(\r\n this.userServiceModal.customerData?.DefaultShippingAddress,\r\n )\r\n ? this.userServiceModal.customerData?.DefaultShippingAddress?.CountryCode\r\n : \"\");\r\n this.userServiceModal.shippingAddress.City =\r\n this.userServiceModal.shippingAddress.City ||\r\n (!this.utilityService.isEmptyObject(\r\n this.userServiceModal.customerData?.DefaultShippingAddress,\r\n )\r\n ? this.userServiceModal.customerData?.DefaultShippingAddress?.City\r\n : \"\");\r\n this.userServiceModal.shippingAddress.Phone =\r\n this.userServiceModal.shippingAddress.Phone ||\r\n (!this.utilityService.isEmptyObject(\r\n this.userServiceModal.customerData?.DefaultShippingAddress,\r\n )\r\n ? this.userServiceModal.customerData?.DefaultShippingAddress?.Phone\r\n : \"\");\r\n }\r\n\r\n // Check if User is Authenticated Or not\r\n public checkIfUserAuthenticatedOrNot(): boolean {\r\n return this.cookieService.check(\"X-Auth\");\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { HttpClient, HttpHeaders } from \"@angular/common/http\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport * as _ from \"lodash\";\r\nimport { Currency } from \"src/app/modals/currency.modal\";\r\nimport { UserService } from \"./user.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class CompanyService {\r\n public defaultCurrency = {\r\n CurrencyCode: \"USD\",\r\n DecimalLength: 2,\r\n Description: \"United States Dollar\",\r\n ExchangeRate: 1,\r\n Symbol: \"$\",\r\n } as Currency;\r\n public selectedCurrency: Currency;\r\n constructor(\r\n public route: ActivatedRoute,\r\n public http: HttpClient,\r\n public userService: UserService,\r\n ) {\r\n const selectedCountry = sessionStorage.getItem(\"selectedCountry\") || \"us\";\r\n this.setCurrencyDetail(selectedCountry);\r\n }\r\n getRegionIDbyPromise(countryCode: string) {\r\n const promise = new Promise((resolve, reject) => {\r\n if (!localStorage.getItem(\"CommonSettings\")) {\r\n this.http\r\n .get(\"assets/data/clientsetting.json\", {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n withCredentials: true,\r\n })\r\n .subscribe(\r\n (data) => {\r\n const data1 = _.filter(data.Regions, (region) => {\r\n return region.CountryList.some((country) => {\r\n return (\r\n country.CountryCode?.toLowerCase() ==\r\n countryCode?.toLowerCase()\r\n );\r\n });\r\n });\r\n if (data1.length > 0) {\r\n resolve(data1[0].ID);\r\n return data1[0].ID;\r\n } else {\r\n resolve(1);\r\n return 1;\r\n }\r\n },\r\n () => {\r\n reject({});\r\n return 1;\r\n },\r\n () => {\r\n reject({});\r\n return 1;\r\n },\r\n );\r\n } else {\r\n const regionsData = JSON.parse(localStorage.getItem(\"CommonSettings\"));\r\n const data1 = _.filter(regionsData.Regions, (region) => {\r\n return region.CountryList.some((country) => {\r\n return (\r\n country.CountryCode?.toLowerCase() == countryCode?.toLowerCase()\r\n );\r\n });\r\n });\r\n if (data1.length > 0) {\r\n resolve(data1[0].ID);\r\n return data1[0].ID;\r\n } else {\r\n resolve(1);\r\n return 1;\r\n }\r\n }\r\n });\r\n return promise;\r\n }\r\n\r\n getRegionID(countryCode: string) {\r\n if (!localStorage.getItem(\"CommonSettings\")) {\r\n this.http\r\n .get(\"assets/data/clientsetting.json\", {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n withCredentials: true,\r\n })\r\n .subscribe(\r\n (data) => {\r\n const data1 = _.filter(data.Regions, (region) => {\r\n return region.CountryList.some((country) => {\r\n return (\r\n country?.CountryCode?.toLowerCase() ==\r\n countryCode?.toLowerCase()\r\n );\r\n });\r\n });\r\n if (data1.length > 0) {\r\n return this.sortingAscendingOrder(data1)[0]?.ID;\r\n } else {\r\n return 1;\r\n }\r\n },\r\n () => {\r\n return 1;\r\n },\r\n () => {\r\n return 1;\r\n },\r\n );\r\n } else {\r\n // found item in session storage\r\n const regionsData = JSON.parse(localStorage.getItem(\"CommonSettings\"));\r\n // filtering regions data\r\n const data1 = _.filter(regionsData.Regions, (region) => {\r\n return region.CountryList.some((country) => {\r\n return (\r\n country.CountryCode?.toLowerCase() == countryCode?.toLowerCase()\r\n );\r\n });\r\n });\r\n // data1 now has every country with same country code so arranging in lower to higher ids of country\r\n if (data1.length > 0) {\r\n return this.sortingAscendingOrder(data1)[0].ID;\r\n } else {\r\n return 1;\r\n }\r\n }\r\n }\r\n\r\n getCurrencyDetail(countryCode = \"us\"): Currency {\r\n if (!localStorage.getItem(\"CommonSettings\")) {\r\n this.http\r\n .get(\"assets/data/clientsetting.json\", {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n withCredentials: true,\r\n })\r\n .subscribe(\r\n (data) => {\r\n const data1 = _.filter(data.Regions, (region) => {\r\n return region.CountryList.some((country) => {\r\n return (\r\n country.CountryCode?.toLowerCase() ==\r\n countryCode?.toLowerCase()\r\n );\r\n });\r\n });\r\n if (data1.length > 0) {\r\n return this.sortingAscendingOrder(data1)[0]?.Currency;\r\n } else {\r\n return this.defaultCurrency;\r\n }\r\n },\r\n () => {\r\n return this.defaultCurrency;\r\n },\r\n () => {\r\n return this.defaultCurrency;\r\n },\r\n );\r\n } else {\r\n const regionsData = JSON.parse(localStorage.getItem(\"CommonSettings\"));\r\n const data1 = _.filter(regionsData.Regions, (region) => {\r\n return region.CountryList.some((country) => {\r\n return (\r\n country.CountryCode?.toLowerCase() == countryCode?.toLowerCase()\r\n );\r\n });\r\n });\r\n if (data1.length > 0) {\r\n return this.sortingAscendingOrder(data1)[0]?.Currency;\r\n } else {\r\n return this.defaultCurrency;\r\n }\r\n }\r\n }\r\n setCurrencyDetail(countryCode = \"us\") {\r\n this.userService.userServiceModal.selectedShippingMethod = 0;\r\n if (!localStorage.getItem(\"CommonSettings\")) {\r\n this.http\r\n .get(\"assets/data/clientsetting.json\", {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n withCredentials: true,\r\n })\r\n .subscribe(\r\n (data) => {\r\n const data1 = _.filter(data.Regions, (region) => {\r\n return region.CountryList.some((country) => {\r\n return (\r\n country.CountryCode?.toLowerCase() ==\r\n countryCode?.toLowerCase()\r\n );\r\n });\r\n });\r\n if (data1.length > 0) {\r\n this.selectedCurrency =\r\n this.sortingAscendingOrder(data1)[0]?.Currency;\r\n } else {\r\n this.selectedCurrency = this.defaultCurrency;\r\n }\r\n },\r\n () => {\r\n this.selectedCurrency = this.defaultCurrency;\r\n },\r\n () => {\r\n this.selectedCurrency = this.defaultCurrency;\r\n },\r\n );\r\n } else {\r\n const regionsData = JSON.parse(localStorage.getItem(\"CommonSettings\"));\r\n const data1 = _.filter(regionsData.Regions, (region) => {\r\n return region.CountryList.some((country) => {\r\n return (\r\n country.CountryCode?.toLowerCase() == countryCode?.toLowerCase()\r\n );\r\n });\r\n });\r\n if (data1.length > 0) {\r\n // this.selectedCurrency = this.sortingAscendingOrder(data1)[0].Currency;\r\n this.selectedCurrency = this.defaultCurrency;\r\n } else {\r\n this.selectedCurrency = this.defaultCurrency;\r\n }\r\n }\r\n }\r\n setAutoshipEditFlag(value) {\r\n localStorage.setItem(\"isEditAutoshipFlag\", value);\r\n }\r\n\r\n getAutoshipEditFlag() {\r\n return localStorage.getItem(\"isEditAutoshipFlag\") == \"true\" ? true : false;\r\n }\r\n sortingAscendingOrder(Array) {\r\n for (let i = 0; i < Array.length; i++) {\r\n for (let j = i + 1; j < Array.length; j++) {\r\n if (Array[i]?.ID > Array[j]?.ID) {\r\n const temp = Array[i];\r\n Array[i] = Array[j];\r\n Array[j] = temp;\r\n }\r\n }\r\n }\r\n return Array;\r\n }\r\n}\r\n","import { HttpClient, HttpHeaders } from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport * as _ from \"lodash\";\r\nimport { Cart } from \"src/app/modals/shoppingcart.modal\";\r\nimport { UserService } from \"./user.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class ShoppingCartService {\r\n shoppingCart;\r\n constructor(\r\n private http: HttpClient,\r\n public user: UserService,\r\n ) {}\r\n\r\n setShoppingCart(region: number, customerType?: number) {\r\n customerType =\r\n customerType || this.user.userServiceModal.customerTypeID || 2;\r\n\r\n const promise = new Promise((resolve) => {\r\n this.http\r\n .get(\"assets/data/cart.json\", {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n })\r\n .subscribe((data) => {\r\n this.shoppingCart = [];\r\n _.filter(data.Carts, (cart) => {\r\n // if (cart.Region == region) {\r\n return cart.CartConfiguration.filter((carts: Cart) => {\r\n if (carts.CustomerType == customerType) {\r\n return this.shoppingCart.push(carts);\r\n }\r\n });\r\n // }\r\n });\r\n resolve(this.shoppingCart);\r\n return this.shoppingCart;\r\n });\r\n }).then(() => {\r\n sessionStorage.setItem(\"cart\", JSON.stringify(this.shoppingCart));\r\n });\r\n return promise;\r\n }\r\n\r\n getShoppingCart(orderType: number): Array {\r\n const packs = JSON.parse(localStorage.getItem(\"cart.packs\") || '[]');\r\n const orders = JSON.parse(localStorage.getItem(\"cart.order\") || '[]');\r\n if (this.shoppingCart != null && this.shoppingCart != undefined) {\r\n return this.shoppingCart.filter((cart: Cart) => {\r\n return cart.OrderTypeID == orderType;\r\n });\r\n } else if (sessionStorage.getItem(\"cart\")) {\r\n const carts = JSON.parse(sessionStorage.getItem(\"cart\"));\r\n return carts.filter((cart: Cart) => {\r\n return cart.OrderTypeID == orderType;\r\n });\r\n } else if (packs.length > 0 && orders.find(i => i.ItemID == 39 )) {\r\n return [\r\n {\r\n Name: \"\",\r\n CurrencyCode: \"\",\r\n LanguageID: \"\",\r\n PriceTypeID: 0,\r\n StoreID: 4,\r\n CountryCode: \"\",\r\n CustomerType: 1,\r\n OrderTypeID: -1,\r\n },\r\n ];\r\n } else {\r\n return [\r\n {\r\n Name: \"\",\r\n CurrencyCode: \"\",\r\n LanguageID: \"\",\r\n PriceTypeID: 0,\r\n StoreID: 3,\r\n CountryCode: \"\",\r\n CustomerType: 3,\r\n OrderTypeID: 1\r\n },\r\n ];\r\n }\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { MatSnackBar } from \"@angular/material/snack-bar\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class NotificationService {\r\n constructor(\r\n private readonly snackBar: MatSnackBar,\r\n public dialog: MatDialog,\r\n private translate: TranslateService,\r\n ) {}\r\n public service = {};\r\n /*\r\n * Notification\r\n * @method Notification\r\n * @param {string} title Notification title\r\n * @param {string} message Notification message\r\n * @param {string} type Notification type\r\n * @param {string} from Notification position\r\n * @param {string} align Notification alignment\r\n * @param {object} icon Notification icon\r\n * @param {boolean} animIn Notification animation in\r\n * @param {boolean} animOut Notification animation out\r\n * @param {number} delay Notification delay\r\n */\r\n\r\n private showSnackBar(\r\n title,\r\n message,\r\n className,\r\n from,\r\n align,\r\n icon,\r\n animIn,\r\n animOut,\r\n delay,\r\n ): void {\r\n this.openSnackBar(message, \"X\", className, delay);\r\n }\r\n openSnackBar(\r\n message: string,\r\n action: string,\r\n className = \"\",\r\n duration = 1500,\r\n ) {\r\n this.snackBar.open(this.translate.instant(message), action, {\r\n duration: duration,\r\n verticalPosition: \"top\",\r\n horizontalPosition: \"right\",\r\n panelClass: [className],\r\n });\r\n }\r\n\r\n /*\r\n * Success Notification\r\n * @method success\r\n * @param {string} title Notification title\r\n * @param {string} message Notification message\r\n * @param {string} type Notification type\r\n * @param {string} from Notification position\r\n * @param {string} align Notification alignment\r\n * @param {object} icon Notification icon\r\n * @param {boolean} animIn Notification animation in\r\n * @param {boolean} animOut Notification animation out\r\n * @param {number} delay Notification delay\r\n */\r\n public success(\r\n title: string,\r\n message: string,\r\n from?: string,\r\n align?: string,\r\n icon?: string,\r\n animIn?: string,\r\n animOut?: string,\r\n delay?: number,\r\n ) {\r\n this.showSnackBar(\r\n title,\r\n message,\r\n \"success\",\r\n from,\r\n align,\r\n icon,\r\n animIn,\r\n animOut,\r\n delay,\r\n );\r\n }\r\n /*\r\n * Error Notification\r\n * @method error\r\n * @param {string} title Notification title\r\n * @param {string} message Notification message\r\n * @param {string} type Notification type\r\n * @param {string} from Notification position\r\n * @param {string} align Notification alignment\r\n * @param {object} icon Notification icon\r\n * @param {boolean} animIn Notification animation in\r\n * @param {boolean} animOut Notification animation out\r\n * @param {number} delay Notification delay\r\n */\r\n public error(\r\n title: string,\r\n message: string,\r\n from?: string,\r\n align?: string,\r\n icon?: string,\r\n animIn?: string,\r\n animOut?: string,\r\n delay?: number,\r\n ) {\r\n this.showSnackBar(\r\n title,\r\n message,\r\n \"error\",\r\n from,\r\n align,\r\n icon,\r\n animIn,\r\n animOut,\r\n delay,\r\n );\r\n }\r\n /*\r\n * Warning Notification\r\n * @method warning\r\n * @param {string} title Notification title\r\n * @param {string} message Notification message\r\n * @param {string} type Notification type\r\n * @param {string} from Notification position\r\n * @param {string} align Notification alignment\r\n * @param {object} icon Notification icon\r\n * @param {boolean} animIn Notification animation in\r\n * @param {boolean} animOut Notification animation out\r\n * @param {number} delay Notification delay\r\n */\r\n public warning(\r\n title,\r\n message,\r\n from?: string,\r\n align?: string,\r\n icon?: string,\r\n animIn?: string,\r\n animOut?: string,\r\n delay?: number,\r\n ) {\r\n this.showSnackBar(\r\n title,\r\n message,\r\n \"warning\",\r\n from,\r\n align,\r\n icon,\r\n animIn,\r\n animOut,\r\n delay,\r\n );\r\n }\r\n /*\r\n * Info Notification\r\n * @method info\r\n * @param {string} title Notification title\r\n * @param {string} message Notification message\r\n * @param {string} type Notification type\r\n * @param {string} from Notification position\r\n * @param {string} align Notification alignment\r\n * @param {object} icon Notification icon\r\n * @param {boolean} animIn Notification animation in\r\n * @param {boolean} animOut Notification animation out\r\n * @param {number} delay Notification delay\r\n */\r\n public info(\r\n title: string,\r\n message: string,\r\n from?: string,\r\n align?: string,\r\n icon?: string,\r\n animIn?: string,\r\n animOut?: string,\r\n delay?: number,\r\n ) {\r\n this.showSnackBar(\r\n title,\r\n message,\r\n \"info\",\r\n from,\r\n align,\r\n icon,\r\n animIn,\r\n animOut,\r\n delay,\r\n );\r\n }\r\n}\r\n","import { HttpClient, HttpHeaders } from \"@angular/common/http\";\r\nimport { EventEmitter, Injectable, Output } from \"@angular/core\";\r\nimport { CommonSetting } from \"src/app/modals/commonsetting.modal\";\r\nimport { UserService } from \"./user.service\";\r\nimport { RestApiService } from \"./restapi.service\";\r\nimport * as _ from \"lodash\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { NotificationService } from \"./notification.service\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { CompanyService } from \"./company.service\";\r\nimport { ShoppingCartService } from \"./shopping-cart.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class ConfigService {\r\n public commonSettings: CommonSetting;\r\n public localSettings;\r\n public countryLanguageCode: any = {};\r\n public commonData: any = {};\r\n public allowedCountries;\r\n @Output() ClientRegionsSetSuccessfully: EventEmitter = new EventEmitter();\r\n public isSettingClientRegionsDone = false;\r\n @Output() OpenLanguageSelector: EventEmitter = new EventEmitter();\r\n\r\n constructor(\r\n public user: UserService,\r\n public http: HttpClient,\r\n public apiService: RestApiService,\r\n public translate: TranslateService,\r\n public notificationService: NotificationService,\r\n public activatedRoute: ActivatedRoute,\r\n public companyService: CompanyService,\r\n public shoppingCartService: ShoppingCartService,\r\n ) {\r\n this.commonData.selectedLanguage =\r\n this.activatedRoute.snapshot.queryParams.language ||\r\n sessionStorage.getItem(\"selectedLanguageCode\") ||\r\n \"en\";\r\n }\r\n init(data: CommonSetting) {\r\n return new Promise((resolve, reject) => {\r\n this.commonSettings = data;\r\n this.user.init();\r\n if (!sessionStorage.getItem(\"allowedCountries\")) {\r\n this.apiService.getActiveCountries().subscribe(\r\n (data) => {\r\n if (data && data.Data) {\r\n this.allowedCountries = this.countryLanguageCode = data.Data;\r\n sessionStorage.setItem(\r\n \"allowedCountries\",\r\n JSON.stringify(this.allowedCountries),\r\n );\r\n this.setSelectedCountry(\r\n this.activatedRoute.snapshot.queryParams.countrycode ||\r\n sessionStorage.getItem(\"selectedCountry\") ||\r\n \"us\",\r\n this.commonData.selectedLanguage,\r\n );\r\n resolve(this.allowedCountries);\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"API error: Countries not found!\",\r\n );\r\n reject([]);\r\n }\r\n },\r\n (error) => {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"API error: Countries not found!\" + error.toString(),\r\n );\r\n reject([]);\r\n },\r\n );\r\n } else {\r\n this.allowedCountries = JSON.parse(\r\n sessionStorage.getItem(\"allowedCountries\"),\r\n );\r\n this.setSelectedCountry(\r\n this.activatedRoute.snapshot.queryParams.countrycode ||\r\n sessionStorage.getItem(\"selectedCountry\") ||\r\n \"us\",\r\n this.commonData.selectedLanguage,\r\n );\r\n resolve(this.allowedCountries);\r\n }\r\n });\r\n }\r\n\r\n public async setInitRegionsIDs(CommonSettings: CommonSetting) {\r\n const Regions = await this.apiService.getRegions().toPromise();\r\n CommonSettings.Regions = Regions?.Data;\r\n localStorage.setItem(\"CommonSettings\",JSON.stringify(CommonSettings));\r\n this.ClientRegionsSetSuccessfully.emit(true);\r\n this.isSettingClientRegionsDone = true;\r\n }\r\n\r\n getConfig() {\r\n return this.commonSettings;\r\n }\r\n getLocalConfig() {\r\n return this.localSettings;\r\n }\r\n\r\n setSelectedCountry(country, selectedLanguage) {\r\n selectedLanguage = selectedLanguage || this.commonData.selectedLanguage;\r\n sessionStorage.setItem(\"selectedCountry\", country);\r\n sessionStorage.setItem(\"selectedLanguageCode\", selectedLanguage);\r\n this.commonData.selectedCountry = country;\r\n sessionStorage.removeItem(\"CommonSettings\");\r\n this.companyService.setCurrencyDetail(country);\r\n\r\n this.companyService.getRegionIDbyPromise(country).then((id: any) => {\r\n this.shoppingCartService.setShoppingCart(id);\r\n });\r\n\r\n this.ClientRegionsSetSuccessfully.subscribe((res) => {\r\n if(res) { \r\n this.companyService.getRegionIDbyPromise(country).then((id: any) => {\r\n this.shoppingCartService.setShoppingCart(id);\r\n });\r\n }\r\n });\r\n\r\n this.getCommonSetting(\r\n country,\r\n selectedLanguage || this.commonData.selectedLanguage,\r\n );\r\n }\r\n\r\n getCommonSetting(countryCode, languageCode, setRegionsDataAgain?) {\r\n const commonPromise = new Promise((resolve) => {\r\n if (localStorage.getItem(\"CommonSettings\")) {\r\n const data = JSON.parse(localStorage.getItem(\"CommonSettings\"));\r\n this.setCommonSettingData(data, languageCode, countryCode, setRegionsDataAgain);\r\n this.updateLocale(this.commonData.SelectedLanguage);\r\n resolve(data);\r\n } else {\r\n this.http\r\n .get(\"assets/data/clientsetting.json\", {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n withCredentials: true,\r\n })\r\n .toPromise()\r\n .then((result: CommonSetting) => {\r\n this.commonSettings = result;\r\n this.setCommonSettingData(\r\n this.commonSettings,\r\n languageCode,\r\n countryCode,\r\n );\r\n this.apiService.getRegions().subscribe((reg) => {\r\n this.commonSettings.Regions = [];\r\n this.commonSettings.Regions = reg.Data;\r\n localStorage.setItem(\r\n \"CommonSettings\",\r\n JSON.stringify(this.commonSettings),\r\n );\r\n });\r\n this.updateLocale(this.commonData.SelectedLanguage);\r\n resolve(this.commonSettings);\r\n })\r\n .finally(() => {});\r\n }\r\n });\r\n return commonPromise;\r\n }\r\n\r\n updateLocale(locale) {\r\n let languageCode = \"en\";\r\n try {\r\n if (locale || parseInt(locale, 10) === 0) {\r\n if (this.commonData.selectedLanguage) {\r\n languageCode = this.commonData.selectedLanguage;\r\n } else if (this.commonData.Language) {\r\n const language = _.filter(this.commonData.Language, (lang) => {\r\n return parseInt(lang.LanguageID, 10) === parseInt(locale, 10);\r\n });\r\n if (language.length > 0) {\r\n languageCode = language[0].ISOCode;\r\n }\r\n }\r\n\r\n this.translate.use(languageCode == \"undefined\" ? \"en\" : languageCode);\r\n }\r\n } catch (ex) {\r\n console.warn(\"ex\", ex.message);\r\n }\r\n }\r\n\r\n getLanguageId(languageData, languageCode) {\r\n let selectedLanguage = [];\r\n if (languageCode) {\r\n selectedLanguage = _.filter(languageData, (lang) => {\r\n return lang.LanguageCode === languageCode;\r\n });\r\n if (selectedLanguage.length > 0) {\r\n return selectedLanguage[0].LanguageCode;\r\n } else {\r\n return 0;\r\n }\r\n } else if (languageData) {\r\n return languageData[0]?.LanguageCode || 0;\r\n }\r\n }\r\n\r\n setCommonSettingData(data, languageCode, countryCode, setRegionsDataAgain?) {\r\n this.commonData = data;\r\n const country = _.find(this.allowedCountries, (item) => {\r\n return (\r\n item.CountryCode?.toLowerCase() === (countryCode?.toLowerCase() || \"us\")\r\n );\r\n });\r\n this.commonData.SelectedLanguage = this.getLanguageId(\r\n country?.CountryLanguages,\r\n languageCode,\r\n );\r\n this.commonData.selectedCountry = countryCode || \"us\";\r\n this.commonData.selectedLanguage =\r\n languageCode || country?.CountryLanguages[0].LanguageCode || \"en\";\r\n this.commonData.AddressVerification = data?.AddressVerification;\r\n if (data.Countries && data.Countries.length) {\r\n _.each(data.Countries, (country) => {\r\n if (\r\n country.CountryCodeISO2.toLowerCase() == countryCode.toLowerCase()\r\n ) {\r\n this.commonData.selectedCountryDescription = country.CountryName;\r\n }\r\n });\r\n }\r\n\r\n if(setRegionsDataAgain) {\r\n this.http\r\n .get(\"assets/data/clientsetting.json\", {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n withCredentials: true,\r\n })\r\n .subscribe((data) => {\r\n const comon = data;\r\n this.apiService.getRegions().subscribe((reg) => {\r\n // let comon: any = JSON.parse(localStorage.getItem('CommonSettings'));\r\n comon.Regions = [];\r\n comon.Regions = reg.Data;\r\n localStorage.setItem(\"CommonSettings\", JSON.stringify(comon));\r\n });\r\n });\r\n }\r\n\r\n sessionStorage.setItem(\r\n \"selectedLanguageCode\",\r\n this.commonData.selectedLanguage == \"undefined\"\r\n ? \"en\"\r\n : this.commonData.selectedLanguage,\r\n );\r\n }\r\n\r\n checkGlCountryAvailable(countryCode) {\r\n const availableCountry = _.filter(this.countryLanguageCode, (item) => {\r\n return item.CountryCode.toLowerCase() == countryCode.toLowerCase();\r\n });\r\n\r\n return availableCountry.length > 0;\r\n }\r\n\r\n checkGlLanguageAvailable(languageCode) {\r\n const availableLanguage = _.filter(this.countryLanguageCode, (item) => {\r\n return item.ISOCode.toLowerCase() == languageCode.toLowerCase();\r\n });\r\n return availableLanguage.length > 0;\r\n }\r\n\r\n setWebsiteInfo(websiteInfo) {\r\n this.user.setEnrollerInfo(websiteInfo);\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { RetailData } from \"src/app/modals/storage.modal\";\r\nimport { UtilityService } from \"./utility.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\n/**\r\n * Persistent service\r\n * used for persist application data in observable key value pair\r\n */\r\nexport class PersistentService {\r\n retailData: RetailData;\r\n constructor(public utilityService: UtilityService) {\r\n this.getRetailData();\r\n }\r\n\r\n init() {\r\n this.retailData = {\r\n isNewAutoship: false,\r\n CurrentSelectedAutoOrder: 0,\r\n isChanged: false,\r\n AddMoreItemInAutoshipFlag: false,\r\n AddMoreItemInAutoshipData: {},\r\n editAutoshipItems: [],\r\n uniqueCategoryId: 0,\r\n IsPaid: false,\r\n SelectedAutoshipPayment: {\r\n PaymentTypeID: \"\",\r\n Name: \"\",\r\n Ending: \"\",\r\n PaymentDisplay: \"\",\r\n ExpireMonth: \"\",\r\n ExpireYear: \"\",\r\n BillingAddress: \"\",\r\n BillingAddress2: \"\",\r\n BillingCity: \"\",\r\n BillingCountry: \"\",\r\n BillingState: \"\",\r\n BillingZip: \"\",\r\n },\r\n Autoship: {\r\n Frequency: \"\",\r\n FrequencyTypeDescription: \"\",\r\n FrequencyTypeID: 0,\r\n },\r\n autoshipDate: \"\",\r\n isNewAddress: \"\",\r\n isAddresschanged: false,\r\n IsMailingAddressVerified: false,\r\n AutoOrderShippingAddress: {},\r\n } as RetailData;\r\n }\r\n\r\n setRetailData() {\r\n localStorage.setItem(\"retailData\", JSON.stringify(this.retailData));\r\n this.getRetailData();\r\n }\r\n\r\n getRetailData() {\r\n this.retailData = JSON.parse(localStorage.getItem(\"retailData\"));\r\n if (\r\n !this.retailData ||\r\n this.utilityService.isEmptyObject(this.retailData)\r\n ) {\r\n this.init();\r\n }\r\n }\r\n}\r\n","const DefaultWebalias = \"testalias\";\r\n\r\nfunction getBaseLocation() {\r\n const registerRoute = [\r\n \"/home\",\r\n \"/login\",\r\n \"/signup\",\r\n \"/products/[a-zA-Z0-9]\",\r\n \"/product/[a-zA-Z0-9]\",\r\n \"/product-detail/[a-zA-Z0-9]\",\r\n \"/application\",\r\n \"/join\",\r\n \"/pages/[A-Za-z]\",\r\n \"/complete\",\r\n \"/main\",\r\n \"/about\",\r\n \"/checkout\",\r\n \"/faq\",\r\n \"/orderhistory\",\r\n \"/manageautoship\",\r\n \"/autoorderhistory\",\r\n \"/404\",\r\n \"/order-success\",\r\n \"/signup\",\r\n \"/orderinvoice\",\r\n \"/forgotpassword\",\r\n \"shipping\",\r\n \"/become-a-distributor\"\r\n ];\r\n if (registerRoute.includes(location.pathname)) {\r\n return `/${DefaultWebalias}`;\r\n }\r\n if (\r\n location.pathname.includes(\"pages/\") &&\r\n location.pathname.includes(\"checkout/\")\r\n ) {\r\n const routeMatch = registerRoute.some((item) => {\r\n return new RegExp(item).test(location.pathname);\r\n });\r\n if (routeMatch) {\r\n return `/${DefaultWebalias}`;\r\n }\r\n }\r\n const paths: string[] = location.pathname.split(\"/\").splice(1, 1);\r\n const basePath: string = (paths && paths[0]) || `${DefaultWebalias}`;\r\n return \"/\" + basePath;\r\n}\r\n\r\nexport { DefaultWebalias, getBaseLocation };\r\n","

\r\n {{title}}\r\n

\r\n \r\n
\r\n

{{message}}

\r\n
\r\n \r\n
\r\n \r\n \r\n\r\n
","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\r\nexport class ConfirmDialogModel {\r\n constructor(\r\n public title: string,\r\n public message: string,\r\n public noaction?: string,\r\n public takeaction?: string,\r\n ) {}\r\n}\r\n@Component({\r\n selector: \"app-confirm-dialog\",\r\n templateUrl: \"./confirm-dialog.component.html\",\r\n styleUrls: [\"./confirm-dialog.component.css\"],\r\n})\r\nexport class ConfirmDialogComponent implements OnInit {\r\n title: string;\r\n message: string;\r\n noaction: string;\r\n takeaction: string;\r\n constructor(\r\n public dialogRef: MatDialogRef,\r\n @Inject(MAT_DIALOG_DATA) public data: ConfirmDialogModel,\r\n ) {\r\n this.title = data.title;\r\n this.message = data.message;\r\n this.noaction = data.noaction;\r\n this.takeaction = data.takeaction;\r\n }\r\n\r\n ngOnInit() {}\r\n\r\n onConfirm(): void {\r\n // Close the dialog, return true\r\n this.dialogRef.close(true);\r\n }\r\n\r\n onDismiss(): void {\r\n // Close the dialog, return false\r\n this.dialogRef.close(false);\r\n }\r\n}\r\n","import { Directive, Input, HostBinding } from \"@angular/core\";\r\n@Directive({\r\n selector: \"[default]\",\r\n host: {\r\n \"(error)\": \"updateUrl()\",\r\n \"(load)\": \"load()\",\r\n \"[src]\": \"src\",\r\n },\r\n})\r\nexport class ImagePreloadDirective {\r\n @Input() src: string;\r\n @Input() default: string;\r\n @HostBinding(\"class\") className;\r\n\r\n updateUrl() {\r\n this.src = this.default;\r\n }\r\n load() {\r\n this.className = \"image-loaded\";\r\n }\r\n}\r\n","
\r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
Choose Sponsor
\r\n

\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
0\" [style.visibility]=\"!showSponsorTable ? 'collapse' : 'visible'\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n Sponsor Details \r\n {{element.FirstName}} {{element.LegalLastName}}
\r\n Member ID: {{element.BackOfficeId}}\r\n
\r\n
\r\n hello\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n Sponsor is not found\r\n
\r\n
\r\n \r\n
0\" mat-dailog-actions class=\"enroller-footer\">\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
","import { SelectionModel } from \"@angular/cdk/collections\";\r\nimport { Component, ViewChild } from \"@angular/core\";\r\nimport { FormControl } from \"@angular/forms\";\r\nimport { MatDialog, MatDialogRef } from \"@angular/material/dialog\";\r\nimport { MatPaginator } from \"@angular/material/paginator\";\r\nimport { MatSort } from \"@angular/material/sort\";\r\nimport { MatTableDataSource } from \"@angular/material/table\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport * as _ from \"lodash\";\r\nimport { Observable } from \"rxjs\";\r\nimport { map, startWith } from \"rxjs/operators\";\r\nimport { DefaultWebalias, getBaseLocation } from \"src/app/baseUrl\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { ConfigService } from \"../../services/config.service\";\r\nimport { NotificationService } from \"../../services/notification.service\";\r\nimport { RestApiService } from \"../../services/restapi.service\";\r\nimport { UserService } from \"../../services/user.service\";\r\nimport {\r\n ConfirmDialogComponent,\r\n ConfirmDialogModel,\r\n} from \"../confirm-dialog/confirm-dialog.component\";\r\n\r\n@Component({\r\n selector: \"app-find-enroller\",\r\n templateUrl: \"./findenroller.component.html\",\r\n styleUrls: [\"./findenroller.component.scss\"],\r\n})\r\nexport class FindEnrollerComponent {\r\n public isButtonEnable: boolean = false;\r\n public selection = new SelectionModel(false, []);\r\n public SelectedSponsor: any = {};\r\n userService: UserServiceModal;\r\n searchText: string = \"\";\r\n result: string = \"\";\r\n itemCount: number = 0;\r\n currentRouterPath;\r\n public pageSize: boolean = true;\r\n public filterData = [];\r\n showSponsorTable: boolean = false;\r\n constructor(\r\n public configService: ConfigService,\r\n public router: Router,\r\n public dialog: MatDialog,\r\n public dialogRef: MatDialogRef,\r\n public apiService: RestApiService,\r\n public translate: TranslateService,\r\n public notificationService: NotificationService,\r\n public user: UserService,\r\n private route: ActivatedRoute,\r\n ) {\r\n this.selection.changed.subscribe(() => {\r\n this.isButtonEnable = this.selection.selected.length == 0;\r\n });\r\n this.userService = user.userServiceModal;\r\n }\r\n displayedColumns: string[] = [\r\n \"SelectEnroller\",\r\n \"ProfileImageUrl\",\r\n \"FirstName\",\r\n // \"LastName\",\r\n // \"BackOfficeId\" /*, \"EMail\", \"Phone\" */,\r\n ];\r\n dataSource = new MatTableDataSource([]);\r\n\r\n @ViewChild(MatSort) sort: MatSort;\r\n @ViewChild(MatPaginator) paginator: MatPaginator;\r\n myControl = new FormControl();\r\n options: string[] = [];\r\n filteredOptions: Observable;\r\n\r\n ngOnInit() {\r\n this.filteredOptions = this.myControl.valueChanges.pipe(\r\n startWith(\"\"),\r\n map((value) => this._filter(value)),\r\n );\r\n }\r\n\r\n searchEnroller(searchText: string) {\r\n const req = {\r\n includeWebAliases: true,\r\n searchTerm: searchText,\r\n };\r\n this.apiService.searchAssociate(req).subscribe(\r\n (data) => {\r\n if (data.Data && data.Data.length) {\r\n this.filterData = _.filter(data.Data, (data) => {\r\n this.showSponsorTable = true;\r\n return (\r\n (data.AssociateTypeId == 1 && data.WebAliases.length > 0)\r\n );\r\n });\r\n }\r\n if (data.Data.length == 0) {\r\n this.notificationService.error(\"error_\", \"Sponsor is not found\");\r\n this.filterData = [];\r\n }\r\n\r\n this.dataSource = new MatTableDataSource(this.filterData);\r\n this.dataSource.sort = this.sort;\r\n\r\n this.itemCount = this.filterData.length;\r\n if (this.itemCount >= 10) {\r\n this.pageSize = true;\r\n } else {\r\n this.pageSize = false;\r\n }\r\n this.dataSource.paginator = this.paginator;\r\n },\r\n () => {\r\n // Do stuff whith your error\r\n },\r\n () => {},\r\n );\r\n }\r\n applyFilter(filterValue: string) {\r\n this.dataSource.filter = filterValue.trim().toLowerCase();\r\n }\r\n\r\n private _filter(value: string): string[] {\r\n const filterValue = value.toLowerCase();\r\n return this.options.filter((option) =>\r\n option.toLowerCase().includes(filterValue),\r\n );\r\n }\r\n singleSelection($event, dataSource) {\r\n const numSelected = this.selection.selected.length;\r\n numSelected <= 0\r\n ? (this.isButtonEnable = false)\r\n : (this.isButtonEnable = true);\r\n if ($event.checked) {\r\n this.SelectedSponsor = dataSource;\r\n }\r\n }\r\n setSponsor() {\r\n if (\r\n this.SelectedSponsor &&\r\n this.SelectedSponsor.CustomerId &&\r\n this.SelectedSponsor.WebAliases &&\r\n this.SelectedSponsor.WebAliases.length > 0\r\n ) {\r\n const baseurl = getBaseLocation();\r\n sessionStorage.setItem(\"enrollerSet\", \"true\");\r\n this.route.queryParams.subscribe((params) => {\r\n if (Object.keys(params).length === 0) {\r\n location.href = location.pathname.replace(\r\n baseurl,\r\n baseurl === \"/\"\r\n ? \"/\" + this.SelectedSponsor.WebAliases[0] + \"/\"\r\n : `/${this.SelectedSponsor.WebAliases[0]}`,\r\n );\r\n } else {\r\n this.userService.WebAlias = this.SelectedSponsor.WebAliases[0];\r\n localStorage.setItem(\"userService\", JSON.stringify(this.userService));\r\n location.href = location.pathname.replace(\r\n baseurl,\r\n baseurl === \"/\"\r\n ? \"/\" + this.SelectedSponsor.WebAliases[0] + \"/\"\r\n : `/${this.SelectedSponsor.WebAliases[0]}`,\r\n );\r\n }\r\n });\r\n } else {\r\n this.notificationService.error(\"error_\", \"webalias_not_exists\");\r\n return false;\r\n }\r\n }\r\n confirmDialog(): void {\r\n const message = \"Are you sure you want to do this?\";\r\n\r\n const dialogData = new ConfirmDialogModel(\"Confirm Action\", message);\r\n\r\n const dialogRef = this.dialog.open(ConfirmDialogComponent, {\r\n maxWidth: \"400px\",\r\n data: dialogData,\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((dialogResult) => {\r\n this.result = dialogResult;\r\n });\r\n }\r\n\r\n dialogClose() {\r\n this.dialogRef.close();\r\n }\r\n\r\n handleNoSponsor() {\r\n location.href = location.origin + `/${DefaultWebalias}/` + 'home';\r\n }\r\n}\r\n","\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \"Affiliate\r\n {{userService.enrollerInfo.FirstName + ' ' +\r\n userService.enrollerInfo.LastName + ' '}}\r\n {{('from_' | translate) + ' ' + userService.enrollerInfo.Country}}\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n {{selectedCountry.CountryName}}\r\n arrow_drop_down\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n {{selectedUserType.Description}}\r\n arrow_drop_down\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
","import { Component, OnInit } from \"@angular/core\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { ConfigService } from \"../../services/config.service\";\r\nimport { RestApiService } from \"../../services/restapi.service\";\r\nimport { UserService } from \"../../services/user.service\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport * as _ from \"lodash\";\r\nimport { FindEnrollerComponent } from \"../findenroller/findenroller.component\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { CompanyService } from \"../../services/company.service\";\r\nimport { NotificationService } from \"../../services/notification.service\";\r\n\r\n@Component({\r\n selector: \"app-market-selector\",\r\n templateUrl: \"./market-selector.component.html\",\r\n styleUrls: [\"./market-selector.component.scss\"],\r\n})\r\nexport class MarketSelectorComponent implements OnInit {\r\n selectedCountry: any = {};\r\n selectedUserType: any = {};\r\n public allowedCountries = [];\r\n customerTypes = {};\r\n userService: UserServiceModal;\r\n constructor(\r\n public dialog: MatDialog,\r\n public configService: ConfigService,\r\n public user: UserService,\r\n public apiService: RestApiService,\r\n private route: ActivatedRoute,\r\n public companyService: CompanyService,\r\n public notificationService: NotificationService,\r\n ) {\r\n this.userService = user.userServiceModal;\r\n this.customerTypes = configService.commonSettings.CustomerTypes;\r\n this.allowedCountries = JSON.parse(\r\n sessionStorage.getItem(\"allowedCountries\"),\r\n );\r\n\r\n const selectedCountry = !sessionStorage.getItem(\"selectedCountry\")\r\n ? \"us\"\r\n : sessionStorage.getItem(\"selectedCountry\");\r\n const selectedCustomerTypeID =\r\n sessionStorage.getItem(\"selectedCustomerTypeID\") === \"undefined\"\r\n ? null\r\n : sessionStorage.getItem(\"selectedCustomerTypeID\");\r\n this.selectedUserType = _.find(\r\n this.configService.commonSettings.CustomerTypes,\r\n (customerType) => {\r\n return (\r\n customerType.ID ===\r\n (parseInt(this.route.snapshot.queryParams.type, 10) ||\r\n parseInt(selectedCustomerTypeID, 10) ||\r\n 2)\r\n );\r\n },\r\n );\r\n this.selectedCountry = _.find(this.allowedCountries, (item) => {\r\n return (\r\n item.CountryCode.toLowerCase() ===\r\n (this.route.snapshot.queryParams.countrycode || selectedCountry || \"us\")\r\n );\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n // let queryCategory;\r\n // if (this.route.snapshot.queryParams.catId) {\r\n // queryCategory = parseInt(this.route.snapshot.queryParams.catId, 10);\r\n // } else if (this.route.snapshot.queryParams.category) {\r\n // queryCategory = parseInt(this.route.snapshot.queryParams.category, 10);\r\n // }\r\n }\r\n\r\n changeAffiliate() {\r\n this.dialog.open(FindEnrollerComponent, {\r\n data: {},\r\n panelClass: \"findenroller-dialog\",\r\n autoFocus: false,\r\n });\r\n }\r\n\r\n continue() {\r\n if (this.selectedCountry?.CountryCode) {\r\n this.userService.customerTypeID = this.selectedUserType.ID;\r\n this.dialog.closeAll();\r\n sessionStorage.setItem(\"IsMarketCountrySelected\", \"true\");\r\n sessionStorage.setItem(\r\n \"selectedCountry\",\r\n this.selectedCountry.CountryCode ||\r\n this.configService.commonData.selectedCountry,\r\n );\r\n sessionStorage.setItem(\r\n \"selectedLanguageCode\",\r\n this.configService.commonData.selectedLanguage ||\r\n this.selectedCountry.CountryLanguages[0].LanguageCode,\r\n );\r\n sessionStorage.setItem(\r\n \"selectedCustomerTypeID\",\r\n this.selectedUserType.ID,\r\n );\r\n window.location.reload();\r\n } else {\r\n this.notificationService.error(\"error_\", \"Country is not Selected !!\");\r\n }\r\n }\r\n\r\n selectCustomerType(ID): void {\r\n if (ID) {\r\n this.selectedUserType = _.find(\r\n this.configService.commonSettings.CustomerTypes,\r\n (customerType) => {\r\n return customerType.ID === parseInt(ID, 10);\r\n },\r\n );\r\n }\r\n }\r\n\r\n changeLang(code): void {\r\n if (code) {\r\n this.selectedCountry = _.find(this.allowedCountries, (country) => {\r\n return (\r\n country.CountryCode.trim().toLowerCase() === code.trim().toLowerCase()\r\n );\r\n });\r\n }\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { BehaviorSubject } from \"rxjs\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class LoaderService {\r\n public isLoading = new BehaviorSubject(false);\r\n}\r\n","import { HttpClient } from \"@angular/common/http\";\r\nimport { Component, ElementRef, HostListener, Inject, OnInit } from \"@angular/core\";\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\r\nimport { DomSanitizer } from \"@angular/platform-browser\";\r\nimport { LoaderService } from \"../../services/loader.service\";\r\nimport { Router } from \"@angular/router\";\r\nimport { NotificationService } from \"../../services/notification.service\";\r\nexport function OnIFrameSave(data) {\r\n}\r\nexport function OnIFrameError(error) {\r\n if (!error) {\r\n return;\r\n }\r\n // window.alert(error);\r\n}\r\n@Component({\r\n selector: \"app-hostedpayment-dialog\",\r\n templateUrl: \"./hostedpayment-dialog.component.html\",\r\n styleUrls: [\"./hostedpayment-dialog.component.scss\"],\r\n})\r\nexport class HostedpaymentDialogComponent implements OnInit {\r\n public paymentData: any = {};\r\n public iFrameUrl;\r\n showIsLoading: boolean = true;\r\n showNoProductsError: boolean = false;\r\n\r\n constructor(\r\n public sanitizer: DomSanitizer,\r\n public http: HttpClient,\r\n private loader: LoaderService,\r\n public router: Router,\r\n private elementRef: ElementRef,\r\n public dialogRef: MatDialogRef,\r\n @Inject(MAT_DIALOG_DATA) public data,\r\n public notificationService: NotificationService,\r\n ) {\r\n // this.dialogRef.disableClose = true;\r\n if(this.data.isCheckout){\r\n if(this.data?.Script){\r\n this.paymentData = this.data;\r\n }\r\n else{\r\n this.paymentData = this.data?.IFrameUrl;\r\n }\r\n }\r\n else{\r\n this.paymentData = this.data?.IFrameUrl;\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n // @HostListener(\"window:message\", [\"$event\"])\r\n // onMessage(e) {\r\n // if (e.data.event == \"cardSaved\") {\r\n // // e.data nexio card event\r\n // this.dialogRef.close(e.data.data);\r\n // } else if (e.data.isTestCardEvent == true) {\r\n // // e.data test card event\r\n // this.dialogRef.close(e.data);\r\n // }\r\n // }\r\n @HostListener('window:message', ['$event'])\r\n onMessage(e) {\r\n console.log('iframe data', e.data);\r\n if (e.data.event == 'cardSaved') {\r\n // e.data nexio card event\r\n this.dialogRef.close(e.data.data);\r\n } else if (e.data.isTestCardEvent == true) {\r\n // e.data test card event\r\n this.dialogRef.close(e.data);\r\n } else {\r\n // e.data. has no event in NMI case so handling this case\r\n if (this.paymentData.Script) {\r\n this.dialogRef.close(e.data);\r\n }\r\n\r\n }\r\n if (e) {\r\n this.handleIframeMessage(e);\r\n }\r\n }\r\n @HostListener(\"window:OnIFrameSave\", [\"$event\"])\r\n OnIFrameSave(data) {\r\n console.log(data);\r\n }\r\n @HostListener(\"window:OnIFrameError\", [\"$event\"])\r\n OnIFrameError(data) {\r\n console.log(data);\r\n\r\n }\r\n ngOnInit(): void {\r\n this.setUpIframeMethods();\r\n if (this.paymentData && this.paymentData.Script) {\r\n this.executePaymentScripts(this.paymentData.Script);\r\n }\r\n else {\r\n // const iframe = document.getElementById('iframDSPayment') as HTMLIFrameElement;\r\n // const checkIframe = setInterval(() => {\r\n // try {\r\n // if (iframe.contentDocument && iframe.contentDocument.readyState === 'complete') {\r\n // console.log('Iframe is completely loaded and accessible!');\r\n // iframe.onload = () => {\r\n // iframe.contentWindow.postMessage({ action: 'styleButton', styles: { cursor:'pointer' } }, '*');\r\n // };\r\n // clearInterval(checkIframe);\r\n // }\r\n // } catch (error) {\r\n // console.log('Waiting for iframe to load...');\r\n // }\r\n // }, 100);\r\n }\r\n if (this.paymentData?.IFrameUrl) {\r\n this.iFrameUrl = this.sanitizer.bypassSecurityTrustResourceUrl(\r\n this.paymentData.IFrameUrl,\r\n );\r\n } else {\r\n this.iFrameUrl = this.sanitizer.bypassSecurityTrustResourceUrl(\r\n this.paymentData,\r\n );\r\n }\r\n }\r\n handleIframeMessage(event: MessageEvent) {\r\n\r\n if (event.data.action === 'styleButton') {\r\n const button = document.getElementById('submitButton');\r\n const styles = event.data.styles;\r\n \r\n Object.keys(styles).forEach((style) => {\r\n button.style[style] = styles[style];\r\n });\r\n\r\n button.addEventListener('click', () => {\r\n if (!event.data?.data?.isFormValid) {\r\n this.notificationService.error(\r\n \"error\",\r\n 'Please fill in all required fields correctly.'\r\n );\r\n return;\r\n }\r\n });\r\n }\r\n\r\n const loader = this.elementRef.nativeElement.querySelector('#loader');\r\n const eventData = event.data?.data;\r\n const eventType = event.data?.event;\r\n if (eventType === 'submit') {\r\n loader.style.display = 'flex';\r\n }\r\n if (eventType === 'processed') {\r\n loader.style.display = 'none';\r\n setTimeout(() => window['handleIframeEvent'], 3000);\r\n sessionStorage.setItem(\"customerLoginDetails\", JSON.stringify(eventData))\r\n localStorage.setItem(\"customerLoginDetails\", JSON.stringify(eventData))\r\n this.dialogRef.close(true);\r\n }\r\n }\r\n\r\n cleanupCustomJS(): void {\r\n delete window['handleIframeEvent'];\r\n }\r\n\r\n onConfirm(data): void {\r\n console.log(data);\r\n // Close the dialog, return true\r\n this.dialogRef.close(true);\r\n }\r\n\r\n onDismiss(): void {\r\n // Close the dialog, return false\r\n this.dialogRef.close(false);\r\n }\r\n getIframeHeight(): string {\r\n return this.paymentData.Height;\r\n }\r\n\r\n getIframeUrl(): any {\r\n return this.sanitizer.bypassSecurityTrustResourceUrl(this.paymentData.IFrameUrl);\r\n }\r\n\r\n getIframeWidth(): string {\r\n return this.paymentData.Width;\r\n }\r\n\r\n executePaymentScripts(html) {\r\n // Extract, load and execute ","import { Pipe, PipeTransform } from \"@angular/core\";\r\n@Pipe({\r\n name: \"unique\",\r\n})\r\nexport class UniquePipe implements PipeTransform {\r\n transform(collection, keyname) {\r\n const output = [];\r\n if (collection && collection.length > 0) {\r\n const keys = [];\r\n collection.forEach((item) => {\r\n const key = item[keyname];\r\n if (keys.indexOf(key) === -1) {\r\n keys.push(key);\r\n output.push(item);\r\n }\r\n });\r\n }\r\n return output;\r\n }\r\n}\r\n","import { cloneDeep } from \"lodash\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { BehaviorSubject, Observable } from \"rxjs\";\r\nimport { map } from \"rxjs/operators\";\r\nimport * as _ from \"lodash\";\r\nimport { environment } from \"../../../../environments/environment\";\r\nimport { RestApiService } from \"./restapi.service\";\r\nimport { User } from \"src/app/modals/user.modal\";\r\nimport {\r\n UserServiceModal,\r\n ShippingAddress,\r\n} from \"src/app/modals/userservice.modal\";\r\nimport { ConfigService } from \"./config.service\";\r\nimport { UserService } from \"./user.service\";\r\nimport { NotificationService } from \"./notification.service\";\r\nimport { CookieService } from \"ngx-cookie-service\";\r\nimport { UtilityService } from \"./utility.service\";\r\n\r\n@Injectable({ providedIn: \"root\" })\r\nexport class AccountService {\r\n private userSubject: BehaviorSubject;\r\n public user: Observable;\r\n userServiceModal: UserServiceModal;\r\n\r\n constructor(\r\n private router: Router,\r\n private http: HttpClient,\r\n public apiService: RestApiService,\r\n public configService: ConfigService,\r\n public userService: UserService,\r\n public notificationService: NotificationService,\r\n private cookieService: CookieService,\r\n private utilityService: UtilityService,\r\n ) {\r\n this.userSubject = new BehaviorSubject(\r\n JSON.parse(localStorage.getItem(\"user\")),\r\n );\r\n this.user = this.userSubject.asObservable();\r\n this.userServiceModal = this.userService.userServiceModal;\r\n }\r\n\r\n public get userValue(): User {\r\n return this.userSubject.value;\r\n }\r\n\r\n login(loginrequest) {\r\n return this.apiService.Login(loginrequest).pipe(\r\n map((user) => {\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n localStorage.setItem(\"user\", JSON.stringify(user.body));\r\n this.userSubject.next(user.body);\r\n return user;\r\n }),\r\n );\r\n }\r\n createGuestUser(createGuestRequest) {\r\n return this.apiService.createCustomer(createGuestRequest).pipe(\r\n map((user) => {\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n localStorage.setItem(\"user\", JSON.stringify(user));\r\n this.userSubject.next(user);\r\n return user;\r\n }),\r\n );\r\n }\r\n\r\n logout() {\r\n this.cookieService.delete(\"X-Auth\", \"/\");\r\n this.cookieService.deleteAll(\"/\");\r\n // remove user from local storage and set current user to null\r\n this.apiService.Logout().subscribe(() => {\r\n this.router.navigate([\"/login\"]).then(() => {\r\n localStorage.removeItem(\"user\");\r\n localStorage.clear();\r\n sessionStorage.clear();\r\n this.userService.setDefault();\r\n this.userSubject.next(null);\r\n window.location.reload();\r\n });\r\n });\r\n }\r\n\r\n register(user: User) {\r\n return this.http.post(`${environment.apiUrl}/users/register`, user);\r\n }\r\n\r\n getCustomerData(customerID?: number|string) {\r\n const promise = new Promise((resolve, reject) => {\r\n this.apiService.getCustomer(customerID).subscribe((result) => {\r\n if (result && result.Data) {\r\n this.userServiceModal.customerData = result.Data;\r\n if (\r\n !this.configService.commonData.selectedLanguage ||\r\n (this.configService.commonData.selectedLanguage &&\r\n this.configService.commonData.selectedCountry.toLowerCase() !==\r\n result.Data.DefaultShippingAddress?.CountryCode)\r\n ) {\r\n _.each(this.configService.countryLanguageCode, (item) => {\r\n if (\r\n item.CountryCode ==\r\n result.Data.DefaultShippingAddress?.CountryCode &&\r\n item.CountryLanguages.filter((val) => {\r\n return val.LanguageCode == result.Data.LanguageCode;\r\n })\r\n ) {\r\n this.configService.commonData.selectedLanguage =\r\n item.LanguageCode || result.Data.LanguageCode;\r\n }\r\n });\r\n }\r\n // for autologin\r\n if (this.userServiceModal.customerData.LanguageCode) {\r\n this.configService.commonData.selectedLanguage =\r\n this.userServiceModal.customerData.LanguageCode;\r\n }\r\n this.configService.setSelectedCountry(\r\n this.userServiceModal.customerData.DefaultShippingAddress\r\n ?.CountryCode ||\r\n this.userServiceModal.customerData.PrimaryAddress?.CountryCode,\r\n this.configService.commonData.selectedLanguage,\r\n );\r\n /*this.userServiceModal.shippingAddress =\r\n !this.utilityService.isEmptyObject(\r\n this.userServiceModal.customerData.DefaultShippingAddress,\r\n )\r\n ? cloneDeep(\r\n this.userServiceModal.customerData.DefaultShippingAddress,\r\n )\r\n : {};*/\r\n\r\n // if (\r\n // this.userServiceModal.customerData.DefaultShippingAddress.Street1 ==\r\n // null\r\n // ) {\r\n // // check if loginned user have address saved\r\n // this.userServiceModal.customerData.DefaultShippingAddress = [];\r\n // this.userServiceModal.shippingAddress = {} as ShippingAddress;\r\n // }\r\n\r\n try {\r\n resolve(result);\r\n } catch (ex) {\r\n reject();\r\n console.error(\"ex\", ex);\r\n }\r\n } else {\r\n reject();\r\n this.notificationService.error(\"error_\", result.ErrorDescription);\r\n }\r\n });\r\n });\r\n return promise;\r\n }\r\n isLoggedIn(): boolean {\r\n let isLoggedIn = false;\r\n this.apiService.loginStatus.subscribe((val) => {\r\n isLoggedIn = val;\r\n });\r\n return isLoggedIn;\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { MatDialog, MatDialogConfig } from \"@angular/material/dialog\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { HostedpaymentDialogComponent } from \"../model/hostedpayment-dialog/hostedpayment-dialog.component\";\r\nimport { NotificationService } from \"./notification.service\";\r\nimport { RestApiService } from \"./restapi.service\";\r\nimport { UserService } from \"./user.service\";\r\nimport { UniquePipe } from \"../pipes/Unique.pipe\";\r\nimport * as moment from \"moment\";\r\nimport { UtilityService } from \"./utility.service\";\r\nimport { CompanyService } from \"./company.service\";\r\nimport { ConfigService } from \"./config.service\";\r\nimport { AccountService } from \"./account.service\";\r\nimport { cloneDeep } from \"lodash\";\r\nimport * as _ from \"lodash\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class PaymentService {\r\n public PaymentDataResponse: any = {};\r\n public PaymentTypeResponse: Array = [];\r\n public selectedPaymentTypeName = \"\";\r\n public SelectedPaymentTypes: any = {};\r\n public OldSelectedPaymentType = {};\r\n public oldSelectedPaymentTypeName: string = \"\";\r\n public AllowedMethods = [];\r\n public SaveMethods = [];\r\n public IsFrameReload: boolean;\r\n userService: UserServiceModal;\r\n getPaymentMerchantsLastRequest = {};\r\n\r\n isModalOpen = false;\r\n constructor(\r\n public dialog: MatDialog,\r\n public notificationService: NotificationService,\r\n public user: UserService,\r\n public apiService: RestApiService,\r\n public utilityService: UtilityService,\r\n public companyService: CompanyService,\r\n public configService: ConfigService,\r\n private accountService: AccountService\r\n ) {\r\n this.userService = user.userServiceModal;\r\n }\r\n isLoggedIn() {\r\n if (\r\n Object.keys(this.userService.customerData).length &&\r\n this.userService.customerData.CustomerId &&\r\n this.user.checkIfUserAuthenticatedOrNot()\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n public getPaymentType(statecode?, countryCode?) {\r\n const getPaymentTypePromise = new Promise((resolve, reject) => {\r\n const request = {\r\n customerId: this.userService.customerData.CustomerId,\r\n storeid: 4,\r\n countrycode:\r\n countryCode || this.configService.commonData.selectedCountry || \"us\",\r\n region:\r\n statecode ||\r\n this.companyService.getRegionID(\r\n this.configService.commonData.selectedCountry,\r\n ) ||\r\n this.userService.defaultState ||\r\n \"UT\",\r\n };\r\n\r\n if(_.isEqual(this.getPaymentMerchantsLastRequest, request)) {\r\n resolve(this.PaymentTypeResponse);\r\n return;\r\n }\r\n\r\n this.apiService.getPaymentMerchants(request).subscribe(\r\n (result) => {\r\n try {\r\n this.getPaymentMerchantsLastRequest = cloneDeep(request);\r\n if (parseInt(result.Status, 10) === 0) {\r\n this.PaymentTypeResponse[\"AllowedMethods\"] =\r\n new UniquePipe().transform(result.Data, \"MerchantId\");\r\n resolve(this.PaymentTypeResponse);\r\n } else {\r\n this.notificationService.error(\"error_\", result.Message);\r\n reject(result);\r\n }\r\n } catch (ex) {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n reject(ex);\r\n }\r\n },\r\n (error) => {\r\n reject(error);\r\n },\r\n () => {},\r\n );\r\n });\r\n\r\n // const getCustomerSavedPaymentMethodPromise = new Promise(\r\n // (resolve, reject) => {\r\n\r\n // if(this.accountService.isLoggedIn()) {\r\n // const request = {\r\n // customerId: this.userService.customerData.CustomerId,\r\n // // storeId: 4,\r\n // };\r\n // this.apiService.getCustomerSavedPaymentMethods(request).subscribe(\r\n // (result) => {\r\n // try {\r\n // if (parseInt(result.Status, 10) === 0) {\r\n // this.PaymentTypeResponse[\"SaveMethods\"] =\r\n // new UniquePipe().transform(result.Data, \"PaymentMethodId\");\r\n // resolve(this.PaymentTypeResponse);\r\n // } else {\r\n // this.notificationService.error(\"error_\", result.Message);\r\n // reject(result);\r\n // }\r\n // } catch (ex) {\r\n // this.notificationService.error(\r\n // \"error_\",\r\n // \"error_occured_try_again\",\r\n // );\r\n // reject(ex);\r\n // }\r\n // },\r\n // (error) => {\r\n // reject(error);\r\n // },\r\n // () => {},\r\n // );\r\n // } else {\r\n // resolve(null);\r\n // }\r\n\r\n // },\r\n // );\r\n\r\n const res = Promise.all([\r\n getPaymentTypePromise,\r\n // getCustomerSavedPaymentMethodPromise,\r\n ]);\r\n return res;\r\n }\r\n\r\n public getPaymentData(\r\n paymentdata?,\r\n paymentMethod = \"\",\r\n IsApplication: boolean = false,\r\n ) {\r\n const dialogConfig = new MatDialogConfig();\r\n dialogConfig.role = \"dialog\";\r\n dialogConfig.width = \"720px\";\r\n const promise = new Promise((resolve, reject) => {\r\n const getPaymentDataRequest = {\r\n // iframeid: \"DsIframe\",\r\n // storeid: 0,\r\n merchantid: paymentdata.MerchantId || 0,\r\n CountryCode: this.configService.commonData.selectedCountry || \"us\",\r\n // region: this.companyService.getRegionID(\r\n // this.configService.commonData.selectedCountry,\r\n // ),\r\n // languagecode: this.configService.commonData.selectedLanguage || \"en\",\r\n customerId: this.userService.customerData.CustomerId || 0,\r\n };\r\n this.apiService\r\n .getPaymentMethodIFrame(getPaymentDataRequest)\r\n .subscribe(\r\n (result) => {\r\n try {\r\n if (Number(result.Status) === 0) {\r\n const paymentData = result.Data;\r\n this.PaymentDataResponse = paymentData;\r\n\r\n const iframe = this.dialog.open(HostedpaymentDialogComponent, {\r\n data: {\r\n IFrameUrl: paymentData,\r\n Width: paymentData.Width,\r\n Height: paymentData.Height,\r\n isCheckout: true\r\n },\r\n panelClass: \"hosted_payment-Dialog\",\r\n });\r\n iframe.afterClosed().subscribe((result) => {\r\n if (result) {\r\n const newPayment = result;\r\n newPayment.MerchantId = paymentdata.MerchantId;\r\n // if (\r\n // !IsApplication &&\r\n // (!localStorage.getItem(\"guestLogin\") ||\r\n // localStorage.getItem(\"guestLogin\") == \"false\")\r\n // ) {\r\n // this.savePaymentMethod(newPayment);\r\n // } else {\r\n this.getPaymentType();\r\n // }\r\n const paymentMethods = [];\r\n const editingPaymentMethod = paymentMethod;\r\n if (editingPaymentMethod) {\r\n paymentMethods.splice(\r\n paymentMethods.indexOf(editingPaymentMethod),\r\n 1,\r\n newPayment,\r\n );\r\n this.userService.paymentMethods = paymentMethods;\r\n }\r\n else if (paymentMethods.length >= 2) {\r\n paymentMethods.splice(\r\n paymentMethods.indexOf(editingPaymentMethod),\r\n paymentMethods.length - 1,\r\n newPayment,\r\n );\r\n } else {\r\n // newPayment.CardType = newPayment.type;\r\n // newPayment.Last4 = newPayment.lastFour;\r\n // newPayment.ExpireMonth = newPayment.expireMonth;\r\n // newPayment.ExpireYear = newPayment.expireYear;\r\n newPayment.CardType =\r\n newPayment.type || newPayment.cardType;\r\n newPayment.Last4 =\r\n newPayment.lastFour || newPayment.token.lastFour;\r\n newPayment.ExpireMonth =\r\n newPayment.expireMonth ||\r\n newPayment.card.expirationMonth;\r\n newPayment.ExpireYear =\r\n newPayment.expireYear || newPayment.card.expirationYear;\r\n newPayment.token =\r\n newPayment.token.token || newPayment.token;\r\n paymentMethods.push(newPayment);\r\n this.selectedPaymentTypeName =\r\n newPayment.CardType + \" \" + newPayment.Last4;\r\n this.userService.paymentMethods = paymentMethods;\r\n }\r\n this.userService.isPaymentChanged = true;\r\n localStorage.setItem(\r\n \"userService\",\r\n JSON.stringify(this.userService),\r\n );\r\n return;\r\n }\r\n });\r\n iframe.afterOpened().subscribe(() => {\r\n this.isModalOpen = true;\r\n });\r\n resolve(result);\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n result.ErrorDescription,\r\n );\r\n reject(result);\r\n }\r\n } catch (ex) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"error_occured_try_again\",\r\n );\r\n reject(ex);\r\n }\r\n },\r\n (error) => {\r\n reject(error);\r\n },\r\n );\r\n });\r\n return promise;\r\n }\r\n\r\n public savePaymentMethod(payment) {\r\n const promise = new Promise((resolve, reject) => {\r\n const request = {\r\n customerId: 0,\r\n createPaymentMethod: {\r\n MerchantId: payment.MerchantId || 99,\r\n PaymentToken: payment.token,\r\n CardType: payment.type,\r\n NameOnAccount: payment.billingInfo.fullName || \"\",\r\n Ending: payment.lastFour,\r\n Expires: moment({\r\n year: payment.expireYear,\r\n month: parseInt(payment.expireMonth, 10) - 1,\r\n day: parseInt(moment().format(\"D\"), 10),\r\n }).format(),\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode,\r\n },\r\n };\r\n this.apiService.createPaymentMethod(request).subscribe((response) => {\r\n const result = response.Data;\r\n if (response.Status.toString() !== \"0\") {\r\n reject(response.ErrorDescription);\r\n return;\r\n }\r\n this.getPaymentType();\r\n resolve(result);\r\n });\r\n });\r\n return promise;\r\n }\r\n\r\n public clearPayment() {\r\n this.PaymentDataResponse = {};\r\n this.PaymentTypeResponse = [];\r\n this.selectedPaymentTypeName = \"\";\r\n this.SelectedPaymentTypes = {};\r\n this.OldSelectedPaymentType = {};\r\n this.AllowedMethods = [];\r\n this.SaveMethods = [];\r\n localStorage.setItem(\"paymentService\", JSON.stringify({}));\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { Product } from \"src/app/modals/product.model\";\r\nimport { MatSnackBar } from \"@angular/material/snack-bar\";\r\nimport { CartItem } from \"src/app/modals/cart-item\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { Observable, BehaviorSubject, Subscriber } from \"rxjs\";\r\n\r\n// Get product from Localstorage\r\nconst products = JSON.parse(localStorage.getItem(\"cartItem\")) || [];\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class CartService {\r\n // Array\r\n public cartItems: BehaviorSubject = new BehaviorSubject([]);\r\n public observer: Subscriber;\r\n\r\n constructor(public snackBar: MatSnackBar) {\r\n this.cartItems.subscribe((products) => {\r\n console.log(\"cartItems\", products);\r\n });\r\n }\r\n\r\n // Get Products\r\n public getItems(): Observable {\r\n const itemsStream = new Observable((observer) => {\r\n observer.next(products);\r\n observer.complete();\r\n });\r\n return itemsStream as Observable;\r\n }\r\n\r\n // Add to cart\r\n public addToCart(product, quantity: number) {\r\n let message, status;\r\n let item: CartItem | boolean = false;\r\n // If Products exist\r\n const hasItem = products.find((items, index) => {\r\n if (items.product.Id == product.Id) {\r\n const qty = products[index].quantity + quantity;\r\n const stock = this.calculateStockCounts(products[index], quantity);\r\n if (qty != 0 && stock) {\r\n products[index][\"quantity\"] = qty;\r\n message =\r\n \"The product \" +\r\n product.Languages[0].ProductName +\r\n \" has been added to cart.\";\r\n status = \"success\";\r\n this.snackBar.open(message, \"×\", {\r\n panelClass: [status],\r\n verticalPosition: \"top\",\r\n duration: 3000,\r\n });\r\n }\r\n return true;\r\n }\r\n });\r\n\r\n // If Products does not exist (Add New Products)\r\n if (!hasItem) {\r\n item = { product: product, quantity: quantity };\r\n products.push(item);\r\n message = \"The product \" + product.name + \" has been added to cart.\";\r\n status = \"success\";\r\n this.snackBar.open(message, \"×\", {\r\n panelClass: [status],\r\n verticalPosition: \"top\",\r\n duration: 3000,\r\n });\r\n }\r\n localStorage.setItem(\"cartItem\", JSON.stringify(products));\r\n return item;\r\n }\r\n // Calculate Product stock Counts\r\n public calculateStockCounts(product: CartItem, quantity): CartItem | boolean {\r\n const qty = product.quantity + quantity;\r\n const stock = product.product.stock;\r\n if (stock < qty) {\r\n this.snackBar.open(\r\n \"You can not choose more items than available. In stock \" +\r\n stock +\r\n \" items.\",\r\n \"×\",\r\n { panelClass: \"error\", verticalPosition: \"top\", duration: 3000 },\r\n );\r\n return false;\r\n }\r\n return true;\r\n }\r\n // Removed in cart\r\n public removeFromCart(item: CartItem) {\r\n if (item === undefined) {\r\n return false;\r\n }\r\n const index = products.indexOf(item);\r\n products.splice(index, 1);\r\n localStorage.setItem(\"cartItem\", JSON.stringify(products));\r\n }\r\n\r\n // Total amount\r\n public getTotalAmount(): Observable {\r\n return this.cartItems.pipe(\r\n map(() => {\r\n return products.reduce((prev, curr: CartItem) => {\r\n return prev + curr.product.price * curr.quantity;\r\n }, 0);\r\n }),\r\n );\r\n }\r\n\r\n // Update Cart Value\r\n public updateCartQuantity(\r\n product: Product,\r\n quantity: number,\r\n ): CartItem | boolean {\r\n return products.find((items, index) => {\r\n if (items.product.id == product.id) {\r\n const qty = products[index].quantity + quantity;\r\n const stock = this.calculateStockCounts(products[index], quantity);\r\n if (qty != 0 && stock) {\r\n products[index][\"quantity\"] = qty;\r\n }\r\n localStorage.setItem(\"cartItem\", JSON.stringify(products));\r\n return true;\r\n }\r\n });\r\n }\r\n}\r\n","import { ShoppingCartService } from \"./shopping-cart.service\";\r\nimport { EventEmitter, Injectable, Output } from \"@angular/core\";\r\nimport { Observable, BehaviorSubject, Subscriber } from \"rxjs\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { MatSnackBar } from \"@angular/material/snack-bar\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { DSProduct } from \"src/app/modals/dsproduct.modal\";\r\nimport { RestApiService } from \"./restapi.service\";\r\nimport { UserService } from \"./user.service\";\r\nimport * as _ from \"lodash\";\r\nimport { UtilityService } from \"./utility.service\";\r\nimport { CompanyService } from \"./company.service\";\r\nimport { ConfigService } from \"./config.service\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\n\r\n// Get product from Localstorage\r\nconst products = JSON.parse(localStorage.getItem(\"compareItem\")) || [];\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class ProductService {\r\n public catalogMode: boolean = false;\r\n public allItems;\r\n public topSellingItems;\r\n private url1: string = \"assets/data/\";\r\n public url = \"assets/data/banners.json\";\r\n\r\n public compareProducts: BehaviorSubject = new BehaviorSubject([]);\r\n public observer: Subscriber;\r\n public selectedPacks: any = [];\r\n public selectedOrderItems: any = [];\r\n public selectedAutoOrderItems: any = [];\r\n public packs = [];\r\n public orders = [];\r\n public autoship = [];\r\n public IsAllowDynamicCouponcode: boolean = true;\r\n previousRequest = {};\r\n previousRequestForTopSellingItems = {};\r\n retailStoreCategories = [];\r\n\r\n userServiceModal: UserServiceModal;\r\n @Output() updateProductDetailPricing: EventEmitter = new EventEmitter();\r\n // allPriceGroupAndStoreData = JSON.parse(sessionStorage.getItem('allPriceGroupAndStoreData') || '[]') || [];\r\n allPriceGroupAndStoreData = [];\r\n\r\n constructor(\r\n private httpClient: HttpClient,\r\n public snackBar: MatSnackBar,\r\n public apiService: RestApiService,\r\n public user: UserService,\r\n public utilityService: UtilityService,\r\n public companyService: CompanyService,\r\n public configService: ConfigService,\r\n public shoppingCartService: ShoppingCartService,\r\n ) {\r\n this.compareProducts.subscribe((products) => {\r\n console.log(\"compareProducts\", products);\r\n });\r\n this.userServiceModal = this.user.userServiceModal;\r\n this.init();\r\n }\r\n\r\n private products(req?, saveItems = true): Observable {\r\n\r\n const internalRequest = {\r\n PriceGroup: req?.PriceGroup || this.userServiceModal.customerTypeID || 2,\r\n StoreID: req?.StoreID ||\r\n this.shoppingCartService.getShoppingCart(1)[0]?.StoreID ||\r\n (this.userServiceModal.customerTypeID == 2 ? 3 : 2)\r\n };\r\n\r\n /* ---------------------------------------\r\n * Return Data from Storage if we have it.\r\n --------------------------------------- */\r\n\r\n if(this.isPriceGroupStoreIDDataAvailableInStorage(internalRequest)) {\r\n const DataItems = this.isPriceGroupStoreIDDataAvailableInStorage(internalRequest)?.DataItems || [];\r\n if(DataItems.length > 0) {\r\n const itemsStream = new Observable((observer) => {\r\n observer.next(DataItems);\r\n observer.complete();\r\n });\r\n return itemsStream as Observable;\r\n }\r\n }\r\n\r\n /**-------------------------------------- */\r\n\r\n const request = {\r\n CurrencyCode:\r\n req?.CurrencyCode ||\r\n this.companyService.selectedCurrency?.CurrencyCode ||\r\n \"USD\",\r\n LanguageCode:\r\n req?.LanguageCode ||\r\n this.configService.commonData.selectedLanguage ||\r\n \"en\",\r\n RegionID:\r\n req?.RegionID ||\r\n this.companyService.getRegionID(\r\n this.userServiceModal?.selectedCountry || sessionStorage.getItem('selectedCountry')\r\n ) ||\r\n this.companyService.getRegionID(\r\n sessionStorage.getItem(\"selectedCountry\"),\r\n ) ||\r\n 1,\r\n PriceGroup: internalRequest.PriceGroup,\r\n StoreID: internalRequest.StoreID,\r\n CategoryId: req?.CategoryId,\r\n };\r\n return this.apiService.getItemsbyFilter(request).pipe(\r\n map((items) => {\r\n\r\n const newResult = items.Data;\r\n\r\n // Insert Data into Session Storage\r\n if(saveItems) {\r\n this.InsertItemsIntoSessionStorage(internalRequest, newResult);\r\n }\r\n\r\n this.allItems = newResult;\r\n return newResult;\r\n }),\r\n );\r\n }\r\n\r\n private isPriceGroupStoreIDDataAvailableInStorage({ PriceGroup, StoreID }) {\r\n const getAllItemsMapping = this.allPriceGroupAndStoreData || [];\r\n // const getAllItemsMapping = JSON.parse(sessionStorage.getItem('allPriceGroupAndStoreData') || '[]');\r\n return getAllItemsMapping.find((data: any) => data?.priceGroup == PriceGroup && data?.storeId == StoreID) || null;\r\n }\r\n\r\n private InsertItemsIntoSessionStorage(internalRequest, newResult) {\r\n \r\n if(this.allPriceGroupAndStoreData.find((data: any) => data?.priceGroup == internalRequest.PriceGroup && data?.storeId == internalRequest.StoreID)) {\r\n // If already have with same configuration just Replace it.\r\n this.allPriceGroupAndStoreData.forEach((item: any) => {\r\n if( item?.priceGroup == internalRequest.PriceGroup && item?.storeId == internalRequest.StoreID) {\r\n item['DataItems'] = newResult;\r\n }\r\n }); \r\n } else {\r\n this.allPriceGroupAndStoreData.push({\r\n priceGroup: internalRequest.PriceGroup,\r\n storeId: internalRequest.StoreID,\r\n DataItems: newResult\r\n });\r\n }\r\n\r\n // try {\r\n // sessionStorage.setItem('allPriceGroupAndStoreData', JSON.stringify(this.allPriceGroupAndStoreData));\r\n // } catch (error) {\r\n // if(error.message.includes(\"exceeded the quota\")) {\r\n // // Cleared first 2 records.\r\n // this.allPriceGroupAndStoreData.splice(0, 2);\r\n // sessionStorage.setItem('allPriceGroupAndStoreData', JSON.stringify(this.allPriceGroupAndStoreData));\r\n // }\r\n // }\r\n }\r\n\r\n // Get Products By category\r\n public getProductByCategory(request?, saveItems?): Observable {\r\n\r\n\r\n /* ---------------------------------------\r\n * Return Data from Storage if we have it.\r\n --------------------------------------- */\r\n\r\n if(request.PriceGroup && request.StoreID && this.isPriceGroupStoreIDDataAvailableInStorage(request)) {\r\n this.allItems = this.isPriceGroupStoreIDDataAvailableInStorage(request)?.DataItems || [];\r\n } else {\r\n this.allItems = [];\r\n }\r\n\r\n /**-------------------------------------- */\r\n\r\n\r\n if (\r\n this.allItems &&\r\n this.allItems.length > 0 \r\n ) {\r\n const itemsStream = new Observable((observer) => {\r\n observer.next(this.allItems);\r\n observer.complete();\r\n });\r\n return itemsStream as Observable;\r\n } \r\n \r\n return this.products(request, saveItems);\r\n \r\n }\r\n\r\n public banners(): Observable {\r\n return this.httpClient.get(this.url);\r\n }\r\n\r\n // Get Banners\r\n public getBanners() {\r\n return this.banners();\r\n }\r\n\r\n // Get Banners\r\n public getProducts(request?): Observable> {\r\n this.previousRequest = this.previousRequest || request;\r\n\r\n /* ---------------------------------------\r\n * Return Data from Storage if we have it.\r\n --------------------------------------- */\r\n\r\n if(request.PriceGroup && request.StoreID && this.isPriceGroupStoreIDDataAvailableInStorage(request)) {\r\n this.allItems = this.isPriceGroupStoreIDDataAvailableInStorage(request)?.DataItems || [];\r\n } else {\r\n this.allItems = [];\r\n }\r\n\r\n /**-------------------------------------- */\r\n\r\n if (\r\n this.allItems &&\r\n this.allItems.length > 0 &&\r\n _.isEqual(this.previousRequest, request)\r\n ) {\r\n const itemsStream = new Observable((observer) => {\r\n observer.next(this.allItems);\r\n observer.complete();\r\n });\r\n return itemsStream as Observable;\r\n } else {\r\n return this.products(request);\r\n }\r\n }\r\n public getRelatedProducts(product: DSProduct, NumberOfProducts?, customStoreID?): Observable {\r\n\r\n const request = {\r\n CategoryId: product.CategoryId,\r\n NumberOfProducts: NumberOfProducts || 5,\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode,\r\n LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n RegionID: this.companyService.getRegionID(\r\n this.configService.commonData?.selectedCountry,\r\n ),\r\n PriceGroup: this.userServiceModal.customerTypeID,\r\n StoreID: customStoreID ?? this.shoppingCartService.getShoppingCart(1)[0]?.StoreID,\r\n CountryCode: this.configService.commonData.selectedCountry,\r\n };\r\n\r\n if(this.topSellingItems && this.topSellingItems.length > 0 && \r\n _.isEqual(this.previousRequestForTopSellingItems, request)) {\r\n const topItemsStream = new Observable((observer) => {\r\n observer.next(this.topSellingItems);\r\n observer.complete();\r\n });\r\n return topItemsStream as Observable;\r\n }\r\n\r\n this.previousRequestForTopSellingItems = _.cloneDeep(request);\r\n\r\n return this.apiService.getTopSellingProducts(request).pipe(\r\n map((items) => {\r\n this.topSellingItems = items.Data;\r\n return this.topSellingItems;\r\n }),\r\n );\r\n }\r\n\r\n // Get Products By Id\r\n public getProduct(id: number | string, customRequest?: any): Observable {\r\n\r\n /* ---------------------------------------\r\n * Return Data from Storage if we have it.\r\n --------------------------------------- */\r\n\r\n if(customRequest.PriceGroup && customRequest.StoreID && this.isPriceGroupStoreIDDataAvailableInStorage(customRequest)) {\r\n this.allItems = this.isPriceGroupStoreIDDataAvailableInStorage(customRequest)?.DataItems || [];\r\n } else {\r\n this.allItems = [];\r\n }\r\n\r\n /**-------------------------------------- */\r\n \r\n if (this.allItems && this.allItems.length > 0) {\r\n const product = this.allItems.find((item: any) => {\r\n return item.ItemID?.toLowerCase() == id?.toString()?.toLowerCase();\r\n });\r\n const itemsStream = new Observable((observer) => {\r\n observer.next(product);\r\n observer.complete();\r\n });\r\n return itemsStream as Observable;\r\n } else {\r\n return this.products(customRequest).pipe(\r\n map((items) => {\r\n const products = items;\r\n return products.find((item: any) => {\r\n return item.ItemID?.toLowerCase() == id?.toString()?.toLowerCase();\r\n });\r\n }),\r\n );\r\n }\r\n }\r\n\r\n /*\r\n---------------------------------------------\r\n---------- Compare Product ----------------\r\n---------------------------------------------\r\n*/\r\n\r\n // Get Compare Products\r\n public getComapreProducts(): Observable {\r\n const itemsStream = new Observable((observer) => {\r\n observer.next(products);\r\n observer.complete();\r\n });\r\n return itemsStream as Observable;\r\n }\r\n\r\n // If item is aleready added In compare\r\n public hasProduct(product): boolean {\r\n const item = products.find((item) => item.Id === product.id);\r\n return item !== undefined;\r\n }\r\n\r\n // Get Products By Slug\r\n public getProductBySlug(slug: string): Observable {\r\n return this.products().pipe(\r\n map((items) => {\r\n return items.find((item: any) => {\r\n return item.name.replace(\" \", \"-\") === slug;\r\n });\r\n }),\r\n );\r\n }\r\n\r\n // Add to compare\r\n public addToCompare(product) {\r\n let message, status;\r\n let item = false;\r\n if (this.hasProduct(product)) {\r\n item = products.filter((item) => item.id === product.id)[0];\r\n this.snackBar.open(\r\n \"The product \" + product.name + \" already added to comparison list.\",\r\n \"×\",\r\n { panelClass: \"error\", verticalPosition: \"top\", duration: 3000 },\r\n );\r\n } else {\r\n if (products.length < 4) {\r\n products.push(product);\r\n }\r\n message =\r\n \"The product \" + product.name + \" has been added to comparison list.\";\r\n status = \"success\";\r\n this.snackBar.open(message, \"×\", {\r\n panelClass: [status],\r\n verticalPosition: \"top\",\r\n duration: 3000,\r\n });\r\n }\r\n localStorage.setItem(\"compareItem\", JSON.stringify(products));\r\n return item;\r\n }\r\n\r\n // Removed Product\r\n public removeFromCompare(product) {\r\n if (product === undefined) {\r\n return;\r\n }\r\n const index = products.indexOf(product);\r\n products.splice(index, 1);\r\n localStorage.setItem(\"compareItem\", JSON.stringify(products));\r\n }\r\n\r\n \r\n\r\n private init() {\r\n if (localStorage.getItem(\"cart.packs\")) {\r\n this.selectedPacks = JSON.parse(localStorage.getItem(\"cart.packs\"));\r\n }\r\n if (localStorage.getItem(\"cart.order\")) {\r\n this.selectedOrderItems = JSON.parse(localStorage.getItem(\"cart.order\"));\r\n }\r\n if (localStorage.getItem(\"cart.autoship\")) {\r\n this.selectedAutoOrderItems = JSON.parse(\r\n localStorage.getItem(\"cart.autoship\"),\r\n );\r\n }\r\n }\r\n}\r\n","import { ApplicationInitStatus, Injectable } from \"@angular/core\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport * as _ from \"lodash\";\r\nimport { cloneDeep } from \"lodash\";\r\nimport { CartItem } from \"src/app/modals/cart-item\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { CartService } from \"./cart.service\";\r\nimport { NotificationService } from \"./notification.service\";\r\nimport { ProductService } from \"./product.service\";\r\nimport { RestApiService } from \"./restapi.service\";\r\nimport { UserService } from \"./user.service\";\r\nimport { ConfigService } from \"./config.service\";\r\nimport { UtilityService } from \"./utility.service\";\r\nimport { CompanyService } from \"./company.service\";\r\nimport { ShoppingCartService } from \"./shopping-cart.service\";\r\nimport { environment } from \"src/environments/environment\";\r\nimport { AccountService } from \"./account.service\";\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class OrderService {\r\n public calculateOrderResponse: any = {};\r\n public calculateAutoOrderResponse: any = {};\r\n public lastRequest = {};\r\n public lastAutoOrderRequest = {};\r\n shoppingCartItems: CartItem[] = [];\r\n public packTotal = 0;\r\n public packBusinessVolume = 0;\r\n public orderTotal = 0;\r\n public orderRewardTotal = 0;\r\n public orderBusinessVolume = 0;\r\n public autoorderBusinessVolume = 0;\r\n public PreventTaxJarCalculation: boolean = true;\r\n public UsePoints: boolean = false;\r\n public calculateOrderCall: boolean;\r\n public userService: UserServiceModal;\r\n autoshipstoreId: any;\r\n constructor(\r\n public user: UserService,\r\n public notificationService: NotificationService,\r\n public route: ActivatedRoute,\r\n public cartService: CartService,\r\n public apiService: RestApiService,\r\n public translate: TranslateService,\r\n public itemsService: ProductService,\r\n public configService: ConfigService,\r\n public appInit: ApplicationInitStatus,\r\n public utilityService: UtilityService,\r\n public companyService: CompanyService,\r\n public shoppingCartService: ShoppingCartService,\r\n public accountService: AccountService\r\n ) {\r\n this.userService = this.user.userServiceModal;\r\n appInit.donePromise.then(() => this.onInit());\r\n }\r\n\r\n onInit(): void {\r\n this.getstoreId();\r\n this.cartService\r\n .getItems()\r\n .subscribe(\r\n (shoppingCartItems) => (this.shoppingCartItems = shoppingCartItems),\r\n );\r\n if (\r\n this.itemsService.selectedOrderItems &&\r\n this.itemsService.selectedOrderItems.length > 0\r\n ) {\r\n this.calculateOrder();\r\n }\r\n if (\r\n this.itemsService.selectedAutoOrderItems &&\r\n this.itemsService.selectedAutoOrderItems.length > 0\r\n ) {\r\n this.calculateAutoOrder();\r\n }\r\n }\r\n /*** calculate Order ***/\r\n public calculateOrder(showNotification?: boolean, ordertype?: number, skipResolve?: boolean) {\r\n const promise = new Promise((resolve, reject) => {\r\n const productdetails = [];\r\n const kititems = [];\r\n\r\n try {\r\n if (this.userService.customerTypeID != 1) {\r\n this.itemsService.selectedOrderItems = this.itemsService.selectedOrderItems.filter((item) => item.ItemID != 39);\r\n }\r\n } catch (error) {\r\n //\r\n }\r\n\r\n this.itemsService.selectedOrderItems.forEach((item) => {\r\n productdetails.push({\r\n ItemId: item.ItemID,\r\n Quantity: item.Quantity || 1,\r\n IsReward: false, // item.UsePoints\r\n });\r\n });\r\n\r\n this.itemsService.selectedPacks.forEach((item) => {\r\n kititems.push({\r\n ItemId: item.ItemID,\r\n Quantity: item.Quantity || 1,\r\n IsReward: false,\r\n });\r\n });\r\n\r\n if (this.userService.couponInfo.promoCode) {\r\n const isInCart = this.userService.couponInfo.Allcoupons.some((code) => {\r\n if (code == this.userService.couponInfo.promoCode) {\r\n return true;\r\n }\r\n return false;\r\n });\r\n if (!isInCart) {\r\n this.userService.couponInfo.Allcoupons.push(\r\n this.userService.couponInfo.promoCode,\r\n );\r\n }\r\n }\r\n const token = null; // cookieService.getAuthToken();\r\n const guestLogin =\r\n localStorage.getItem(\"guestLogin\") == \"true\" ? true : false;\r\n if (token && !guestLogin) {\r\n const selectedorders = JSON.parse(localStorage.getItem(\"cart.order\"));\r\n if (!selectedorders || !selectedorders.length) {\r\n this.userService.couponInfo.RewardsForUse = [];\r\n this.userService.couponInfo.promoCode = \"\";\r\n this.userService.couponInfo.promoCodeValid = true;\r\n this.userService.couponInfo.IsAppliedcode = false;\r\n this.userService.couponInfo.Allcoupons = [];\r\n }\r\n }\r\n\r\n if(!this.accountService.isLoggedIn()) {\r\n if(this.itemsService.selectedPacks.length > 0 && this.itemsService.selectedOrderItems.find(i => i.ItemID == 39 )) {\r\n this.userService.customerTypeID = 1; // QLA\r\n }\r\n else if (this.itemsService.selectedPacks.length == 0 && this.itemsService.selectedAutoOrderItems.filter(i => {\r\n return !i.SKU.endsWith('-ins');\r\n }).length > 0 && !this.itemsService.selectedOrderItems.find(i => i.ItemID == 39 )) {\r\n this.userService.customerTypeID = 3; // PC\r\n }\r\n else if (this.itemsService.selectedPacks.length > 0 && this.userService.customerTypeID != 1) {\r\n this.userService.customerTypeID = 3; // For Bundles\r\n }\r\n else if (this.itemsService.selectedPacks.length == 0 && this.itemsService.selectedAutoOrderItems.length == 0 && !this.itemsService.selectedOrderItems.find(i => i.ItemID == 39 )) {\r\n this.userService.customerTypeID = 2; // Retail\r\n }\r\n }\r\n\r\n /** -------------------------------------------\r\n * Autoship Discont Coupon Codes\r\n ------------------------------------------- */\r\n \r\n let autoshipDiscountCouponString = \"\";\r\n\r\n try {\r\n \r\n const autoshipItemIDs = [];\r\n \r\n for (let index = 0; index < this.itemsService.selectedOrderItems.length; index++) {\r\n const currentItem = this.itemsService.selectedOrderItems[index];\r\n // If same order item also exist in autoship cart, push it.\r\n if(this.itemsService.selectedAutoOrderItems.findIndex(i => i.ItemID == currentItem.ItemID) > -1) {\r\n autoshipItemIDs.push(currentItem.ItemID?.toString());\r\n }\r\n }\r\n\r\n if(autoshipItemIDs.length > 0) {\r\n const country = this.configService.commonData.selectedCountry || \"us\";\r\n autoshipDiscountCouponString = `AutoshipDiscount,${country},${autoshipItemIDs.join(',')}`;\r\n }\r\n\r\n } \r\n catch (error) {\r\n // skip!\r\n }\r\n\r\n const RegularCouponCodes = this.configService.localSettings.Global.OrderAllowCoupons\r\n ? this.userService.couponInfo.Allcoupons || []\r\n : [];\r\n\r\n const AllCouponsCodes = [...RegularCouponCodes];\r\n\r\n if(autoshipDiscountCouponString) {\r\n AllCouponsCodes.unshift(autoshipDiscountCouponString);\r\n }\r\n\r\n /** ------------------------------------------- */\r\n\r\n const calculateOrderRequest = {\r\n // customerId: this.userService.enrollerInfo?.CustomerId, // for global discount coupons it is necessary to send customer id or sponsor id like this.userService.customerData?.CustomerId ? this.userService.customerData?.CustomerId:this.userService.enrollerInfo?.CustomerId,\r\n customerType:this.userService.enrollerInfo?.CustomerType ||2,\r\n customerId: \"\",\r\n OrderId:\"\",\r\n calculateOrder: {\r\n // WarehouseId: 0,\r\n ShipMethodId: this.userService.selectedShippingMethod || 0,\r\n StoreId: \"9D770BC91C\",\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode ||\"USD\",\r\n ShippingAddress: {\r\n AddressId: 0,\r\n Street1: this.userService.shippingAddress.Street1 || \"507 e\",\r\n Street2: this.userService.shippingAddress.Street2 || \"\",\r\n Street3: \"\",\r\n PostalCode:\r\n this.userService.shippingAddress.PostalCode ||\r\n this.userService.shippingAddress.PostalCode ||\r\n \"84043\",\r\n City: this.userService.shippingAddress.City || \"Lehi\",\r\n Region: this.userService.shippingAddress.Region\r\n ? this.userService.shippingAddress.Region\r\n : this.userService.defaultState ||\r\n this.userService.regionMainState ||\r\n \"UT\",\r\n CountryCode: this.configService.commonData.selectedCountry || \"US\",\r\n },\r\n PriceGroup: this.userService.customerTypeID || 2,\r\n OrderType: 1,\r\n KitItems: kititems,\r\n Items: productdetails,\r\n PartyId: 0,\r\n CouponCodes: AllCouponsCodes,\r\n CountryCode: this.configService.commonData.selectedCountry || \"us\",\r\n CustomShippingAddress:[{\r\n Line1: this.userService.shippingAddress.Street1 || \"507 e\",\r\n Line2: this.userService.shippingAddress.Street2 || \"\",\r\n Zip:\r\n this.userService.shippingAddress.PostalCode ||\r\n this.userService.shippingAddress.PostalCode ||\r\n \"67890\",\r\n City: this.userService.shippingAddress.City || \"Lehi\",\r\n StateCode: this.userService.shippingAddress.Region\r\n ? this.userService.shippingAddress.Region\r\n : this.userService.defaultState ||\r\n this.userService.regionMainState ||\r\n \"UT\",\r\n CountryCode: this.configService.commonData.selectedCountry || \"Us\",\r\n }]\r\n },\r\n };\r\n\r\n if (!skipResolve && _.isEqual(this.lastRequest, calculateOrderRequest)) {\r\n resolve(this.calculateOrderResponse);\r\n } else {\r\n this.lastRequest = cloneDeep(calculateOrderRequest);\r\n this.apiService\r\n .calculateCustomerOrderTotal(calculateOrderRequest)\r\n .subscribe(\r\n (result) => {\r\n\r\n this.itemsService.updateProductDetailPricing.emit(true);\r\n \r\n this.calculateOrderCall = false;\r\n\r\n try {\r\n if (environment.linkTracking.isAllowed) {\r\n this.abandonedCart(\r\n \"Standard\",\r\n result.Data.Items,\r\n result.Data.Total,\r\n );\r\n }\r\n } catch (error) {\r\n console.log(\"error\", error);\r\n }\r\n\r\n try {\r\n if (parseInt(result.Status, 10) === 0) {\r\n this.calculateOrderResponse = result.Data;\r\n\r\n /** ----------------------------------------------------\r\n * Removing Autoship Discount Error From Response\r\n ------------------------------------------------------*/\r\n\r\n if (this.calculateOrderResponse.CouponResults) {\r\n this.calculateOrderResponse.CouponResults = this.calculateOrderResponse.CouponResults.filter((coupon) => {\r\n return !coupon.Code.includes(\"AutoshipDiscount\");\r\n });\r\n }\r\n\r\n /** --------------------------------------------------*/\r\n\r\n if (this.calculateOrderResponse.CouponResults) {\r\n this.calculateOrderResponse.CouponResults.forEach(\r\n (item) => {\r\n const isInCart =\r\n this.userService.couponInfo.Allcoupons?.some(\r\n (code) => {\r\n if (\r\n code.toLowerCase() == item.Code.toLowerCase()\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n );\r\n\r\n if (item.IsValid) {\r\n if (!isInCart) {\r\n this.userService.couponInfo.Allcoupons.push(\r\n item.Code,\r\n );\r\n }\r\n if (\r\n this.userService.couponInfo.promoCode == item.Code\r\n ) {\r\n this.notificationService.success(\r\n \"success\",\r\n \"coupon_added_success\",\r\n );\r\n }\r\n\r\n this.userService.couponInfo.promoCodeValid = true;\r\n } else {\r\n this.userService.couponInfo.promoCodeValid = false;\r\n this.userService.couponInfo.IsAppliedcode = false;\r\n this.userService.couponInfo.promoCode = \"\";\r\n if (\r\n isInCart &&\r\n this.itemsService.selectedOrderItems.length\r\n ) {\r\n this.userService.couponInfo.Allcoupons =\r\n this.userService.couponInfo.Allcoupons.filter(\r\n (code) => {\r\n return (\r\n code.toLowerCase() !=\r\n item.Code.toLowerCase()\r\n );\r\n },\r\n );\r\n this.userService.couponInfo.RewardsForUse =\r\n this.userService.couponInfo.RewardsForUse.filter(\r\n (e) => {\r\n return (\r\n e.Code.toLowerCase() !=\r\n item.Code.toLowerCase()\r\n );\r\n },\r\n );\r\n }\r\n }\r\n },\r\n );\r\n }\r\n this.userService.couponInfo.promoCode = \"\";\r\n setTimeout(() => {\r\n this.userService.shippingMethods =\r\n result.Data.ShippingMethods;\r\n\r\n if (\r\n this.userService.shippingMethods &&\r\n this.userService.shippingMethods.length\r\n ) {\r\n const selectedShipmethod =\r\n this.userService.shippingMethods.filter(\r\n (shipMethod) => {\r\n return (\r\n shipMethod.ShipMethodId ===\r\n this.userService.selectedShippingMethod\r\n );\r\n },\r\n );\r\n if (selectedShipmethod.length > 0) {\r\n this.userService.selectedShippingMethod =\r\n this.userService.selectedShippingMethod ||\r\n selectedShipmethod[0].ShipMethodId;\r\n } else {\r\n this.userService.selectedShippingMethod =\r\n this.userService.selectedShippingMethod ||\r\n this.userService.shippingMethods[0].ShipMethodId;\r\n }\r\n }\r\n }, 100);\r\n\r\n // pack total\r\n if (this.itemsService.selectedPacks.length) {\r\n this.packTotal = 0;\r\n this.packBusinessVolume = 0;\r\n this.itemsService.selectedPacks.forEach((item) => {\r\n this.packTotal =\r\n this.packTotal + item.Quantity * item.Price;\r\n this.packBusinessVolume =\r\n this.packBusinessVolume +\r\n item.Quantity * (item.BusinessVolume || item.PV);\r\n });\r\n }\r\n // order total\r\n if (this.itemsService.selectedOrderItems.length) {\r\n this.orderTotal = 0;\r\n this.orderRewardTotal = 0;\r\n this.orderBusinessVolume = 0;\r\n const selectedOrderItems = cloneDeep(\r\n this.itemsService.selectedOrderItems,\r\n );\r\n this.itemsService.selectedOrderItems = [];\r\n selectedOrderItems.forEach((item) => {\r\n this.calculateOrderResponse.Items.forEach((item1) => {\r\n if (item1.CurrencyCode == \"RWD\") {\r\n item1.UsePoints = true;\r\n }\r\n\r\n if (\r\n item.ItemID == item1.ItemId &&\r\n !!item.UsePoints == !!item1.UsePoints\r\n ) {\r\n item.Price =\r\n item1.Price || item1.PriceEach || item.Price;\r\n if (item1.CurrencyCode == \"RWD\") {\r\n this.orderRewardTotal =\r\n this.orderRewardTotal +\r\n item1.Quantity *\r\n (item1.Price || item1.PriceEach || 0);\r\n } else {\r\n this.orderTotal =\r\n this.orderTotal +\r\n item1.Quantity *\r\n (item1.Price || item1.PriceEach || 0);\r\n }\r\n item1.BusinessVolumeTotal =\r\n this.orderBusinessVolume +\r\n item1.Quantity * (item1.Cv || item1.Qv || 0);\r\n this.orderBusinessVolume =\r\n this.orderBusinessVolume +\r\n item1.Quantity * (item1.Cv || item.Qv || 0);\r\n this.itemsService.selectedOrderItems.push(item);\r\n }\r\n });\r\n });\r\n }\r\n if (showNotification) {\r\n this.notificationService.success(\r\n \"success\",\r\n this.translate.instant(\r\n \"item_added_your_order_shopping_cart\",\r\n ),\r\n );\r\n }\r\n resolve(result);\r\n } else {\r\n const getMessage = result.Message.toLowerCase().includes(\r\n \"Api returned 404 Not Found\".toLowerCase(),\r\n );\r\n let getItemName;\r\n if (getMessage && getMessage !== null) {\r\n const getNumber = result.Message;\r\n const getItemCode = getNumber.match(\r\n new RegExp(\"Item with Id\" + \"\\\\s(\\\\w+)\"),\r\n )[1]; // getNumber.replace(/\\D/g, '');\r\n let getItemDetails = this.itemsService.selectedOrderItems;\r\n if (this.itemsService.selectedPacks.length > 0) {\r\n getItemDetails = getItemDetails.concat(\r\n this.itemsService.selectedPacks,\r\n );\r\n }\r\n getItemDetails.forEach((item) => {\r\n if (item.ItemID == getItemCode) {\r\n getItemName = item.ProductName;\r\n }\r\n });\r\n\r\n this.translate.get(\"error_item_not_found\").subscribe(() => {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"error_item_not_found\") +\r\n \" \" +\r\n getItemName,\r\n );\r\n });\r\n } else {\r\n this.notificationService.error(\"error_\", result.Message);\r\n }\r\n\r\n reject(result);\r\n }\r\n } catch (ex) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"error_occured_try_again\",\r\n );\r\n reject(ex);\r\n }\r\n },\r\n (error) => {\r\n // this.calculateOrderCall = false;\r\n reject(error);\r\n console.log(error)\r\n },\r\n );\r\n }\r\n });\r\n return promise;\r\n }\r\n\r\n /***calculate Auto Order***/\r\n\r\n public calculateAutoOrder(showNotification?: boolean) {\r\n const promise = new Promise((resolve, reject) => {\r\n this.PreventTaxJarCalculation = true;\r\n const productdetails = [];\r\n this.itemsService.selectedAutoOrderItems.forEach((item) => {\r\n productdetails.push({\r\n ItemId: item.ItemID,\r\n Quantity: item.Quantity,\r\n IsKitItem: false,\r\n });\r\n });\r\n\r\n if(!this.accountService.isLoggedIn()) {\r\n if(this.itemsService.selectedPacks.length > 0 && this.itemsService.selectedOrderItems.find(i => i.ItemID == 39 )) {\r\n this.userService.customerTypeID = 1; // QLA\r\n } \r\n else if (this.itemsService.selectedPacks.length == 0 && this.itemsService.selectedAutoOrderItems.filter(i => {\r\n return !i.SKU.endsWith('-ins');\r\n }).length > 0 && !this.itemsService.selectedOrderItems.find(i => i.ItemID == 39 )) {\r\n this.userService.customerTypeID = 3; // PC\r\n }\r\n else if (this.itemsService.selectedPacks.length > 0 && this.userService.customerTypeID != 1) {\r\n this.userService.customerTypeID = 3; // For Bundles\r\n }\r\n else if (this.itemsService.selectedPacks.length == 0 && this.itemsService.selectedAutoOrderItems.length == 0 && !this.itemsService.selectedOrderItems.find(i => i.ItemID == 39 )) {\r\n this.userService.customerTypeID = 2; // Retail\r\n }\r\n }\r\n\r\n const calculateOrderRequest = {\r\n customerId: \"\",\r\n customerType:this.userService.enrollerInfo?.CustomerType ||2,\r\n calculateOrder: {\r\n // WarehouseId: 0,\r\n ShipMethodId: this.userService.selectedShippingMethod || 0,\r\n // StoreId: this.shoppingCartService.getShoppingCart(2)[0]?.StoreID,\r\n StoreId: this.autoshipstoreId || \"80C806BCDE\",\r\n CurrencyCode: this.companyService.selectedCurrency?.CurrencyCode,\r\n ShippingAddress: {\r\n AddressId: 0,\r\n Street1: this.userService.shippingAddress.Street1,\r\n Street2: this.userService.shippingAddress.Street2,\r\n Street3: \"\",\r\n PostalCode:\r\n this.userService.shippingAddress.PostalCode ||\r\n this.userService.shippingAddress.PostalCode ||\r\n \"\",\r\n City: this.userService.shippingAddress.City,\r\n Region: this.userService.shippingAddress.Region\r\n ? this.userService.shippingAddress.Region\r\n : this.userService.defaultState ||\r\n this.userService.regionMainState ||\r\n \"\",\r\n // || this.itemsService.getState() || this.userService.shippingAddress.MainState);,\r\n CountryCode: this.configService.commonData.selectedCountry || \"us\",\r\n },\r\n PriceGroup: this.userService.customerTypeID || 2,\r\n OrderType: 2,\r\n KitItems: [],\r\n Items: productdetails,\r\n PartyId: 0,\r\n CouponCodes: this.configService.localSettings.Global.OrderAllowCoupons\r\n ? this.userService.couponInfo.Allcoupons || []\r\n : [],\r\n CountryCode: this.configService.commonData.selectedCountry || \"us\",\r\n },\r\n OrderId:\"\",\r\n };\r\n if (_.isEqual(this.lastAutoOrderRequest, calculateOrderRequest)) {\r\n resolve(this.calculateAutoOrderResponse);\r\n } else {\r\n this.lastAutoOrderRequest = cloneDeep(calculateOrderRequest);\r\n console.log(\"check the calculateorder\",calculateOrderRequest)\r\n this.apiService\r\n .calculateCustomerOrderTotal(calculateOrderRequest)\r\n .subscribe(\r\n (result) => {\r\n try {\r\n if (environment.linkTracking.isAllowed) {\r\n this.abandonedCart(\r\n \"Autoship\",\r\n result.Data.Items,\r\n result.Data.Total,\r\n );\r\n }\r\n } catch (error) {\r\n //\r\n }\r\n\r\n try {\r\n if (parseInt(result.Status, 10) === 0) {\r\n this.calculateAutoOrderResponse = result.Data;\r\n if (showNotification) {\r\n this.notificationService.success(\r\n \"success\",\r\n this.translate.instant(\"item_added_in_your_autoship\"),\r\n );\r\n }\r\n this.autoorderBusinessVolume = 0;\r\n const selectedAutoOrderItems = cloneDeep(\r\n this.itemsService.selectedAutoOrderItems,\r\n );\r\n this.itemsService.selectedAutoOrderItems = [];\r\n selectedAutoOrderItems.forEach((autoitem) => {\r\n this.calculateAutoOrderResponse.Items.forEach((item1) => {\r\n if (autoitem.ItemID == item1.ItemId) {\r\n autoitem.Price = item1.Price || item1.PriceEach;\r\n autoitem.CV = item1.Cv;\r\n autoitem.QV = item1.Qv;\r\n autoitem.BusinessVolumeTotal =\r\n this.autoorderBusinessVolume +\r\n item1.Quantity * (item1.Cv || item1.Qv || 0);\r\n this.autoorderBusinessVolume =\r\n this.autoorderBusinessVolume +\r\n item1.Quantity * (item1.Cv || item1.Qv || 0);\r\n }\r\n });\r\n });\r\n this.userService.shippingMethods = result.Data.ShipMethods;\r\n if (\r\n this.userService.shippingMethods &&\r\n this.userService.shippingMethods.length\r\n ) {\r\n const selectedShipmethod =\r\n this.userService.shippingMethods.filter((shipMethod) => {\r\n return (\r\n shipMethod.ShipMethodID ===\r\n this.userService.selectedShippingMethod\r\n );\r\n });\r\n if (selectedShipmethod.length > 0) {\r\n this.userService.selectedShippingMethod =\r\n this.userService.selectedShippingMethod ||\r\n selectedShipmethod[0].ShipMethodID;\r\n } else {\r\n this.userService.selectedShippingMethod =\r\n this.userService.selectedShippingMethod ||\r\n this.userService.shippingMethods[0].ShipMethodID;\r\n }\r\n }\r\n this.itemsService.selectedAutoOrderItems =\r\n selectedAutoOrderItems;\r\n resolve(result);\r\n } else {\r\n const getMessage = result.Message.toLowerCase().includes(\r\n \"Api returned 404 Not Found\".toLowerCase(),\r\n );\r\n let getItemName;\r\n if (getMessage && getMessage !== null) {\r\n const getNumber = result.Message;\r\n const getItemCode = getNumber.match(\r\n new RegExp(\"Item with Id\" + \"\\\\s(\\\\w+)\"),\r\n )[1]; // getNumber.replace(/\\D/g, '');\r\n const getItemDetails =\r\n this.itemsService.selectedAutoOrderItems;\r\n getItemDetails.forEach((item) => {\r\n if (item.ItemID == getItemCode) {\r\n getItemName = item.ProductName;\r\n }\r\n });\r\n\r\n this.translate.get(\"error_item_not_found\").subscribe(() => {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"error_item_not_found\") +\r\n \" \" +\r\n getItemName,\r\n );\r\n });\r\n } else {\r\n this.notificationService.error(\"error_\", result.Message);\r\n }\r\n reject(result);\r\n }\r\n } catch (ex) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"error_occured_try_again\",\r\n );\r\n reject(ex);\r\n }\r\n },\r\n (error) => {\r\n reject(error);\r\n },\r\n );\r\n }\r\n });\r\n return promise;\r\n }\r\n\r\n public abandonedCart(type, items, total) {\r\n let data1;\r\n const cartItems = [];\r\n if (items.length > 0) {\r\n items.forEach((element) => {\r\n cartItems.push({\r\n itemId: element.ItemId,\r\n productName: element.ProductName,\r\n sku: element.Sku,\r\n quantity: element.Quantity,\r\n qv: element.Qv,\r\n cv: element.Cv,\r\n bonus: element.Bonus,\r\n price: element.price,\r\n languageCode: element.LanguageCode,\r\n currencyCode: element.CurrencyCode,\r\n });\r\n });\r\n }\r\n try {\r\n if (\r\n this.user.userServiceModal &&\r\n Object.keys(this.user.userServiceModal.customerData).length > 0\r\n ) {\r\n data1 = [\r\n {\r\n type: type,\r\n cartItem: cartItems,\r\n price: total,\r\n enrollerInfo: {\r\n customerId: this.userService.enrollerInfo.CustomerId,\r\n backOfficeId: this.userService.enrollerInfo.BackOfficeId,\r\n firstName: this.userService.enrollerInfo.FirstName,\r\n lastName: this.userService.enrollerInfo.LastName,\r\n webAlias: this.userService.enrollerInfo.WebAlias,\r\n phoneNumber: this.userService.enrollerInfo.PrimaryPhone,\r\n emailAddress: this.userService.enrollerInfo.EmailAddress,\r\n country: this.userService.enrollerInfo.Country,\r\n region: this.userService.enrollerInfo.Region,\r\n },\r\n customerInfo: {\r\n customerId: this.user.userServiceModal.customerData.CustomerId\r\n ? this.user.userServiceModal.customerData.CustomerId\r\n : \"\",\r\n backOfficeId: this.user.userServiceModal.customerData.BackOfficeId\r\n ? this.user.userServiceModal.customerData.BackOfficeId\r\n : \"\",\r\n firstName: this.user.userServiceModal.customerData.FirstName\r\n ? this.user.userServiceModal.customerData.FirstName\r\n : \"\",\r\n lastName: this.user.userServiceModal.customerData.LastName\r\n ? this.user.userServiceModal.customerData.LastName\r\n : \"\",\r\n webAlias: this.user.userServiceModal.customerData.WebAlias\r\n ? this.user.userServiceModal.customerData.WebAlias\r\n : \"\",\r\n phoneNumber: this.user.userServiceModal.customerData.PrimaryPhone\r\n ? this.user.userServiceModal.customerData.PrimaryPhone\r\n : \"\",\r\n emailAddress: this.user.userServiceModal.customerData.EmailAddress\r\n ? this.user.userServiceModal.customerData.EmailAddress\r\n : \"\",\r\n country: this.user.userServiceModal.customerData.PrimaryAddress\r\n .CountryCode\r\n ? this.user.userServiceModal.customerData.PrimaryAddress\r\n .CountryCode\r\n : \"\",\r\n region: this.user.userServiceModal.customerData.PrimaryAddress\r\n .Region\r\n ? this.user.userServiceModal.customerData.PrimaryAddress.Region\r\n : this.user.userServiceModal.customerData.PrimaryAddress.Region,\r\n },\r\n },\r\n ];\r\n } else {\r\n data1 = [\r\n {\r\n type: type,\r\n cartItem: cartItems,\r\n price: total,\r\n enrollerInfo: {\r\n customerId: this.userService.enrollerInfo.CustomerId,\r\n backOfficeId: this.userService.enrollerInfo.BackOfficeId,\r\n firstName: this.userService.enrollerInfo.FirstName,\r\n lastName: this.userService.enrollerInfo.LastName,\r\n webAlias: this.userService.enrollerInfo.WebAlias,\r\n phoneNumber: this.userService.enrollerInfo.PrimaryPhone,\r\n emailAddress: this.userService.enrollerInfo.EmailAddress,\r\n country: this.userService.enrollerInfo.Country,\r\n region: this.userService.enrollerInfo.Region,\r\n },\r\n customerInfo: {},\r\n },\r\n ];\r\n }\r\n const tempData = JSON.stringify(data1);\r\n window[\"ZTM\"].setStats(\r\n environment.linkTracking.companyName,\r\n \"AbandonedCart\",\r\n tempData,\r\n );\r\n } catch (error) {\r\n //\r\n }\r\n }\r\n\r\n /** *Reset last requests\r\n * @method resetLastRequests\r\n * Reset last requests in case of continue shoppings.\r\n */\r\n public resetLastRequests() {\r\n this.lastRequest = {};\r\n this.lastAutoOrderRequest = {};\r\n }\r\n\r\n getStoreIdForRetailCustomers() {\r\n\r\n const autoship_Items_Without_Installment = this.itemsService.selectedAutoOrderItems.filter(i => !i.SKU.endsWith('-ins'));\r\n\r\n if(autoship_Items_Without_Installment.length > 0) {\r\n return 2; // wholesale\r\n }\r\n \r\n return 3; // retail\r\n\r\n }\r\n\r\n getstoreId() {\r\n this.apiService.getStores().subscribe((result) => {\r\n this.autoshipstoreId = result.Data[0].ID;\r\n })\r\n }\r\n}\r\n","
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \"\"\r\n\r\n
\r\n
1\"\r\n fxFlex.xs=\"100\" fxFlex.sm=\"100\">\r\n \r\n \"\"\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

{{product?.ProductName}}

\r\n

{{(product?.RetailPrice * OrderQuantityCount)\r\n |currency:companyService.selectedCurrency.CurrencyCode}}

\r\n

\r\n

\r\n
\r\n

Product details

\r\n

\r\n
\r\n
\r\n
\r\n
0\">\r\n \r\n
\r\n

\r\n \r\n \r\n \r\n {{ value.Option }}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n Quantity\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
","import { Component, OnInit, Inject } from \"@angular/core\";\r\nimport { ProductService } from \"src/app/components/shared/services/product.service\";\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\r\nimport { Router } from \"@angular/router\";\r\nimport { ConfigService } from \"src/app/components/shared/services/config.service\";\r\nimport * as _ from \"lodash\";\r\nimport { CompanyService } from \"src/app/components/shared/services/company.service\";\r\nimport { UserService } from \"src/app/components/shared/services/user.service\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\n\r\n@Component({\r\n selector: \"app-product-dialog\",\r\n templateUrl: \"./product-dialog.component.html\",\r\n styleUrls: [\"./product-dialog.component.scss\"],\r\n})\r\nexport class ProductDialogComponent implements OnInit {\r\n userService: UserServiceModal;\r\n public products;\r\n public product;\r\n public counter: number = 1;\r\n public variantImage = \"\";\r\n public selectedColor = \"\";\r\n public selectedSize = \"\";\r\n public orderOptions;\r\n public OrderQuantityCount;\r\n itemType: string;\r\n itemTypes = {};\r\n ezpModel = {};\r\n event;\r\n activeImage;\r\n activeChildImage;\r\n defaultImage = {};\r\n value = [];\r\n isOptionsSelected: boolean;\r\n callbackService;\r\n showItemChooser;\r\n cartItem;\r\n childItem = {};\r\n public path;\r\n constructor(\r\n public configService: ConfigService,\r\n private router: Router,\r\n public user: UserService,\r\n public productsService: ProductService,\r\n public dialogRef: MatDialogRef,\r\n public itemsService: ProductService,\r\n public companyService: CompanyService,\r\n @Inject(MAT_DIALOG_DATA) public data,\r\n ) {\r\n this.userService = this.user.userServiceModal;\r\n this.callbackService = data.service;\r\n this.itemType = data.type;\r\n this.product = data.value;\r\n this.OrderQuantityCount = data.value.Quantity || 1;\r\n this.itemTypes = {\r\n pack: {\r\n getItemsCall: \"GetEnrollmentKitItems\",\r\n itemQuantity: \"packQuantity\",\r\n cartItems: \"selectedPacks\",\r\n itemserviceCall: \"getPackItems\",\r\n },\r\n order: {\r\n getItemsCall: \"GetProducts\",\r\n itemQuantity: \"orderQuantity\",\r\n cartItems: \"selectedOrderItems\",\r\n itemserviceCall: \"getOrderItems\",\r\n },\r\n autoship: {\r\n getItemsCall: \"GetAutoshipItems\",\r\n itemQuantity: \"autoshipQuantity\",\r\n cartItems: \"selectedAutoOrderItems\",\r\n itemserviceCall: \"getAutoshipItems\",\r\n },\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n this.setUpOrderOptions(this.product);\r\n this.path = this.product?.ImageUrl;\r\n }\r\n\r\n changeimage(e) {\r\n this.path = e;\r\n }\r\n\r\n // determines whether or not buy button should be enabled\r\n buyButtonEnabled() {\r\n if (\r\n !this.product.HasOptions &&\r\n this.product.ItemOptions &&\r\n this.product.ItemOptions.length > 0 &&\r\n this.isOptionsSelected\r\n ) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n // Add item to appropriate cart (autoship / order)\r\n addToCart(type, product) {\r\n if (\r\n this.cartItem &&\r\n this.cartItem.ItemOptions &&\r\n product.ItemOptions.length > 0\r\n ) {\r\n const index = _.findIndex(\r\n this.itemsService[this.itemTypes[this.itemType].cartItems],\r\n { ItemID: this.cartItem.ItemID },\r\n );\r\n this.itemsService[this.itemTypes[this.itemType].cartItems].splice(\r\n index,\r\n 1,\r\n );\r\n }\r\n this.currentQuantity(type, product);\r\n // old add to cart method\r\n // this.callbackService.addToCart(product, true, this.getItemCode(product), type === 'autoship', true, type === 'pack', false);\r\n // new method below\r\n this.product.Quantity = this.OrderQuantityCount;\r\n\r\n if (this.itemType == \"autoship\") {\r\n if (product?.HasOptions) {\r\n this.callbackService.addToCart(\r\n product,\r\n true,\r\n product?.CustomItemCode,\r\n true,\r\n true,\r\n false,\r\n true,\r\n );\r\n } else {\r\n this.callbackService.addToCart(\r\n product,\r\n true,\r\n \"\",\r\n true,\r\n true,\r\n false,\r\n true,\r\n );\r\n }\r\n } else if (this.itemType == \"order\") {\r\n if (product?.HasOptions) {\r\n this.callbackService.addToCart(\r\n product,\r\n true,\r\n product?.CustomItemCode,\r\n false,\r\n true,\r\n false,\r\n true,\r\n );\r\n } else {\r\n this.callbackService.addToCart(\r\n product,\r\n true,\r\n \"\",\r\n false,\r\n true,\r\n false,\r\n true,\r\n );\r\n }\r\n } else if (this.itemType == \"pack\") {\r\n if (product?.HasOptions) {\r\n this.callbackService.addToCart(\r\n product,\r\n true,\r\n product?.CustomItemCode,\r\n false,\r\n true,\r\n true,\r\n true,\r\n );\r\n } else {\r\n this.callbackService.addToCart(\r\n product,\r\n true,\r\n \"\",\r\n false,\r\n true,\r\n true,\r\n true,\r\n );\r\n }\r\n }\r\n\r\n this.close();\r\n }\r\n\r\n // add to cart or buy\r\n addToCartOrShowDetails(type, product) {\r\n this.itemType = type ? type : this.itemType;\r\n this.addToCart(this.itemType, product);\r\n }\r\n\r\n public close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n public increment() {\r\n this.counter += 1;\r\n }\r\n\r\n public decrement() {\r\n if (this.counter > 1) {\r\n this.counter -= 1;\r\n }\r\n }\r\n\r\n public increaseQuantity() {\r\n if (this.OrderQuantityCount < 99) {\r\n this.OrderQuantityCount++;\r\n }\r\n }\r\n\r\n public decreaseQuantity() {\r\n if (this.OrderQuantityCount > 1) {\r\n this.OrderQuantityCount--;\r\n }\r\n }\r\n\r\n currentQuantity(type, item) {\r\n type = type || this.itemType;\r\n this.callbackService[this.itemTypes[type].itemQuantity] =\r\n this.callbackService[this.itemTypes[type].itemQuantity] || {};\r\n this.callbackService[this.itemTypes[type].itemQuantity][\r\n this.getItemCode(item)\r\n ] = this.OrderQuantityCount;\r\n }\r\n\r\n setUpOrderOptions(item) {\r\n if (!this.orderOptions) {\r\n this.orderOptions = {};\r\n }\r\n\r\n const dict = this.orderOptions;\r\n\r\n // If editing an item with selected customizations, find them and set the dropdowns\r\n let optionsMap;\r\n _.each(item?.OptionsMap, (val) => {\r\n val.OptionNames = val.Key.split(\"|\");\r\n });\r\n if (item?.selectedOptions) {\r\n item.OptionsMap.some((optMap) => {\r\n if (optMap.ItemId === (item.CustomItemCode || item.ItemID)) {\r\n optionsMap = optMap.OptionNames;\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n\r\n // Otherwise, default to the first options map\r\n const optionMapNames = item?.OptionsMap\r\n ? item?.OptionsMap.map((optMap) => {\r\n return optMap?.OptionNames;\r\n })\r\n : [];\r\n\r\n if (!item?.selectedOptions || !optionsMap) {\r\n optionsMap = optionMapNames[0];\r\n }\r\n\r\n // Loop through the OptionsMap\r\n let optionVal;\r\n let optionValues;\r\n for (const index in optionsMap) {\r\n if (Object.prototype.hasOwnProperty.call(optionsMap, index)) {\r\n optionVal = optionsMap[index];\r\n // For each option in the OptionsMap, loop through the ItemOptions\r\n for (const itemIndex in item.ItemOptions) {\r\n // Get all the values of the ItemOption\r\n if (\r\n Object.prototype.hasOwnProperty.call(item.ItemOptions, itemIndex)\r\n ) {\r\n optionValues =\r\n item.ItemOptions[itemIndex].Values.map(getOptionValueName);\r\n // If one of them is the value from the OptionsMap, use it\r\n const option = item.ItemOptions[itemIndex];\r\n if (\r\n !!~optionValues.indexOf(optionVal) &&\r\n !dict[this.getOrderOptionKey(item, option)]\r\n ) {\r\n dict[this.getOrderOptionKey(item, option)] = optionVal;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getOptionValueName(val) {\r\n return val.Option;\r\n }\r\n }\r\n\r\n // change active image\r\n setActiveImage(image) {\r\n setTimeout(() => {\r\n this.activeImage = image;\r\n }, 1);\r\n }\r\n\r\n setActiveChildImage(image) {\r\n this.activeChildImage = image;\r\n }\r\n\r\n // Show the price times the quantity selected\r\n getPrice(item, quantity) {\r\n if (quantity < 1) {\r\n this.OrderQuantityCount = 1;\r\n }\r\n return item ? (item.Price || item.Prices[0].Price) * quantity : 0;\r\n }\r\n\r\n // Show the volume times the quantity selected\r\n getVolume(item, quantity) {\r\n return (\r\n (item.BusinessVolume || item.BusinessVolume === 0\r\n ? item.BusinessVolume\r\n : item.PV) * quantity\r\n );\r\n }\r\n\r\n transformItem(item) {\r\n item.Price =\r\n item.Price || item.Price === 0 ? item.Price : item.Prices[0].Price;\r\n\r\n item.Images = item.Images || [];\r\n if (\r\n item.LargeImageUrl &&\r\n !_.find(item.Images, {\r\n Path: item.LargeImageUrl,\r\n })\r\n ) {\r\n item.Images.unshift({\r\n Description: item.Description,\r\n Path: item.LargeImageUrl,\r\n });\r\n } else if (\r\n item.Image &&\r\n !_.find(item.Images, {\r\n Path: item.Image,\r\n })\r\n ) {\r\n item.Images.unshift({\r\n Description: item.Description,\r\n Path: item.Image,\r\n });\r\n }\r\n return item;\r\n }\r\n\r\n itemInCart(item) {\r\n const shoppingCart =\r\n this.itemsService[this.itemTypes[this.itemType].cartItems];\r\n return _.find(shoppingCart, {\r\n ItemID: item.ItemID,\r\n });\r\n }\r\n\r\n // get kit item details\r\n getKitItemDetails(kitItem) {\r\n this.childItem = kitItem;\r\n this.activeChildImage = kitItem.Images\r\n ? kitItem.Images[0]\r\n : this.defaultImage;\r\n }\r\n\r\n // Select an option from a customization menu\r\n selectOption(item, option, value) {\r\n option.selected = value.Option;\r\n this.orderOptions[this.getOrderOptionKey(item, option)] = value.Option;\r\n const tempOptData = [];\r\n Object.keys(this.orderOptions).forEach((optdata) => {\r\n tempOptData.push(optdata);\r\n }),\r\n item.OptionsMap.forEach((itemOptdata) => {\r\n if (\r\n JSON.stringify(tempOptData.sort()) ===\r\n JSON.stringify(itemOptdata.OptionNames.sort())\r\n ) {\r\n let tempimgurl = item.SmallImageUrl;\r\n if (itemOptdata.Image) {\r\n tempimgurl = item.SmallImageUrl.substr(\r\n 0,\r\n item.SmallImageUrl.lastIndexOf(\"/\"),\r\n ).concat(itemOptdata.Image);\r\n }\r\n const tempimage = {\r\n Path: tempimgurl,\r\n };\r\n this.setActiveImage(tempimage);\r\n }\r\n });\r\n if (item?.HasOptions) {\r\n item.CustomItemCode = this.getItemCode(item);\r\n }\r\n }\r\n\r\n setInitialItemOption(option, value) {\r\n const defaultOption =\r\n this.orderOptions[this.getOrderOptionKey(this.product, option)] ||\r\n option.Option;\r\n if (value.Option === defaultOption) {\r\n option.selected = value.Option;\r\n }\r\n }\r\n\r\n getOrderOptionKey(item, option) {\r\n return item.ItemID + \"__\" + option.Option;\r\n }\r\n getOptionsText(optionValArray) {\r\n return \"[\" + optionValArray.join(\", \") + \"]\";\r\n }\r\n\r\n getItemCode(item) {\r\n // If there are no customizations, just return the item code\r\n if (!item.ItemOptions || !item.ItemOptions.length || !item.HasOptions) {\r\n return this.product.ItemID;\r\n }\r\n // If there are customizations, find the right OptionsMap and use its code\r\n const optionValues = [];\r\n for (const key in this.orderOptions) {\r\n if (\r\n !Object.prototype.hasOwnProperty.call(this.orderOptions, key) ||\r\n item.ItemID.toString() !== key.split(\"__\")[0]\r\n ) {\r\n continue;\r\n }\r\n\r\n optionValues.push(this.orderOptions[key]);\r\n }\r\n\r\n optionValues.sort();\r\n\r\n item.selectedOptions = this.getOptionsText(optionValues);\r\n\r\n if (item.HasKitOptions) {\r\n item.KitGroups.forEach((kitGroup) => {\r\n kitGroup.Items.forEach(this.getItemCode);\r\n });\r\n }\r\n\r\n let mapping;\r\n for (const index in item.OptionsMap) {\r\n if (Object.prototype.hasOwnProperty.call(item.OptionsMap, index)) {\r\n mapping = item.OptionsMap[index];\r\n mapping.OptionNames.sort();\r\n if (_.isEqual(optionValues, mapping.OptionNames)) {\r\n return mapping.ItemId;\r\n }\r\n }\r\n }\r\n\r\n throw new Error(\r\n \"Error: \" +\r\n item.ProductName +\r\n \" does not have a mapping for \" +\r\n optionValues.toString() +\r\n \".\",\r\n );\r\n }\r\n getValidValues(item, option, values) {\r\n // Get the already-selected option values (except this one and values from other items)\r\n const currentOption = this.getOrderOptionKey(item, option);\r\n const otherOptions = [];\r\n\r\n for (const key in this.orderOptions) {\r\n if (\r\n key === currentOption ||\r\n item.ItemID.toString() !== key.split(\"__\")[0]\r\n ) {\r\n continue;\r\n }\r\n\r\n otherOptions.push(this.orderOptions[key]);\r\n }\r\n\r\n // Whittle down the OptionMaps to the ones that have all the already-selected options\r\n const optionMapNames = item.OptionsMap\r\n ? item.OptionsMap.map((optMap) => {\r\n return optMap.OptionNames;\r\n })\r\n : [];\r\n const validOptionMaps = optionMapNames.filter((optNames) => {\r\n // For each OptionMap, ensure that it contains all the other selected options\r\n let optionValue1;\r\n for (const index in otherOptions) {\r\n if (Object.prototype.hasOwnProperty.call(otherOptions, index)) {\r\n optionValue1 = otherOptions[index];\r\n if (~optNames.indexOf(optionValue1)) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n // Union the validOptionMaps\r\n const validOptionValues = validOptionMaps.reduce((arr, optMap) => {\r\n let optionName;\r\n for (const index in optMap) {\r\n if (Object.prototype.hasOwnProperty.call(optMap, index)) {\r\n optionName = optMap[index];\r\n if (!~arr.indexOf(optionName)) {\r\n arr.push(optionName);\r\n }\r\n }\r\n }\r\n return arr;\r\n }, []);\r\n\r\n // Set `isAvailable: true` on each option that can be found in validOptionNames, and `isAvailable: false` on the others\r\n let optionValue;\r\n for (const index in values) {\r\n if (Object.prototype.hasOwnProperty.call(values, index)) {\r\n optionValue = values[index];\r\n optionValue.isAvailable = !!~validOptionValues.indexOf(\r\n optionValue.Option,\r\n );\r\n }\r\n }\r\n return values.filter((itm) => {\r\n return itm.isAvailable;\r\n });\r\n }\r\n\r\n openSelect(event) {\r\n this.event = event || this.event;\r\n // this is due to select input fields are not consistant in some browser\r\n if (window.screen.availWidth < 600 && !event) {\r\n setTimeout(() => {}, 100);\r\n }\r\n }\r\n\r\n checkOptions(option) {\r\n let count = 0;\r\n this.value.forEach((item) => {\r\n if (item) {\r\n count++;\r\n }\r\n });\r\n this.isOptionsSelected = count === option.length;\r\n }\r\n}\r\n","import { ShoppingCartService } from \"./shopping-cart.service\";\r\nimport { cloneDeep } from \"lodash\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { MatSnackBar } from \"@angular/material/snack-bar\";\r\nimport * as _ from \"lodash\";\r\nimport { OrderService } from \"./order.service\";\r\nimport { UserService } from \"./user.service\";\r\nimport { ProductService } from \"./product.service\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { Router } from \"@angular/router\";\r\nimport { NotificationService } from \"./notification.service\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { ConfirmDialogComponent } from \"../model/confirm-dialog/confirm-dialog.component\";\r\nimport { UtilityService } from \"./utility.service\";\r\nimport { CompanyService } from \"./company.service\";\r\nimport { ConfigService } from \"./config.service\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class ItemsListService {\r\n public isShowViewButton: boolean = false;\r\n public totalItem = {};\r\n public buttonText = {};\r\n public productList = [];\r\n public categoryList = [];\r\n public products = [];\r\n public selectedCategory: string = \"all\";\r\n public selectedCategoryType: string = \"\";\r\n public selectedCategories: any = {};\r\n public allProductList = [];\r\n userServiceModal: UserServiceModal;\r\n public type;\r\n swalErrorMsg: string;\r\n MembershipItemCode: number = 0;\r\n\r\n constructor(\r\n private itemsService: ProductService,\r\n public snackBar: MatSnackBar,\r\n public orderService: OrderService,\r\n public userService: UserService,\r\n public route: Router,\r\n public notificationService: NotificationService,\r\n public translate: TranslateService,\r\n private dialog: MatDialog,\r\n public utilityService: UtilityService,\r\n public companyService: CompanyService,\r\n public configService: ConfigService,\r\n public shoppingCartService: ShoppingCartService,\r\n ) {\r\n this.userServiceModal = this.userService.userServiceModal;\r\n }\r\n\r\n viewAll(index) {\r\n if (this.totalItem[index] === 4) {\r\n this.totalItem[index] = 100;\r\n this.buttonText[index] = \"view_less\";\r\n } else {\r\n this.totalItem[index] = 4;\r\n this.buttonText[index] = \"view_more\";\r\n }\r\n }\r\n\r\n checkSelect(type) {\r\n if (type && type != \"all\") {\r\n for (const i in this.selectedCategories) {\r\n if (this.selectedCategories[i] === true) {\r\n return;\r\n }\r\n }\r\n this.selectedCategories[\"all\"] = true;\r\n _.each(this.categoryList, (item) => {\r\n this.selectedCategories[item.CategoryId] = true;\r\n });\r\n } else {\r\n let checkselectall = false;\r\n if (this.categoryList.length >= 1) {\r\n _.each(this.categoryList, (item) => {\r\n if (this.selectedCategories[\"all\"] === true) {\r\n this.selectedCategories[item.CategoryId] = true;\r\n checkselectall = true;\r\n } else {\r\n this.selectedCategories[item.CategoryId] = false;\r\n checkselectall = false;\r\n }\r\n });\r\n } else {\r\n this.selectedCategories[\"all\"] = true;\r\n }\r\n if (!checkselectall) {\r\n if (this.categoryList.length > 0) {\r\n this.selectedCategories[this.categoryList[0].CategoryId] = true;\r\n }\r\n this.productList = _.filter(this.products, (item) => {\r\n if (typeof type === \"string\" || typeof type === \"number\") {\r\n return item.CategoryId == type;\r\n } else {\r\n return this.selectedCategories[item.CategoryId];\r\n }\r\n });\r\n return true;\r\n }\r\n }\r\n }\r\n getItemsByCategory(type = null) {\r\n\r\n this.selectedCategory = type || \"all\";\r\n type = type === \"[object Object]\" ? \"all\" : type;\r\n if (type && type != \"all\") {\r\n if (typeof type === \"string\" || typeof type === \"number\") {\r\n this.selectedCategories[\"all\"] = false;\r\n _.each(this.categoryList, (item) => {\r\n if (item.Category.toLowerCase() != type.toString().toLowerCase()) {\r\n this.selectedCategories[item.CategoryId] = false;\r\n } else if (\r\n item.Category.toLowerCase() == type.toString().toLowerCase()\r\n ) {\r\n this.selectedCategories[item.CategoryId] = true;\r\n }\r\n });\r\n } else {\r\n this.checkSelect(type);\r\n }\r\n\r\n this.productList = _.filter(this.products, (item) => {\r\n if (typeof type === \"string\" || typeof type === \"number\") {\r\n return item.Category.toLowerCase() == type.toString().toLowerCase();\r\n } else {\r\n return type[item.CategoryId];\r\n }\r\n });\r\n } else {\r\n this.isShowViewButton = true;\r\n if (!this.checkSelect(type)) {\r\n this.productList = this.products;\r\n }\r\n }\r\n if (this.selectedCategories[\"all\"] == true) {\r\n this.selectedCategoryType = \"all\";\r\n } else if (this.productList.length > 0) {\r\n this.selectedCategoryType = this.productList[0].CategoryDescription || \"\";\r\n }\r\n }\r\n\r\n groupByKeepOrder(arr, prop) {\r\n const newArr = [];\r\n const wrapObj = {};\r\n\r\n _.forEach(arr, (item) => {\r\n let propName = item[prop];\r\n if (propName) {\r\n propName = propName.toString();\r\n if (!wrapObj[propName]) {\r\n wrapObj[propName] = [];\r\n newArr.push(wrapObj[propName]);\r\n }\r\n // adds item to the group\r\n wrapObj[propName].push(item);\r\n }\r\n });\r\n // delete wrapObj; // don't need this anymore\r\n return newArr;\r\n }\r\n\r\n checkRestrictedState(\r\n countrycall,\r\n country,\r\n CheckoutCall,\r\n swalcheck,\r\n uniqueCategoryIdCheck,\r\n productCall,\r\n newRegionCall,\r\n isRedirect,\r\n isReload,\r\n ) {\r\n const promise = new Promise((resolve, reject) => {\r\n const request = {\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode,\r\n LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n RegionID: newRegionCall\r\n ? this.companyService.getRegionID(\r\n this.configService.commonData.selectedCountry,\r\n )\r\n : 1,\r\n PriceGroup: this.userServiceModal.customerTypeID,\r\n StoreID: this.shoppingCartService.getShoppingCart(1)[0]?.StoreID,\r\n CategoryId: 0,\r\n };\r\n this.itemsService.getProducts(request).subscribe(\r\n (result: any) => {\r\n try {\r\n let preOrderLength = 0;\r\n let preAutoOrderLength = 0;\r\n if (result.length > 0) {\r\n preOrderLength = this.itemsService.selectedOrderItems.length;\r\n preAutoOrderLength =\r\n this.itemsService.selectedAutoOrderItems.length;\r\n\r\n if (this.itemsService.selectedOrderItems.length > 0) {\r\n const selectedOrder = cloneDeep(\r\n this.itemsService.selectedOrderItems,\r\n );\r\n this.itemsService.selectedOrderItems = [];\r\n _.each(selectedOrder, (product) => {\r\n const itemDetails = _.filter(result, (item) => {\r\n if (item.HasOptions) {\r\n _.each(item.OptionsMap, (value) => {\r\n if (value.ItemId == product.ItemID) {\r\n item.ItemID = value.ItemId;\r\n return;\r\n }\r\n });\r\n }\r\n if (\r\n item.ItemID == product.ItemID &&\r\n product.selectedOptions\r\n ) {\r\n item.selectedOptions = product.selectedOptions;\r\n }\r\n return item.ItemID == product.ItemID;\r\n });\r\n if (itemDetails.length > 0) {\r\n const optionItem = cloneDeep(itemDetails[0]);\r\n if (!product.UsePoints) {\r\n optionItem.Quantity = product.Quantity;\r\n optionItem.UsePoints = false;\r\n } else if (product.UsePoints) {\r\n optionItem.UsePoints = product.UsePoints;\r\n optionItem.rewardQuantity = product.rewardQuantity;\r\n }\r\n this.itemsService.selectedOrderItems.push(optionItem);\r\n localStorage.setItem(\r\n \"cart.order\",\r\n JSON.stringify(this.itemsService.selectedOrderItems),\r\n );\r\n }\r\n });\r\n if (\r\n this.itemsService.selectedOrderItems.length !== preOrderLength\r\n ) {\r\n this.swalErrorMsg = \"error_some_items_not_exist\";\r\n }\r\n }\r\n if (this.itemsService.selectedAutoOrderItems.length > 0) {\r\n const selectedAutoOrder = cloneDeep(\r\n this.itemsService.selectedAutoOrderItems,\r\n );\r\n this.itemsService.selectedAutoOrderItems = [];\r\n _.each(selectedAutoOrder, (product) => {\r\n const itemDetails = _.filter(result, (item) => {\r\n if (item.HasOptions) {\r\n _.each(item.OptionsMap, (value) => {\r\n if (value.ItemId == product.ItemID) {\r\n item.ItemID = value.ItemId;\r\n return;\r\n }\r\n });\r\n }\r\n if (\r\n item.ItemID == product.ItemID &&\r\n product.selectedOptions\r\n ) {\r\n item.selectedOptions = product.selectedOptions;\r\n }\r\n return item.ItemID == product.ItemID && item.AllowAutoship;\r\n });\r\n if (itemDetails.length > 0) {\r\n const optionItem = cloneDeep(itemDetails[0]);\r\n optionItem.Quantity = product.Quantity;\r\n optionItem.UsePoints = false;\r\n this.itemsService.selectedAutoOrderItems.push(optionItem);\r\n }\r\n });\r\n if (\r\n this.itemsService.selectedAutoOrderItems.length !==\r\n preAutoOrderLength\r\n ) {\r\n this.swalErrorMsg = \"error_some_items_not_exist\";\r\n }\r\n }\r\n } else {\r\n this.allProductList = [];\r\n this.itemsService.selectedOrderItems = [];\r\n this.itemsService.selectedAutoOrderItems = [];\r\n this.swalErrorMsg = \"error_products_not_exist_in_region\";\r\n }\r\n\r\n localStorage.setItem(\r\n \"cart.order\",\r\n JSON.stringify(this.itemsService.selectedOrderItems),\r\n );\r\n if (this.itemsService.selectedOrderItems.length === 0) {\r\n this.orderService.calculateOrderResponse = {};\r\n } else {\r\n this.orderService.calculateOrder();\r\n }\r\n\r\n localStorage.setItem(\r\n \"cart.autoship\",\r\n JSON.stringify(this.itemsService.selectedAutoOrderItems),\r\n );\r\n if (this.itemsService.selectedAutoOrderItems.length === 0) {\r\n this.orderService.calculateAutoOrderResponse = {};\r\n } else {\r\n this.orderService.calculateAutoOrder();\r\n }\r\n // check user logged in and has selectedOrders\r\n if (\r\n this.itemsService.selectedAutoOrderItems.length !==\r\n preAutoOrderLength ||\r\n this.itemsService.selectedOrderItems.length !== preOrderLength\r\n ) {\r\n if (countrycall || CheckoutCall || productCall) {\r\n this.userServiceModal.checkItems = false;\r\n if (swalcheck) {\r\n this.restrictedStateSwal(\r\n this.swalErrorMsg,\r\n productCall,\r\n isRedirect,\r\n isReload,\r\n );\r\n } else if (isRedirect) {\r\n this.redirection();\r\n }\r\n }\r\n }\r\n resolve({\r\n items: result,\r\n errorMsg: this.swalErrorMsg ? true : false,\r\n });\r\n } catch (ex) {\r\n this.notificationService.error(\r\n \"Error\",\r\n this.translate.instant(\"error_occured_try_again\"),\r\n );\r\n this.clearcart();\r\n if (countrycall || CheckoutCall || productCall) {\r\n this.userServiceModal.checkItems = false;\r\n this.route.navigate([\"/products/all\"]);\r\n }\r\n reject(ex);\r\n }\r\n },\r\n (error) => {\r\n this.clearcart();\r\n reject(error);\r\n this.route.navigate([\"/products/all\"]);\r\n },\r\n );\r\n });\r\n return promise;\r\n }\r\n\r\n clearcart() {\r\n this.allProductList = [];\r\n this.itemsService.selectedOrderItems = [];\r\n this.itemsService.selectedAutoOrderItems = [];\r\n localStorage.setItem(\r\n \"cart.order\",\r\n JSON.stringify(this.itemsService.selectedOrderItems),\r\n );\r\n localStorage.setItem(\r\n \"cart.autoship\",\r\n JSON.stringify(this.itemsService.selectedAutoOrderItems),\r\n );\r\n this.orderService.calculateOrderResponse = {};\r\n this.orderService.calculateAutoOrderResponse = {};\r\n this.userServiceModal.checkItems = false;\r\n }\r\n\r\n destory() {\r\n this.isShowViewButton = true;\r\n this.totalItem = {};\r\n this.buttonText = {};\r\n this.productList = [];\r\n this.categoryList = [];\r\n this.products = [];\r\n }\r\n\r\n redirection() {\r\n this.route.navigate([\"/products/all\"]);\r\n }\r\n\r\n restrictedStateSwal(datatitle, productCall, isRedirect, isReload) {\r\n const dialogRef1 = this.dialog.open(ConfirmDialogComponent, {\r\n maxWidth: \"400px\",\r\n data: {\r\n title: this.translate.instant(datatitle),\r\n message: \"\",\r\n takeaction: productCall\r\n ? this.translate.instant(\"ok_btn\")\r\n : this.translate.instant(\"go_product\"),\r\n noaction: this.translate.instant(\"stay_on_checkout\"),\r\n },\r\n panelClass: \"\",\r\n disableClose: true,\r\n autoFocus: false,\r\n });\r\n dialogRef1.afterClosed().subscribe((dialogResult) => {\r\n if (dialogResult) {\r\n if (isRedirect) {\r\n this.redirection();\r\n }\r\n if (isReload) {\r\n location.reload();\r\n }\r\n }\r\n });\r\n }\r\n\r\n getAutoships_WithoutInstallment = (allAutoshipList) => {\r\n return allAutoshipList.filter((item) => !item?.Custom?.Field5.includes(\"installment-sku\"));\r\n };\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { NotificationService } from \"./notification.service\";\r\nimport { RestApiService } from \"./restapi.service\";\r\nimport { UserService } from \"./user.service\";\r\nimport * as moment from \"moment\";\r\nimport { UtilityService } from \"./utility.service\";\r\nimport { PersistentService } from \"./persistent.service\";\r\nimport { ConfigService } from \"./config.service\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport * as _ from \"lodash\";\r\nimport { cloneDeep } from \"lodash\";\r\nimport { CommonSetting } from \"src/app/modals/commonsetting.modal\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class AutoshipConfigurationService {\r\n \r\n public commonData: CommonSetting;\r\n public setting: any = {};\r\n public userService: UserServiceModal;\r\n public maxCurrentMonth: boolean = false;\r\n public restrictCurrentMonth: boolean;\r\n public currentAutoshipdate: boolean;\r\n public autoshipDate;\r\n\r\n constructor(\r\n public notificationService: NotificationService,\r\n public user: UserService,\r\n public apiService: RestApiService,\r\n public utilityService: UtilityService,\r\n public persistentService: PersistentService,\r\n public configService: ConfigService,\r\n public translate: TranslateService,\r\n ) {\r\n this.userService = this.user.userServiceModal;\r\n this.commonData = this.configService.getConfig();\r\n this.autoshipDate =\r\n this.autoshipDate || moment().add(1, \"months\").format(\"DD MMMM YYYY\");\r\n }\r\n\r\n onInit(): void {\r\n this.init();\r\n }\r\n\r\n init() {\r\n const autoshipConfigData = [\r\n {\r\n CustomerTypeId: \"1\",\r\n NewAutoshipRestrictedDates: null,\r\n StartDate: \"2021-10-25\",\r\n NewAutoshipEndDate: \"All\",\r\n AutoshipNotPaidRestrictedDates: null,\r\n AutoshipNotPaidEndDate: \"All\",\r\n AutoshipPaidEndDate: \"All\",\r\n AutoshipPaidRestrictedDates: null,\r\n },\r\n ];\r\n if (autoshipConfigData.length > 0) {\r\n this.setting = autoshipConfigData[0];\r\n this.setting.allowEdit = true;\r\n this.setting.disableEdit = false;\r\n let isfreqcall = false;\r\n if (this.utilityService.getAutoshipEditFlag()) {\r\n this.setting.configDate = this.setting.AutoshipPaidEndDate;\r\n this.setting.configRestrictedDate = this.setting\r\n .AutoshipPaidRestrictedDates\r\n ? this.setting.AutoshipPaidRestrictedDates.split(\",\")\r\n : \"\";\r\n }\r\n\r\n if (\r\n moment(this.setting.configDate).format(\"DD-MM-YYYY\") ==\r\n moment().endOf(\"month\").format(\"DD-MM-YYYY\")\r\n ) {\r\n this.setting.currentMonthOnly = true;\r\n }\r\n\r\n if (\r\n this.setting.configDate === \"None\" ||\r\n this.setting.configDate === \"All\"\r\n ) {\r\n this.setting.InvalidEndDate = true;\r\n }\r\n if (this.setting.configDate !== \"None\") {\r\n isfreqcall = true;\r\n this.getDefaultFrequency().then(() => {\r\n this.setAutoshipDate();\r\n });\r\n } else {\r\n this.setting.disableEdit = true;\r\n this.autoshipDate =\r\n this.autoshipDate || moment().add(1, \"months\").format(\"DD MMMM YYYY\");\r\n }\r\n if (!isfreqcall) {\r\n this.getDefaultFrequency();\r\n }\r\n } else {\r\n this.setting.allowEdit = true;\r\n this.getDefaultFrequency();\r\n }\r\n }\r\n\r\n // /**\r\n // * Get Next Remaining Date\r\n // * @method getNextRemainingDate\r\n // */\r\n getNextRemainingDate() {\r\n try {\r\n let num;\r\n if (this.utilityService.getAutoshipEditFlag()) {\r\n num = this.setting.AutoshipPaidRestrictedDates?.split(\",\");\r\n } else {\r\n num = this.setting.NewAutoshipRestrictedDates?.split(\",\");\r\n }\r\n\r\n let selecteddate = true;\r\n let currentdate = moment(\r\n this.getDefaultDate(this.setting.autoshipSettings),\r\n );\r\n let defaultDate = moment(\r\n this.getDefaultDate(this.setting.autoshipSettings),\r\n );\r\n let day = moment(currentdate).format(\"D\");\r\n let isRestricted = !!~num?.indexOf(day);\r\n let assignDate;\r\n\r\n while (selecteddate) {\r\n if (\r\n this.setting.configDate === \"All\" ||\r\n !this.setting.configDate ||\r\n currentdate <= moment(this.setting.configDate) ||\r\n defaultDate <= moment(new Date())\r\n ) {\r\n day = moment(currentdate).format(\"D\");\r\n isRestricted = !!~num.indexOf(day);\r\n if (!isRestricted) {\r\n assignDate = moment(currentdate).format(\"DD MMMM YYYY\");\r\n selecteddate = false;\r\n break;\r\n }\r\n currentdate = currentdate.add(1, \"days\");\r\n continue;\r\n } else if (\r\n this.setting.configDate &&\r\n moment(this.setting.configDate) >= defaultDate\r\n ) {\r\n day = moment(defaultDate).format(\"D\");\r\n isRestricted = !!~num.indexOf(day);\r\n if (!isRestricted) {\r\n assignDate = moment(defaultDate).format(\"DD MMMM YYYY\");\r\n selecteddate = false;\r\n break;\r\n }\r\n defaultDate = defaultDate.add(-1, \"days\");\r\n continue;\r\n } else if (moment(this.setting.configDate) <= defaultDate) {\r\n defaultDate = defaultDate.add(-1, \"days\");\r\n continue;\r\n }\r\n }\r\n return assignDate;\r\n } catch (ex) {\r\n console.error(\"ex\", ex);\r\n }\r\n }\r\n\r\n // /**\r\n // * Set Autoship Date\r\n // * @method setAutoshipDate\r\n // */\r\n setAutoshipDate() {\r\n if (this.setting && this.setting.configRestrictedDate) {\r\n try {\r\n const dates = this.setting.configRestrictedDate;\r\n const counter = 0;\r\n const today = parseInt(moment(new Date()).format(\"DD\"), 10);\r\n const endofmonth = moment(new Date()).daysInMonth();\r\n const num = this.setting.configRestrictedDate;\r\n if (dates.length > 0) {\r\n let i;\r\n _.each(dates, () => {\r\n if (counter < 1) {\r\n if (\r\n (this.setting.InvalidEndDate\r\n ? moment().add(1, \"months\")\r\n : moment(this.setting.configDate)\r\n ).format(\"MM-YY\") ==\r\n moment(this.setting.StartDate).format(\"MM-YY\")\r\n ) {\r\n if (this.setting.currentMonthOnly) {\r\n if (endofmonth == dates.length) {\r\n this.autoshipDate =\r\n this.autoshipDate ||\r\n moment(1, \"DD\").add(1, \"month\").format(\"DD MMMM YYYY\");\r\n this.restrictCurrentMonth = false;\r\n } else {\r\n let existCurrentMonth = false;\r\n for (i = today + 1; i <= endofmonth; i++) {\r\n if (num.map(Number).indexOf(i) == -1) {\r\n existCurrentMonth = true;\r\n break;\r\n }\r\n }\r\n if (existCurrentMonth) {\r\n this.autoshipDate =\r\n this.autoshipDate ||\r\n moment(i, \"DD\").format(\"DD MMMM YYYY\");\r\n this.restrictCurrentMonth = true;\r\n this.maxCurrentMonth = true;\r\n } else {\r\n for (i = today; i >= 1; i--) {\r\n if (num.map(Number).indexOf(i) == -1) {\r\n this.autoshipDate =\r\n this.autoshipDate ||\r\n moment(i, \"DD\")\r\n .add(1, \"month\")\r\n .format(\"DD MMMM YYYY\");\r\n this.restrictCurrentMonth = false;\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n let exist = false;\r\n for (i = today + 1; i <= endofmonth; i++) {\r\n if (num.map(Number).indexOf(i) == -1) {\r\n exist = true;\r\n break;\r\n }\r\n }\r\n if (exist) {\r\n this.autoshipDate =\r\n this.autoshipDate ||\r\n moment(i, \"DD\").format(\"DD MMMM YYYY\");\r\n this.restrictCurrentMonth = true;\r\n } else {\r\n for (i = 1; i <= today; i++) {\r\n if (num.map(Number).indexOf(i) == -1) {\r\n this.autoshipDate =\r\n this.autoshipDate ||\r\n moment(i, \"DD\")\r\n .add(1, \"month\")\r\n .format(\"DD MMMM YYYY\");\r\n this.restrictCurrentMonth = false;\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n this.autoshipDate =\r\n this.autoshipDate || this.getNextRemainingDate();\r\n }\r\n } else {\r\n this.autoshipDate =\r\n this.currentAutoshipdate || this.getNextRemainingDate();\r\n }\r\n });\r\n } else {\r\n if (this.setting.currentMonthOnly) {\r\n this.autoshipDate =\r\n this.autoshipDate ||\r\n this.getNextRemainingDate() ||\r\n moment(new Date()).add(1, \"days\").format(\"DD MMMM YYYY\");\r\n this.restrictCurrentMonth = true;\r\n this.maxCurrentMonth = true;\r\n } else {\r\n this.autoshipDate =\r\n this.autoshipDate ||\r\n moment().add(1, \"months\").format(\"DD MMMM YYYY\");\r\n }\r\n }\r\n } catch (e) {\r\n if (this.setting.currentMonthOnly) {\r\n this.autoshipDate =\r\n this.autoshipDate ||\r\n moment(new Date()).add(1, \"days\").format(\"DD MMMM YYYY\");\r\n this.maxCurrentMonth = true;\r\n } else {\r\n this.autoshipDate =\r\n this.autoshipDate ||\r\n moment().add(1, \"months\").format(\"DD MMMM YYYY\");\r\n }\r\n }\r\n } else if (this.setting.currentMonthOnly) {\r\n this.autoshipDate =\r\n this.autoshipDate ||\r\n this.getNextRemainingDate() ||\r\n moment(new Date()).add(1, \"days\").format(\"DD MMMM YYYY\");\r\n this.maxCurrentMonth = true;\r\n } else {\r\n this.autoshipDate =\r\n this.autoshipDate ||\r\n this.getNextRemainingDate() ||\r\n moment(this.getDefaultDate(this.setting.autoshipSettings)).format(\r\n \"DD MMMM YYYY\",\r\n );\r\n }\r\n }\r\n\r\n // /**\r\n // * Get Disable Days\r\n // * @method getDisableDays\r\n // * @param {number} year Date of Year\r\n // */\r\n getDisableDays(year) {\r\n const disableDatesArr = [];\r\n const dateStart = moment(this.setting.StartDate);\r\n let dateEnd = moment(this.setting.configDate);\r\n let timeValues = [];\r\n let currentMonthOnly;\r\n if (this.setting.configDate == \"None\") {\r\n this.autoshipDate = this.autoshipDate || \"\";\r\n }\r\n if (this.setting.configDate == \"All\") {\r\n // this array is for all months\r\n timeValues = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\r\n } else {\r\n if (\r\n (this.setting.InvalidEndDate\r\n ? moment().add(1, \"months\")\r\n : moment(this.setting.configDate)\r\n ).format(\"MM-YY\") == moment(this.setting.StartDate).format(\"MM-YY\") &&\r\n this.restrictCurrentMonth === false\r\n ) {\r\n currentMonthOnly = _.range(\r\n 1,\r\n (this.setting.InvalidEndDate\r\n ? moment().add(1, \"months\")\r\n : moment(this.setting.configDate)\r\n ).daysInMonth() + 1,\r\n );\r\n currentMonthOnly.splice(\r\n parseInt(moment(this.autoshipDate).format(\"DD\"), 10) - 1,\r\n 1,\r\n );\r\n dateEnd = (\r\n this.setting.InvalidEndDate\r\n ? moment().add(1, \"months\")\r\n : moment(this.setting.configDate)\r\n ).add(1, \"months\");\r\n }\r\n while (dateEnd >= dateStart) {\r\n timeValues.push(dateStart.format(\"MM\"));\r\n dateStart.add(1, \"month\");\r\n }\r\n }\r\n let restricteddates = [];\r\n if (currentMonthOnly) {\r\n restricteddates = currentMonthOnly ? currentMonthOnly : [];\r\n } else {\r\n restricteddates = this.setting.configRestrictedDate || [];\r\n }\r\n if (restricteddates.length > 0) {\r\n const addYear = this.setting.configDate === \"All\" ? 20 : 0;\r\n for (let y = year; y <= year + addYear; y++) {\r\n for (let j = 0; j < timeValues.length; j++) {\r\n if (j > 0 && timeValues[j - 1] > timeValues[j]) {\r\n y++;\r\n }\r\n for (let i = 0; i <= restricteddates.length; i++) {\r\n const daysofMonth = moment(timeValues[j], \"MM\").daysInMonth();\r\n if (daysofMonth >= restricteddates[i]) {\r\n const dat = timeValues[j] + \"/\" + restricteddates[i] + \"/\" + y;\r\n disableDatesArr.push(moment(dat).format(\"DD MMMM YYYY\"));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return disableDatesArr;\r\n }\r\n\r\n getDefaultFrequency() {\r\n const defaultFrequencyPromise = new Promise((resolve) => {\r\n const frequencyTypes = this.commonData.FrequencyTypes;\r\n const frequencies = [];\r\n (this.setting.autoshipSettings = {}),\r\n frequencyTypes.filter((type) => {\r\n frequencies.push(type);\r\n });\r\n if (frequencies.length > 1) {\r\n this.setting.frequencies = frequencies;\r\n this.setting.autoshipFrequencies = cloneDeep(frequencies);\r\n this.setting.autoshipSettings.frequency =\r\n this.setting.autoshipFrequencies[0].Description;\r\n this.setting.autoshipSettings.frequencyTypeID =\r\n this.setting.autoshipFrequencies[0].ID;\r\n\r\n _.each(this.setting.autoshipFrequencies, (autoshipFrequency) => {\r\n autoshipFrequency.Description = autoshipFrequency.Description\r\n ? this.translate.instant(\r\n autoshipFrequency.Description.toLowerCase().replace(\r\n /[^a-zA-Z0-9]/g,\r\n \"_\",\r\n ),\r\n )\r\n : \"\";\r\n if (\r\n this.persistentService.retailData.Autoship &&\r\n this.persistentService.retailData.Autoship.FrequencyTypeID ==\r\n autoshipFrequency.ID\r\n ) {\r\n this.setting.autoshipSettings.frequency =\r\n this.persistentService.retailData.Autoship.FrequencyTypeDescription;\r\n this.setting.autoshipSettings.frequencyTypeID =\r\n this.persistentService.retailData.Autoship.FrequencyTypeID;\r\n }\r\n if (\r\n !this.persistentService.retailData.Autoship &&\r\n this.persistentService.retailData.Autoship.selectedFrequencyID ==\r\n autoshipFrequency.ID\r\n ) {\r\n this.setting.autoshipSettings.frequency =\r\n autoshipFrequency.Description;\r\n this.setting.autoshipSettings.frequencyTypeID =\r\n autoshipFrequency.ID;\r\n }\r\n });\r\n if (\r\n !this.setting.autoshipSettings.frequencyTypeID &&\r\n this.utilityService.getAutoshipEditFlag()\r\n ) {\r\n this.setting.autoshipSettings.frequency =\r\n this.setting.autoshipFrequencies[0].Description;\r\n this.setting.autoshipSettings.frequencyTypeID =\r\n this.setting.autoshipFrequencies[0].ID;\r\n }\r\n this.setting.IsMultipleFrequency = true;\r\n } else if (frequencies.length == 1) {\r\n this.setting.IsMultipleFrequency = false;\r\n this.setting.autoshipSettings.frequency =\r\n this.persistentService.retailData.Autoship &&\r\n this.persistentService.retailData.Autoship.FrequencyTypeDescription ==\r\n frequencies[0].Description\r\n ? this.persistentService.retailData.Autoship\r\n .FrequencyTypeDescription\r\n : frequencies[0].Description;\r\n this.setting.autoshipSettings.frequencyTypeID =\r\n this.persistentService.retailData.Autoship &&\r\n this.persistentService.retailData.Autoship.FrequencyTypeID ==\r\n frequencies[0].ID\r\n ? this.persistentService.retailData.Autoship.FrequencyTypeID\r\n : frequencies[0].ID;\r\n }\r\n resolve(this.setting.autoshipSettings);\r\n });\r\n return defaultFrequencyPromise;\r\n }\r\n\r\n getDefaultDate(frequencyList) {\r\n let frequency;\r\n if (!this.setting.IsMultipleFrequency) {\r\n frequency = frequencyList.frequencyTypeID;\r\n }\r\n let date = new Date();\r\n switch (frequency) {\r\n case 0:\r\n date = moment(new Date()).add(1, \"w\").toDate();\r\n break;\r\n case 1:\r\n date = moment(new Date()).add(2, \"w\").toDate();\r\n break;\r\n case 2:\r\n date = moment(new Date()).add(1, \"M\").toDate();\r\n break;\r\n case 3:\r\n date = moment(new Date()).add(2, \"M\").toDate();\r\n break;\r\n case 4:\r\n date = moment(new Date()).add(3, \"M\").toDate();\r\n break;\r\n case 5:\r\n date = moment(new Date()).add(6, \"M\").toDate();\r\n break;\r\n case 6:\r\n date = moment(new Date()).add(1, \"y\").toDate();\r\n break;\r\n case 7:\r\n date = moment(new Date()).add(4, \"w\").toDate();\r\n break;\r\n case 8:\r\n date = moment(new Date()).add(6, \"w\").toDate();\r\n break;\r\n case 9:\r\n date = moment(new Date()).add(8, \"w\").toDate();\r\n break;\r\n case 10:\r\n date = moment(new Date()).add(12, \"w\").toDate();\r\n break;\r\n default:\r\n date = moment(new Date()).add(1, \"M\").toDate();\r\n break;\r\n // code to be executed if n doesn't match any constant\r\n }\r\n return date;\r\n }\r\n\r\n getAutoshipDate() {\r\n return this.autoshipDate;\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class SideNavBarService {\r\n public showsideBarSummary: boolean = false;\r\n constructor() {\r\n }\r\n\r\n public triggerOpen(): void {\r\n this.showsideBarSummary = !this.showsideBarSummary;\r\n }\r\n\r\n public closeSidePanel(): void {\r\n this.showsideBarSummary = false;\r\n }\r\n}\r\n","import { ShoppingCartService } from \"./shopping-cart.service\";\r\nimport { PaymentService } from \"./payment.service\";\r\nimport {\r\n ConfirmDialogModel,\r\n ConfirmDialogComponent,\r\n} from \"./../model/confirm-dialog/confirm-dialog.component\";\r\nimport { EventEmitter, Injectable, Output } from \"@angular/core\";\r\nimport { OrderService } from \"./order.service\";\r\nimport * as _ from \"lodash\";\r\nimport { cloneDeep } from \"lodash\";\r\nimport { UserService } from \"./user.service\";\r\nimport { NotificationService } from \"./notification.service\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { ProductService } from \"./product.service\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport {\r\n ShippingAddress,\r\n UserServiceModal,\r\n} from \"src/app/modals/userservice.modal\";\r\nimport { Router } from \"@angular/router\";\r\nimport { ProductDialogComponent } from \"../../shop/products/product-dialog/product-dialog.component\";\r\nimport { UtilityService } from \"./utility.service\";\r\nimport { PersistentService } from \"./persistent.service\";\r\nimport { Location } from \"@angular/common\";\r\nimport { ItemsListService } from \"./itemsList.service\";\r\nimport { SideNavBarService } from \"./sidenavbar.service\";\r\nimport { AutoshipConfigurationService } from \"./autoshipConfiguration.service\";\r\nimport { CompanyService } from \"./company.service\";\r\nimport { ConfigService } from \"./config.service\";\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class Cart1Service {\r\n public isKitAdded = {};\r\n public packQuantity = {};\r\n public orderQuantity = {};\r\n public orderRewardQuantity = {};\r\n public autoshipQuantity = {};\r\n userService: UserServiceModal;\r\n public oldRestrictedState;\r\n public oldRegionMainState;\r\n public restrictedOrderItems = [];\r\n public restrictedAutoOrderItems = [];\r\n public ReplacementsItemsInCart = localStorage.getItem(\"cart.replacementItems\") ? JSON.parse(localStorage.getItem(\"cart.replacementItems\")) : { ItemsMapping: {}, PeriodMapping: {} };\r\n @Output() addAOScanToCart: EventEmitter = new EventEmitter();\r\n @Output() errorExist: EventEmitter = new EventEmitter();\r\n \r\n constructor(\r\n public orderService: OrderService,\r\n public notificationService: NotificationService,\r\n public user: UserService,\r\n private translate: TranslateService,\r\n private itemsService: ProductService,\r\n private dialog: MatDialog,\r\n public paymentService: PaymentService,\r\n public router: Router,\r\n public utilityService: UtilityService,\r\n public persistentService: PersistentService,\r\n public location: Location,\r\n public itemsListService: ItemsListService,\r\n public sideNavBarService: SideNavBarService,\r\n public autoshipConfigurationService: AutoshipConfigurationService,\r\n public companyService: CompanyService,\r\n public configService: ConfigService,\r\n public shoppingCartService: ShoppingCartService,\r\n ) {\r\n this.userService = user.userServiceModal;\r\n this.init();\r\n }\r\n\r\n // /**\r\n // * Increase quantiy of items in cart.\r\n // * @method increaseQuantiy\r\n // * @param {object} item Item object.\r\n // * @param {boolean} isAutoship If it is added to autoship or not.\r\n // */\r\n public increaseQuantiy(item, isAutoship?: boolean, isPack?: boolean) {\r\n this.persistentService.retailData.isChanged = true;\r\n if (isAutoship) {\r\n if (this.autoshipQuantity[item.ItemID] < 99) {\r\n this.autoshipQuantity[item.ItemID] =\r\n Number(this.autoshipQuantity[item.ItemID] || 0) + 1;\r\n item.Quantity = this.autoshipQuantity[item.ItemID];\r\n localStorage.setItem(\r\n \"cart.autoship\",\r\n JSON.stringify(this.itemsService.selectedAutoOrderItems),\r\n );\r\n }\r\n this.orderService.calculateAutoOrder();\r\n } else if (isPack) {\r\n this.packQuantity[item.ItemID] =\r\n Number(this.packQuantity[item.ItemID] || 0) + 1;\r\n item.Quantity = this.packQuantity[item.ItemID];\r\n localStorage.setItem(\r\n \"cart.packs\",\r\n JSON.stringify(this.itemsService.selectedPacks),\r\n );\r\n this.orderService.calculateOrder(false, -1);\r\n } else {\r\n if (!item.UsePoints) {\r\n this.orderQuantity[item.ItemID] = this.orderQuantity[item.ItemID] || 0;\r\n if (this.orderQuantity[item.ItemID] < 99) {\r\n this.orderQuantity[item.ItemID] =\r\n Number(this.orderQuantity[item.ItemID] || 0) + 1;\r\n item.Quantity = this.orderQuantity[item.ItemID];\r\n this.itemsService.selectedOrderItems.filter((x) => {\r\n if (x.ItemID == item.ItemID) {\r\n x.Quantity = item.Quantity;\r\n }\r\n });\r\n localStorage.setItem(\r\n \"cart.order\",\r\n JSON.stringify(this.itemsService.selectedOrderItems),\r\n );\r\n this.notificationService.success(\r\n \"success\",\r\n \"Item quantity is increased\",\r\n );\r\n }\r\n } else if (item.UsePoints) {\r\n if (this.orderRewardQuantity[item.ItemID] < 99) {\r\n this.orderRewardQuantity[item.ItemID] =\r\n Number(this.orderRewardQuantity[item.ItemID] || 0) + 1;\r\n item.rewardQuantity = this.orderRewardQuantity[item.ItemID];\r\n localStorage.setItem(\r\n \"cart.order\",\r\n JSON.stringify(this.itemsService.selectedOrderItems),\r\n );\r\n }\r\n }\r\n this.orderService.calculateOrder(false, 1);\r\n }\r\n }\r\n // /**\r\n // * Decrease quantiy of items in cart.\r\n // * @method decreaseQuantiy\r\n // * @param {object} item Item object.\r\n // * @param {boolean} isAutoship If it is added to autoship or not.\r\n // */\r\n public decreaseQuantiy(item, isAutoship?: boolean, isPack?: boolean) {\r\n this.persistentService.retailData.isChanged = true;\r\n if (isAutoship) {\r\n this.autoshipQuantity[item.ItemID] = Number(\r\n this.autoshipQuantity[item.ItemID] || 0,\r\n );\r\n this.autoshipQuantity[item.ItemID]--;\r\n item.Quantity = this.autoshipQuantity[item.ItemID];\r\n localStorage.setItem(\r\n \"cart.autoship\",\r\n JSON.stringify(this.itemsService.selectedAutoOrderItems),\r\n );\r\n if (item.Quantity !== 0) {\r\n this.orderService.calculateAutoOrder();\r\n }\r\n } else if (isPack) {\r\n this.packQuantity[item.ItemID] = Number(\r\n this.packQuantity[item.ItemID] || 0,\r\n );\r\n this.packQuantity[item.ItemID]--;\r\n item.Quantity = this.packQuantity[item.ItemID];\r\n localStorage.setItem(\r\n \"cart.packs\",\r\n JSON.stringify(this.itemsService.selectedPacks),\r\n );\r\n if (item.Quantity !== 0) {\r\n this.orderService.calculateOrder(false, -1);\r\n }\r\n } else {\r\n if (!item.UsePoints) {\r\n this.orderQuantity[item.ItemID]--;\r\n item.Quantity = this.orderQuantity[item.ItemID];\r\n } else if (item.UsePoints) {\r\n this.orderRewardQuantity[item.ItemID]--;\r\n item.rewardQuantity = this.orderRewardQuantity[item.ItemID];\r\n }\r\n\r\n localStorage.setItem(\r\n \"cart.order\",\r\n JSON.stringify(this.itemsService.selectedOrderItems),\r\n );\r\n if (item.Quantity !== 0) {\r\n this.orderService.calculateOrder(false, 1);\r\n }\r\n }\r\n if (item.Quantity === 0 || item.rewardQuantity === 0) {\r\n this.removeFromCart(item, isAutoship, isPack, true);\r\n }\r\n }\r\n // autoAddedCoupon method used to add auto add coupon\r\n public autoAddedCoupon() {\r\n if (this.userService.couponInfo.availableRewards.length > 0) {\r\n if (this.itemsService.IsAllowDynamicCouponcode) {\r\n _.each(this.userService.couponInfo.availableRewards, (item) => {\r\n if (item.Code == this.userService.DynamicCouponCode.promoCode) {\r\n this.userService.couponInfo.RewardsForUse = _.filter(\r\n this.userService.couponInfo.RewardsForUse,\r\n (item1) => {\r\n return (\r\n item1.Code !== this.userService.DynamicCouponCode.promoCode\r\n );\r\n },\r\n );\r\n }\r\n });\r\n }\r\n }\r\n }\r\n // /**\r\n // * Add items to cart.\r\n // * @method addToCart\r\n // * @param {object} item Item object.\r\n // * @param {boolean} isShowNotification Is show notification message on item added in cart.\r\n // * @param {string} customOrderCode Custom order code.\r\n // * @param {boolean} isAutoship If it is added to autoship or not.\r\n // * @param {object} fromDialog if it is added from pop Dialog or not.\r\n // * @param {boolean} isPack If it is added to pack or not.\r\n // */\r\n public addToCart(\r\n item,\r\n isShowNotification,\r\n customOrderCode,\r\n isAutoship?: boolean,\r\n fromDialog?: boolean,\r\n isPack?: boolean,\r\n fromApplication?: boolean,\r\n fromPointbtn?: boolean\r\n ) {\r\n this.persistentService.retailData.isChanged = true;\r\n if (isPack && !this.utilityService.isPackMultipleQuantity) {\r\n this.addPack(item, isShowNotification);\r\n } else {\r\n if (typeof isAutoship == \"undefined\") {\r\n isAutoship = false;\r\n }\r\n\r\n // Use a custom order code (for customization options like color and size) if one is passed in\r\n const itemCode = (customOrderCode || item?.ItemID)?.toString();\r\n // Determine if the item is in the cart, and if so, retrieve it\r\n\r\n this.addOrderToCart(\r\n item,\r\n itemCode,\r\n fromDialog,\r\n isAutoship,\r\n isShowNotification,\r\n isPack,\r\n fromPointbtn\r\n );\r\n // }\r\n }\r\n\r\n if (!isAutoship) {\r\n this.autoAddedCoupon();\r\n }\r\n }\r\n\r\n // /**\r\n // * show Product Detail.\r\n // * @method showProductDetail\r\n // * @param {object} item Item object.\r\n // * @param {boolean} hasOptions Is show notification message on item added in cart.\r\n // * @param {boolean} isAutoship If it is added to autoship or not.\r\n // * @param {boolean} isPack If it is added to pack or not.\r\n // */\r\n\r\n public showProductDetail(\r\n item,\r\n isAutoship?: boolean,\r\n hasOptions?: boolean,\r\n isPack?: boolean,\r\n fromApplication?: boolean,\r\n ) {\r\n if (!item) {\r\n return;\r\n }\r\n item = cloneDeep(item);\r\n\r\n // We don't pass HasOptions to the modal, because that property is used to decide behavior when \"Add to Cart\" is clicked.\r\n item.Quantity = isAutoship\r\n ? this.autoshipQuantity[item.ItemID]\r\n : isPack\r\n ? this.packQuantity[item.ItemID]\r\n : this.orderQuantity[item.ItemID];\r\n item.rewardQuantity = this.orderRewardQuantity[item.ItemID];\r\n if (!hasOptions) {\r\n item.HasOptions = null;\r\n }\r\n if (isPack) {\r\n item.ItemOptions = [];\r\n item.OptionsMap = [];\r\n }\r\n\r\n if (fromApplication) {\r\n this.dialog.open(ProductDialogComponent, {\r\n data: {\r\n value: item,\r\n service: this,\r\n type: isAutoship ? \"autoship\" : isPack ? \"pack\" : \"order\",\r\n },\r\n disableClose: true,\r\n panelClass: \"product-dialog\",\r\n autoFocus: false,\r\n });\r\n } else {\r\n this.router.navigate([\"/product\", item.ItemID], {\r\n queryParams: {\r\n itemType: isAutoship ? \"autoship\" : isPack ? \"pack\" : \"order\",\r\n },\r\n });\r\n }\r\n }\r\n\r\n // /**\r\n // * Remove items from cart.\r\n // * @method removeFromCart\r\n // * @param {object} item Item object.\r\n // * @param {boolean} isAutoship If it is added to autoship or not.\r\n // * @param {boolean} isPack If it is added to pack or not.\r\n // */\r\n public removeFromCart(\r\n item,\r\n isAutoship?: boolean,\r\n isPack?: boolean,\r\n isShowNotification?: boolean\r\n ) {\r\n if (isPack) {\r\n this.itemsService.selectedPacks = _.without(\r\n this.itemsService.selectedPacks,\r\n _.find(this.itemsService.selectedPacks, { ItemID: item.ItemID }),\r\n );\r\n this.isKitAdded[item.ItemID] = false;\r\n localStorage.setItem(\r\n \"cart.packs\",\r\n JSON.stringify(this.itemsService.selectedPacks),\r\n );\r\n this.orderService.calculateOrder(false, -1).then(() => {\r\n if (isShowNotification) {\r\n this.notificationService.success(\"success\", \"item_removed_from_pack\");\r\n }\r\n });\r\n } else {\r\n const ItemID = item.ItemID;\r\n const selectedItems = isAutoship\r\n ? \"selectedAutoOrderItems\"\r\n : \"selectedOrderItems\";\r\n\r\n this[\r\n isAutoship\r\n ? \"autoshipQuantity\"\r\n : !item.UsePoints\r\n ? \"orderQuantity\"\r\n : \"orderRewardQuantity\"\r\n ][ItemID] = 0;\r\n if (item.UsePoints) {\r\n item.rewardQuantity = 0;\r\n } else {\r\n item.Quantity = 0;\r\n }\r\n\r\n // Unselect the item\r\n this.itemsService[selectedItems] = this.itemsService[\r\n selectedItems\r\n ].filter((item1) => {\r\n if (item1.ItemID !== ItemID) {\r\n return true;\r\n } else {\r\n return item1.UsePoints !== item.UsePoints;\r\n }\r\n });\r\n\r\n if (isAutoship) {\r\n localStorage.setItem(\r\n \"cart.autoship\",\r\n JSON.stringify(this.itemsService.selectedAutoOrderItems),\r\n );\r\n this.orderService.calculateAutoOrder().then(() => {\r\n if (this.itemsService.selectedAutoOrderItems.length == 0) {\r\n this.autoshipConfigurationService.autoshipDate = \"\";\r\n this.autoshipConfigurationService.init();\r\n if (this.utilityService.getAutoshipEditFlag()) {\r\n this.utilityService.setAutoshipEditFlag(false);\r\n this.persistentService.retailData.AddMoreItemInAutoshipFlag =\r\n false;\r\n this.persistentService.retailData.AddMoreItemInAutoshipData = {};\r\n this.persistentService.retailData.editAutoshipItems = [];\r\n this.persistentService.retailData.CurrentSelectedAutoOrder = 0;\r\n }\r\n if (\r\n this.itemsService.selectedOrderItems.length === 0 &&\r\n window.location.pathname.indexOf(\"/join\") === -1\r\n ) {\r\n this.router.navigate([\"/products/all\"]);\r\n }\r\n }\r\n if (isShowNotification) {\r\n this.notificationService.success(\r\n \"success\",\r\n \"item_removed_from_autoship\",\r\n );\r\n }\r\n });\r\n } else {\r\n localStorage.setItem(\r\n \"cart.order\",\r\n JSON.stringify(this.itemsService.selectedOrderItems),\r\n );\r\n this.orderService.calculateOrder(false, 1).then(() => {\r\n if (isShowNotification) {\r\n this.notificationService.success(\r\n \"success\",\r\n \"item_removed_from_order\",\r\n );\r\n\r\n if (this.itemsService[selectedItems].length == 0) {\r\n if (window.location.pathname.indexOf(\"/join\") > -1) {\r\n this.router.navigate([\"/join\"]);\r\n } else {\r\n this.router.navigate([\"/products/all\"]);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n }\r\n if (\r\n this.itemsService.selectedOrderItems == 0 &&\r\n this.itemsService.selectedAutoOrderItems == 0\r\n ) {\r\n this.userService.selectedShippingMethod = 0;\r\n }\r\n }\r\n\r\n public clearCart() {\r\n this.isKitAdded = {};\r\n this.orderQuantity = {};\r\n this.orderRewardQuantity = {};\r\n this.autoshipQuantity = {};\r\n this.itemsService.selectedPacks = [];\r\n this.itemsService.selectedOrderItems = [];\r\n this.itemsService.selectedAutoOrderItems = [];\r\n this.ReplacementsItemsInCart = { ItemsMapping: {}, PeriodMapping: {} };\r\n this.orderService.calculateOrderResponse = {};\r\n this.orderService.calculateAutoOrderResponse = {};\r\n localStorage.removeItem(\"cart.packs\");\r\n localStorage.removeItem(\"cart.order\");\r\n localStorage.removeItem(\"cart.autoship\");\r\n localStorage.removeItem(\"cart.replacementItems\");\r\n }\r\n\r\n public getItemPrice(item) {\r\n let price = null;\r\n if (!item.Prices || !item.Prices.length) {\r\n price = item.Price;\r\n } else {\r\n item.Prices.forEach((p) => {\r\n if (\r\n p.CurrencyCode == null ||\r\n (p.CurrencyCode && p.CurrencyCode.toLowerCase() !== \"rwd\")\r\n ) {\r\n price = p.Price;\r\n }\r\n });\r\n }\r\n return price;\r\n }\r\n\r\n public getOrderItems(isAutoship?: boolean, isPack?: boolean) {\r\n if (isAutoship) {\r\n return this.itemsService.selectedAutoOrderItems;\r\n } else if (isPack) {\r\n return this.itemsService.selectedPacks;\r\n } else {\r\n return this.itemsService.selectedOrderItems;\r\n }\r\n }\r\n\r\n public addOrderToCart(\r\n item,\r\n itemCode,\r\n fromDialog,\r\n isAutoship?: boolean,\r\n isShowNotification?: boolean,\r\n isPack?: boolean,\r\n fromPointbtn?: boolean\r\n ) {\r\n isAutoship = !!isAutoship;\r\n\r\n const cartItems = isAutoship\r\n ? this.itemsService.selectedAutoOrderItems\r\n : isPack\r\n ? this.itemsService.selectedPacks\r\n : this.itemsService.selectedOrderItems;\r\n let itemInCart = null;\r\n const isInCart = cartItems.some((cartItem) => {\r\n if (\r\n cartItem.ItemID == itemCode &&\r\n Boolean(cartItem.UsePoints) == Boolean(fromPointbtn)\r\n ) {\r\n itemInCart = cartItem;\r\n return true;\r\n }\r\n return false;\r\n });\r\n\r\n if (isInCart) {\r\n // If it is in the cart...\r\n const itemQuantities = isAutoship\r\n ? this.autoshipQuantity\r\n : isPack\r\n ? this.packQuantity\r\n : !fromPointbtn\r\n ? this.orderQuantity\r\n : this.orderRewardQuantity;\r\n let quantity;\r\n if (!fromDialog) {\r\n // If not coming from a dialog, increase the quantity\r\n quantity = itemQuantities[itemCode]\r\n ? Number(itemQuantities[itemCode]) + 1\r\n : 1;\r\n } else {\r\n // If coming from a dialog, keep the quantity from the dialog\r\n quantity = itemQuantities[itemCode]\r\n ? Number(itemQuantities[itemCode])\r\n : 1;\r\n }\r\n\r\n itemQuantities[itemCode] = quantity;\r\n if (!cartItems[cartItems.indexOf(itemInCart)].UsePoints) {\r\n cartItems[cartItems.indexOf(itemInCart)].Quantity = quantity;\r\n } else {\r\n cartItems[cartItems.indexOf(itemInCart)].rewardQuantity = quantity;\r\n }\r\n } else {\r\n // If it is not in the cart, add it\r\n this.getKitInfo(item);\r\n item = cloneDeep(item);\r\n if (fromPointbtn) {\r\n // item.Price = this.getItemPoints(item);\r\n item.OriginalPrice = item.Price;\r\n }\r\n item.ItemID = itemCode.toString();\r\n item.UsePoints = fromPointbtn;\r\n item.Quantity = isAutoship\r\n ? this.autoshipQuantity[itemCode] || 1\r\n : isPack\r\n ? this.packQuantity[itemCode] || 1\r\n : this.orderQuantity[itemCode] || 1;\r\n item.rewardQuantity = this.orderRewardQuantity[itemCode] || 1;\r\n if (item.HasOptions) {\r\n _.each(item.OptionsMap, (value) => {\r\n if (value.ItemId == item.ItemID) {\r\n item.OptionsImage = value.Image;\r\n return;\r\n }\r\n });\r\n }\r\n cartItems.push(item);\r\n }\r\n if (isPack) {\r\n item.IsKitItem = true;\r\n }\r\n\r\n if (isAutoship) {\r\n this.orderService.calculateAutoOrder(isShowNotification);\r\n } else {\r\n if (isPack) {\r\n this.orderService.calculateOrder(isShowNotification, -1);\r\n } else {\r\n this.orderService.calculateOrder(isShowNotification, 1);\r\n }\r\n }\r\n\r\n localStorage.setItem(\r\n isAutoship ? \"cart.autoship\" : isPack ? \"cart.packs\" : \"cart.order\",\r\n JSON.stringify(cartItems),\r\n );\r\n }\r\n\r\n public getKitInfo(item) {\r\n if (!item.HasKitGroups) {\r\n return;\r\n }\r\n const kitItemNames = [];\r\n _.each(item.KitGroups, (group) => {\r\n let kitItemName = group.selectedItem.Name;\r\n if (group.selectedItem.HasOptions) {\r\n kitItemName += \" \" + group.selectedItem.selectedOptions;\r\n }\r\n kitItemNames.push(kitItemName);\r\n });\r\n item.selectedKitOptions = kitItemNames.join(\", \");\r\n }\r\n\r\n public addPack(item, isShowNotification?: boolean) {\r\n if (\r\n item.HasOptions ||\r\n (item.HasKitGroups &&\r\n !_.every(item.KitGroups, (group) => {\r\n return group.selectedItem;\r\n }))\r\n ) {\r\n // If there are options (e.g. color/size), show the product details modal\r\n this.showProductDetail(item, false, null, true);\r\n return;\r\n } else {\r\n this.isKitAdded[item.ItemID] = true;\r\n\r\n // If the product is already added, exit the method\r\n if (~this.itemsService.selectedPacks.indexOf(item)) {\r\n return;\r\n }\r\n let alreadyPackItems = false;\r\n _.each(this.itemsService.selectedPacks, (items) => {\r\n if (items.ItemID == item.ItemID) {\r\n alreadyPackItems = true;\r\n }\r\n });\r\n if (!alreadyPackItems) {\r\n this.itemsService.selectedPacks.push(item);\r\n }\r\n this.itemsService.selectedPacks.forEach((item1) => {\r\n item1.IsKitItem = true;\r\n item1.Quantity = 1;\r\n });\r\n\r\n localStorage.setItem(\r\n \"cart.packs\",\r\n JSON.stringify(this.itemsService.selectedPacks),\r\n );\r\n // this.triggerAddRemoveCartItems(item, null, false, false, true);\r\n this.orderService.calculateOrder(isShowNotification, -1);\r\n }\r\n }\r\n\r\n public setQuantiy() {\r\n if (this.itemsService.selectedPacks.length > 0) {\r\n this.itemsService.selectedPacks.forEach((item) => {\r\n this.isKitAdded[item.ItemID] = true;\r\n this.packQuantity[item.ItemID] = item.Quantity;\r\n });\r\n }\r\n if (this.itemsService.selectedOrderItems.length > 0) {\r\n this.itemsService.selectedOrderItems.forEach((item) => {\r\n if (!item.UsePoints) {\r\n this.orderQuantity[item.ItemID] = item.Quantity;\r\n } else if (item.UsePoints) {\r\n this.orderRewardQuantity[item.ItemID] = item.rewardQuantity;\r\n }\r\n });\r\n }\r\n\r\n if (this.itemsService.selectedAutoOrderItems.length > 0) {\r\n this.itemsService.selectedAutoOrderItems.forEach((item) => {\r\n this.autoshipQuantity[item.ItemID] = item.Quantity;\r\n });\r\n }\r\n if (\r\n (this.itemsService.selectedPacks.length > 0 ||\r\n this.itemsService.selectedOrderItems.length > 0) &&\r\n !this.userService.checkItems\r\n ) {\r\n this.orderService.calculateOrder(false, -1);\r\n }\r\n if (\r\n this.itemsService.selectedAutoOrderItems.length > 0 &&\r\n !this.userService.checkItems\r\n ) {\r\n this.orderService.calculateAutoOrder();\r\n }\r\n }\r\n\r\n private init() {\r\n this.setQuantiy();\r\n }\r\n\r\n public updateCountry(country, languagecode, sideNavCall, shippingCall) {\r\n sessionStorage.removeItem('items');\r\n if (!languagecode) {\r\n languagecode = sessionStorage.getItem(\"selectedLanguageCode\");\r\n }\r\n if (sideNavCall) {\r\n this.sideNavBarService.closeSidePanel();\r\n }\r\n if (\r\n this.configService.commonData.selectedCountry?.toLowerCase() !==\r\n country.CountryCode.toLowerCase() ||\r\n this.configService.commonData.selectedLanguage !== languagecode\r\n ) {\r\n this.oldRestrictedState = this.userService.restrictedStates;\r\n this.oldRegionMainState = this.userService.regionMainState;\r\n this.userService.regionMainState = \"\";\r\n\r\n const countrySwal = this.translate.instant(\r\n \"if_you_selected_other_country\",\r\n );\r\n\r\n this.marketSwalCheckItems(\r\n countrySwal,\r\n country,\r\n languagecode,\r\n shippingCall,\r\n false,\r\n );\r\n\r\n return;\r\n\r\n const request = {\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode,\r\n LanguageCode: this.configService.commonData.selectedLanguage,\r\n RegionID: this.companyService.getRegionID(\r\n this.configService.commonData?.selectedCountry,\r\n ),\r\n PriceGroup: this.userService.customerTypeID,\r\n StoreID: this.shoppingCartService.getShoppingCart(1)[0]?.StoreID, // this.userService.customerTypeID == 2 ? 3 : 2\r\n CategoryId: 0,\r\n };\r\n this.itemsService.getProducts(request).subscribe((result) => {\r\n try {\r\n if (result.length != 0) {\r\n const countrySwal = this.translate.instant(\r\n \"if_you_selected_other_country\",\r\n );\r\n if (\r\n this.itemsService.selectedOrderItems.length ||\r\n this.itemsService.selectedAutoOrderItems.length\r\n ) {\r\n if (result.length > 0) {\r\n this.restrictedOrderItems = this.getRestrictedItems(\r\n this.itemsService.selectedOrderItems,\r\n result,\r\n false,\r\n );\r\n this.restrictedAutoOrderItems = this.getRestrictedItems(\r\n this.itemsService.selectedAutoOrderItems,\r\n result,\r\n true,\r\n );\r\n } else {\r\n this.itemsService.selectedOrderItems = [];\r\n this.itemsService.selectedAutoOrderItems = [];\r\n }\r\n\r\n if (\r\n this.restrictedOrderItems.length ||\r\n this.restrictedAutoOrderItems.length\r\n ) {\r\n const swalHtml = this.setRestrictItemsSwal();\r\n this.marketSwalCheckItems(\r\n swalHtml,\r\n country,\r\n languagecode,\r\n shippingCall,\r\n true,\r\n );\r\n } else {\r\n const swalText = countrySwal + \"\\n\\n\";\r\n if (shippingCall) {\r\n this.userService.newshippingAddress.Country =\r\n country.CountryCode;\r\n this.marketSwalCheckItems(\r\n swalText,\r\n country,\r\n languagecode,\r\n shippingCall,\r\n false,\r\n );\r\n } else {\r\n this.marketSwalCheckItems(\r\n swalText,\r\n country,\r\n languagecode,\r\n shippingCall,\r\n false,\r\n );\r\n }\r\n }\r\n } else {\r\n this.marketSwalCheckItems(\r\n countrySwal,\r\n country,\r\n languagecode,\r\n shippingCall,\r\n false,\r\n );\r\n }\r\n } else {\r\n if (localStorage.getItem(\"CommonSettings\")) {\r\n const data = JSON.parse(localStorage.getItem(\"CommonSettings\"));\r\n this.configService.commonData.selectedCountry =\r\n data.selectedCountry;\r\n this.configService.commonData.selectedLanguage =\r\n data.selectedLanguage;\r\n this.itemsService.selectedOrderItems.length = [];\r\n this.itemsService.selectedAutoOrderItems = [];\r\n this.userService.regionMainState = this.oldRegionMainState;\r\n this.notificationService.error(\r\n \"error_\",\r\n \"error_occured_try_again\",\r\n );\r\n }\r\n }\r\n } catch (ex) {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n }\r\n });\r\n }\r\n }\r\n\r\n public getRestrictedItems(selectedItems, OrderItem, isAutoship?: boolean) {\r\n if (OrderItem.length > 0 && selectedItems.length > 0) {\r\n return selectedItems.filter((item) => {\r\n return !OrderItem.some((item2) => {\r\n if (item2.HasOptions && (!isAutoship || item2.AllowAutoship)) {\r\n _.each(item2.OptionsMap, (value) => {\r\n if (\r\n value.ItemId == item.ItemID &&\r\n (item.UsePoints ? item.UsePoints == item2.UsePoints : true)\r\n ) {\r\n item2.ItemID = value.ItemId;\r\n return;\r\n }\r\n });\r\n }\r\n if (\r\n item2.ItemID == item.ItemID &&\r\n (item.UsePoints ? item.UsePoints == item2.UsePoints : true) &&\r\n (!isAutoship || item2.AllowAutoship) &&\r\n item.selectedOptions\r\n ) {\r\n item2.selectedOptions = item.selectedOptions;\r\n }\r\n return (\r\n item.ItemID == item2.ItemID &&\r\n (item.UsePoints ? item.UsePoints == item2.UsePoints : true) &&\r\n (!isAutoship || item2.AllowAutoship)\r\n );\r\n });\r\n });\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n public setRestrictItemsSwal() {\r\n let swalMessage =\r\n this.translate.instant(\"if_you_selected_other_country\") + \"\\n\\n\";\r\n if (this.restrictedOrderItems.length) {\r\n swalMessage =\r\n swalMessage +\r\n this.translate.instant(\"order_item_not_avail_in_this_region\") +\r\n \"\\n\";\r\n _.each(this.restrictedOrderItems, (item, key) => {\r\n const logNumber = key + 1;\r\n if (item.UsePoints) {\r\n swalMessage =\r\n swalMessage +\r\n logNumber +\r\n \". \" +\r\n item.ProductName +\r\n \"(\" +\r\n this.translate.instant(\r\n \"reward_order_item_not_avail_in_this_region\",\r\n ) +\r\n \")\" +\r\n \",\\n\";\r\n } else {\r\n swalMessage =\r\n swalMessage + logNumber + \". \" + item.ProductName + \",\\n\";\r\n }\r\n });\r\n }\r\n\r\n if (this.restrictedAutoOrderItems.length) {\r\n swalMessage =\r\n swalMessage +\r\n this.translate.instant(\"autoship_item_not_avail_new_region\");\r\n _.each(this.restrictedAutoOrderItems, (item, key) => {\r\n const logNumber = key + 1;\r\n swalMessage = swalMessage + logNumber + \". \" + item.ProductName + \",\\n\";\r\n });\r\n }\r\n return swalMessage;\r\n }\r\n\r\n public marketSwalCheckItems(\r\n swalText,\r\n country,\r\n languagecode,\r\n shippingCall,\r\n checkRestriction,\r\n ) {\r\n const dialogData = new ConfirmDialogModel(\r\n this.translate.instant(\"trying_change_country\"),\r\n this.translate.instant(swalText),\r\n this.translate.instant(\"NO\"),\r\n this.translate.instant(\"YES\"),\r\n );\r\n\r\n const dialogRef = this.dialog.open(ConfirmDialogComponent, {\r\n data: dialogData,\r\n disableClose: true,\r\n panelClass: \"\",\r\n autoFocus: false,\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((confirm) => {\r\n if (confirm) {\r\n sessionStorage.removeItem('items');\r\n sessionStorage.removeItem('allPriceGroupAndStoreData');\r\n if (\r\n this.configService.commonData.selectedCountry?.toLowerCase() !==\r\n country.CountryCode.toLowerCase()\r\n ) {\r\n this.userService.newshippingAddress = {};\r\n this.userService.shippingAddress = {} as ShippingAddress;\r\n this.userService.regionMainState = \"\";\r\n this.userService.restrictedStates = [];\r\n this.userService.selectedShippingMethod = 0;\r\n this.userService.shippingMethods = [];\r\n this.clearCart();\r\n if (this.userService.customerData.DefaultShippingAddress) {\r\n this.userService.customerData.DefaultShippingAddress = {};\r\n }\r\n this.userService.paymentMethods = [];\r\n this.paymentService.clearPayment();\r\n localStorage.removeItem(\"paymentService\");\r\n }\r\n\r\n if (shippingCall) {\r\n if (checkRestriction) {\r\n this.itemsListService\r\n .checkRestrictedState(\r\n true,\r\n country,\r\n \"\",\r\n \"\",\r\n this.persistentService.retailData.uniqueCategoryId,\r\n \"\",\r\n true,\r\n false,\r\n false,\r\n )\r\n .then(() => {\r\n this.updateCountryLanguage(country, languagecode);\r\n });\r\n } else {\r\n this.updateCountryLanguage(country, languagecode);\r\n }\r\n } else {\r\n this.configService.commonData.selectedCountry =\r\n country.CountryCode.toLowerCase();\r\n this.configService.commonData.selectedLanguage =\r\n languagecode.toLowerCase();\r\n this.configService.setSelectedCountry(\r\n country.CountryCode.toLowerCase(),\r\n languagecode.toLowerCase(),\r\n );\r\n\r\n if (checkRestriction) {\r\n this.itemsListService\r\n .checkRestrictedState(\r\n true,\r\n country,\r\n \"\",\r\n \"\",\r\n this.persistentService.retailData.uniqueCategoryId,\r\n \"\",\r\n \"\",\r\n false,\r\n false,\r\n )\r\n .then(() => {\r\n setTimeout(() => {\r\n window.location.reload();\r\n }, 500);\r\n });\r\n } else {\r\n setTimeout(() => {\r\n window.location.reload();\r\n }, 500);\r\n }\r\n }\r\n } else {\r\n this.userService.restrictedStates = this.oldRestrictedState;\r\n this.userService.regionMainState = this.oldRegionMainState;\r\n if (localStorage.getItem(\"CommonSettings\")) {\r\n const data = JSON.parse(localStorage.getItem(\"CommonSettings\"));\r\n this.configService.commonData.selectedCountry = data.selectedCountry || sessionStorage.getItem('selectedCountry')?.toLowerCase();\r\n this.configService.commonData.selectedLanguage = data.selectedLanguage || sessionStorage.getItem('selectedLanguageCode')?.toLowerCase();\r\n }\r\n if (shippingCall) {\r\n this.userService.newshippingAddress.Country =\r\n this.configService.commonData.selectedCountry?.toUpperCase();\r\n location.reload();\r\n }\r\n }\r\n });\r\n }\r\n\r\n updateCountryLanguage(country, languagecode) {\r\n this.userService.newshippingAddress = {};\r\n this.userService.newshippingAddress.Country = country.CountryCode;\r\n if (\r\n this.userService.customerData &&\r\n Object.keys(this.userService.customerData).length > 0 &&\r\n this.userService.customerData.PrimaryAddress?.CountryCode.toLowerCase() ==\r\n this.userService.newshippingAddress.Country.toLowerCase()\r\n ) {\r\n this.userService.newshippingAddress.Region =\r\n this.userService.customerData.PrimaryAddress.Region;\r\n } else {\r\n this.userService.newshippingAddress.Region = \"null\";\r\n }\r\n this.configService.commonData.selectedCountry =\r\n country.CountryCode.toLowerCase();\r\n const allowedCountries = JSON.parse(\r\n sessionStorage.getItem(\"allowedCountries\"),\r\n );\r\n _.each(allowedCountries.Data, (item) => {\r\n if (item.CountryCode.toLowerCase() == country.CountryCode.toLowerCase()) {\r\n this.configService.commonData.selectedLanguage = languagecode;\r\n }\r\n });\r\n this.configService.setSelectedCountry(\r\n country.CountryCode.toLowerCase(),\r\n this.configService.commonData.selectedLanguage,\r\n );\r\n }\r\n\r\n public clearItems() {\r\n this.isKitAdded = {};\r\n this.orderQuantity = {};\r\n this.autoshipQuantity = {};\r\n this.itemsService.selectedPacks = [];\r\n this.itemsService.selectedOrderItems = [];\r\n this.itemsService.selectedAutoOrderItems = [];\r\n }\r\n\r\n public getCartItems(cartItems) {\r\n if (cartItems) {\r\n if (!JSON.parse(localStorage.getItem(\"isLoggedIn\"))) {\r\n this.clearItems();\r\n } else {\r\n localStorage.removeItem(\"isLoggedIn\");\r\n }\r\n\r\n _.each(cartItems.Order, (cartItem) => {\r\n const isOrderItemExist = _.some(\r\n this.itemsService.selectedOrderItems,\r\n (item) => {\r\n if (item.HasOptions) {\r\n _.each(item.OptionsMap, (value) => {\r\n if (value.ItemId == item.ItemID) {\r\n item.ItemID = value.ItemId;\r\n return;\r\n }\r\n });\r\n }\r\n return item.ItemID == cartItem.ItemID;\r\n },\r\n );\r\n if (!isOrderItemExist) {\r\n this.itemsService.selectedOrderItems.push(cartItem);\r\n this.orderQuantity[cartItem.ItemID] = cartItem.Quantity;\r\n }\r\n });\r\n\r\n _.each(cartItems.Autoship, (cartItem) => {\r\n const isAutoItemExist = _.some(\r\n this.itemsService.selectedAutoOrderItems,\r\n (item) => {\r\n if (item.HasOptions) {\r\n _.each(item.OptionsMap, (value) => {\r\n if (value.ItemId == item.ItemID) {\r\n item.ItemID = value.ItemId;\r\n return;\r\n }\r\n });\r\n }\r\n return item.ItemID == cartItem.ItemID;\r\n },\r\n );\r\n if (!isAutoItemExist) {\r\n this.itemsService.selectedAutoOrderItems.push(cartItem);\r\n this.autoshipQuantity[cartItem.ItemID] = cartItem.Quantity;\r\n }\r\n });\r\n\r\n _.each(cartItems.Packs, (cartItem) => {\r\n const isPacksItemExist = _.some(\r\n this.itemsService.selectedPacks,\r\n (item) => {\r\n if (item.HasOptions) {\r\n _.each(item.OptionsMap, (value) => {\r\n if (value.ItemId == item.ItemID) {\r\n item.ItemID = value.ItemId;\r\n return;\r\n }\r\n });\r\n }\r\n return item.ItemID == cartItem.ItemID;\r\n },\r\n );\r\n if (!isPacksItemExist) {\r\n this.itemsService.selectedPacks.push(cartItem);\r\n this.packQuantity[cartItem.ItemID] = cartItem.Quantity;\r\n }\r\n });\r\n }\r\n }\r\n public resetItemQuantities() {\r\n if (this.itemsService.selectedPacks.length > 0) {\r\n const packtemp = {};\r\n this.itemsService.selectedPacks.forEach((item) => {\r\n packtemp[item.ItemID] = item.Quantity;\r\n });\r\n this.packQuantity = packtemp;\r\n } else {\r\n this.packQuantity = {};\r\n }\r\n\r\n if (this.itemsService.selectedOrderItems.length > 0) {\r\n const ordertemp = {};\r\n const orderRewardtemp = {};\r\n this.itemsService.selectedOrderItems.forEach((item) => {\r\n if (!item.UsePoints) {\r\n ordertemp[item.ItemID] = item.Quantity;\r\n } else if (item.UsePoints) {\r\n orderRewardtemp[item.ItemID] = item.rewardQuantity;\r\n }\r\n });\r\n this.orderQuantity = ordertemp;\r\n } else {\r\n this.orderQuantity = {};\r\n this.orderRewardQuantity = {};\r\n }\r\n\r\n if (this.itemsService.selectedAutoOrderItems.length > 0) {\r\n const autoordertemp = {};\r\n this.itemsService.selectedAutoOrderItems.forEach((item) => {\r\n autoordertemp[item.ItemID] = item.Quantity;\r\n });\r\n this.autoshipQuantity = autoordertemp;\r\n } else {\r\n this.autoshipQuantity = {};\r\n }\r\n }\r\n\r\n isAnyInstallmentItemInCart() {\r\n const all = [...this.itemsService.selectedOrderItems, ...this.itemsService.selectedAutoOrderItems];\r\n return all.some(item => item.SKU && item.SKU.endsWith(\"-ins\")) ;\r\n }\r\n\r\n isAnInstallmentItem(item) {\r\n return item.SKU && item.SKU.endsWith(\"-ins\");\r\n }\r\n\r\n getAllReferenceOfInstallmentItems(sku) {\r\n\r\n /**\r\n * Note:-\r\n * \r\n * {item} will have SKU = \"GGEU38-i | GGEU38-ins | GGEU38-xyz\"\r\n * {mainSKU} will hold = \"GGEU38\"\r\n * {Replicaitems} will hold = [\"GGEU38-i\", \"GGEU38-ins\"]\r\n */\r\n const result = { mainSKU: \"\", Replicaitems: []};\r\n const ReplacementsItems = this.ReplacementsItemsInCart.ItemsMapping;\r\n for(const skuName in ReplacementsItems) {\r\n if(sku.includes(`${skuName}`)) {\r\n result.mainSKU = skuName;\r\n result.Replicaitems = [...ReplacementsItems[skuName]];\r\n }\r\n }\r\n return result ;\r\n }\r\n\r\n removeInstallmentItemFromCart(item) {\r\n const { mainSKU, Replicaitems } = this.getAllReferenceOfInstallmentItems(item.SKU);\r\n\r\n if(Replicaitems.length == 0) return;\r\n\r\n const installmentItem = Replicaitems.find((item) => this.isAnInstallmentItem(item));\r\n const autoshipItem = this.itemsService.selectedAutoOrderItems.find((item) => item.SKU == installmentItem.SKU);\r\n \r\n // Normal Remove from Cart\r\n this.removeFromCart(item, false, false, true);\r\n setTimeout(() => { this.removeFromCart(autoshipItem, false, false, true); }, 2000);\r\n \r\n // Autoship Remove from Cart\r\n setTimeout(() => { this.removeFromCart(autoshipItem, true, false, true); }, 3000);\r\n\r\n // Remove the key from the \"ReplacementsItemsInCart\"\r\n if ( Object.prototype.hasOwnProperty.call(this.ReplacementsItemsInCart.ItemsMapping, mainSKU)) {\r\n delete this.ReplacementsItemsInCart.ItemsMapping[mainSKU];\r\n delete this.ReplacementsItemsInCart.PeriodMapping[mainSKU];\r\n localStorage.setItem(\"cart.replacementItems\", JSON.stringify(this.ReplacementsItemsInCart));\r\n }\r\n }\r\n\r\n getAutoshipDiscountPrice(item) {\r\n\r\n if(!item) {\r\n return 0;\r\n }\r\n\r\n // If current Item found in autoship cart [selectedAutoOrderItems]\r\n const isAutoshipItemExist = this.itemsService.selectedAutoOrderItems.find((i) => i.ItemID == item.ItemID);\r\n\r\n if(isAutoshipItemExist) {\r\n return isAutoshipItemExist ? (isAutoshipItemExist.Price || isAutoshipItemExist.Prices[0].Price) * isAutoshipItemExist.Quantity : 0;\r\n } \r\n\r\n // If current Item found in CalculateOrderResponse\r\n\r\n const selectedItem = this.orderService.calculateOrderResponse?.Items?.find((i) => i.ItemId == item.ItemID);\r\n if(selectedItem) {\r\n return selectedItem ? (selectedItem.Price) * selectedItem.Quantity : 0;\r\n } \r\n\r\n return item ? (item.Price || item.Prices[0].Price) * item.Quantity : 0;\r\n }\r\n\r\n /** ---------------------------------------------------------\r\n * Maintain Items in Cart, on Customer Type change\r\n --------------------------------------------------------- */\r\n\r\n \r\n\r\n /** ---------------------------------------------------------\r\n * Ends Here\r\n --------------------------------------------------------- */\r\n\r\n}\r\n","import { Directive, OnInit, Output, EventEmitter } from \"@angular/core\";\r\n\r\n/*\r\nSample usage :
...
\r\n*/\r\n\r\n@Directive({\r\n selector: \"[ngInit]\",\r\n})\r\nexport class NgInitDirective implements OnInit {\r\n @Output()\r\n ngInit: EventEmitter = new EventEmitter();\r\n\r\n ngOnInit() {\r\n this.ngInit.emit();\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class RegexService {\r\n constructor() {}\r\n\r\n getRegex(countryCode) {\r\n let regex;\r\n switch (countryCode) {\r\n case \"AR\":\r\n regex = /^[a-zA-Z0-9 _.-]*$/;\r\n break;\r\n case \"AT\":\r\n case \"AU\":\r\n case \"BE\":\r\n case \"HU\":\r\n case \"NZ\":\r\n case \"PH\":\r\n case \"ZA\":\r\n regex = /^\\d{4}$/;\r\n break;\r\n case \"CR\":\r\n case \"DE\":\r\n case \"ES\":\r\n case \"FR\":\r\n case \"MX\":\r\n case \"PE\":\r\n regex = /^\\d{5}$/;\r\n break;\r\n case \"RU\":\r\n case \"EC\":\r\n case \"SG\":\r\n case \"IN\":\r\n regex = /^\\d{6}$/;\r\n break;\r\n case \"PA\":\r\n regex = /^\\d{5,6}$/;\r\n break;\r\n case \"JP\":\r\n regex = /^([0-9]){3}[-]([0-9]){4}$/;\r\n break;\r\n case \"CA\":\r\n regex =\r\n /^([ABCEGHJKLMNPRSTVXYabceghjklmnprstvxy]\\d[ABCEGHJKLMNPRSTVWXYZabceghjklmnprstvwxyz]) {0,1}(\\d[ABCEGHJKLMNPRSTVWXYZabceghjklmnprstvwxyz]\\d)$/;\r\n break;\r\n case \"CL\":\r\n regex = /^(\\d{7}|\\d{3}[-]\\d{4})$/;\r\n break;\r\n case \"KR\":\r\n regex = /^(\\d{5}|\\d{3}[-]\\d{3})$/;\r\n break;\r\n case \"NL\":\r\n regex = /^[1-9][0-9]{3}\\s?([a-zA-Z]{2})?$/;\r\n break;\r\n case \"PT\":\r\n regex = /^\\d{4}([-]?\\d{3})?$/;\r\n break;\r\n case \"US\":\r\n regex = /^\\d{5}([-]?\\d{4})?$/;\r\n break;\r\n case \"GB\":\r\n regex =\r\n /^([A-Pa-pR-Ur-uWYZwyz](([0-9](([0-9]|[A-Ha-hJKSTUWjkstuw])?)?)|([A-Ha-hK-Yk-y][0-9]([0-9]|[ABEHMNPRVWXYabehmnprvwxy])?)) [0-9][ABabD-Hd-hJLNjlnP-Up-uW-Zw-z]{2})|GIRgir 0AAaa$/;\r\n break;\r\n default:\r\n regex = /^[a-zA-Z0-9 _.-]*$/;\r\n break;\r\n }\r\n return regex;\r\n }\r\n}\r\n","import {\r\n Directive,\r\n ElementRef,\r\n Renderer2,\r\n HostListener,\r\n ChangeDetectorRef,\r\n OnInit,\r\n EventEmitter,\r\n Output,\r\n} from \"@angular/core\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport $ from \"jquery\";\r\nimport { RegexService } from \"../services/regex.service\";\r\nimport { Cart1Service } from \"../services/cart1.service\";\r\n@Directive({\r\n selector: \"[validate]\",\r\n})\r\nexport class ValidateDirective implements OnInit {\r\n windowBlur: boolean = true;\r\n @Output(\"success\") successFun: EventEmitter = new EventEmitter();\r\n constructor(\r\n private ref: ChangeDetectorRef,\r\n public translate: TranslateService,\r\n private elementRef: ElementRef,\r\n private renderer: Renderer2,\r\n public regexService: RegexService,\r\n private cartService: Cart1Service\r\n ) {}\r\n @HostListener(\"window:focus\", [\"$event.target\"])\r\n onFocus() {\r\n this.windowBlur = false;\r\n }\r\n\r\n @HostListener(\"window:focusout\", [\"$event.target\"])\r\n onFocusout() {\r\n this.windowBlur = true;\r\n }\r\n\r\n @HostListener(\"focus\", [\"$event.target\"])\r\n elemntonFocus(target1) {\r\n const target = $(target1);\r\n target.closest(\".control-group\").removeClass(\"has-error\");\r\n target.closest(\".control-group\").find(\".has-error\").remove();\r\n target.parent(\".ds-validate\").removeClass(\"ds-validate--has-error\");\r\n target.parent(\".ds-validate\").find(\".has-error\").remove();\r\n target.find(\"state-error\").remove();\r\n target.removeClass(\"state-error\");\r\n target.removeClass(\"state-success\");\r\n target.find(\"state-success\").remove();\r\n }\r\n\r\n @HostListener(\"focusout\", [\"$event.target\"])\r\n elemntonFocusout(target1) {\r\n const target = $(target1);\r\n target.parent(\".ds-validate\").removeClass(\"ds-validate--has-error\");\r\n target.parent(\".ds-validate\").find(\".has-error\").remove();\r\n }\r\n @HostListener(\"blur\", [\"$event.target\"])\r\n elemntonBlur(target) {\r\n this.checkForm(target, 0);\r\n }\r\n @HostListener(\"focusin\", [\"$event.target\"])\r\n elemntonFocusin() {}\r\n\r\n @HostListener(\"keydown\", [\"$event\"])\r\n elementonkeypress($event) {\r\n const e = $event;\r\n const element = $($event.target);\r\n if (element.attr(\"inputspace\")) {\r\n let altkeypress;\r\n if (e.altKey) {\r\n altkeypress = true;\r\n } else {\r\n if (altkeypress) {\r\n altkeypress = false;\r\n return false;\r\n }\r\n }\r\n if (\r\n (e.which >= 32 && e.which <= 36) ||\r\n (e.which >= 41 && e.which <= 45) ||\r\n e.which === 47 ||\r\n (e.key == \"@\" && e.which === 50) ||\r\n (e.which >= 58 && e.which <= 64) ||\r\n (e.which >= 91 && e.which <= 93) ||\r\n (e.which >= 106 && e.which <= 188) ||\r\n (e.which >= 190 && e.which <= 222)\r\n ) {\r\n return false;\r\n }\r\n }\r\n if (element.attr(\"inputonlynumber\")) {\r\n if (\r\n (e.which >= 32 && e.which <= 36) ||\r\n (e.which >= 41 && e.which <= 47) ||\r\n (e.which >= 58 && e.which <= 93) ||\r\n (e.which >= 106 && e.which <= 222)\r\n ) {\r\n return false;\r\n }\r\n }\r\n if (element.attr(\"inputmobilespacendash\")) {\r\n if (\r\n (e.which >= 33 && e.which <= 34) ||\r\n (e.which >= 41 && e.which <= 45) ||\r\n e.which === 47 ||\r\n (e.which >= 58 && e.which <= 64) ||\r\n (e.which >= 91 && e.which <= 93) ||\r\n (e.which >= 106 && e.which <= 188) ||\r\n (e.which >= 190 && e.which <= 222)\r\n ) {\r\n return false;\r\n }\r\n }\r\n if (element.attr(\"validate-maxlength\")) {\r\n const attr = element.attr(\"validate-maxlength\");\r\n if (element.val().length + 1 > attr) {\r\n const customErrorMessgae = element.attr(\"error-message\");\r\n element.closest(\".control-group\").find(\".has-error\").remove();\r\n if (customErrorMessgae) {\r\n this.showError(customErrorMessgae, element, attr);\r\n } else {\r\n this.showError(\"error_maxlength_chars\", element, attr);\r\n }\r\n } else {\r\n this.showSuccess(element);\r\n }\r\n }\r\n if (element.attr(\"inputspacehypens\")) {\r\n if (e.which === 32 || e.which === 189) {\r\n return false;\r\n }\r\n }\r\n if (element.attr(\"nospaceallow\")) {\r\n if (e.which === 32) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n this.renderer.listen(this.elementRef.nativeElement, \"focus\", (event) => {\r\n const target = $(event.target);\r\n target.closest(\".control-group\").removeClass(\"has-error\");\r\n target.closest(\".control-group\").find(\".has-error\").remove();\r\n target.parents(\".ds-validate\").removeClass(\"ds-validate--has-error\");\r\n target.parents(\".ds-validate\").find(\".has-error\").remove();\r\n target.find(\"state-error\").remove();\r\n target.removeClass(\"state-error\");\r\n target.removeClass(\"state-success\");\r\n target.find(\"state-success\").remove();\r\n });\r\n const element = $(this.elementRef.nativeElement);\r\n if (element.attr(\"trigger-check\")) {\r\n this.renderer.listen(this.elementRef.nativeElement, \"click\", (ev) => {\r\n ev.preventDefault();\r\n // remove any visible errors\r\n $(\".mat-form-field.has-error\").removeClass(\"has-error\");\r\n $(\".mat-form-field\").find(\".has-error\").remove();\r\n\r\n // grab all inputs set for validation minus the button triggering the check\r\n const inputs = $(\"input,mat-select,mat-checkbox\").not(\r\n \"input[trigger-check]\",\r\n );\r\n\r\n // loop through inputs and send them through checkForm\r\n inputs.each((i, element) => {\r\n this.checkForm(element, 0);\r\n });\r\n\r\n const errors = $(\".mat-form-field.has-error\");\r\n if (errors.length === 0) {\r\n this.successFun.emit();\r\n // this.ref.detectChanges(element);\r\n } else {\r\n const target = $(\".mat-form-field.has-error\")[0];\r\n $(\"html, body\").animate(\r\n {\r\n scrollTop: $(target).offset().top - 100,\r\n },\r\n 1000,\r\n ); // animate scroll to first error\r\n this.cartService.errorExist.emit(true);\r\n }\r\n });\r\n }\r\n if (element.attr(\"triggerWithoutScroll\")) {\r\n element.click((ev) => {\r\n // StopExecution = true;\r\n ev.preventDefault();\r\n // remove any visible errors\r\n $(\".mat-form-field.has-error\").removeClass(\"has-error\");\r\n $(\".mat-form-field\").find(\".has-error\").remove();\r\n\r\n // this.ref.detectChanges(element.attr(\"pvCheck\"));\r\n const sectiontype = element.attr(\"sectiontype\");\r\n\r\n // grab all inputs set for validation minus the button triggering the check\r\n const inputs = $(\"[\" + sectiontype + \"]\").not(\r\n \"input[trigger-checksection]\",\r\n );\r\n\r\n // loop through inputs and send them through checkForm\r\n inputs.each((i, element) => {\r\n this.checkForm(element, 0);\r\n });\r\n\r\n const errors = $(\".mat-form-field.has-error\");\r\n if (errors.length === 0) {\r\n this.successFun.emit();\r\n }\r\n });\r\n }\r\n if (element.attr(\"trigger-check-section\")) {\r\n this.renderer.listen(this.elementRef.nativeElement, \"click\", (ev) => {\r\n ev.preventDefault();\r\n // remove any visible errors\r\n $(\".mat-form-field.has-error\").removeClass(\"has-error\");\r\n $(\".mat-form-field\").find(\".has-error\").remove();\r\n\r\n // this.ref.detectChanges(element.attr('pvCheck'));\r\n\r\n const sectiontype = element.attr(\"sectiontype\");\r\n\r\n // grab all inputs set for validation minus the button triggering the check\r\n const inputs = $(\"[\" + sectiontype + \"]\")\r\n .not(\"button[trigger-check-section]\")\r\n .not(\".novalidate\");\r\n\r\n // loop through inputs and send them through checkForm\r\n inputs.each((i, element) => {\r\n this.checkForm(element, 0);\r\n });\r\n\r\n // special pw check that happens only on btn click and if pw field exists\r\n if ($(\"#password1\").length > 0) {\r\n const pw1 = $(\"#password1\");\r\n const pw2 = $(\"#password2\");\r\n const ctrlGrps = pw1.closest(\".controls-row\").find(\".mat-form-field\");\r\n if (pw1.val() !== pw2.val()) {\r\n ctrlGrps.addClass(\"has-error\");\r\n $(\".password-match\").text(\"No Match\").addClass(\"has-error\");\r\n }\r\n }\r\n\r\n const errors = $(\".mat-form-field.has-error\");\r\n if (errors.length === 0) {\r\n this.successFun.emit();\r\n } else {\r\n const target = $(\".mat-form-field.has-error\")[0];\r\n const link = $(target);\r\n const offset = link.offset();\r\n const top = offset.top;\r\n const bottom = $(window).height() - top - link.height();\r\n $(\"html, body\").animate(\r\n {\r\n scrollTop: bottom > 1 ? bottom : $(target).offset().top,\r\n },\r\n 1000,\r\n ); // animate scroll to first error\r\n }\r\n });\r\n }\r\n if (element.attr(\"triggerTabSection\")) {\r\n element.click((ev) => {\r\n setTimeout(() => {\r\n // StopExecution = true;\r\n ev.preventDefault();\r\n // remove any visible errors\r\n\r\n const sections = $(\"div[trigger-tab-section='true']\").not(\r\n \"[currenttab='true']\",\r\n );\r\n sections.forEach((n, item) => {\r\n const element1 = $(item);\r\n // grab all inputs set for validation minus the button triggering the check\r\n const inputs = element1.find(\":input\");\r\n\r\n // loop through inputs and send them through checkForm\r\n inputs.each((i, e) => {\r\n const element = $(e);\r\n element.closest(\".mat-form-field\").removeClass(\"has-error\");\r\n element.closest(\".mat-form-field\").find(\".has-error\").remove();\r\n\r\n this.checkForm(element, 0);\r\n });\r\n });\r\n // special pw check that happens only on btn click and if pw field exists\r\n if ($(\"#password1\").length > 0) {\r\n const pw1 = $(\"#password1\");\r\n const pw2 = $(\"#password2\");\r\n const ctrlGrps = pw1\r\n .closest(\".controls-row\")\r\n .find(\".mat-form-field\");\r\n if (pw1.val() !== pw2.val()) {\r\n ctrlGrps.addClass(\"has-error\");\r\n $(\".password-match\").text(\"No Match\").addClass(\"has-error\");\r\n }\r\n }\r\n }, 1000);\r\n });\r\n }\r\n return null;\r\n }\r\n\r\n checkForm(element1, type = 0) {\r\n const element = $(element1);\r\n let attr;\r\n let value = element.val();\r\n if (element1.localName === \"mat-select\") {\r\n value = element1.textContent;\r\n }\r\n\r\n /*--attrs is not used because when the continue button is clicked attrs held the value of the button and not the element we passsed in - instead\r\n we check the old fashioned way with jQuery to see what validation needs to be done.--*/\r\n\r\n // not empty validation\r\n if (element.attr(\"noempty\")) {\r\n if ($.trim(value) === \"\") {\r\n if (type === 0) {\r\n element.closest(\".mat-form-field\").find(\".has-error\").remove();\r\n this.showError(\"error_required_field\", element);\r\n }\r\n } else {\r\n this.showSuccess(element);\r\n }\r\n }\r\n\r\n if (element.attr(\"validname\")) {\r\n if (value.match(/[*^|\":<>[\\]{}\\\\()';?/~!,]/)) {\r\n if (type === 0) {\r\n this.showError(\"error_special_char\", element);\r\n }\r\n } else {\r\n this.showSuccess(element);\r\n }\r\n }\r\n\r\n if (element.attr(\"phoneno\")) {\r\n if (!value.match(/^\\d*$/)) {\r\n if (type === 0) {\r\n this.showError(\"error_only_numbers\", element);\r\n }\r\n }\r\n }\r\n // min length validation\r\n if (element.attr(\"minlength\")) {\r\n attr = element.attr(\"minlength\");\r\n if (value) {\r\n if (value.length < attr) {\r\n if (type === 0) {\r\n element.closest(\".ds-validate\").addClass(\"ds-field--is-dirty\");\r\n this.showError(\"error_minimum_chars\", element, attr);\r\n }\r\n } else {\r\n this.showSuccess(element);\r\n }\r\n }\r\n }\r\n\r\n // max length validation\r\n if (element.attr(\"validate-maxlength\")) {\r\n attr = element.attr(\"validate-maxlength\");\r\n if (value.length > attr) {\r\n if (type === 0) {\r\n const customErrorMessgae = element.attr(\"error-message\");\r\n if (customErrorMessgae) {\r\n this.showError(customErrorMessgae, element, attr);\r\n } else {\r\n this.showError(\"error_maxlength_chars\", element, attr);\r\n }\r\n }\r\n } else {\r\n this.showSuccess(element);\r\n }\r\n }\r\n // email validation\r\n if (element.attr(\"email\") && element.attr(\"email\") == \"true\") {\r\n if (value) {\r\n this.validateEmail(value, element);\r\n }\r\n }\r\n\r\n // alphanumeric validation\r\n if (element.attr(\"alphanumericdash\")) {\r\n if (value) {\r\n this.validateAlphaNumericDash(value, type);\r\n }\r\n }\r\n\r\n if (element.attr(\"password-match\")) {\r\n const currentPw = $(\"#txtPassword\").val();\r\n if (element.val()) {\r\n if (currentPw == element.val()) {\r\n this.showSuccess(element);\r\n } else {\r\n if (type === 0) {\r\n element.closest(\".mat-form-field\").find(\".has-error\").remove();\r\n this.showError(\"password_not_match\", element, attr);\r\n }\r\n }\r\n }\r\n }\r\n // no spaces\r\n if (element.attr(\"nospaces\")) {\r\n if (value.match(/\\s/g)) {\r\n if (type === 0) {\r\n element.closest(\".mat-form-field\").find(\".has-error\").remove();\r\n this.showError(\"error_spaces_not_permitted\", element);\r\n }\r\n } else {\r\n this.showSuccess(element);\r\n }\r\n }\r\n // select validation\r\n if (element.attr(\"validate-select\")) {\r\n value = element1.textContent.replace(/\\s/g, \"\");\r\n\r\n if (\r\n (value && value.match(/Select a/)) ||\r\n !value ||\r\n value == \" \" ||\r\n value == \"\"\r\n ) {\r\n if (type === 0) {\r\n this.showError(\"error_make_selection\", element);\r\n }\r\n } else {\r\n this.showSuccess(element);\r\n }\r\n }\r\n\r\n // select validation\r\n if (element.attr(\"validate-custom-select\")) {\r\n value = $(\"#freq_dd\").val();\r\n\r\n if (value === \"\") {\r\n if (type === 0) {\r\n this.showError(\"error_make_selection\", element);\r\n }\r\n // else {\r\n // formcompletecheck = false;\r\n // }\r\n } else {\r\n this.showSuccess(element);\r\n }\r\n }\r\n\r\n // checkbox validation\r\n if (element.attr(\"checkbox-validate\")) {\r\n element.on(\"click\", (event) => {\r\n const target = $(event.target);\r\n if ($(event.target).find(\"input[class='mat-checkbox-input']\")) {\r\n target.closest(\".control-group\").removeClass(\"has-error\");\r\n target.closest(\".control-group\").find(\".has-error\").remove();\r\n target.parents(\".ds-validate\").removeClass(\"ds-validate--has-error\");\r\n target.parents(\".ds-validate\").find(\".has-error\").remove();\r\n target.find(\"state-error\").remove();\r\n target.removeClass(\"state-error\");\r\n target.removeClass(\"state-success\");\r\n target.find(\"state-success\").remove();\r\n }\r\n });\r\n if (\r\n element.find(\"input\").attr(\"aria-checked\") == \"false\" ||\r\n !element.find(\"input\").attr(\"aria-checked\")\r\n ) {\r\n if (type === 0) {\r\n this.showError(\"checkbox_required\", element);\r\n }\r\n } else {\r\n this.showSuccess(element);\r\n }\r\n }\r\n // checkbox validation\r\n if (element.attr(\"checkbox-validate-autoship\")) {\r\n if (\r\n (element.find(\"input\").attr(\"aria-checked\") == \"false\" ||\r\n !element.find(\"input\").attr(\"aria-checked\")) &&\r\n element.hasClass(\"ischeck\")\r\n ) {\r\n if (type === 0) {\r\n this.showError(\"autoship_required\", element.parent().parent());\r\n }\r\n } else {\r\n this.showSuccess(element);\r\n }\r\n }\r\n\r\n // regex validation\r\n if (element.attr(\"regxvalid\")) {\r\n if (value) {\r\n this.regexValidate(\r\n value,\r\n element,\r\n element.attr(\"regxvalidValue\"),\r\n type,\r\n );\r\n }\r\n }\r\n\r\n // regex validation\r\n if (element.attr(\"regxvalidzip\")) {\r\n if (value) {\r\n this.regexValidateZip(\r\n element,\r\n value,\r\n element.attr(\"regexcountry\").toUpperCase(),\r\n );\r\n }\r\n }\r\n\r\n // greater than zero\r\n if (element.attr(\"greater-than-zero\")) {\r\n if (value) {\r\n const numb = value.replace(/[^0-9]/g, \"\");\r\n if (numb > 0) {\r\n this.showSuccess(element);\r\n } else {\r\n if (type === 0) {\r\n this.showError(\"greater_then_zero\", element, attr);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n validateEmail(value, element, type = 0) {\r\n const filter = new RegExp(\r\n \"^([\\\\w-\\\\.+]+)@((\\\\[[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.)|(([\\\\w-]+\\\\.)+))([a-zA-Z]{2,10}|[0-9]{1,3})(\\\\]?)$\",\r\n );\r\n if (filter.test(value)) {\r\n this.showSuccess(element);\r\n } else {\r\n if (type === 0) {\r\n this.showError(\"error_valid_email\", element);\r\n }\r\n }\r\n }\r\n validateAlphaNumericDash(value, element, type = 0) {\r\n const filter = new RegExp(\"^[a-zA-Z0-9-.]+$\");\r\n if (filter.test(value)) {\r\n this.showSuccess(element);\r\n } else {\r\n if (type === 0) {\r\n this.showError(\"error_valid_alphanumeric\", element);\r\n }\r\n }\r\n }\r\n regexValidate(value, element, regxExp, type = 0) {\r\n const filter = new RegExp(regxExp);\r\n if (filter.test(value)) {\r\n this.showSuccess(element);\r\n } else {\r\n if (type === 0) {\r\n element.closest(\".mat-form-field\").find(\".has-error\").remove();\r\n this.showError(\"INVALID_PASSWORD_FORMAT\", element);\r\n }\r\n }\r\n }\r\n regexValidateZip(element, value, countrycode, type = 0) {\r\n const regxExp = this.regexService.getRegex(countrycode);\r\n const filter = new RegExp(regxExp);\r\n if (filter.test(value)) {\r\n this.showSuccess(element);\r\n } else {\r\n if (type === 0) {\r\n this.showError(\"INVALID ZIP\", element);\r\n }\r\n }\r\n }\r\n\r\n showError(msg, element, val?: \"\") {\r\n // let element=$(element.parent());\r\n if (!element.hasClass(\"novalidate\")) {\r\n if (\r\n !element.closest(\".mat-form-field\").find(\"span\").hasClass(\"has-error\")\r\n ) {\r\n // create and display error message\r\n element.removeClass(\"state-success\");\r\n element.addClass(\"state-error\");\r\n const container = $(\"\");\r\n\r\n if (element.attr(\"custommsg\")) {\r\n msg = element.attr(\"custommsg\");\r\n }\r\n\r\n msg = this.translate.instant(msg, { value: val });\r\n container\r\n .text(msg)\r\n .addClass(\"has-error help-block ng-scope\")\r\n .attr(\"translate\", \"\");\r\n element\r\n .parent()\r\n .closest(\".ds-validate\")\r\n .addClass(\"ds-validate--has-error\");\r\n element\r\n .parent()\r\n .closest(\".custom-validate\")\r\n .addClass(\"custom-validate--has-error\");\r\n\r\n if (element.hasClass(\"ds-checkbox\") || element.hasClass(\"ds-radio\")) {\r\n element.after(container);\r\n }\r\n if (element.parentsUntil().hasClass(\"ds-validate--has-error\")) {\r\n element.after(container);\r\n }\r\n if (element.parentsUntil().hasClass(\"custom-validate--has-error\")) {\r\n element.after(container);\r\n }\r\n element.closest(\".mat-form-field\").addClass(\"has-error\");\r\n }\r\n }\r\n }\r\n showSuccess(element) {\r\n if (!element.hasClass(\"novalidate\") && !this.windowBlur) {\r\n if (\r\n !element.closest(\".mat-form-field\").find(\"span\").hasClass(\"has-error\")\r\n ) {\r\n // create and display error message\r\n element.removeClass(\"state-error\");\r\n element.addClass(\"state-success\");\r\n }\r\n }\r\n }\r\n}\r\n","
\r\n\r\n \r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n

\r\n

\r\n \r\n

0\" class=\"pV\">\r\n 0\"\r\n [textContent]=\"': (' + getOrderQuanity()+ ' items)'\">\r\n \r\n

\r\n

0 || this.itemsService.selectedAutoOrderItems.length > 0)\"\r\n class=\"pV m-t-20\" style=\"width: 309px !important;\">Your cart is currently empty. Keep\r\n Shopping.\r\n

\r\n
\r\n
\r\n
\r\n

0\"\r\n [textContent]=\"((orderService.calculateOrderResponse.Total) ? (orderService.calculateOrderResponse.Total) : 0) | currency:companyService.selectedCurrency.CurrencyCode\">\r\n

\r\n

\r\n

\r\n\r\n

0\" class=\"f-right c-light main_qv\">\r\n {{'global_pv'|translate}}\r\n 0\">:\r\n {{((orderService.orderBusinessVolume) || 0)}}\r\n :\r\n {{((orderService.orderBusinessVolume) || 0)}}\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n 0 && utilityService.isEnrollment()\">\r\n \r\n
\r\n
\r\n
\r\n
\r\n

\r\n

\r\n \r\n

\r\n
\r\n
\r\n

\r\n

\r\n

{{'global_pv'|translate}} \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \"product\"\r\n
\r\n
\r\n

\r\n

\r\n \r\n

\r\n {{'global_pv'|translate}} : {{item.Quantity * (item.CV || item.QV || 0)}}

\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n 0\">\r\n \r\n
\r\n
\r\n
\r\n
\r\n

\r\n

\r\n \r\n \r\n

\r\n
\r\n
\r\n

\r\n

\r\n

{{'global_pv'|translate}}\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \"img\"\r\n
\r\n
\r\n

\r\n \r\n

\r\n {{'global_pv'|translate}} : {{item.Quantity * (item.CV ||\r\n item.QV || 0)}}

\r\n
\r\n \r\n \r\n \r\n\r\n Qty:\r\n\r\n \r\n\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
0 || itemsService.selectedPacks.length > 0\">\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n 0\">\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n

\r\n

\r\n \r\n

\r\n
\r\n
\r\n

\r\n

\r\n

{{'global_pv'|translate}} :\r\n {{(orderService.autoorderBusinessVolume || 0)}}

\r\n
\r\n
\r\n
\r\n
\r\n

\r\n
\r\n
\r\n
\r\n calendar_today\r\n
\r\n
\r\n \r\n \r\n \r\n keyboard_arrow_down\r\n \r\n \r\n \r\n

Choose Autoship Frequency

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {{freq.Description | translate}}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \"product\r\n
\r\n
\r\n

\r\n \r\n

\r\n {{'global_pv'|translate}} :\r\n {{item.Quantity * (item.CV || item.QV || 0)}}

\r\n
\r\n \r\n \r\n \r\n\r\n Qty:\r\n\r\n \r\n\r\n\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
0) && (itemsService.selectedOrderItems.length>0)\">\r\n \r\n \r\n
\r\n
0 || this.itemsService.selectedAutoOrderItems.length>0)\">\r\n \r\n

Or

\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n close\r\n your Cart\r\n \r\n

\r\n
\r\n\r\n
\r\n\r\n \r\n
0\">\r\n
Bundles
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \"img\"\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n delete\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n {{i + 1}}\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
0\">\r\n
one-time purchase
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \"img\"\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n delete\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n \r\n {{i + 1}}\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n
0\" class=\"cart-footer\" [ngClass]=\"{ 'macFooter' : isMac }\" fxLayout=\"column\" fxLayoutGap=\"14px\">\r\n
\r\n
\r\n

SUBTOTAL:

\r\n

0 ? (orderService.calculateOrderResponse.SubTotal - orderService.calculateOrderResponse.DiscountTotal) : orderService.calculateOrderResponse.SubTotal ) : 0) | currency: companyService.selectedCurrency.CurrencyCode\">

\r\n
\r\n Shipping handling & taxes calculated at checkout\r\n \r\n
\r\n\r\n \r\n
No Items In cart...
\r\n
\r\n\r\n
\r\n
\r\n","import { Router } from \"@angular/router\";\r\nimport { Component, OnInit, Input } from \"@angular/core\";\r\nimport { ProductService } from \"../services/product.service\";\r\nimport { Observable } from \"rxjs\";\r\nimport { UserService } from \"../services/user.service\";\r\nimport { NotificationService } from \"../services/notification.service\";\r\nimport { RestApiService } from \"../services/restapi.service\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { OrderService } from \"../services/order.service\";\r\nimport { ConfigService } from \"../services/config.service\";\r\nimport * as moment from \"moment\";\r\nimport { SideNavBarService } from \"../services/sidenavbar.service\";\r\nimport { Cart1Service } from \"../services/cart1.service\";\r\nimport { Location } from \"@angular/common\";\r\nimport * as _ from \"lodash\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { UtilityService } from \"../services/utility.service\";\r\nimport { PersistentService } from \"../services/persistent.service\";\r\nimport { AccountService } from \"../services/account.service\";\r\nimport { AutoshipConfigurationService } from \"../services/autoshipConfiguration.service\";\r\nimport { CompanyService } from \"../services/company.service\";\r\nimport { CommonSetting } from \"src/app/modals/commonsetting.modal\";\r\nimport { ItemsListService } from \"../services/itemsList.service\";\r\nimport { Platform } from '@angular/cdk/platform';\r\n\r\n@Component({\r\n selector: \"app-sidebar-summary-cart\",\r\n templateUrl: \"./sidebar-summary-cart.component.html\",\r\n styleUrls: [\"./sidebar-summary-cart.component.scss\"],\r\n})\r\nexport class SideBarSummaryCartComponent implements OnInit {\r\n public commonData: CommonSetting;\r\n public AutoshipMinDate: Date;\r\n public AutoshipMaxDate: Date;\r\n shouldRun: boolean = true;\r\n limit: 3;\r\n isShow: boolean;\r\n lastQuantity: 0;\r\n selectedfrequencyTypeID;\r\n autoshipConfiguration = {\r\n setting: {\r\n allowEdit: true,\r\n },\r\n };\r\n userService: UserServiceModal;\r\n currentState;\r\n checkoutVal;\r\n QuantityArray: Array = new Array(30);\r\n NewCartEvents = {};\r\n isMac: boolean = false;\r\n\r\n constructor(\r\n public configService: ConfigService,\r\n public orderService: OrderService,\r\n public user: UserService,\r\n public notificationService: NotificationService,\r\n public apiService: RestApiService,\r\n public translate: TranslateService,\r\n public sideNavBarService: SideNavBarService,\r\n public cart1Service: Cart1Service,\r\n public itemsService: ProductService,\r\n public location: Location,\r\n public router: Router,\r\n public utilityService: UtilityService,\r\n public persistentService: PersistentService,\r\n public accountService: AccountService,\r\n public autoshipConfigurationService: AutoshipConfigurationService,\r\n public companyService: CompanyService,\r\n public itemListService: ItemsListService,\r\n private platform: Platform\r\n ) {\r\n this.autoshipConfigurationService.autoshipDate = new Date(\r\n autoshipConfigurationService.autoshipDate,\r\n );\r\n this.userService = user.userServiceModal;\r\n this.commonData = this.configService.getConfig();\r\n this.selectedfrequencyTypeID =\r\n this.persistentService.retailData.Autoship.FrequencyTypeID =\r\n this.commonData.FrequencyTypes[2].ID;\r\n this.AutoshipMinDate = moment()\r\n .add(this.configService.localSettings.Autoship.AutoshipMinDate, \"days\")\r\n .toDate();\r\n this.AutoshipMaxDate = moment()\r\n .add(this.configService.localSettings.Autoship.AutoshipMaxDate, \"days\")\r\n .toDate();\r\n }\r\n @Input() events: Observable;\r\n\r\n ngOnInit() {\r\n this.currentState = this.location.path();\r\n this.isMac = this.platform.IOS;\r\n }\r\n\r\n showTaxMessage() {\r\n return (\r\n !(this.location.path().toLowerCase() == \"/join\") &&\r\n !(this.location.path().toLowerCase() == \"/checkout\") &&\r\n (this.itemsService.selectedOrderItems.length > 0 ||\r\n this.itemsService.selectedAutoOrderItems.length > 0 ||\r\n this.itemsService.selectedPacks.length > 0)\r\n );\r\n }\r\n\r\n getPacksQuanity() {\r\n let quantity = 0;\r\n _.each(this.itemsService.selectedPacks, (item) => {\r\n quantity += item.Quantity ? parseInt(item.Quantity, 10) : 0;\r\n });\r\n return quantity;\r\n }\r\n\r\n getOrderQuanity() {\r\n let quantity = 0;\r\n _.each(this.itemsService.selectedOrderItems, (item) => {\r\n if (!item.UsePoints) {\r\n quantity += item.Quantity ? parseInt(item.Quantity, 10) : 0;\r\n }\r\n if (item.UsePoints) {\r\n quantity += item.rewardQuantity ? parseInt(item.rewardQuantity, 10) : 0;\r\n }\r\n });\r\n return quantity;\r\n }\r\n\r\n getAutoOrderQuanity() {\r\n let quantity = 0;\r\n _.each(this.itemsService.selectedAutoOrderItems, (item) => {\r\n quantity += item.Quantity ? parseInt(item.Quantity, 10) : 0;\r\n });\r\n return quantity;\r\n }\r\n\r\n removePromo(code) {\r\n this.userService.couponInfo.RewardsForUse = _.reject(\r\n this.userService.couponInfo.RewardsForUse,\r\n (e) => {\r\n return e.Code === code;\r\n },\r\n );\r\n this.userService.couponInfo.promoCode = \"\";\r\n this.userService.couponInfo.promoCodeValid = false;\r\n this.userService.couponInfo.IsAppliedcode = false;\r\n this.userService.couponInfo.Allcoupons.splice(\r\n this.userService.couponInfo.Allcoupons.indexOf(code),\r\n 1,\r\n );\r\n this.orderService.calculateOrder();\r\n }\r\n getCustomerTypeName() {\r\n const custmerType = _.find(\r\n this.configService.commonSettings.CustomerTypes,\r\n (item) => {\r\n return item.ID == this.userService.customerTypeID;\r\n },\r\n );\r\n if (custmerType) {\r\n return { type: custmerType.Description };\r\n }\r\n }\r\n\r\n dateFilter(date) {\r\n let disableDates = [];\r\n if (disableDates.length === 0) {\r\n disableDates = [];\r\n }\r\n return disableDates.indexOf(moment(date).format(\"DD MMMM YYYY\")) === -1;\r\n }\r\n\r\n submitApplication() {\r\n document.querySelectorAll(\"#place-order-btn\")[0].click();\r\n }\r\n\r\n checkitem() {\r\n if (this.utilityService.getAutoshipEditFlag()) {\r\n return true;\r\n }\r\n return (\r\n this.itemsService.selectedOrderItems.length > 0 ||\r\n this.itemsService.selectedAutoOrderItems.length > 0\r\n );\r\n }\r\n\r\n navigateToNextStep() {\r\n this.sideNavBarService.triggerOpen();\r\n if (\r\n this.currentState.toLowerCase() == \"/checkout\" &&\r\n Object.keys(this.userService.customerData).length &&\r\n (this.userService.customerData.CustomerId ||\r\n this.userService.customerData.PrimaryAddress.Region) &&\r\n this.checkitem() &&\r\n this.user.checkIfUserAuthenticatedOrNot()\r\n ) {\r\n this.submitApplication();\r\n } else if (\r\n this.currentState.toLowerCase() != \"/checkout\" &&\r\n Object.keys(this.userService.customerData).length &&\r\n (this.userService.customerData.CustomerId ||\r\n this.userService.customerData.PrimaryAddress.Region) &&\r\n this.checkitem() &&\r\n this.user.checkIfUserAuthenticatedOrNot()\r\n ) {\r\n this.router.navigate([\"/checkout\"]);\r\n } else if (\r\n this.checkitem() &&\r\n ((Object.keys(this.userService.customerData).length === 0 &&\r\n !this.userService.customerData.CustomerId) ||\r\n !this.user.checkIfUserAuthenticatedOrNot())\r\n ) {\r\n if (this.currentState.toLowerCase() == \"/checkout\") {\r\n this.accountService.logout();\r\n }\r\n this.router.navigate([\"/login\"]);\r\n } else if (this.currentState.toLowerCase() != \"/products/all\") {\r\n this.router.navigate([\"/products/all\"]);\r\n } else if (!this.checkitem()) {\r\n this.notificationService.error(\"error_\", \"error_no_item_selected\");\r\n }\r\n }\r\n\r\n backStep() {\r\n if (this.location.path().toLowerCase() == \"/login\") {\r\n this.router.navigate([\"/products/all\"]);\r\n } else if (this.location.path().toLowerCase() == \"/signup\") {\r\n this.router.navigate([\"/Login\"]);\r\n } else if (this.location.path().toLowerCase() == \"/forgotpassword\") {\r\n this.router.navigate([\"/Login\"]);\r\n } else {\r\n this.router.navigate([\"/products/all\"]);\r\n }\r\n this.sideNavBarService.triggerOpen();\r\n }\r\n\r\n navigateToApplication() {\r\n const application =\r\n this.configService.localSettings.Global.ConfigurableCheckout &&\r\n this.userService.customerData.CustomerId\r\n ? \"/checkout\"\r\n : \"/join\";\r\n this.sideNavBarService.triggerOpen();\r\n if (\r\n (Object.keys(this.userService.customerData).length ||\r\n this.userService.guestUserData.Email) &&\r\n (this.userService.customerData.CustomerId ||\r\n this.userService.customerData.PrimaryAddress.Region ||\r\n this.userService.guestUserData.Email) &&\r\n this.checkitem() &&\r\n this.user.checkIfUserAuthenticatedOrNot()\r\n ) {\r\n this.router.navigate([application]);\r\n } else if (\r\n this.checkitem() &&\r\n ((Object.keys(this.userService.customerData).length === 0 &&\r\n !this.userService.customerData.CustomerId) ||\r\n !this.user.checkIfUserAuthenticatedOrNot())\r\n ) {\r\n if (\r\n this.location.path().toLowerCase() == \"/checkout\" ||\r\n this.userService.guestUserLogin\r\n ) {\r\n this.accountService.logout();\r\n }\r\n this.router.navigate([\"/login\"], {\r\n queryParams: { type: \"checkout\" },\r\n queryParamsHandling: \"merge\",\r\n });\r\n } else if (this.location.path().toLowerCase() != \"/products/all\") {\r\n this.router.navigate([\"/products/all\"]);\r\n } else if (!this.checkitem()) {\r\n this.notificationService.error(\"error_\", \"error_no_item_selected\");\r\n }\r\n }\r\n\r\n showLogincheckoutBtn() {\r\n return !(\r\n this.location.path().toLowerCase() == \"/checkout\" ||\r\n this.location.path().toLowerCase() == \"/join\" ||\r\n this.location.path().toLowerCase() == \"/login\"\r\n );\r\n }\r\n\r\n useCoupons() {\r\n return (\r\n this.userService.couponInfo.OrderAllowCoupons &&\r\n this.userService.couponInfo.availableRewards &&\r\n this.userService.couponInfo.availableRewards.length\r\n );\r\n }\r\n\r\n checkRewardStatus(reward) {\r\n const isInUse = this.userService.couponInfo.RewardsForUse.some(\r\n (currentReward) => {\r\n return currentReward.Code === reward.Code;\r\n },\r\n );\r\n return isInUse;\r\n }\r\n\r\n toggleCoupon(coupon) {\r\n const applied = this.userService.couponInfo.RewardsForUse.some((reward) => {\r\n return reward.Code === coupon.Code;\r\n });\r\n\r\n if (\r\n applied &&\r\n this.userService.DynamicCouponCode.promoCode != coupon.Code\r\n ) {\r\n this.removePromo(coupon.Code);\r\n } else {\r\n this.userService.couponInfo.RewardsForUse.push(coupon);\r\n if (this.userService.couponInfo.RewardsForUse.length) {\r\n _.each(this.userService.couponInfo.RewardsForUse, (reward) => {\r\n const IsCouponAvailable = this.userService.couponInfo.Allcoupons.some(\r\n (coupon) => {\r\n return reward.Code === coupon;\r\n },\r\n );\r\n if (!IsCouponAvailable) {\r\n this.userService.couponInfo.Allcoupons.push(reward.Code);\r\n }\r\n });\r\n }\r\n this.orderService.calculateOrder();\r\n }\r\n }\r\n\r\n goToSignUp() {\r\n this.sideNavBarService.triggerOpen();\r\n if (\r\n this.itemsService.selectedOrderItems == 0 &&\r\n this.configService.localSettings.Global.OrderItemRequired[\r\n this.userService.customerTypeID\r\n ]\r\n ) {\r\n const msg = \"unified_order_item_required\";\r\n this.notificationService.error(\"error_\", this.translate.instant(msg));\r\n return;\r\n }\r\n // \r\n // if (this.itemsService.selectedAutoOrderItems == 0 && this.configService.localSettings.Global.AutoshipItemRequired[this.userService.customerTypeID]) {\r\n // const AutoshipMsg = 'unified_auto_order_item_required';\r\n // this.notificationService.error('error_', this.translate.instant(AutoshipMsg));\r\n // return;\r\n // }\r\n this.router.navigate([\"/join\"], {\r\n queryParams: { type: this.userService.customerTypeID },\r\n queryParamsHandling: \"merge\",\r\n });\r\n }\r\n\r\n showNewCustomerBtn() {\r\n if (this.user.checkIfUserAuthenticatedOrNot()) {\r\n return false;\r\n } else if (\r\n this.location.path().toLowerCase() == \"/signup\" ||\r\n this.location.path().toLowerCase() == \"/join\"\r\n ) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }\r\n\r\n isLoggedIn() {\r\n if (\r\n Object.keys(this.userService.customerData).length &&\r\n this.userService.customerData.CustomerId &&\r\n this.user.checkIfUserAuthenticatedOrNot()\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n isAutoshipChanged() {\r\n if (\r\n !moment(this.autoshipConfigurationService.autoshipDate).isSame(\r\n this.persistentService.retailData.autoshipDate,\r\n \"day\",\r\n )\r\n ) {\r\n return true;\r\n }\r\n if (\r\n this.persistentService.retailData.Autoship &&\r\n this.commonData.FrequencyTypes[0].ID !=\r\n this.persistentService.retailData.Autoship.FrequencyTypeID\r\n ) {\r\n return true;\r\n }\r\n if (\r\n this.userService.isAddressChanged ||\r\n this.userService.isPaymentChanged ||\r\n this.userService.isShipMethodChanged\r\n ) {\r\n return true;\r\n }\r\n\r\n if (this.utilityService.getAutoshipEditFlag()) {\r\n if (this.persistentService.retailData.isChanged) {\r\n if (\r\n _.isEqual(\r\n this.persistentService.retailData.editAutoshipItems,\r\n this.itemsService.selectedAutoOrderItems,\r\n ) &&\r\n this.itemsService.selectedOrderItems.length == 0\r\n ) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n cancelAutoship() {\r\n this.router.navigate([\"/manageautoship\"]);\r\n this.sideNavBarService.triggerOpen();\r\n this.notificationService.success(\r\n \"Success\",\r\n this.translate.instant(\"autoship_cancel\"),\r\n );\r\n }\r\n\r\n deleteAutoship(autoShipId?: number) {\r\n this.apiService.deleteAutoship(autoShipId).subscribe((result) => {\r\n if (result && Number(result.Status) === 1) {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"some_error_occur_try_again\"),\r\n );\r\n } else {\r\n this.notificationService.success(\r\n \"Success\",\r\n this.translate.instant(\"successfully_deleted\"),\r\n );\r\n }\r\n });\r\n }\r\n\r\n setFrequency() {\r\n this.commonData.FrequencyTypes.some((freq) => {\r\n if (\r\n freq.ID == this.persistentService.retailData.Autoship.FrequencyTypeID\r\n ) {\r\n this.persistentService.retailData.Autoship.FrequencyTypeID = freq.ID;\r\n this.persistentService.retailData.Autoship.FrequencyTypeID = freq.ID;\r\n this.persistentService.retailData.Autoship.FrequencyTypeDescription =\r\n freq.Description;\r\n this.persistentService.retailData.isChanged = true;\r\n return;\r\n }\r\n });\r\n }\r\n\r\n saveEditAutoship() {\r\n this.sideNavBarService.triggerOpen();\r\n this.router.navigate([\"/manageautoship\"]);\r\n }\r\n\r\n NavigateToAutoship() {\r\n this.sideNavBarService.triggerOpen();\r\n this.persistentService.retailData.AddMoreItemInAutoshipFlag = false;\r\n this.utilityService.setAutoshipEditFlag(false);\r\n this.persistentService.retailData.CurrentSelectedAutoOrder = 0;\r\n this.persistentService.retailData.AddMoreItemInAutoshipData = {};\r\n this.cart1Service.clearCart();\r\n this.router.navigate([\"/manageautoship\"]);\r\n }\r\n\r\n getAutoshipNumber() {\r\n return (\r\n this.translate.instant(\"_invoice_autoorder\") +\r\n this.persistentService.retailData.CurrentSelectedAutoOrder\r\n );\r\n }\r\n\r\n canCheckOut() {\r\n if (this.userService.customerData.CustomerId) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n getItems(type: string) {\r\n return this.itemsService[\r\n type == \"pack\"\r\n ? \"selectedPacks\"\r\n : type == \"autoship\"\r\n ? \"selectedAutoOrderItems\"\r\n : \"selectedOrderItems\"\r\n ];\r\n }\r\n\r\n getImage(item) {\r\n let imageUrl = (\r\n (item.OptionsImage &&\r\n item.ImageUrl.substr(0, item.ImageUrl.lastIndexOf(\"/\")).concat(\r\n item.OptionsImage,\r\n )) ||\r\n item.ImageUrl\r\n );\r\n\r\n if(!imageUrl) {\r\n imageUrl = item.imageUrl;\r\n }\r\n\r\n // If local image \r\n\r\n if (imageUrl && imageUrl.includes(\"assets/images\")) {\r\n return imageUrl;\r\n }\r\n\r\n return (imageUrl && imageUrl.includes(\"CMS/images/inventory\")) ? (this.configService.localSettings.Disco.DiscoUrl + imageUrl) : this.configService.localSettings.Disco.DiscoUrl + '/CMS/images/inventory' + imageUrl;\r\n }\r\n\r\n view() {\r\n this.isShow = !this.isShow;\r\n }\r\n\r\n getQuantityModel(type, item) {\r\n return this.cart1Service[\r\n type == \"pack\"\r\n ? \"packQuantity\"\r\n : type == \"autoship\"\r\n ? \"autoshipQuantity\"\r\n : item && item.UsePoints\r\n ? \"orderRewardQuantity\"\r\n : \"orderQuantity\"\r\n ];\r\n }\r\n\r\n increaseQuantiy(type, item) {\r\n this.cart1Service.increaseQuantiy(item, type == \"autoship\", type == \"pack\");\r\n this.updateQuantity(type);\r\n }\r\n\r\n decreaseQuantiy(type, item) {\r\n this.cart1Service.decreaseQuantiy(item, type == \"autoship\", type == \"pack\");\r\n this.updateQuantity(type);\r\n }\r\n\r\n \r\n\r\n removeFromCart(type, item) {\r\n\r\n // If Installment replica is removed, remove installment item and it's autoship\r\n if(item?.SKU?.endsWith(\"-i\")) {\r\n this.cart1Service.removeInstallmentItemFromCart(item);\r\n return;\r\n } \r\n\r\n this.cart1Service.removeFromCart(\r\n item,\r\n type == \"autoship\",\r\n type == \"pack\",\r\n true,\r\n );\r\n this.updateQuantity(type);\r\n }\r\n\r\n updateQuantity(type) {\r\n // TODO:: this is bad remove this.\r\n if (!(type == \"autoship\")) {\r\n //\r\n }\r\n }\r\n\r\n closeCart() {\r\n if (\r\n this.itemsService.selectedAutoOrderItems.length === 0 &&\r\n this.itemsService.selectedOrderItems.length === 0\r\n ) {\r\n this.router.navigate([\"/products/all\"]);\r\n }\r\n }\r\n frequencyDescription(id) {\r\n let Description: string;\r\n this.commonData.FrequencyTypes.forEach((element) => {\r\n if (element.ID == id) {\r\n Description = element.Description;\r\n }\r\n });\r\n return Description;\r\n }\r\n\r\n checkQuantity(type, item) {\r\n const quantity = this.getQuantityModel(type, item)[item.ItemID];\r\n if (!Number(quantity)) {\r\n this.cart1Service.removeFromCart(\r\n item,\r\n type == \"autoship\",\r\n type == \"pack\",\r\n true,\r\n );\r\n } else {\r\n if (!item.UsePoints) {\r\n item.Quantity = quantity;\r\n } else if (item.UsePoints) {\r\n item.rewardQuantity = quantity;\r\n }\r\n if (type == \"autoship\") {\r\n localStorage.setItem(\r\n \"cart.autoship\",\r\n JSON.stringify(this.itemsService.selectedAutoOrderItems),\r\n );\r\n this.orderService.calculateAutoOrder();\r\n } else {\r\n localStorage.setItem(\r\n type == \"pack\" ? \"cart.packs\" : \"cart.order\",\r\n JSON.stringify(\r\n type == \"pack\"\r\n ? this.itemsService.selectedPacks\r\n : this.itemsService.selectedOrderItems,\r\n ),\r\n );\r\n this.orderService.calculateOrder();\r\n }\r\n }\r\n this.updateQuantity(type);\r\n }\r\n\r\n getLastQuantity(type, item) {\r\n this.lastQuantity = this.getQuantityModel(type, item)[item.ItemID];\r\n }\r\n\r\n NewCartEvents_handleSubscribeAndSave($event, sidebarItem) {\r\n const { checked } = $event;\r\n \r\n if(checked == true) {\r\n\r\n // Add Item\r\n\r\n const orderItems = JSON.parse(localStorage.getItem('cart.order') || '[]') || [];\r\n const orderCartItem = orderItems.find(i => i.ItemID == sidebarItem.ItemID);\r\n if(!orderCartItem) {\r\n return;\r\n }\r\n\r\n this.cart1Service.addToCart(orderCartItem, true, '', true, false, false, false, false);\r\n this.orderService.calculateOrder(true, 1, true);\r\n\r\n // Current Quantity\r\n\r\n const currentAutoorderItem = this.itemsService.selectedAutoOrderItems.find(i => i.ItemID == sidebarItem.ItemID);\r\n if(currentAutoorderItem) {\r\n setTimeout(() => {\r\n this.NewCartEvents_UpdateQuantity(\"autoship\", orderCartItem, orderCartItem.Quantity, currentAutoorderItem.Quantity);\r\n }, 100);\r\n }\r\n\r\n } else if ( checked == false ) {\r\n // Remove Item\r\n const autoshipCartItem = this.itemsService.selectedAutoOrderItems.find(i => i.ItemID == sidebarItem.ItemID);\r\n if(!autoshipCartItem) {\r\n return;\r\n }\r\n this.getQuantityModel(\"autoship\", autoshipCartItem)[autoshipCartItem.ItemID] = 0;\r\n this.cart1Service.removeFromCart(autoshipCartItem, true, false, true);\r\n this.orderService.calculateOrder(true, 1, true);\r\n }\r\n }\r\n\r\n NewCartEvents_isInAutoshipCart(id) {\r\n return this.itemsService?.selectedAutoOrderItems.some((item) => item.ItemID == id) || false;\r\n }\r\n\r\n NewCartEvents_DeleteItem(item) {\r\n const inInCart = this.itemsService.selectedOrderItems.find(i => i.ItemID == item.ItemID);\r\n const inInAutoshipCart = this.itemsService.selectedAutoOrderItems.find(i => i.ItemID == item.ItemID);\r\n\r\n if(inInAutoshipCart) {\r\n this.removeFromCart(\"autoship\", inInAutoshipCart);\r\n }\r\n\r\n if(inInCart) {\r\n this.removeFromCart(\"order\", inInCart);\r\n }\r\n\r\n if(this.itemsService.selectedOrderItems.length > 0) {\r\n this.orderService.calculateOrder();\r\n }\r\n }\r\n\r\n NewCartEvents_UpdateQuantity(type, item, modelQty?: any, currentQty?: any) {\r\n\r\n const currentQuantity = currentQty || item.Quantity;\r\n const modelQuantity = modelQty || this.getQuantityModel(type, item)[item.ItemID];\r\n\r\n //Increase Quantity\r\n if(currentQuantity < modelQuantity) {\r\n this.getQuantityModel(type, item)[item.ItemID] = modelQuantity - 1;\r\n if(type == \"order\"|| type == \"autoship\") {\r\n const autoshipCartItem = this.itemsService.selectedAutoOrderItems.find(i => i.ItemID == item.ItemID);\r\n if(autoshipCartItem) {\r\n this.getQuantityModel(\"autoship\", item)[item.ItemID] = modelQuantity - 1;\r\n this.cart1Service.increaseQuantiy(autoshipCartItem, true, false);\r\n }\r\n }\r\n this.cart1Service.increaseQuantiy(item, type == \"autoship\", type == \"pack\");\r\n } \r\n \r\n //Decrease Quantity\r\n else if (currentQuantity > modelQuantity) {\r\n this.getQuantityModel(type, item)[item.ItemID] = modelQuantity + 1;\r\n if(type == \"order\"|| type == \"autoship\") {\r\n const autoshipCartItem = this.itemsService.selectedAutoOrderItems.find(i => i.ItemID == item.ItemID);\r\n if(autoshipCartItem) {\r\n this.getQuantityModel(\"autoship\", item)[item.ItemID] = modelQuantity + 1;\r\n this.cart1Service.decreaseQuantiy(autoshipCartItem, true, false);\r\n }\r\n }\r\n this.cart1Service.decreaseQuantiy(item, type == \"autoship\", type == \"pack\");\r\n }\r\n\r\n setTimeout(() => this.NewCartEvents_UpdateGlabalQuantities(), 100);\r\n \r\n }\r\n\r\n NewCartEvents_UpdateGlabalQuantities() {\r\n for (const productID in this.cart1Service.autoshipQuantity) {\r\n this.cart1Service.autoshipQuantity[productID] = this.cart1Service.orderQuantity[productID];\r\n }\r\n }\r\n\r\n GoToCheckout() {\r\n let customerTypeID = this.userService.customerTypeID;\r\n\r\n if(!this.accountService.isLoggedIn()) {\r\n if(this.itemsService.selectedPacks.length > 0 && this.itemsService.selectedOrderItems.find(i => i.ItemID == 39 )) {\r\n customerTypeID = 1; // QLA\r\n } \r\n else if (this.itemsService.selectedPacks.length == 0 && this.itemsService.selectedAutoOrderItems.filter(i => {\r\n return !i.SKU.endsWith('-ins');\r\n }).length > 0 && !this.itemsService.selectedOrderItems.find(i => i.ItemID == 39 )) {\r\n customerTypeID = 3; // PC\r\n }\r\n else if (this.itemsService.selectedPacks.length > 0 && customerTypeID != 1) {\r\n customerTypeID = 3; // For Bundles\r\n }\r\n else if (this.itemsService.selectedPacks.length == 0 && this.itemsService.selectedAutoOrderItems.length == 0 && !this.itemsService.selectedOrderItems.find(i => i.ItemID == 39 )) {\r\n this.userService.customerTypeID = 2; // Retail\r\n }\r\n \r\n this.router.navigate(['/login']);\r\n this.sideNavBarService.closeSidePanel();\r\n return;\r\n }\r\n\r\n\r\n if(this.accountService.isLoggedIn()) {\r\n this.router.navigate(['/checkout']);\r\n this.sideNavBarService.closeSidePanel();\r\n return;\r\n }\r\n\r\n }\r\n\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { BehaviorSubject } from \"rxjs\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class SidebarMenuService {\r\n public appDrawer;\r\n public currentUrl = new BehaviorSubject(undefined);\r\n\r\n constructor(private router: Router) {}\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\n\r\nexport class Settings {\r\n constructor(\r\n public name: string,\r\n public theme: string,\r\n public rtl: boolean,\r\n ) {}\r\n}\r\n\r\n@Injectable()\r\nexport class AppSettings {\r\n public settings = new Settings(\"Sophia\", \"orange\", false);\r\n}\r\n","import { Component, Input } from \"@angular/core\";\r\nimport { CartService } from \"../services/cart.service\";\r\nimport { Observable, Subject } from \"rxjs\";\r\nimport { CartItem } from \"src/app/modals/cart-item\";\r\nimport { ProductService } from \"../services/product.service\";\r\nimport { SideNavBarService } from \"../services/sidenavbar.service\";\r\nimport { DSProduct } from \"src/app/modals/dsproduct.modal\";\r\nimport * as _ from \"lodash\";\r\nimport { UtilityService } from \"../services/utility.service\";\r\n@Component({\r\n selector: \"app-shopping-widgets\",\r\n templateUrl: \"./shopping-widgets.component.html\",\r\n styleUrls: [\"./shopping-widgets.component.scss\"],\r\n})\r\nexport class ShoppingWidgetsComponent {\r\n products: Array;\r\n indexProduct: number;\r\n public sidenavMenuItems;\r\n @Input() shoppingCartItems: CartItem[] = [];\r\n @Input() isWhite: boolean = true;\r\n sideBarSummaryToogle: Subject = new Subject();\r\n constructor(\r\n private cartService: CartService,\r\n public productService: ProductService,\r\n public sideNavBarService: SideNavBarService,\r\n public itemsService: ProductService,\r\n public utilityService: UtilityService,\r\n ) {}\r\n\r\n public removeItem(item: CartItem) {\r\n this.cartService.removeFromCart(item);\r\n }\r\n public getTotal(): Observable {\r\n return this.cartService.getTotalAmount();\r\n }\r\n getQuanity() {\r\n let quantity = 0;\r\n // if (this.utilityService.isEnrollment()) {\r\n _.each(this.itemsService.selectedPacks, (item) => {\r\n quantity += item.Quantity ? Number(item.Quantity) : 0;\r\n });\r\n // }\r\n _.each(this.itemsService.selectedOrderItems, (item) => {\r\n if (!item.UsePoints) {\r\n quantity += item.Quantity ? Number(item.Quantity) : 0;\r\n }\r\n if (item.UsePoints) {\r\n quantity += item.rewardQuantity ? Number(item.rewardQuantity) : 0;\r\n }\r\n });\r\n // _.each(this.itemsService.selectedAutoOrderItems, (item) => {\r\n // quantity += item.Quantity ? Number(item.Quantity) : 0;\r\n // });\r\n return quantity;\r\n }\r\n}\r\n","
\r\n\r\n \r\n
","\r\n\r\n
\r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n

\r\n Home\r\n \r\n \r\n Shop\r\n \r\n \r\n \r\n \r\n Join\r\n \r\n

\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{category.Category}}\r\n All\r\n
\r\n {{item.ProductName}}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n {{ accountService.isLoggedIn() ? userService?.customerData?.FirstName : 'Guest' }}\r\n
\r\n
\r\n perm_identity\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \"companylogo\"\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n receipt\r\n Order\r\n History\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n assessment\r\n Manage\r\n Autoship\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \"\"\r\n
\r\n
\r\n
\r\n SHOP\r\n EVENTS\r\n JOIN US\r\n
\r\n\r\n
\r\n person\r\n \r\n \r\n
\r\n\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n {{ accountService.isLoggedIn() ? userService?.customerData?.FirstName : 'Guest' }}\r\n
\r\n
\r\n perm_identity\r\n\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n receipt\r\n Order\r\n History\r\n
\r\n
\r\n \r\n \r\n
\r\n assessment\r\n Manage\r\n Autoship\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n \r\n
\r\n

\r\n Home\r\n \r\n Shop\r\n \r\n Join\r\n \r\n

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{category.Category}}\r\n All\r\n
\r\n {{item.ProductName}}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n {{ accountService.isLoggedIn() ? userService?.customerData?.FirstName : 'Guest' }}\r\n
\r\n
\r\n perm_identity\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \"companylogo\"\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n receipt\r\n Order\r\n History\r\n
\r\n
\r\n \r\n \r\n
\r\n assessment\r\n Manage\r\n Autoship\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \"\"\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
","import {\r\n Component,\r\n EventEmitter,\r\n HostListener,\r\n OnInit,\r\n Output,\r\n} from \"@angular/core\";\r\nimport { CartItem } from \"src/app/modals/cart-item\";\r\nimport { CartService } from \"../services/cart.service\";\r\nimport { AppSettings, Settings } from \"../services/color-option.service\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { AccountService } from \"../services/account.service\";\r\nimport { UserService } from \"../services/user.service\";\r\nimport { DSProduct } from \"src/app/modals/dsproduct.modal\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { ConfigService } from \"../services/config.service\";\r\nimport { RestApiService } from \"../services/restapi.service\";\r\nimport { CompanyService } from \"../services/company.service\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { ItemsListService } from \"../services/itemsList.service\";\r\nimport { ProductService } from \"../services/product.service\";\r\nimport { Cart1Service } from \"../services/cart1.service\";\r\nimport { ViewportScroller } from \"@angular/common\";\r\n\r\n@Component({\r\n selector: \"app-header\",\r\n templateUrl: \"./header.component.html\",\r\n styleUrls: [\"./header.component.scss\"],\r\n})\r\nexport class HeaderComponent implements OnInit {\r\n public sidenavMenuItems;\r\n @Output() sildeMobileNavEvent = new EventEmitter();\r\n public currencies = [\"USD\", \"EUR\"];\r\n public currency;\r\n public flag;\r\n public userService: UserServiceModal;\r\n userServiceModal: UserServiceModal;\r\n products: Array;\r\n welcmtext: string = \"\";\r\n public allItems: { Category: string; CategoryId: string|number }[] = [];\r\n public productlist: { Category: string; CategoryId: string|number }[] = [];\r\n indexProduct: number;\r\n shoppingCartItems: CartItem[] = [];\r\n public settings: Settings;\r\n isTop: boolean = true;\r\n currentRouterPath;\r\n HomeProductlist;\r\n public allowedCountries = [];\r\n\r\n constructor(\r\n public accountService: AccountService,\r\n private cartService: CartService,\r\n public appSettings: AppSettings,\r\n public translate: TranslateService,\r\n public user: UserService,\r\n public router: Router,\r\n public activatedRoute: ActivatedRoute,\r\n public configService: ConfigService,\r\n public apiService: RestApiService,\r\n public companyService: CompanyService,\r\n public http: HttpClient,\r\n public itemsListService: ItemsListService,\r\n public productsService: ProductService,\r\n public UserService: UserService,\r\n public cart1Service: Cart1Service,\r\n private viewportScroller: ViewportScroller\r\n ) {\r\n this.allowedCountries = JSON.parse(\r\n sessionStorage.getItem(\"allowedCountries\") || '[]'\r\n );\r\n this.userServiceModal = this.UserService?.userServiceModal;\r\n this.settings = this.appSettings.settings;\r\n this.userService = this.user.userServiceModal;\r\n this.cartService\r\n .getItems()\r\n .subscribe(\r\n (shoppingCartItems) => (this.shoppingCartItems = shoppingCartItems),\r\n );\r\n this.router.events.subscribe(() => {\r\n this.currentRouterPath = router.url;\r\n });\r\n }\r\n\r\n run() {\r\n this.allItems = this.itemsListService.categoryList;\r\n const product = this.itemsListService.groupByKeepOrder(\r\n this.productsService.orders,\r\n \"CategoryId\",\r\n );\r\n let uniqueRequireProduct = [];\r\n if (this.configService.localSettings.Global.CategoriesToFetch?.length > 0) {\r\n product.filter((x) => {\r\n x.filter((item) => {\r\n if (\r\n this.configService.localSettings.Global.CategoriesToFetch.indexOf(\r\n item.Category,\r\n ) > -1\r\n ) {\r\n uniqueRequireProduct.push(item);\r\n }\r\n });\r\n });\r\n } else {\r\n uniqueRequireProduct = [...product];\r\n }\r\n this.HomeProductlist = uniqueRequireProduct;\r\n const note: HTMLElement = document.querySelector(\r\n \".\" + document.getElementById(\"header-menu\").parentElement.className,\r\n );\r\n note.style.width = \"900px\";\r\n note.style.height = \"250px\";\r\n if (screen.width < 1225) {\r\n note.style.width = \"622px\";\r\n note.style.height = \"250px\";\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n this.currency = this.currencies[0];\r\n setTimeout(() => {\r\n this.welcmtext = this.translate.instant(\"welcome_\");\r\n }, 3000);\r\n }\r\n toggleMobileMenu($event) {\r\n this.sildeMobileNavEvent.emit($event);\r\n }\r\n changeCurrency(currency) {\r\n this.currency = currency;\r\n }\r\n changeLang(flag) {\r\n this.flag = flag;\r\n }\r\n logout() {\r\n this.accountService.logout();\r\n }\r\n\r\n login() {\r\n this.router.navigateByUrl(\"/login\");\r\n }\r\n @HostListener(\"window:scroll\", [\"$event\"])\r\n onScroll(): void {\r\n if (window.scrollY > 60) {\r\n this.isTop = false;\r\n } else {\r\n this.isTop = true;\r\n }\r\n }\r\n\r\n isLoggedIn() {\r\n if (\r\n Object.keys(this.userService.customerData).length &&\r\n this.userService.customerData.CustomerId &&\r\n this.user.checkIfUserAuthenticatedOrNot()\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n selectFlagCountry() {\r\n this.configService.OpenLanguageSelector.emit(true);\r\n }\r\n \r\n public updatecountry(country, languagecode) {\r\n this.cart1Service.updateCountry(country, languagecode, true, false);\r\n }\r\n\r\n scrollToEventsSection() {\r\n this.router.navigate(['/home'], { fragment: 'events-section' }).then(() => {\r\n const anchorElement = document.querySelector(`.events-section`);\r\n anchorElement && anchorElement.scrollIntoView({ behavior: 'smooth' });\r\n });\r\n }\r\n \r\n}\r\n","\r\n\r\n\r\n\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n \"Awesome\r\n
\r\n \r\n
\r\n
\r\n

Links

\r\n
\r\n \r\n
\r\n
\r\n
\r\n

Contact

\r\n
\r\n
\r\n
\r\n
\r\n

{{configService.localSettings.Company.Address.Phone}}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n

{{configService.localSettings.Company.Address.Street }}\r\n {{configService.localSettings.Company.Address.City}} {{configService.localSettings.Company.Address.State}}\r\n {{configService.localSettings.Company.Address.Address1}}\r\n {{configService.localSettings.Company.Address.Country}}

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n

CONNECT

\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { ConfigService } from \"../services/config.service\";\r\nimport { UserService } from \"../services/user.service\";\r\nimport $ from \"jquery\";\r\nimport { AccountService } from \"../services/account.service\";\r\n\r\n@Component({\r\n selector: \"app-footer\",\r\n templateUrl: \"./footer.component.html\",\r\n styleUrls: [\"./footer.component.scss\"],\r\n})\r\nexport class FooterComponent implements OnInit {\r\n\r\n options = {\r\n // cacheSeconds: 0,\r\n // cache: true,\r\n data: {\r\n locale: \"en-US\",\r\n },\r\n };\r\n\r\n userServiceModal: UserServiceModal;\r\n\r\n constructor(\r\n public configService: ConfigService,\r\n public userService: UserService,\r\n public accountService: AccountService,\r\n ) {\r\n this.userServiceModal = this.userService.userServiceModal;\r\n }\r\n ngOnInit() {\r\n // document height when all expandables are closed is less than 1150 that is why docheight < 1150 is taken\r\n // scrollpercentrounded calculates the percentage of page scrolled example when scrollbar touches end it is 100%\r\n // max height of order summar box is 610 in this case so we have dynamically used to calculate bottomfooter variable\r\n // media height css is found in application css when page loads for the first time and no scroll event is given\r\n // we are giving 430 in case of bottomfooter less than 430 because there is no need for decreasing size of order box after bottom 430\r\n $(window).bind(\"scroll\", () => {\r\n const scrollTop = $(window).scrollTop();\r\n const docHeight = $(document).height();\r\n const winHeight = $(window).height();\r\n const scrollPercent = scrollTop / (docHeight - winHeight);\r\n const scrollPercentRounded = Math.round(scrollPercent * 100);\r\n const bottomfooter = (scrollPercentRounded * 610) / 100;\r\n\r\n if (docHeight <= 1150 && scrollPercentRounded <= 20) {\r\n $(\"#sideCartBox\").css({\r\n position: \"fixed\",\r\n right: \"25px\",\r\n top: \"200px\",\r\n bottom: bottomfooter + 150,\r\n left: \"inherit\",\r\n \"max-height\": \"610px\",\r\n \"box-shadow\": \"inherit\",\r\n });\r\n } else if (docHeight > 1150 && scrollPercentRounded <= 20) {\r\n $(\"#sideCartBox\").css({\r\n position: \"fixed\",\r\n right: \"25px\",\r\n top: \"200px\",\r\n bottom:\r\n bottomfooter < 430 && docHeight > 1150\r\n ? bottomfooter\r\n : bottomfooter < 430 &&\r\n docHeight < 1150 &&\r\n bottomfooter + 100 < 430\r\n ? bottomfooter + 100\r\n : \"430px\",\r\n left: \"inherit\",\r\n \"max-height\": \"610px\",\r\n \"box-shadow\": \"inherit\",\r\n });\r\n } else if (scrollPercentRounded > 20) {\r\n $(\"#sideCartBox\").css({\r\n position: \"fixed\",\r\n right: \"25px\",\r\n top: \"0px\",\r\n bottom:\r\n bottomfooter < 430 && docHeight > 1150\r\n ? bottomfooter\r\n : bottomfooter < 430 &&\r\n docHeight < 1150 &&\r\n bottomfooter + 100 < 430\r\n ? bottomfooter + 100\r\n : \"430px\",\r\n left: \"inherit\",\r\n \"max-height\": \"610px\",\r\n \"box-shadow\": \"inherit\",\r\n });\r\n } else if (scrollPercentRounded >= 35) {\r\n $(\"#sideCartBox\").css({\r\n position: \"fixed\",\r\n right: \"25px\",\r\n top: \"0px\",\r\n bottom:\r\n bottomfooter < 430 && docHeight > 1150\r\n ? bottomfooter\r\n : bottomfooter < 430 &&\r\n docHeight < 1150 &&\r\n bottomfooter + 100 < 430\r\n ? bottomfooter + 100\r\n : \"430px\",\r\n left: \"inherit\",\r\n \"max-height\": \"610px\",\r\n \"box-shadow\": \"inherit\",\r\n });\r\n } else {\r\n $(\"#sideCartBox\").css({\r\n position: \"fixed\",\r\n right: \"25px\",\r\n top: \"200px\",\r\n bottom: \"inherit\",\r\n left: \"inherit\",\r\n \"max-height\": \"610px\",\r\n \"box-shadow\": \"inherit\",\r\n });\r\n }\r\n });\r\n }\r\n isLoggedIn() {\r\n if (\r\n Object.keys(this.userServiceModal.customerData).length &&\r\n this.userServiceModal.customerData.CustomerId &&\r\n this.userService.checkIfUserAuthenticatedOrNot()\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n logoutHandler() {\r\n this.accountService.logout();\r\n }\r\n}\r\n","\r\n
\r\n {{item.displayName}}\r\n
\r\n
\r\n {{children.displayName}}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n\r\n
\r\n {{item.displayName}}\r\n {{children.displayName}}\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
","import { Component, OnInit, Input, Output, EventEmitter } from \"@angular/core\";\r\nimport { SidebarMenuService } from \"./sidebar-menu.service\";\r\nimport {\r\n animate,\r\n state,\r\n style,\r\n transition,\r\n trigger,\r\n} from \"@angular/animations\";\r\nimport { SidenavMenu } from \"./sidebar-menu.model\";\r\nimport { Router } from \"@angular/router\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { UserService } from \"../services/user.service\";\r\nimport { AccountService } from \"../services/account.service\";\r\nimport { ProductService } from \"../services/product.service\";\r\n\r\n@Component({\r\n selector: \"app-sidebar\",\r\n templateUrl: \"./sidebar.component.html\",\r\n styleUrls: [\"./sidebar.component.scss\"],\r\n animations: [\r\n trigger(\"indicatorRotate\", [\r\n state(\"collapsed\", style({ transform: \"rotate(0deg)\" })),\r\n state(\"expanded\", style({ transform: \"rotate(180deg)\" })),\r\n transition(\r\n \"expanded <=> collapsed\",\r\n animate(\"225ms cubic-bezier(0.4,0.0,0.2,1)\"),\r\n ),\r\n ]),\r\n ],\r\n})\r\nexport class SidebarComponent implements OnInit {\r\n expanded: boolean;\r\n // @HostBinding('attr.aria-expanded') ariaExpanded = this.expanded;\r\n @Input() item: SidenavMenu;\r\n @Input() depth: number;\r\n @Output() close = new EventEmitter();\r\n @Input() children;\r\n userServiceModal: UserServiceModal;\r\n constructor(\r\n private sidenavMenuService: SidebarMenuService,\r\n public router: Router,\r\n public userService: UserService,\r\n public accountService: AccountService,\r\n public productService: ProductService,\r\n ) {\r\n this.userServiceModal = this.userService.userServiceModal;\r\n if (this.depth === undefined) {\r\n this.depth = 0;\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n this.sidenavMenuService.currentUrl.subscribe((url: string) => {\r\n if (this.item.route && url) {\r\n this.expanded = url.indexOf(`/${this.item.route}`) === 0;\r\n // this.ariaExpanded = this.expanded;\r\n }\r\n });\r\n }\r\n onItemSelected(item: SidenavMenu) {\r\n if (!item.children || !item.children.length) {\r\n item.displayName == \"Join\"\r\n ? this.router.navigate([\"/join\"])\r\n : this.router.navigate([item.route]);\r\n }\r\n if (item.children && item.children.length) {\r\n this.expanded = !this.expanded;\r\n }\r\n }\r\n\r\n closeDialog() {\r\n this.close.emit(\"1\");\r\n }\r\n isLoggedIn() {\r\n if (\r\n Object.keys(this.userServiceModal.customerData).length &&\r\n this.userServiceModal.customerData.CustomerId &&\r\n this.userService.checkIfUserAuthenticatedOrNot()\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n logoutHandler(item) {\r\n if (item == \"Sign Out\") {\r\n this.accountService.logout();\r\n }\r\n }\r\n}\r\n","\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \"companylogo\"\r\n\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n\r\n\r\n \r\n\r\n
\r\n\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \"companylogo\"\r\n\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n\r\n\r\n\r\n \r\n\r\n \r\n\r\n
","import { Component, OnInit, ViewChild } from \"@angular/core\";\r\nimport { CartItem } from \"../../modals/cart-item\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { SidebarMenuService } from \"../shared/sidebar/sidebar-menu.service\";\r\nimport { SidenavMenu } from \"../shared/sidebar/sidebar-menu.model\";\r\nimport { UserService } from \"../shared/services/user.service\";\r\nimport { FindEnrollerComponent } from \"../shared/model/findenroller/findenroller.component\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { ConfigService } from \"../shared/services/config.service\";\r\nimport {\r\n ConfirmDialogComponent,\r\n ConfirmDialogModel,\r\n} from \"../shared/model/confirm-dialog/confirm-dialog.component\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport * as _ from \"lodash\";\r\nimport { RestApiService } from \"../shared/services/restapi.service\";\r\nimport { MatSidenav } from \"@angular/material/sidenav\";\r\nimport { PaymentService } from \"../shared/services/payment.service\";\r\nimport { Cart1Service } from \"../shared/services/cart1.service\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { DSProduct } from \"src/app/modals/dsproduct.modal\";\r\nimport { UtilityService } from \"../shared/services/utility.service\";\r\nimport { ProductService } from \"../shared/services/product.service\";\r\nimport { ItemsListService } from \"../shared/services/itemsList.service\";\r\nimport { MatMenuTrigger } from \"@angular/material/menu\";\r\nimport { AccountService } from \"../shared/services/account.service\";\r\n@Component({\r\n selector: \"app-main\",\r\n templateUrl: \"./main.component.html\",\r\n styleUrls: [\"./main.component.scss\"],\r\n})\r\nexport class MainComponent implements OnInit {\r\n public sidenavMenuItems;\r\n public customerTypes;\r\n public allowedCountries = [];\r\n public country;\r\n public userType;\r\n userServiceModal: UserServiceModal;\r\n products: Array;\r\n welcmtext: string = \"\";\r\n selectedLanguageCode;\r\n indexProduct: number;\r\n shoppingCartItems: CartItem[] = [];\r\n @ViewChild(\"langMenuTrigger\") langMenuTrigger: MatMenuTrigger;\r\n showTopHeader = false;\r\n\r\n public banners = [];\r\n\r\n public categoriesList;\r\n public categoriesItemList;\r\n public url: string;\r\n navItems: SidenavMenu[] = [\r\n {\r\n displayName: \"Home\",\r\n iconName: \"home\",\r\n route: \"/home\",\r\n },\r\n {\r\n displayName: \"Shop\",\r\n iconName: \"feedback\",\r\n route: \"/products/all\",\r\n },\r\n {\r\n displayName: \"Join\",\r\n iconName: \"settings\",\r\n route: \"/join\",\r\n },\r\n {\r\n displayName: \"About\",\r\n iconName: \"feedback\",\r\n route: \"/about\",\r\n },\r\n // {\r\n // displayName: \"Contact\",\r\n // iconName: \"contacts\",\r\n // route: \"/contact\",\r\n // },\r\n {\r\n displayName: \"Sign Out\",\r\n iconName: \"feedback\",\r\n route: \"/login\",\r\n },\r\n {\r\n displayName: \"Sign In\",\r\n iconName: \"settings\",\r\n route: \"/login\",\r\n },\r\n {\r\n displayName: \"Useful Links\",\r\n iconName: \"pages\",\r\n children: [\r\n {\r\n displayName: \"Refund Policy\",\r\n iconName: \"question_answer\",\r\n route: \"\",\r\n url: \"#\"\r\n },\r\n {\r\n displayName: \"Shipping and Return Policy\",\r\n iconName: \"question_answer\",\r\n route: \"\",\r\n url: \"assets/pdfs/Return & Shipping Policies.pdf\"\r\n },\r\n {\r\n displayName: \"Terms and Conditions\",\r\n iconName: \"question_answer\",\r\n route: \"\",\r\n url: \"assets/pdfs/Terms & Conditions.pdf\"\r\n },\r\n {\r\n displayName: \"Policies and Procedures\",\r\n iconName: \"question_answer\",\r\n route: \"\",\r\n url: \"assets/pdfs/Policies & Procedures.pdf\"\r\n },\r\n ],\r\n },\r\n ];\r\n @ViewChild(\"start\") public sideBarMenu: MatSidenav;\r\n constructor(\r\n public activatedRoute: ActivatedRoute,\r\n public translate: TranslateService,\r\n public configService: ConfigService,\r\n private dialog: MatDialog,\r\n public userService: UserService,\r\n public router: Router,\r\n private cart1Service: Cart1Service,\r\n public sidenavMenuService: SidebarMenuService,\r\n public apiService: RestApiService,\r\n public paymentService: PaymentService,\r\n public utilityService: UtilityService,\r\n public productService: ProductService,\r\n public itemsListService: ItemsListService,\r\n public accountService: AccountService,\r\n ) {\r\n this.userServiceModal = this.userService.userServiceModal;\r\n this.allowedCountries = JSON.parse(\r\n sessionStorage.getItem(\"allowedCountries\"),\r\n );\r\n this.configService.OpenLanguageSelector\r\n .subscribe((event) => {\r\n event && this.langMenuTrigger && this.langMenuTrigger.openMenu();\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n setTimeout(() => {\r\n this.welcmtext = this.translate.instant(\"welcome_\");\r\n }, 3000);\r\n\r\n const selectedCustomerTypeID =\r\n sessionStorage.getItem(\"selectedCustomerTypeID\") === \"undefined\"\r\n ? null\r\n : sessionStorage.getItem(\"selectedCustomerTypeID\");\r\n\r\n const typeOfId = _.find(\r\n this.configService.commonSettings?.CustomerTypes,\r\n (customerType) => {\r\n return (\r\n customerType.ID ===\r\n (parseInt(this.activatedRoute.snapshot.queryParams.type, 10) ||\r\n parseInt(selectedCustomerTypeID, 10) ||\r\n this.userService.DefaultCustomerType)\r\n );\r\n },\r\n );\r\n\r\n this.userServiceModal.customerTypeID = typeOfId?.ID;\r\n }\r\n\r\n sildeMobileNav() {\r\n this.sideBarMenu.toggle();\r\n }\r\n\r\n public updatecountry(country, languagecode) {\r\n this.cart1Service.updateCountry(country, languagecode, true, false);\r\n }\r\n\r\n navigateToChangeAffiliate() {\r\n this.dialog.open(FindEnrollerComponent, {\r\n disableClose: true,\r\n panelClass: \"findenroller-dialog\",\r\n autoFocus: false,\r\n });\r\n }\r\n\r\n changeCustomerType(ID) {\r\n if (ID === this.userServiceModal.customerTypeID) {\r\n return;\r\n }\r\n\r\n const dialogData = new ConfirmDialogModel(\r\n this.translate.instant(\"update_customer_title\"),\r\n this.translate.instant(\"update_customer_text\"),\r\n this.translate.instant(\"NO\"),\r\n this.translate.instant(\"YES\"),\r\n );\r\n\r\n const dialogRef = this.dialog.open(ConfirmDialogComponent, {\r\n maxWidth: \"400px\",\r\n data: dialogData,\r\n autoFocus: false,\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((dialogResult) => {\r\n if (dialogResult) {\r\n sessionStorage.removeItem('items');\r\n this.userServiceModal.customerTypeID = ID;\r\n sessionStorage.setItem(\"selectedCustomerTypeID\", ID);\r\n this.router\r\n .navigate([], {\r\n relativeTo: this.activatedRoute,\r\n queryParams: { type: ID },\r\n queryParamsHandling: \"merge\",\r\n })\r\n .then(() => {\r\n window.location.reload();\r\n });\r\n this.cart1Service.clearCart();\r\n }\r\n });\r\n }\r\n\r\n close(item) {\r\n if (!(item.children && item.children.length)) {\r\n this.sideBarMenu.close();\r\n }\r\n }\r\n closed(val) {\r\n if (val != \"1\") {\r\n this.sideBarMenu.close();\r\n }\r\n }\r\n\r\n customerTypeDescription() {\r\n if (!this.configService.commonSettings.CustomerTypes) {\r\n return \"\";\r\n }\r\n if (!this.userServiceModal.customerTypeID) {\r\n return \"\";\r\n }\r\n return _.find(\r\n this.configService.commonSettings.CustomerTypes,\r\n (customerType) => {\r\n return this.userServiceModal.customerTypeID == customerType.ID;\r\n },\r\n ).Description;\r\n }\r\n\r\n isLoggedIn() {\r\n if (\r\n Object.keys(this.userServiceModal.customerData).length &&\r\n this.userServiceModal.customerData.CustomerId &&\r\n this.userService.checkIfUserAuthenticatedOrNot()\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n setNavItemCategories() {\r\n for (const element of this.categoriesList) {\r\n if (\r\n this.configService.localSettings.Global.CategoriesToFetch?.length > 0\r\n ) {\r\n if (\r\n this.configService.localSettings.Global.CategoriesToFetch.indexOf(\r\n element.Category,\r\n ) > -1\r\n ) {\r\n this.navItems[1].children.push({\r\n displayName: element.Category,\r\n iconName: \"contacts\",\r\n route: `/products/${element.CategoryId}`,\r\n });\r\n }\r\n } else {\r\n this.navItems[1].children.push({\r\n displayName: element.Category,\r\n iconName: \"contacts\",\r\n route: `/products/${element.CategoryId}`,\r\n });\r\n }\r\n }\r\n }\r\n\r\n handleTopHeader(actioN?: string) {\r\n if( actioN == \"show\") {\r\n console.log(\"show\");\r\n this.showTopHeader = true;\r\n }\r\n if( actioN == \"hide\") {\r\n console.log(\"hide\");\r\n this.showTopHeader = false;\r\n }\r\n }\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { LoaderService } from \"../shared/services/loader.service\";\r\n\r\n@Component({\r\n selector: \"app-my-loader\",\r\n templateUrl: \"./my-loader.component.html\",\r\n styleUrls: [\"./my-loader.component.scss\"],\r\n})\r\nexport class MyLoaderComponent implements OnInit {\r\n loading: boolean;\r\n\r\n constructor(private loaderService: LoaderService) {\r\n this.loaderService.isLoading.subscribe((v) => {\r\n this.loading = v;\r\n });\r\n }\r\n ngOnInit() {}\r\n}\r\n","
\r\n
\r\n \r\n \r\n
\r\n
","import {\r\n ApplicationInitStatus,\r\n APP_INITIALIZER,\r\n Component,\r\n HostListener,\r\n Inject,\r\n OnInit,\r\n} from \"@angular/core\";\r\nimport { ActivatedRoute, NavigationEnd, Router, RouterEvent } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { ConfigService } from \"./components/shared/services/config.service\";\r\nimport { UserService } from \"./components/shared/services/user.service\";\r\nimport { PersistentService } from \"./components/shared/services/persistent.service\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { MarketSelectorComponent } from \"./components/shared/model/market-selector/market-selector.component\";\r\nimport { environment } from \"src/environments/environment\";\r\nimport { Cart1Service } from \"./components/shared/services/cart1.service\";\r\nimport { ProductService } from \"./components/shared/services/product.service\";\r\nimport { OrderService } from \"./components/shared/services/order.service\";\r\n\r\n@Component({\r\n selector: \"app-root\",\r\n templateUrl: \"./app.component.html\",\r\n styleUrls: [\"./app.component.scss\"],\r\n})\r\nexport class AppComponent implements OnInit {\r\n constructor(\r\n @Inject(APP_INITIALIZER) public appInit: ApplicationInitStatus,\r\n public configService: ConfigService,\r\n public router: Router,\r\n private translate: TranslateService,\r\n public userService: UserService,\r\n public persistent: PersistentService,\r\n private dialog: MatDialog,\r\n private cart1Service: Cart1Service,\r\n private activateroute: ActivatedRoute,\r\n private productService: ProductService,\r\n private orderService: OrderService\r\n ) {\r\n if (sessionStorage.getItem(\"language\")) {\r\n translate.setDefaultLang(sessionStorage.getItem(\"language\"));\r\n translate.use(sessionStorage.getItem(\"language\"));\r\n } else {\r\n translate.setDefaultLang(\"en\");\r\n translate.use(\"en\");\r\n }\r\n }\r\n @HostListener(\"window:beforeunload\", [\"$event\"]) unloadHandler() {\r\n localStorage.setItem(\r\n \"userService\",\r\n JSON.stringify(this.userService.userServiceModal),\r\n );\r\n localStorage.setItem(\r\n \"retailData\",\r\n JSON.stringify(this.persistent.retailData),\r\n );\r\n }\r\n\r\n ngOnInit() {\r\n // show market selector according to page\r\n this.router.events.subscribe((event: RouterEvent) => {\r\n window.scroll({top: 0, left: 0, behavior: 'smooth'});\r\n if (event.url == \"/join\") {\r\n //this.showMarketSelector();\r\n }\r\n });\r\n\r\n /* ------------------------------------------------\r\n Cart Link Sharing Process\r\n ------------------------------------------------ */\r\n\r\n this.activateroute.queryParams.subscribe((queryparam) => {\r\n const { isshort, type, countrycode, language, cartitems } = queryparam;\r\n if(isshort && cartitems) {\r\n this.handleCartLinkSharing(type, countrycode, language, cartitems);\r\n }\r\n });\r\n\r\n /* ------------------------------------------------\r\n Page View Event Link Tracking Starts\r\n ------------------------------------------------ */\r\n\r\n if (environment.linkTracking.isAllowed) {\r\n this.router.events.subscribe((evt) => {\r\n if (!(evt instanceof NavigationEnd)) {\r\n return;\r\n }\r\n try {\r\n const pathArray = evt.urlAfterRedirects.split(\"/\");\r\n const pageName = pathArray[pathArray.length - 1];\r\n const data = JSON.stringify({\r\n pageName: pageName,\r\n pageURL: location.href,\r\n });\r\n window[\"ZTM\"].setStats(\r\n environment.linkTracking.companyName,\r\n \"PageView\",\r\n data,\r\n );\r\n } catch (error) {\r\n //\r\n }\r\n window.scrollTo(0, 0);\r\n });\r\n }\r\n\r\n /*---------x---------Page View Event Link Tracking Ends----------x---------- */\r\n }\r\n showMarketSelector() {\r\n if (!(sessionStorage.getItem(\"IsMarketCountrySelected\") === \"true\")) {\r\n this.dialog.open(MarketSelectorComponent, {\r\n maxWidth: \"400px\",\r\n data: {},\r\n panelClass: \"marketselector-dialog-container\",\r\n disableClose: true,\r\n autoFocus: false,\r\n });\r\n }\r\n }\r\n\r\n /* eslint-disable @typescript-eslint/no-unused-vars */\r\n handleCartLinkSharing(customerType, countryCode, languageCode, cartItems) {\r\n\r\n try {\r\n \r\n this.cart1Service.clearCart();\r\n const queryItems = JSON.parse(cartItems) || [];\r\n\r\n if(queryItems.length == 0) {\r\n return;\r\n }\r\n\r\n languageCode = languageCode.split('-')[0];\r\n this.configService.setSelectedCountry(countryCode, languageCode);\r\n\r\n sessionStorage.removeItem('items');\r\n this.productService.getProductByCategory({\r\n PriceGroup: customerType,\r\n LanguageCode: languageCode,\r\n StoreID: 4\r\n }, false).subscribe(\r\n (ItemsArray) => {\r\n\r\n const orderItems = [];\r\n const autoOrderItems = [];\r\n\r\n queryItems.forEach((QI) => {\r\n ItemsArray.forEach((item) => {\r\n if(QI.itemcode == item.ItemID) {\r\n if(QI.orderqty > 0) {\r\n item.Quantity = QI.orderqty;\r\n orderItems.push({...item});\r\n }\r\n if(item.AllowAutoship && QI.autoshipqty > 0) {\r\n item.Quantity = QI.autoshipqty;\r\n autoOrderItems.push({...item});\r\n }\r\n } else {\r\n // Option Items\r\n }\r\n });\r\n });\r\n\r\n this.productService.selectedOrderItems = orderItems;\r\n this.productService.selectedAutoOrderItems = autoOrderItems;\r\n localStorage.setItem('cart.order', JSON.stringify(this.productService.selectedOrderItems));\r\n localStorage.setItem('cart.autoship', JSON.stringify(this.productService.selectedAutoOrderItems));\r\n\r\n if((orderItems.length + autoOrderItems.length) > 0) {\r\n\r\n // orderQuantity Modal Update\r\n this.productService.selectedOrderItems.forEach((item) => {\r\n this.cart1Service.orderQuantity[item.ItemID] = item.Quantity;\r\n });\r\n\r\n // autoshipQuantity Modal Update\r\n this.productService.selectedAutoOrderItems.forEach((item) => {\r\n this.cart1Service.autoshipQuantity[item.ItemID] = item.Quantity;\r\n });\r\n\r\n this.userService.userServiceModal.customerTypeID = customerType;\r\n this.router.navigate(['/'], { queryParamsHandling: \"\" });\r\n }\r\n\r\n this.productService.selectedOrderItems.length > 0 ? this.orderService.calculateOrder() : this.orderService.calculateOrderResponse = {};\r\n this.productService.selectedAutoOrderItems.length > 0 ? this.orderService.calculateAutoOrder() : this.orderService.calculateAutoOrderResponse = {};\r\n\r\n }\r\n );\r\n\r\n } catch (error) {\r\n //\r\n }\r\n\r\n }\r\n\r\n}\r\n\r\n","
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n","import { MatDialogRef } from \"@angular/material/dialog\";\r\nimport { Component, OnInit, ViewEncapsulation } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-loyalty-program\",\r\n templateUrl: \"./loyalty-program.component.html\",\r\n styleUrls: [\"./loyalty-program.component.scss\"],\r\n encapsulation: ViewEncapsulation.Emulated,\r\n})\r\nexport class LoyaltyProgramComponent implements OnInit {\r\n cvvCode: number|string;\r\n constructor(private dialogRef: MatDialogRef) {}\r\n\r\n ngOnInit(): void {}\r\n\r\n save() {\r\n this.dialogRef.close();\r\n }\r\n close() {\r\n this.dialogRef.close();\r\n }\r\n}\r\n","\r\n
\r\n close\r\n
\r\n\r\n
\r\n
LOYALTY PROGRAM
\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n

After successfully processing three automatic orders, QLAs and PCs will receive a 30% off coupon that can be applied to one item in the back office*. The discount expires 30 days after the issued date.

\r\n\r\n

This simple Loyalty Program rewards all QLAs and PCs, at no additional entry costs or requirements.\r\n

\r\n
\r\n
\r\n\r\n
\r\n
\r\n
How do I sign up?
\r\n
    \r\n
  • Find your favorite products
  • \r\n
  • Select “Subscribe & Save” when adding your products to your cart.
  • \r\n
  • Checkout!
  • \r\n
\r\n

It really is as simple as that! After processing your autoship for three consecutive months you’ll receive your discount.

\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n \"\"\r\n
\r\n \r\n
\r\n
\r\n","\r\n\r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n
\r\n \r\n
\r\n

INTRODUCING

\r\n

The Perfect Workout

\r\n

Begins with the perfect stretch material

\r\n

Shop now

\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n

Womens

\r\n

Get a bonus plus for buying more that three\r\n products

\r\n

Shop the\r\n Collection

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n

Sweat Shirts

\r\n

Get a bonus plus for buying more that three\r\n products

\r\n

Shop the\r\n Collection

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

{{allItems[0]?.Category}}

\r\n
\r\n
\r\n
\r\n \"\"\r\n\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

{{productImage.ProductName}}

\r\n

{{productImage.oldPrice}} \r\n {{'$'+productImage.Price}}

\r\n
\r\n
\r\n

Sale

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n

The Sweat Suit

\r\n

With award-winning moisture-wicking fabric.

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Shoal Sports Bra in Black

\r\n

Shop now

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Tributary Leggings

\r\n

Shop now

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Tundra Leggings in Dark Green

\r\n

Shop now

\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

Collections

\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Leggings

\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Sports Bras

\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Men's Jackets

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \"image\"\r\n
\r\n
\r\n

OUR VALUES

\r\n

Performance

\r\n

Everything we do at {{'Clientname' | translate}} is guided by a commitment to\r\n unlocking the highest\r\n performance within our customers.

\r\n

Learn More

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

{{allItems[1]?.Category}}

\r\n
\r\n
\r\n
\r\n \"\"\r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

{{productImage.ProductName}}

\r\n

{{productImage.oldPrice}} \r\n {{'$'+productImage.Price}}

\r\n
\r\n
\r\n

Sale

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

{{slide.title}}

\r\n

{{slide.subtitle}}

\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
0\">\r\n
\r\n

{{allItems[2]?.Category}}

\r\n
\r\n
\r\n
\r\n \"\"\r\n\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

{{productImage.ProductName}}

\r\n

{{productImage.oldPrice}} \r\n {{'$'+productImage.Price}}

\r\n
\r\n
\r\n

Sale

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \"image\"\r\n
\r\n
\r\n

INTRODUCING

\r\n

The New Collection

\r\n

Sustainable activewear inspired by the real lives and real bodies of our\r\n customers.

\r\n

Shop now

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

Social

\r\n
\r\n
\r\n
\r\n \r\n
\r\n

We've just launched our newest pair of seamless tights. Pictured here and\r\n in stores soon.

\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Our newest line of tights come in navy and black and are sure to get you\r\n running.

\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Celebrating Mondays that get us moving - from the track to the pool.

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n \r\n

BUNDLES

\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \"\"\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n \r\n
\r\n \"\"\r\n
\r\n\r\n \r\n
\r\n
\r\n

THE FUTURE IS FREQUENCY

\r\n

AO Scan Technology is changing the way people approach health. Learn how your body is performing from any device, no matter where you are.

\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n

Subscribe and Be rewarded

\r\n Learn how to maximize your purchases\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n 0\" >\r\n \r\n
\r\n
\r\n
{{category.ID == 21 ? \"Get Started\" : category.Name}}
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n \"\"\r\n
\r\n

Experience NanoTechnology

\r\n Allows for more effective and efficient absorption.\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \"\"\r\n
\r\n \r\n \r\n
\r\n
\r\n

\r\n Take your health to the next level\r\n with the AO Infinity products

\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n \r\n \r\n \r\n
\r\n
Learn How to get rewarded after purchases
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n \r\n
\r\n \"\"\r\n
\r\n\r\n \r\n
\r\n \"\"\r\n
\r\n\r\n \r\n
\r\n
\r\n

NANO COMES FROM A `NANOMETER' (1 BILLIONTH OF A METER). TO PUT IT IN PERSPECTIVE, TAKE A ROUND\r\n MARBLE THAT IS COMMONLY USED TO PLAY GAMES AND COMPARE THAT TO THE SIZE OF THE WORLD.

\r\n Nano Technology separates the binding of molecular structure into smaller and smaller sizes to\r\n allow for more effective and efficient absorption. When this happens with molecular structures\r\n we consume in our supplements, they become bioavailable at the cellular level.\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n \r\n
\r\n \"\"\r\n
\r\n\r\n \r\n
\r\n
\r\n

IT'S ABOUT PRIME

\r\n Give your body the nutritional supplementation it deserves! Prime optimizes cell function and\r\n life by activating the cell's natural defenses, restoring cell structure from environmental\r\n damage, and maximizing the longevity of cell life.\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n \"\"\r\n
AO SCAN TECHNOLOGY
\r\n \r\n
\r\n
\r\n \"\"\r\n
Lightwave Glasses
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n\r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { ProductService } from \"../../shared/services/product.service\";\r\nimport { ConfigService } from \"../../shared/services/config.service\";\r\nimport { DSProduct } from \"src/app/modals/dsproduct.modal\";\r\nimport { UserService } from \"../../shared/services/user.service\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { CompanyService } from \"../../shared/services/company.service\";\r\nimport { ShoppingCartService } from \"../../shared/services/shopping-cart.service\";\r\nimport {\r\n SwiperConfigInterface,\r\n SwiperNavigationInterface,\r\n SwiperPaginationInterface,\r\n} from \"ngx-swiper-wrapper\";\r\nimport { Router } from \"@angular/router\";\r\nimport { Cart1Service } from \"../../shared/services/cart1.service\";\r\nimport { ItemsListService } from \"../../shared/services/itemsList.service\";\r\nimport * as _ from \"lodash\";\r\nimport { environment } from \"src/environments/environment\";\r\nimport { RestApiService } from \"../../shared/services/restapi.service\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { LoyaltyProgramComponent } from \"../../shared/model/loyalty-program/loyalty-program.component\";\r\nimport { SideNavBarService } from \"../../shared/services/sidenavbar.service\";\r\n\r\n@Component({\r\n selector: \"app-home\",\r\n templateUrl: \"./home.component.html\",\r\n styleUrls: [\"./home.component.scss\"],\r\n})\r\nexport class HomeComponent implements OnInit {\r\n // Builder.io\r\n\r\n noBuilderPageForUrl: boolean = false;\r\n\r\n context = {\r\n navigate: (path: string) => this.router.navigate([path])\r\n };\r\n\r\n options: any = {\r\n cacheSeconds: 0.1,\r\n data: {\r\n locale: \"en-US\",\r\n },\r\n };\r\n\r\n // Builder.io\r\n\r\n public OrderQuantityCount;\r\n public selectedCategory;\r\n env;\r\n products: Array;\r\n healthBeautyProduct: Array;\r\n shopPacksProduct: Array = [];\r\n quarterlyPacksProduct: Array;\r\n userService: UserServiceModal;\r\n itemType = \"\";\r\n public config: SwiperConfigInterface = {};\r\n private pagination: SwiperPaginationInterface = {\r\n el: \".swiper-pagination\",\r\n clickable: true,\r\n };\r\n private navigation: SwiperNavigationInterface = {\r\n nextEl: \".swiper-button-next\",\r\n prevEl: \".swiper-button-prev\",\r\n };\r\n public allItems: { Category; CategoryId }[] = [];\r\n contentLoaded = false;\r\n public banners = [];\r\n public slides = [];\r\n public BundlesConfig: SwiperConfigInterface = {};\r\n\r\n AvailableBundles = [\r\n {\r\n Description: \"Builder Bluetooth\",\r\n imageUrl: \"assets/images/bundle-images/BuilderBluetoothBundle.jpg\",\r\n itemID: 780,\r\n },\r\n {\r\n Description: \"Builder Wired\",\r\n imageUrl: \"assets/images/bundle-images/BuilderWiredBundle.jpg\",\r\n itemID: 778,\r\n },\r\n {\r\n Description: \"Starter Bluetooth\",\r\n imageUrl: \"assets/images/bundle-images/StarterBluetoothBundle.jpg\",\r\n itemID: 779,\r\n },\r\n {\r\n Description: \"Starter Wired\",\r\n imageUrl: \"assets/images/bundle-images/StarterWiredBundle.jpg\",\r\n itemID: 777,\r\n },\r\n {\r\n Description: \"Balance Bundle\",\r\n imageUrl: \"assets/images/bundle-images/BalanceBundle.jpg\",\r\n itemID: 1201,\r\n },\r\n {\r\n Description: \"Radiance Bundle\",\r\n imageUrl: \"assets/images/bundle-images/RadianceBundle.jpg\",\r\n itemID: 1202,\r\n },\r\n {\r\n Description: \"Vitality Bundle\",\r\n imageUrl: \"assets/images/bundle-images/VitalityBundle.jpg\",\r\n itemID: 1203,\r\n },\r\n {\r\n Description: \"Basic Bluetooth\",\r\n imageUrl: \"assets/images/bundle-images/BluetoothHeadsetNEW.jpg\",\r\n itemID: 129,\r\n },\r\n ];\r\n\r\n AvailableCategories = [];\r\n\r\n public slider = [\r\n {\r\n subtitle: \"They move when you move - no surprises.\",\r\n title: \"Women's Tops\",\r\n image:\r\n \"https://cdn.shopify.com/s/files/1/0926/9298/files/NEWBLACKOUTLEGGINGS_NAVY_1_085ee5dc-7e45-4d27-8a72-d75f18d4bb01_1080x.jpg?v=1600985773\",\r\n },\r\n {\r\n subtitle: \"Coordinated outfits to get you training.\",\r\n title: \"Training\",\r\n image:\r\n \"https://cdn.shopify.com/s/files/1/0926/9298/files/IMGN_191028_AF1_sRGB91023_JASMINE_02_038_F1_sRGB_1080x.jpg?v=1600972867\",\r\n },\r\n {\r\n subtitle: \"The very best activewear.\",\r\n title: \"Women's Tights\",\r\n image:\r\n \"https://cdn.shopify.com/s/files/1/0926/9298/files/Block_02_1080x.jpg?v=1600977240\",\r\n },\r\n ];\r\n constructor(\r\n public configService: ConfigService,\r\n public translate: TranslateService,\r\n private titleService: Title,\r\n public productService: ProductService,\r\n public user: UserService,\r\n public companyService: CompanyService,\r\n public shoppingCartService: ShoppingCartService,\r\n public router: Router,\r\n public cart1Service: Cart1Service,\r\n public itemsListService: ItemsListService,\r\n private apiService: RestApiService,\r\n private dialog: MatDialog,\r\n private sidebarNavService: SideNavBarService,\r\n ) {\r\n this.userService = user.userServiceModal;\r\n // this.getAllProductsCategories();\r\n\r\n this.env = environment;\r\n }\r\n ngOnInit() {\r\n this.getAllCategories();\r\n\r\n this.BundlesConfig = {\r\n observer: true,\r\n direction: \"horizontal\",\r\n slidesPerView: 3,\r\n spaceBetween: 80,\r\n keyboard: true,\r\n navigation: false,\r\n pagination: {\r\n el: \".swiper-pagination\",\r\n clickable: true,\r\n },\r\n grabCursor: true,\r\n loop: false,\r\n preloadImages: false,\r\n lazy: true,\r\n breakpoints: {\r\n 480: {\r\n slidesPerView: 1,\r\n pagination: {\r\n el: \".swiper-pagination\",\r\n clickable: true,\r\n },\r\n },\r\n 740: {\r\n slidesPerView: 2,\r\n pagination: {\r\n el: \".swiper-pagination\",\r\n clickable: true,\r\n },\r\n },\r\n 960: {\r\n slidesPerView: 3,\r\n pagination: {\r\n el: \".swiper-pagination\",\r\n clickable: true,\r\n },\r\n },\r\n 1280: {\r\n slidesPerView: 3,\r\n pagination: {\r\n el: \".swiper-pagination\",\r\n clickable: true,\r\n },\r\n },\r\n },\r\n };\r\n\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_home\") + \" | \" + text,\r\n );\r\n });\r\n setTimeout(() => {\r\n this.contentLoaded = true;\r\n }, 3000);\r\n this.slides = this.configService.localSettings.Home.PrimaryBanner;\r\n this.config = {\r\n observer: true,\r\n direction: \"horizontal\",\r\n slidesPerView: 1,\r\n spaceBetween: 10,\r\n keyboard: true,\r\n navigation: true,\r\n pagination: false,\r\n grabCursor: true,\r\n loop: false,\r\n preloadImages: false,\r\n lazy: true,\r\n breakpoints: {\r\n 480: {\r\n slidesPerView: 1,\r\n },\r\n 740: {\r\n slidesPerView: 2,\r\n },\r\n 960: {\r\n slidesPerView: 3,\r\n },\r\n 1280: {\r\n slidesPerView: 3,\r\n },\r\n },\r\n };\r\n }\r\n\r\n getAllCategories() {\r\n if (this.productService.retailStoreCategories.length > 0) {\r\n return this.productService.retailStoreCategories;\r\n }\r\n\r\n this.apiService.GetCategories(3).subscribe((result) => {\r\n this.productService.retailStoreCategories = result;\r\n });\r\n }\r\n\r\n getImageUrlFromDescription(translationsArray) {\r\n if (!translationsArray) return null;\r\n const englishTranslation = translationsArray.find(\r\n (t) => t.LanguageCode == \"en\",\r\n );\r\n if (!englishTranslation) {\r\n return null;\r\n }\r\n return englishTranslation.Description;\r\n }\r\n\r\n mouseEnter(index) {\r\n document.getElementById(\"btn\" + index).classList.add(\"faded-in\");\r\n document.getElementById(\"btn\" + index).classList.remove(\"faded-out\");\r\n setTimeout(() => {\r\n document.getElementById(\"btn\" + index).style.opacity = \"1\";\r\n }, 590);\r\n }\r\n mouseOut(index) {\r\n document.getElementById(\"btn\" + index).classList.add(\"faded-out\");\r\n setTimeout(() => {\r\n document.getElementById(\"btn\" + index).style.opacity = \"0\";\r\n }, 590);\r\n document.getElementById(\"btn\" + index).classList.remove(\"faded-in\");\r\n }\r\n getAllProductsCategories() {\r\n this.selectedCategory = { CategoryId: 0 };\r\n this.productService\r\n .getProductByCategory(this.selectedCategory)\r\n .subscribe((products) => {\r\n this.productService.orders = products.map((item) => {\r\n item.Price =\r\n item.Price ||\r\n (item.Prices && item.Prices[0] && item.Prices[0].Price);\r\n return item;\r\n });\r\n\r\n const uniqueItems = _.uniqBy(products, (x) => x.CategoryId);\r\n let uniqueRequireProduct = [];\r\n if (\r\n this.configService.localSettings.Global.CategoriesToFetch?.length > 0\r\n ) {\r\n uniqueItems.filter((x) => {\r\n if (\r\n this.configService.localSettings.Global.CategoriesToFetch.indexOf(\r\n x.Category,\r\n ) > -1\r\n ) {\r\n uniqueRequireProduct.push(x);\r\n }\r\n });\r\n } else {\r\n uniqueRequireProduct = [...uniqueItems];\r\n }\r\n\r\n this.itemsListService.selectedCategories = {};\r\n if (this.selectedCategory.Category == \"all\") {\r\n this.itemsListService.selectedCategories[\"all\"] = true;\r\n }\r\n this.itemsListService.categoryList = _.map(\r\n uniqueRequireProduct,\r\n (object) => {\r\n return _.pick(object, [\"CategoryId\", \"Category\"]);\r\n },\r\n );\r\n this.itemsListService.products = this.productService.orders;\r\n this.itemsListService.type = \"order\";\r\n this.itemsListService.getItemsByCategory(\r\n this.selectedCategory.Category,\r\n );\r\n this.products = this.itemsListService.productList.slice(0.8);\r\n this.allItems = this.itemsListService.categoryList;\r\n if (this.allItems) {\r\n this.healthBeautyProducts();\r\n this.quarterlyPacksProducts();\r\n this.shopPacksProducts();\r\n }\r\n });\r\n }\r\n\r\n healthBeautyProducts() {\r\n this.itemsListService.getItemsByCategory(this.allItems[0]?.Category);\r\n this.healthBeautyProduct = this.itemsListService.productList.slice(0, 3);\r\n }\r\n quarterlyPacksProducts() {\r\n this.itemsListService.getItemsByCategory(this.allItems[1]?.Category);\r\n this.quarterlyPacksProduct = this.itemsListService.productList.slice(0, 3);\r\n }\r\n shopPacksProducts() {\r\n this.itemsListService.getItemsByCategory(this.allItems[2]?.Category);\r\n this.shopPacksProduct = this.itemsListService.productList.slice(0, 3);\r\n }\r\n\r\n goToShop(id) {\r\n this.router.navigate([\"/product\", id]);\r\n }\r\n\r\n handleProduct(item) {\r\n if (item.ItemOptions.length > 0) {\r\n this.router.navigate([\"/product\", item.ItemID]);\r\n } else {\r\n this.OrderQuantityCount = item && item.Quantity ? item.Quantity : 1;\r\n if (this.cart1Service[\"orderQuantity\"][item.ItemID] >= 1) {\r\n this.increaseQuantiy(\"order\", item);\r\n } else {\r\n this.cart1Service[\"orderQuantity\"][item.ItemID] =\r\n this.OrderQuantityCount;\r\n this.cart1Service.addToCart(\r\n item,\r\n true,\r\n item.ItemID,\r\n false,\r\n false,\r\n false,\r\n true,\r\n );\r\n }\r\n }\r\n }\r\n increaseQuantiy(type, item) {\r\n this.cart1Service.increaseQuantiy(item, type == \"autoship\", type == \"pack\");\r\n }\r\n\r\n goToItem(id, type) {\r\n this.router.navigate([`/product/${id}`], {\r\n queryParams: { storeid: 4, itemtype: type },\r\n });\r\n }\r\n\r\n openLoyaltyPopup() {\r\n this.dialog.open(LoyaltyProgramComponent, {\r\n disableClose: true,\r\n panelClass: \"loyalty-program-dialog\",\r\n autoFocus: false,\r\n });\r\n }\r\n\r\n addPackToCart(item) {\r\n this.addPackFromEnrollStore(item);\r\n return;\r\n\r\n const packItemCode = item.itemID;\r\n this.productService.getProductByCategory().subscribe((alltems) => {\r\n const packItem = alltems.find((item) => item.ItemID == packItemCode);\r\n\r\n if (!packItem) {\r\n this.addPackFromEnrollStore(item);\r\n return;\r\n }\r\n\r\n this.cart1Service.addToCart(\r\n packItem,\r\n true,\r\n packItem.ItemID,\r\n false,\r\n false,\r\n true,\r\n );\r\n this.sidebarNavService.showsideBarSummary = true;\r\n });\r\n }\r\n\r\n addPackFromEnrollStore(packItem) {\r\n // Convert to PC for Packs Shopping if he is not QLA.\r\n if (this.userService.customerTypeID != 1) {\r\n this.userService.customerTypeID = 3;\r\n }\r\n\r\n sessionStorage.removeItem(\"items\");\r\n\r\n const packItemCode = packItem.itemID;\r\n this.productService\r\n .getProductByCategory({\r\n PriceGroup: this.userService.customerTypeID,\r\n StoreID: 4,\r\n })\r\n .subscribe((alltems) => {\r\n const packItem = alltems.find((item) => item.ItemID == packItemCode);\r\n\r\n if (!packItem) {\r\n sessionStorage.removeItem(\"items\");\r\n this.router.navigate([`/product/${packItemCode}`]);\r\n }\r\n\r\n this.cart1Service.addToCart(\r\n packItem,\r\n true,\r\n packItem.ItemID,\r\n false,\r\n false,\r\n true,\r\n );\r\n this.sidebarNavService.showsideBarSummary = true;\r\n });\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { HomeComponent } from \"./components/pages/home/home.component\";\r\n\r\nconst appRoutes: Routes = [\r\n {\r\n path: \"\",\r\n redirectTo: \"home\",\r\n pathMatch: \"full\",\r\n },\r\n {\r\n path: \"home\",\r\n component: HomeComponent,\r\n pathMatch: \"full\",\r\n },\r\n {\r\n path: \"**\",\r\n redirectTo: \"home\",\r\n },\r\n];\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n RouterModule.forRoot(appRoutes, {\r\n useHash: false,\r\n relativeLinkResolution: \"legacy\",\r\n scrollPositionRestoration: 'enabled'\r\n }),\r\n ],\r\n exports: [RouterModule],\r\n})\r\nexport class AppRoutingModule {}\r\n","\r\n\r\n\r\n\r\n\t\r\n\r\n\r\n\r\n\r\n\t\r\n\r\n\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\"\"\r\n\t\t\t
\r\n\t\t
\r\n\t\t
\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t
\r\n\t\t
\r\n\t\t\t

No Images Found!!

\r\n\t\t
\r\n\t
\r\n\r\n\r\n","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { MatDialog, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport * as _ from \"lodash\";\r\nimport { AutoshipConfigurationService } from \"../../shared/services/autoshipConfiguration.service\";\r\nimport { CompanyService } from \"../../shared/services/company.service\";\r\nimport { ConfigService } from \"../../shared/services/config.service\";\r\nimport { ItemsListService } from \"../../shared/services/itemsList.service\";\r\nimport { PersistentService } from \"../../shared/services/persistent.service\";\r\nimport { ProductService } from \"../../shared/services/product.service\";\r\nimport { UtilityService } from \"../../shared/services/utility.service\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { environment } from \"src/environments/environment\";\r\n\r\ndeclare const require;\r\n@Component({\r\n selector: \"app-flickity\",\r\n templateUrl: \"./flickity.component.html\",\r\n styleUrls: [\"./flickity.component.scss\"],\r\n})\r\nexport class FlickityComponent implements OnInit {\r\n ItemID;\r\n CartType: string;\r\n itemType: string;\r\n type: string;\r\n images;\r\n isShowShareOptions: boolean;\r\n defaultImage = {};\r\n public products = [];\r\n public product: any = {};\r\n public orderOptions;\r\n public OrderQuantityCount;\r\n env;\r\n\r\n constructor(\r\n private titleService: Title,\r\n public configService: ConfigService,\r\n private route: ActivatedRoute,\r\n public productsService: ProductService,\r\n public dialog: MatDialog,\r\n private router: Router,\r\n public itemsService: ProductService,\r\n public itemsListService: ItemsListService,\r\n public activateroute: ActivatedRoute,\r\n public utilityService: UtilityService,\r\n public persistentService: PersistentService,\r\n public autoshipConfigurationService: AutoshipConfigurationService,\r\n public companyService: CompanyService,\r\n @Inject(MAT_DIALOG_DATA) public data,\r\n ) {\r\n this.ItemID = data.id;\r\n this.defaultImage = {\r\n Path: \"assets/images/noimage.png\",\r\n Description: this.product ? this.product.Description : \"\",\r\n };\r\n this.CartType = this.itemType || \"order\";\r\n this.type = this.CartType;\r\n this.env = environment;\r\n }\r\n\r\n ngOnInit() {\r\n this.productsService.getProduct(this.ItemID).subscribe((product) => {\r\n this.product = [product];\r\n this.images = this.product[0].Images;\r\n this.OrderQuantityCount =\r\n product && product.Quantity ? product.Quantity : 1;\r\n this.onItemsSucces([product]);\r\n this.setUpOrderOptions(this.product);\r\n });\r\n }\r\n public onItemsSucces(result) {\r\n this.itemType =\r\n this.type === \"order\"\r\n ? \"order\"\r\n : this.type == \"pack\"\r\n ? \"pack\"\r\n : \"autoship\";\r\n this.itemsService[this.itemType] = result.map((item) => {\r\n item.Price = item.Price || item.Prices[0].Price;\r\n return item;\r\n });\r\n this.itemsListService.products = this.itemsService[this.itemType];\r\n this.itemsListService.type = this.type;\r\n const selectedItem = this.product;\r\n this.products = result.map((item) => {\r\n item.Price = item.Price || item.Prices[0].Price;\r\n return item;\r\n });\r\n if (selectedItem) {\r\n this.products = _.filter(this.products, (product) => {\r\n return product.ItemID != selectedItem.ItemID;\r\n });\r\n }\r\n if (this.ItemID) {\r\n let isItemExists = false;\r\n _.each(result, (item) => {\r\n if (item.HasOptions) {\r\n _.each(item.OptionsMap, (value) => {\r\n if (value.ItemId == this.ItemID) {\r\n item.ItemID = this.ItemID;\r\n return;\r\n }\r\n });\r\n }\r\n if (\r\n isNaN(this.ItemID)\r\n ? (item.ProductName || \"\").toLowerCase().replace(/\\s/g, \"\") ==\r\n this.ItemID.toLowerCase().replace(/\\s/g, \"\")\r\n : item.ItemID == this.ItemID\r\n ) {\r\n isItemExists = true;\r\n this.product = this.transformItem(item);\r\n this.OrderQuantityCount = selectedItem\r\n ? selectedItem.Quantity || 1\r\n : 1;\r\n item.Quantity = selectedItem ? selectedItem.Quantity || 1 : 1;\r\n localStorage.setItem(\"params.type\", this.type);\r\n localStorage.setItem(\r\n \"params.productList\",\r\n JSON.stringify(this.products),\r\n );\r\n }\r\n });\r\n if (!isItemExists) {\r\n this.router.navigate([\"/Products\"]);\r\n }\r\n }\r\n }\r\n\r\n public transformItem(item) {\r\n this.isShowShareOptions = false;\r\n item.Price =\r\n item.Price || item.Price === 0\r\n ? item.Price\r\n : item.Prices && item.Prices[0] && item.Prices[0].Price;\r\n item.Images = item.Images || [];\r\n if (item) {\r\n Object.keys(item.Prices).forEach((p: any) => {\r\n if (\r\n p.CurrencyCode &&\r\n p.CurrencyCode.toLowerCase() === \"rwd\" &&\r\n p.Price > 0\r\n ) {\r\n item.UsePoints = true;\r\n }\r\n });\r\n }\r\n if (\r\n item.LargeImageUrl &&\r\n !_.find(item.Images, { Path: item.LargeImageUrl })\r\n ) {\r\n item.Images.unshift({\r\n Description: item.Description,\r\n Path: item.LargeImageUrl,\r\n });\r\n } else if (item.Image && !_.find(item.Images, { Path: item.Image })) {\r\n item.Images.unshift({\r\n Description: item.Description,\r\n Path: item.Image,\r\n });\r\n }\r\n this.isShowShareOptions = true;\r\n return item;\r\n }\r\n\r\n setUpOrderOptions(item) {\r\n if (!this.orderOptions) {\r\n this.orderOptions = {};\r\n }\r\n\r\n const dict = this.orderOptions;\r\n\r\n // If editing an item with selected customizations, find them and set the dropdowns\r\n let optionsMap;\r\n _.each(item.OptionsMap, (val) => {\r\n val.OptionNames = val.Key.split(\"|\");\r\n });\r\n if (item.selectedOptions) {\r\n item.OptionsMap.some((optMap) => {\r\n if (optMap.ItemId === (item.KitCustomItemCode || item.ItemID)) {\r\n optionsMap = optMap.OptionNames;\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n\r\n // Otherwise, default to the first options map\r\n const optionMapNames = item.OptionsMap\r\n ? item.OptionsMap.map((optMap) => {\r\n return optMap.OptionNames;\r\n })\r\n : [];\r\n\r\n if (!item.selectedOptions || !optionsMap) {\r\n optionsMap = optionMapNames[0];\r\n }\r\n\r\n // Loop through the OptionsMap\r\n let optionVal;\r\n let optionValues;\r\n for (const index in optionsMap) {\r\n if (Object.prototype.hasOwnProperty.call(optionsMap, index)) {\r\n optionVal = optionsMap[index];\r\n // For each option in the OptionsMap, loop through the ItemOptions\r\n for (const itemIndex in item.ItemOptions) {\r\n // Get all the values of the ItemOption\r\n if (\r\n Object.prototype.hasOwnProperty.call(item.ItemOptions, itemIndex)\r\n ) {\r\n optionValues =\r\n item.ItemOptions[itemIndex].Values.map(getOptionValueName);\r\n // If one of them is the value from the OptionsMap, use it\r\n const option = item.ItemOptions[itemIndex];\r\n if (\r\n !!~optionValues.indexOf(optionVal) &&\r\n !dict[this.getOrderOptionKey(item, option)]\r\n ) {\r\n dict[this.getOrderOptionKey(item, option)] = optionVal;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getOptionValueName(val) {\r\n return val.Option;\r\n }\r\n }\r\n getOrderOptionKey(item, option) {\r\n return item.ItemID + \"__\" + option.Option;\r\n }\r\n\r\n call() {\r\n const Flickity = require(\"flickity\");\r\n require(\"flickity-imagesloaded\");\r\n require(\"flickity-as-nav-for\");\r\n require(\"flickity-bg-lazyload\");\r\n\r\n const carouselMain = document.getElementById(\"carouselMain\");\r\n const carouselNav = document.getElementById(\"carouselNav\");\r\n\r\n new Flickity(carouselMain, {\r\n pageDots: false,\r\n bgLazyLoad: true,\r\n });\r\n\r\n new Flickity(carouselNav, {\r\n asNavFor: \"#carouselMain\",\r\n contain: true,\r\n pageDots: false,\r\n bgLazyLoad: true,\r\n });\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { DomSanitizer } from \"@angular/platform-browser\";\r\n@Pipe({\r\n name: \"unsafe\",\r\n})\r\nexport class UnsafePipe implements PipeTransform {\r\n constructor(private sanitizer: DomSanitizer) {}\r\n transform(content) {\r\n return this.sanitizer.bypassSecurityTrustHtml(content);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n \"\"\r\n
\r\n\r\n
0\" class=\"swiper-container m-b-20 gallery-top\" [swiper]=\"GalleryTopImages\">\r\n
\r\n
\r\n \"\"\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
0\" class=\"swiper-container gallery-thumbs\" [swiper]=\"GalleryThumbImages\">\r\n
\r\n
\r\n \"\"\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n
\r\n Why Subscribe? Better prices, set it and forget it.\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n Subscribe & Save\r\n One-time Purchase\r\n \r\n
\r\n\r\n \r\n
\r\n \r\n \r\n \r\n {{i + 1}}\r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n\r\n\r\n \r\n
\r\n
\r\n Buy with Installments\r\n
\r\n
0 && todaysInstallmentAmount(product, OrderQuantityCount) > 0\" class=\"m-t-10 color-blackish\">Your {{ getInstallmentsNumber(product) }} installment payments will be {{ todaysInstallmentAmount(product, OrderQuantityCount) | currency:companyService.selectedCurrency.CurrencyCode }} beginning with your first payment today.
\r\n
\r\n\r\n
\r\n\r\n\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n

\r\n \r\n \r\n \r\n {{value.Option}} \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n\r\n\r\n \r\n
\r\n\r\n \r\n\r\n
\r\n 0\">\r\n \r\n
\r\n

\r\n
\r\n
\r\n
\r\n\r\n
\r\n

\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n

Suggested Products

\r\n
\r\n\r\n
\r\n
\r\n
\r\n \"\"\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
*These statements have not been evaluated by the Food and Drug Administration.
\r\n This Product is not intended to diagnose, treat, cure, or prevent any disease.
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
","import {\r\n Component,\r\n OnInit,\r\n ViewChild,\r\n AfterViewInit,\r\n OnDestroy,\r\n} from \"@angular/core\";\r\nimport { ProductService } from \"src/app/components/shared/services/product.service\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { CartService } from \"src/app/components/shared/services/cart.service\";\r\nimport { SwiperDirective, SwiperConfigInterface } from \"ngx-swiper-wrapper\";\r\n// import { ProductZoomComponent } from './product-zoom/product-zoom.component';\r\nimport { Cart1Service } from \"src/app/components/shared/services/cart1.service\";\r\nimport { ConfigService } from \"src/app/components/shared/services/config.service\";\r\nimport * as _ from \"lodash\";\r\nimport * as $ from \"jquery\";\r\nimport { ItemsListService } from \"src/app/components/shared/services/itemsList.service\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { UtilityService } from \"src/app/components/shared/services/utility.service\";\r\nimport { PersistentService } from \"src/app/components/shared/services/persistent.service\";\r\nimport { AutoshipConfigurationService } from \"src/app/components/shared/services/autoshipConfiguration.service\";\r\nimport { CompanyService } from \"src/app/components/shared/services/company.service\";\r\nimport { environment } from \"src/environments/environment\";\r\nimport { FlickityComponent } from \"src/app/components/pages/flickity/flickity.component\";\r\nimport {\r\n ConfirmDialogComponent,\r\n ConfirmDialogModel,\r\n} from \"src/app/components/shared/model/confirm-dialog/confirm-dialog.component\";\r\nimport { AccountService } from \"src/app/components/shared/services/account.service\";\r\nimport { UserService } from \"src/app/components/shared/services/user.service\";\r\nimport { NotificationService } from \"src/app/components/shared/services/notification.service\";\r\nimport { SideNavBarService } from \"src/app/components/shared/services/sidenavbar.service\";\r\n\r\n@Component({\r\n selector: \"app-product-details\",\r\n templateUrl: \"./product-details.component.html\",\r\n styleUrls: [\"./product-details.component.scss\"],\r\n})\r\nexport class ProductDetailsComponent\r\n implements OnInit, AfterViewInit, OnDestroy\r\n{\r\n public config: SwiperConfigInterface = {};\r\n public GalleryThumbImages: SwiperConfigInterface = {};\r\n public GalleryTopImages: SwiperConfigInterface = {};\r\n\r\n @ViewChild(\"zoomViewer\", { static: true }) zoomViewer;\r\n @ViewChild(SwiperDirective, { static: true }) directiveRef: SwiperDirective;\r\n\r\n public product: any = {};\r\n public products = [];\r\n public allItems: { Category?: string; CategoryId?: (string|number) }[] = [];\r\n public relatedProducts = [];\r\n public orderOptions;\r\n public image;\r\n public zoomImage;\r\n ezpModel = {};\r\n event;\r\n activeImage = \"\";\r\n value = [];\r\n defaultImage: any = {};\r\n isOptionsSelected: boolean;\r\n public counter: number = 1;\r\n public OrderQuantityCount;\r\n itemTypes = {};\r\n index: number;\r\n bigProductImageIndex = 0;\r\n CartType: string;\r\n itemType: string;\r\n type: string;\r\n ItemID;\r\n isShowShareOptions: boolean;\r\n panelOpenSpecification: boolean = false;\r\n panelOpenAutoship: boolean = false;\r\n healthBeautyProduct = [];\r\n env;\r\n selectedCategory;\r\n itemPurchaseSelectionType: string = '';\r\n QuantityArray: Array = new Array(30);\r\n ProductSpecification = [];\r\n queryparams = {};\r\n\r\n constructor(\r\n private titleService: Title,\r\n private translate: TranslateService,\r\n public configService: ConfigService,\r\n private route: ActivatedRoute,\r\n public productsService: ProductService,\r\n public dialog: MatDialog,\r\n private router: Router,\r\n private cartService: CartService,\r\n private cart1Service: Cart1Service,\r\n public itemsService: ProductService,\r\n public itemsListService: ItemsListService,\r\n public activateroute: ActivatedRoute,\r\n public utilityService: UtilityService,\r\n public persistentService: PersistentService,\r\n public autoshipConfigurationService: AutoshipConfigurationService,\r\n public companyService: CompanyService,\r\n private accountService: AccountService,\r\n private userService: UserService,\r\n private notificationService: NotificationService,\r\n private sidebarNavService: SideNavBarService,\r\n ) {\r\n this.itemTypes = {\r\n pack: {\r\n getItemsCall: \"GetEnrollmentKitItems\",\r\n itemQuantity: \"packQuantity\",\r\n cartItems: \"selectedPacks\",\r\n itemserviceCall: \"getPackItems\",\r\n },\r\n order: {\r\n getItemsCall: \"GetProducts\",\r\n itemQuantity: \"orderQuantity\",\r\n cartItems: \"selectedOrderItems\",\r\n itemserviceCall: \"getOrderItems\",\r\n },\r\n autoship: {\r\n getItemsCall: \"GetAutoshipItems\",\r\n itemQuantity: \"autoshipQuantity\",\r\n cartItems: \"selectedAutoOrderItems\",\r\n itemserviceCall: \"getAutoshipItems\",\r\n },\r\n };\r\n this.env = environment;\r\n\r\n this.itemsService.updateProductDetailPricing.subscribe((res) => {\r\n if(res) {\r\n if(window.location.pathname.includes('product/')) {\r\n this.refreshProduct();\r\n }\r\n }\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n\r\n if(this.product.AllowAutoship) {\r\n this.itemPurchaseSelectionType = 'type-subscribe';\r\n } else {\r\n this.itemPurchaseSelectionType = 'type-one-time';\r\n }\r\n\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_productdetails\") + \" | \" + text,\r\n );\r\n });\r\n this.autoshipConfigurationService.init();\r\n this.setProductsDetails();\r\n }\r\n\r\n ngAfterViewInit() {\r\n // this.config = {\r\n // observer: true,\r\n // direction: \"horizontal\",\r\n // slidesPerView: 3,\r\n // spaceBetween: 10,\r\n // keyboard: true,\r\n // navigation: true,\r\n // pagination: false,\r\n // grabCursor: true,\r\n // loop: false,\r\n // preloadImages: false,\r\n // lazy: true,\r\n // breakpoints: {\r\n // 480: {\r\n // slidesPerView: 1,\r\n // },\r\n // 740: {\r\n // slidesPerView: 2,\r\n // },\r\n // 960: {\r\n // slidesPerView: 3,\r\n // },\r\n // 1280: {\r\n // slidesPerView: 3,\r\n // },\r\n // },\r\n // };\r\n\r\n this.updateGallerySwiper();\r\n \r\n }\r\n\r\n updateGallerySwiper() {\r\n this.GalleryThumbImages = {\r\n spaceBetween: 10,\r\n slidesPerView: 4,\r\n loop: false,\r\n freeMode: true,\r\n watchSlidesVisibility: true,\r\n watchSlidesProgress: true,\r\n slideActiveClass: 'slide-gallery-active'\r\n };\r\n\r\n this.GalleryTopImages = {\r\n spaceBetween: 10,\r\n loop: false,\r\n navigation: {\r\n nextEl: '.swiper-button-next',\r\n prevEl: '.swiper-button-prev',\r\n },\r\n thumbs: {\r\n swiper: Object.assign(this.GalleryThumbImages, {el: '.gallery-thumbs'})\r\n }\r\n };\r\n }\r\n\r\n setProductsDetails() {\r\n this.route.params.subscribe((params) => {\r\n\r\n $(document).ready(() => {\r\n this.updateGallerySwiper();\r\n });\r\n\r\n this.ItemID = params[\"id\"];\r\n this.activateroute.queryParams.subscribe((queryparam) => {\r\n const { storeid } = queryparam;\r\n this.queryparams['storeid'] = storeid;\r\n this.itemType = queryparam.itemtype || queryparam.itemType;\r\n this.router.navigate([\".\"], {\r\n relativeTo: this.route,\r\n queryParams: { itemtype: this.itemType, storeid: storeid },\r\n replaceUrl: true,\r\n });\r\n window.scroll(0, 0);\r\n\r\n this.productsService.allItems = [];\r\n\r\n const request = {};\r\n request['CategoryId'] = \"\";\r\n request['PriceGroup'] = this.userService.userServiceModal.customerTypeID || this.configService.commonData.PurchaseCustomerType.CUSTOMER;\r\n request['StoreID'] = this.configService.commonData.PurchaseStore.RETAIL || storeid;\r\n \r\n this.productsService.getProduct(this.ItemID, request).subscribe((product) => {\r\n\r\n if(!product) {\r\n this.router.navigate(['/products/all']);\r\n }\r\n\r\n this.product = product ? [product] : [];\r\n // console.log(\"product\",this.product);\r\n /** Modify the Images URLs ( push all urls in one KEY { AllImagesUrls} ) */\r\n\r\n try {\r\n\r\n const item = this.product[0];\r\n\r\n //Suggested Products\r\n // this.getRelatedProducts(item);\r\n\r\n // Parse HTML to make Tabs\r\n (item?.Specifications && this.fetchAndParseTabs(item?.Specifications));\r\n\r\n if(item && item.ImageUrl) {\r\n item['AllImagesUrls'] = [];\r\n item?.AllImagesUrls?.push({ url: item.ImageUrl});\r\n if(item.Images.length > 0) {\r\n item.Images.map((image) => item.AllImagesUrls.push({ url: image?.Path}));\r\n }\r\n }\r\n this.product[0] = item;\r\n\r\n // Set Short description\r\n $(document).ready(function(){\r\n const shortDescription = document.querySelector(\".short-description\");\r\n item?.Description && shortDescription && (shortDescription.innerHTML = item.Description);\r\n });\r\n\r\n\r\n } catch (error) {\r\n //\r\n }\r\n\r\n \r\n\r\n /** -------------------------------------------------------- */\r\n\r\n\r\n this.itemsService.selectedOrderItems.filter((x) => {\r\n if (x.ItemID == this.product[0]?.ItemID) {\r\n this.product.Quantity = x.Quantity;\r\n }\r\n });\r\n const dialogData = new ConfirmDialogModel(\r\n this.translate.instant(\"update_product_title\"),\r\n this.translate.instant(\"update_product_text\"),\r\n this.product.length > 0 ? this.translate.instant(\"NO\") : \"\",\r\n this.product.length > 0\r\n ? this.translate.instant(\"YES\")\r\n : this.translate.instant(\"ok_btn\"),\r\n );\r\n if (this.product.length == 0) {\r\n const dialogRef = this.dialog.open(ConfirmDialogComponent, {\r\n maxWidth: \"400px\",\r\n data: dialogData,\r\n autoFocus: false,\r\n });\r\n dialogRef.afterClosed().subscribe((dialogresult) => {\r\n if (dialogresult) {\r\n this.router.navigateByUrl(\"products/all\");\r\n }\r\n });\r\n }\r\n\r\n this.OrderQuantityCount = product && product.Quantity ? product.Quantity : 1;\r\n // this.onItemsSucces(this.product);\r\n // this.setUpOrderOptions(this.product);\r\n\r\n if(this.product.length > 0) {\r\n this.product = this.product[0];\r\n }\r\n\r\n });\r\n });\r\n this.defaultImage = {\r\n Path: \"assets/images/noimage.png\",\r\n Description: this.product ? this.product.Description : \"\",\r\n };\r\n this.CartType = this.itemType || \"order\";\r\n this.type = this.CartType;\r\n });\r\n }\r\n\r\n refreshProduct() {\r\n const request = {\r\n CategoryId: \"all\",\r\n };\r\n\r\n this.productsService.getProductByCategory(request).subscribe((products) => {\r\n if(products) {\r\n this.setProductsDetails();\r\n }\r\n });\r\n }\r\n\r\n public onItemsSucces(result) {\r\n\r\n \r\n this.itemType =\r\n this.type === \"order\"\r\n ? \"order\"\r\n : this.type == \"pack\"\r\n ? \"pack\"\r\n : \"autoship\";\r\n this.itemsService[this.itemType] = result.map((item) => {\r\n item.Price = item.Price || item.Prices[0].Price;\r\n return item;\r\n });\r\n this.itemsListService.products = this.itemsService[this.itemType];\r\n this.itemsListService.type = this.type;\r\n const selectedItem = this.product;\r\n this.products = result.map((item) => {\r\n item.Price = item.Price || item.Prices[0].Price;\r\n return item;\r\n });\r\n if (selectedItem) {\r\n this.products = _.filter(this.products, (product) => {\r\n return product.ItemID != selectedItem.ItemID;\r\n });\r\n }\r\n if (this.ItemID) {\r\n let isItemExists = false;\r\n _.each(result, (item) => {\r\n if (item.HasOptions) {\r\n _.each(item.OptionsMap, (value) => {\r\n if (value.ItemId == this.ItemID) {\r\n item.ItemID = this.ItemID;\r\n return;\r\n }\r\n });\r\n }\r\n if (\r\n isNaN(this.ItemID)\r\n ? (item.ProductName || \"\").toLowerCase().replace(/\\s/g, \"\") ==\r\n this.ItemID.toLowerCase().replace(/\\s/g, \"\")\r\n : item.ItemID == this.ItemID\r\n ) {\r\n isItemExists = true;\r\n this.product = this.transformItem(item);\r\n this.OrderQuantityCount = selectedItem\r\n ? selectedItem.Quantity || 1\r\n : 1;\r\n item.Quantity = selectedItem ? selectedItem.Quantity || 1 : 1;\r\n localStorage.setItem(\"params.type\", this.type);\r\n localStorage.setItem(\r\n \"params.productList\",\r\n JSON.stringify(this.products),\r\n );\r\n }\r\n });\r\n if (!isItemExists) {\r\n this.router.navigate([\"/Products\"]);\r\n }\r\n }\r\n }\r\n public transformItem(item) {\r\n this.isShowShareOptions = false;\r\n item.Price =\r\n item.Price || item.Price === 0\r\n ? item.Price\r\n : item.Prices && item.Prices[0] && item.Prices[0].Price;\r\n item.Images = item.Images || [];\r\n if (item) {\r\n Object.keys(item.Prices).forEach((p: any) => {\r\n if (\r\n p.CurrencyCode &&\r\n p.CurrencyCode.toLowerCase() === \"rwd\" &&\r\n p.Price > 0\r\n ) {\r\n item.UsePoints = true;\r\n }\r\n });\r\n }\r\n if (\r\n item.LargeImageUrl &&\r\n !_.find(item.Images, { Path: item.LargeImageUrl })\r\n ) {\r\n item.Images.unshift({\r\n Description: item.Description,\r\n Path: item.LargeImageUrl,\r\n });\r\n } else if (item.Image && !_.find(item.Images, { Path: item.Image })) {\r\n item.Images.unshift({\r\n Description: item.Description,\r\n Path: item.Image,\r\n });\r\n }\r\n this.isShowShareOptions = true;\r\n return item;\r\n }\r\n\r\n public selectImage(index) {\r\n this.bigProductImageIndex = index;\r\n }\r\n\r\n public increaseQuantity() {\r\n if (this.OrderQuantityCount < 99) {\r\n this.OrderQuantityCount++;\r\n }\r\n }\r\n\r\n public decreaseQuantity() {\r\n if (this.OrderQuantityCount > 1) {\r\n this.OrderQuantityCount--;\r\n }\r\n }\r\n\r\n getRelatedProducts(product) {\r\n const storeID = product.CategoryId === 36 ? 4 : null;\r\n this.productsService\r\n .getRelatedProducts(product, 4, storeID)\r\n .subscribe((result) => {\r\n const Suggestedproducts = result;\r\n this.relatedProducts = Suggestedproducts.filter((element) => element.ItemID !== product.ItemID);\r\n this.relatedProducts.length > 3 && this.relatedProducts.pop();\r\n });\r\n }\r\n\r\n // Add to cart\r\n public addToCart(type, product, purchaseMode?) {\r\n\r\n if(type == \"check-type\") {\r\n this.itemPurchaseSelectionType == 'type-subscribe' \r\n ? (type = 'autoship') \r\n : this.itemPurchaseSelectionType == 'type-one-time' \r\n ? (type = 'order') : 'order';\r\n }\r\n\r\n if(this.itemType == 'pack') {\r\n type = \"pack\";\r\n }\r\n\r\n this.currentQuantity(type, product);\r\n\r\n // If Item is from installment\r\n if(purchaseMode == \"installment\") {\r\n this.buyItemWithInstallment(product);\r\n return;\r\n }\r\n\r\n this.product.Quantity = this.OrderQuantityCount;\r\n\r\n if(type == \"autoship\" || product.ItemID == 'e97') {\r\n this.addToBothCart(product);\r\n } \r\n else if (type == \"order\") {\r\n this.cart1Service.addToCart(product, true, this.getItemCode(product), false, true, false, false);\r\n } \r\n else if (this.itemType == 'pack') {\r\n sessionStorage.setItem('IsMarketCountrySelected', 'true');\r\n this.cart1Service.addToCart(product, true, this.getItemCode(product), false, true, type === \"pack\", false);\r\n }\r\n\r\n this.sidebarNavService.showsideBarSummary = true;\r\n\r\n }\r\n\r\n addToBothCart(product) {\r\n // Autoship\r\n this.cart1Service.addToCart(product, true, this.getItemCode(product), true, true, false, false);\r\n\r\n // Order\r\n this.cart1Service.addToCart(product, true, this.getItemCode(product), false, true, false, false);\r\n }\r\n\r\n public filterItemOptionID(type, product) {\r\n const optionMap = [];\r\n product.OptionsMap.forEach((x) => {\r\n optionMap.push(x.Key);\r\n });\r\n const selectoption = product.selectedOptions\r\n .replace(\"[\", \"\")\r\n .replace(\"]\", \"\")\r\n .split(\",\");\r\n selectoption.forEach((element) => {\r\n optionMap.filter((x, index) => {\r\n if (!x.includes(element.trim())) {\r\n optionMap.splice(index, 9999);\r\n }\r\n });\r\n });\r\n product.OptionsMap.filter((key) => {\r\n if (key.Key == optionMap[0]) {\r\n //\r\n }\r\n });\r\n this.addToCart(type, product);\r\n }\r\n // Add to cart\r\n public buyNow(product, quantity) {\r\n if (quantity > 0) {\r\n this.cartService.addToCart(product, parseInt(quantity, 10));\r\n this.router.navigate([\"/checkout\"]);\r\n }\r\n }\r\n\r\n public onMouseMove(e) {\r\n if (window.innerWidth >= 1280) {\r\n const image = e.currentTarget;\r\n const offsetX = e.offsetX;\r\n const offsetY = e.offsetY;\r\n const x = (offsetX / image.offsetWidth) * 100;\r\n const y = (offsetY / image.offsetHeight) * 100;\r\n const zoomer = this.zoomViewer.nativeElement.children[0];\r\n if (zoomer) {\r\n zoomer.style.backgroundPosition = x + \"% \" + y + \"%\";\r\n zoomer.style.display = \"block\";\r\n zoomer.style.height = image.height + \"px\";\r\n zoomer.style.width = image.width + \"px\";\r\n }\r\n }\r\n }\r\n\r\n onMouseLeave() {\r\n this.zoomViewer.nativeElement.children[0].style.display = \"none\";\r\n }\r\n\r\n getPrice(item, quantity) {\r\n if (quantity < 1) {\r\n this.OrderQuantityCount = 1;\r\n }\r\n\r\n // Subscription Price\r\n if(this.itemPurchaseSelectionType == \"type-subscribe\") {\r\n return item && item.AllowAutoship ? (item.AutoshipPrice * quantity) : (item.Price || (item.Prices && item.Prices[0].Price)) * quantity;\r\n }\r\n\r\n return item\r\n ? (item.Price || (item.Prices && item.Prices[0].Price)) * quantity\r\n : 0;\r\n }\r\n checkOptions(option) {\r\n let count = 0;\r\n this.value.forEach((item) => {\r\n if (item) {\r\n count++;\r\n }\r\n });\r\n\r\n this.isOptionsSelected = count === option.length;\r\n }\r\n currentQuantity(type, item) {\r\n type = type || this.itemType;\r\n this.cart1Service[this.itemTypes[type].itemQuantity] =\r\n this.cart1Service[this.itemTypes[type].itemQuantity] || {}; // TODO::check if needed\r\n this.cart1Service[this.itemTypes[type].itemQuantity][\r\n this.getItemCode(item)\r\n ] = this.OrderQuantityCount;\r\n }\r\n\r\n setUpOrderOptions(item) {\r\n if (!this.orderOptions) {\r\n this.orderOptions = {};\r\n }\r\n\r\n const dict = this.orderOptions;\r\n\r\n // If editing an item with selected customizations, find them and set the dropdowns\r\n let optionsMap;\r\n _.each(item.OptionsMap, (val) => {\r\n val.OptionNames = val.Key.split(\"|\");\r\n });\r\n if (item.selectedOptions) {\r\n item.OptionsMap.some((optMap) => {\r\n if (optMap.ItemId === (item.KitCustomItemCode || item.ItemID)) {\r\n optionsMap = optMap.OptionNames;\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n\r\n // Otherwise, default to the first options map\r\n const optionMapNames = item.OptionsMap\r\n ? item.OptionsMap.map((optMap) => {\r\n return optMap.OptionNames;\r\n })\r\n : [];\r\n\r\n if (!item.selectedOptions || !optionsMap) {\r\n optionsMap = optionMapNames[0];\r\n }\r\n\r\n // Loop through the OptionsMap\r\n let optionVal;\r\n let optionValues;\r\n for (const index in optionsMap) {\r\n if (Object.prototype.hasOwnProperty.call(optionsMap, index)) {\r\n optionVal = optionsMap[index];\r\n // For each option in the OptionsMap, loop through the ItemOptions\r\n for (const itemIndex in item.ItemOptions) {\r\n // Get all the values of the ItemOption\r\n if (\r\n Object.prototype.hasOwnProperty.call(item.ItemOptions, itemIndex)\r\n ) {\r\n optionValues =\r\n item.ItemOptions[itemIndex].Values.map(getOptionValueName);\r\n // If one of them is the value from the OptionsMap, use it\r\n const option = item.ItemOptions[itemIndex];\r\n if (\r\n !!~optionValues.indexOf(optionVal) &&\r\n !dict[this.getOrderOptionKey(item, option)]\r\n ) {\r\n dict[this.getOrderOptionKey(item, option)] = optionVal;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getOptionValueName(val) {\r\n return val.Option;\r\n }\r\n }\r\n\r\n // change active image\r\n setActiveImage(image) {\r\n this.ezpModel = {\r\n small: image.Path || this.defaultImage.Path,\r\n large: image.Path || this.defaultImage.Path,\r\n };\r\n setTimeout(() => {\r\n this.activeImage = image;\r\n }, 1);\r\n }\r\n\r\n selectOption(item, option, value, isKitItem) {\r\n option.selected = value.Option;\r\n this.orderOptions[this.getOrderOptionKey(item, option)] = value.Option;\r\n const tempOptData = [];\r\n Object.keys(this.orderOptions).forEach((optdata) => {\r\n tempOptData.push(optdata);\r\n }),\r\n item.OptionsMap.forEach((itemOptdata) => {\r\n if (\r\n JSON.stringify(tempOptData.sort()) ===\r\n JSON.stringify(itemOptdata.OptionNames.sort())\r\n ) {\r\n let tempimgurl = item.SmallImageUrl;\r\n if (itemOptdata.Image) {\r\n tempimgurl = item.SmallImageUrl.substr(\r\n 0,\r\n item.SmallImageUrl.lastIndexOf(\"/\"),\r\n ).concat(itemOptdata.Image);\r\n }\r\n const tempimage = {\r\n Path: tempimgurl,\r\n };\r\n this.setActiveImage(tempimage);\r\n }\r\n });\r\n // item.OptionsMap.filter((itemOptdata) => {\r\n this.itemsService.selectedOrderItems.filter((item) => {\r\n item.ItemOptions.filter((i) => {\r\n if (i.selected == option.selected) {\r\n this.OrderQuantityCount = item.Quantity;\r\n }\r\n });\r\n });\r\n // })\r\n\r\n if (isKitItem) {\r\n item.KitCustomItemCode = this.getItemCode(item);\r\n }\r\n }\r\n\r\n setInitialItemOption(option, value) {\r\n const defaultOption =\r\n this.orderOptions[this.getOrderOptionKey(this.product, option)] ||\r\n option.Option;\r\n if (value.Option === defaultOption) {\r\n option.selected = value.Option;\r\n }\r\n }\r\n\r\n getOrderOptionKey(item, option) {\r\n return item.ItemID + \"__\" + option.Option;\r\n }\r\n\r\n // Determine what values are available based on what's already been selected\r\n getValidValues(item, option, values) {\r\n // Get the already-selected option values (except this one and values from other items)\r\n const currentOption = this.getOrderOptionKey(item, option);\r\n const otherOptions = [];\r\n for (const key in this.orderOptions) {\r\n if (\r\n key === currentOption ||\r\n item.ItemID.toString() !== key.split(\"__\")[0]\r\n ) {\r\n continue;\r\n }\r\n otherOptions.push(this.orderOptions[key]);\r\n }\r\n // Whittle down the OptionMaps to the ones that have all the already-selected options\r\n const optionMapNames = item.OptionsMap\r\n ? item.OptionsMap.map((optMap) => {\r\n return optMap.OptionNames;\r\n })\r\n : [];\r\n const validOptionMaps = optionMapNames.filter((optNames) => {\r\n // For each OptionMap, ensure that it contains all the other selected options\r\n let optionValue1;\r\n for (const index in otherOptions) {\r\n if (Object.prototype.hasOwnProperty.call(otherOptions, index)) {\r\n optionValue1 = otherOptions[index];\r\n if (~optNames.indexOf(optionValue1)) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n // Union the validOptionMaps\r\n const validOptionValues = validOptionMaps.reduce((arr, optMap) => {\r\n let optionName;\r\n for (const index in optMap) {\r\n if (Object.prototype.hasOwnProperty.call(optMap, index)) {\r\n optionName = optMap[index];\r\n if (!~arr.indexOf(optionName)) {\r\n arr.push(optionName);\r\n }\r\n }\r\n }\r\n return arr;\r\n }, []);\r\n\r\n // Set `isAvailable: true` on each option that can be found in validOptionNames, and `isAvailable: false` on the others\r\n let optionValue;\r\n for (const index in values) {\r\n if (Object.prototype.hasOwnProperty.call(values, index)) {\r\n optionValue = values[index];\r\n optionValue.isAvailable = !!~validOptionValues.indexOf(\r\n optionValue.Option,\r\n );\r\n }\r\n }\r\n\r\n // return the original values\r\n return values.filter((itm) => {\r\n return itm.isAvailable;\r\n });\r\n }\r\n\r\n getOptionsText(optionValArray) {\r\n return \"[\" + optionValArray.join(\", \") + \"]\";\r\n }\r\n\r\n getItemCode(item) {\r\n // If there are no customizations, just return the item code\r\n if (!item.ItemOptions || !item.ItemOptions.length || !item.HasOptions) {\r\n return this.product.ItemID;\r\n }\r\n\r\n // If there are customizations, find the right OptionsMap and use its code\r\n const optionValues = [];\r\n for (const key in this.orderOptions) {\r\n if (\r\n !Object.prototype.hasOwnProperty.call(this.orderOptions, key) ||\r\n item.ItemID.toString() !== key.split(\"__\")[0]\r\n ) {\r\n continue;\r\n }\r\n\r\n optionValues.push(this.orderOptions[key]);\r\n }\r\n\r\n optionValues.sort();\r\n\r\n item.selectedOptions = this.getOptionsText(optionValues);\r\n\r\n if (item.HasKitOptions) {\r\n item.KitGroups.forEach((kitGroup) => {\r\n kitGroup.Items.forEach(this.getItemCode);\r\n });\r\n }\r\n\r\n let mapping;\r\n for (const index in item.OptionsMap) {\r\n if (Object.prototype.hasOwnProperty.call(item.OptionsMap, index)) {\r\n mapping = item.OptionsMap[index];\r\n mapping.OptionNames.sort();\r\n if (_.isEqual(optionValues, mapping.OptionNames)) {\r\n return mapping.ItemId;\r\n }\r\n }\r\n }\r\n\r\n throw new Error(\r\n \"Error: \" +\r\n item.ProductName +\r\n \" does not have a mapping for \" +\r\n optionValues.toString() +\r\n \".\",\r\n );\r\n }\r\n\r\n openSelect(event) {\r\n this.event = event || this.event;\r\n // this is due to select input fields are not consistant in some browser\r\n if (window.screen.availWidth < 600 && !event) {\r\n setTimeout(() => {}, 100);\r\n }\r\n }\r\n\r\n hideAddToCart(item, isAutoShip = false) {\r\n if (!this.utilityService.isEmptyObject(item)) {\r\n const itemId = this.getItemCode(item);\r\n let isOrderAllow = false;\r\n if (item.OptionsMap?.length > 0 && isAutoShip) {\r\n _.each(item.OptionsMap, (value) => {\r\n if (value.ItemId == itemId) {\r\n if (isAutoShip) {\r\n isOrderAllow = item.AllowAutoship; // ? value.AllowAutoship : false;\r\n } else {\r\n isOrderAllow = value.isAllowOrder;\r\n }\r\n }\r\n });\r\n } else if (isAutoShip) {\r\n return item.AllowAutoship;\r\n } else {\r\n return item.isAllowOrder;\r\n }\r\n return isOrderAllow;\r\n }\r\n }\r\n getAllProductsCategories() {\r\n this.selectedCategory = { CategoryId: \"all\" };\r\n this.productsService\r\n .getProductByCategory(this.selectedCategory)\r\n .subscribe((products) => {\r\n this.productsService.orders = products.map((item) => {\r\n item.Price =\r\n item.Price ||\r\n (item.Prices && item.Prices[0] && item.Prices[0].Price);\r\n return item;\r\n });\r\n\r\n const uniqueItems = _.uniqBy(products, (x) => x.CategoryId);\r\n let uniqueRequireProduct = [];\r\n if (\r\n this.configService.localSettings.Global.CategoriesToFetch?.length > 0\r\n ) {\r\n uniqueItems.filter((x) => {\r\n if (\r\n this.configService.localSettings.Global.CategoriesToFetch.indexOf(\r\n x.Category,\r\n ) > -1\r\n ) {\r\n uniqueRequireProduct.push(x);\r\n }\r\n });\r\n } else {\r\n uniqueRequireProduct = [...uniqueItems];\r\n }\r\n this.itemsListService.selectedCategories = {};\r\n if (this.selectedCategory.Category == \"all\") {\r\n this.itemsListService.selectedCategories[\"all\"] = true;\r\n }\r\n this.itemsListService.categoryList = _.map(\r\n uniqueRequireProduct,\r\n (object) => {\r\n return _.pick(object, [\"CategoryId\", \"Category\"]);\r\n },\r\n );\r\n this.itemsListService.products = this.productsService.orders;\r\n this.itemsListService.type = \"order\";\r\n this.itemsListService.getItemsByCategory(\r\n this.selectedCategory.Category,\r\n );\r\n\r\n this.products = this.itemsListService.productList.slice(0.8);\r\n this.allItems = this.itemsListService.categoryList;\r\n this.healthBeautyProducts();\r\n });\r\n }\r\n healthBeautyProducts() {\r\n this.itemsListService.getItemsByCategory(this.allItems[0].Category);\r\n this.healthBeautyProduct = this.itemsListService.productList.slice(0, 3);\r\n }\r\n addProduct(item) {\r\n if (item.ItemOptions.length > 0) {\r\n this.router.navigate([\"/product\", item.ItemID]);\r\n } else {\r\n this.OrderQuantityCount = item && item.Quantity ? item.Quantity : 1;\r\n if (this.cart1Service[\"orderQuantity\"][item.ItemID] >= 1) {\r\n this.increaseQuantiy(\"order\", item);\r\n } else {\r\n this.cart1Service[\"orderQuantity\"][item.ItemID] =\r\n this.OrderQuantityCount;\r\n this.cart1Service.addToCart(\r\n item,\r\n true,\r\n item.ItemID,\r\n false,\r\n false,\r\n false,\r\n true,\r\n );\r\n }\r\n }\r\n }\r\n increaseQuantiy(type, item) {\r\n this.cart1Service.increaseQuantiy(item, type == \"autoship\", type == \"pack\");\r\n }\r\n mouseEnter(index) {\r\n document.getElementById(\"btn\" + index).classList.add(\"faded-in\");\r\n document.getElementById(\"btn\" + index).classList.remove(\"faded-out\");\r\n setTimeout(() => {\r\n document.getElementById(\"btn\" + index).style.opacity = \"1\";\r\n // document.getElementById('product'+index).style.opacity = \"0\"\r\n // document.getElementById('products'+index).style.opacity = \"1\"\r\n }, 590);\r\n }\r\n mouseOut(index) {\r\n document.getElementById(\"btn\" + index).classList.add(\"faded-out\");\r\n // document.getElementById('product'+index).classList.remove(\"productIn\")\r\n // if (index < 3) {\r\n // (document.getElementById('product'+index)).src = this.productImages[index].url;\r\n // } else if(index < 10){\r\n // (document.getElementById('product'+index)).src = this.mensProduct[(index-4)].url;\r\n // }else{\r\n // (document.getElementById('product'+index)).src = this.newProduct[(index-10)].url;\r\n\r\n // }\r\n setTimeout(() => {\r\n document.getElementById(\"btn\" + index).style.opacity = \"0\";\r\n // document.getElementById('products'+index).style.opacity = \"0\"\r\n // document.getElementById('product'+index).style.opacity = \"1\"\r\n }, 590);\r\n document.getElementById(\"btn\" + index).classList.remove(\"faded-in\");\r\n }\r\n goToShop(id) {\r\n this.router.navigate([\"/product\", id]);\r\n window.scroll(0, 0);\r\n }\r\n goToslider(id) {\r\n this.dialog.open(FlickityComponent, {\r\n data: { id: id },\r\n disableClose: true,\r\n panelClass: \"slider-dialog\",\r\n autoFocus: false,\r\n });\r\n }\r\n\r\n isInstallmentAllowed(product) {\r\n let isAllowed = false;\r\n if(product.Custom?.Field1?.endsWith(`${product.SKU}-i`) && product.Custom?.Field2?.endsWith(`${product.SKU}-ins`)) {\r\n isAllowed = true;\r\n }\r\n return isAllowed;\r\n }\r\n\r\n buyItemWithInstallment(product) {\r\n if(this.isInstallmentAllowed(product)) {\r\n //\r\n const item1 = this.itemsService.allItems?.find((item) => item.SKU == `${product.SKU}-i`);\r\n const item2 = this.itemsService.allItems?.find((item) => item.SKU == `${product.SKU}-ins`);\r\n\r\n if(!item1 || !item2) {\r\n this.notificationService.error(\"Error\", \"Something went wrong, please try without installments\");\r\n }\r\n\r\n // Inserting record for future reference\r\n if(!this.cart1Service.ReplacementsItemsInCart['ItemsMapping'][`${product.SKU}`]) {\r\n this.cart1Service.ReplacementsItemsInCart['ItemsMapping'][`${product.SKU}`] = [item1, item2];\r\n }\r\n\r\n if(!this.cart1Service.ReplacementsItemsInCart['PeriodMapping'][`${product.SKU}`]) {\r\n this.cart1Service.ReplacementsItemsInCart['PeriodMapping'][`${product.SKU}`] = this.getInstallmentsNumber(product);\r\n }\r\n\r\n localStorage.setItem(\"cart.replacementItems\",\r\n JSON.stringify(this.cart1Service.ReplacementsItemsInCart),\r\n );\r\n \r\n // Normal Add to cart ( item 1 and item 2 )\r\n this.cart1Service.addToCart(item1, true, item1.ItemID, false, false, false, false);\r\n\r\n setTimeout(() => {\r\n this.cart1Service.addToCart(item2, true, item2.ItemID, false, false, false, false);\r\n }, 2500);\r\n\r\n // Autoship Add to cart ( for item 2)\r\n setTimeout(() => {\r\n this.cart1Service.addToCart(item2, true, item2.ItemID, true, false, false, false);\r\n }, 1500);\r\n\r\n this.sidebarNavService.showsideBarSummary = true;\r\n\r\n }\r\n }\r\n \r\n RedirectToDetailPage(){\r\n const ProductCode = this.activateroute.snapshot.paramMap.get('id');\r\n this.router.navigate([\"/product/\", ProductCode]);\r\n }\r\n\r\n ngOnDestroy() {\r\n this.OrderQuantityCount = 1;\r\n this.cart1Service.resetItemQuantities();\r\n }\r\n\r\n getInstallmentsNumber(item) {\r\n const Field1 = item.Custom?.Field1?.split(\"_\");\r\n return (Field1 && (+Field1[0])) || null;\r\n }\r\n\r\n todaysInstallmentAmount(product, OrderQuantityCount) {\r\n const price = this.getPrice(product, OrderQuantityCount);\r\n const count = this.getInstallmentsNumber(product);\r\n\r\n if( price > 0 && count > 0) {\r\n return (price / count) || 0;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n copyProductLink() {\r\n const url = window.location.href;\r\n navigator.clipboard.writeText(url)\r\n .then(() => {\r\n this.notificationService.success(\"Success\", \"Link copied to clipboard!\");\r\n });\r\n }\r\n\r\n AddSuggestedProductToCart(item) {\r\n\r\n // Fetching that product from ALL products, then adding.\r\n\r\n const product = this.itemsService.allItems.find((i) => i.ItemID == item.ItemID);\r\n if(!product) {\r\n this.router.navigate(['/product', item.ItemID]);\r\n return;\r\n }\r\n\r\n this.cart1Service.addToCart(product, true, \"\", false, false, false, false);\r\n this.sidebarNavService.showsideBarSummary = true;\r\n }\r\n\r\n fetchAndParseTabs(SerializedHTML){\r\n\r\n try {\r\n\r\n const parser = new DOMParser();\r\n const doc = parser.parseFromString(SerializedHTML, 'text/html');\r\n \r\n const tabSections = doc.querySelectorAll('.5star-tab-section');\r\n const tabData = [];\r\n \r\n tabSections.forEach(section => {\r\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n //@ts-ignore\r\n const title = section.querySelector('.5star-tab-title')?.innerText;\r\n const content = section.querySelector('.5star-tab-content')?.innerHTML || \"\";\r\n tabData.push({ title, content });\r\n });\r\n \r\n console.log(\"tabData\", tabData);\r\n \r\n this.ProductSpecification = tabData;\r\n\r\n } catch(err) {\r\n this.ProductSpecification = [];\r\n }\r\n\r\n }\r\n}","import { Pipe, PipeTransform } from \"@angular/core\";\r\n\r\n@Pipe({\r\n name: \"productSearch\",\r\n pure: false,\r\n})\r\nexport class ProductSearchPipe implements PipeTransform {\r\n \r\n transform(items, filter: string, filterOptions?: any) {\r\n\r\n if (!items || (!filter && (filterOptions && !filterOptions[\"best-seller\"] && !filterOptions[\"new\"]))) {\r\n return items;\r\n }\r\n\r\n let filteredItems = [];\r\n const searchedItems = [];\r\n const isBestsellerChecked = filterOptions && filterOptions[\"best-seller\"];\r\n const isNewChecked = filterOptions && filterOptions[\"new\"];\r\n\r\n const removeDuplicates = (arr) => {\r\n const uniqueItems = {};\r\n const result = [];\r\n \r\n arr.forEach(item => {\r\n if (!uniqueItems[item.ItemID]) {\r\n uniqueItems[item.ItemID] = true;\r\n result.push(item);\r\n }\r\n });\r\n \r\n return result;\r\n };\r\n\r\n items.map(i => {\r\n\r\n // Searching By Name\r\n if((i.ProductName?.toLowerCase().indexOf(filter.toLowerCase()) > -1 ||\r\n i.Description?.toLowerCase().indexOf(filter.toLowerCase()) > -1 ||\r\n i.SKU?.toLowerCase().indexOf(filter.toLowerCase()) > -1)) {\r\n searchedItems.push(i);\r\n }\r\n\r\n filteredItems = searchedItems;\r\n\r\n if (isBestsellerChecked && isNewChecked) {\r\n filteredItems = searchedItems.filter(product => product.Custom?.Field3 || product.Custom?.Field4);\r\n } else if (isBestsellerChecked) {\r\n filteredItems = searchedItems.filter(product => product.Custom?.Field3);\r\n } else if (isNewChecked) {\r\n filteredItems = searchedItems.filter(product => product.Custom?.Field4);\r\n }\r\n \r\n });\r\n \r\n filteredItems = removeDuplicates(filteredItems);\r\n \r\n return filteredItems;\r\n \r\n }\r\n}\r\n","
\r\n\r\n
\r\n \r\n
\r\n

Choose Variant

\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n

Choose {{option.Option}}

\r\n \r\n \r\n \r\n {{validValue.Option}} \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n Add to cart\r\n
\r\n\r\n
\r\n
\r\n\r\n
","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\r\nimport { Router } from '@angular/router';\r\nimport * as _ from \"lodash\";\r\nimport { Cart1Service } from '../../services/cart1.service';\r\nimport { SideNavBarService } from '../../services/sidenavbar.service';\r\n\r\n@Component({\r\n selector: 'app-variant-selection',\r\n templateUrl: './variant-selection.component.html',\r\n styleUrls: ['./variant-selection.component.scss']\r\n})\r\nexport class VariantSelectionComponent implements OnInit {\r\n product: any;\r\n productOptions: any = [];\r\n VariantMapping = {};\r\n constructor(\r\n public dialogRef: MatDialogRef,\r\n private router: Router,\r\n private cart1Service: Cart1Service,\r\n private sidenavBarService: SideNavBarService,\r\n @Inject(MAT_DIALOG_DATA) public data\r\n ) { \r\n const { item } = data;\r\n if(!item) {\r\n router.navigate([\"/home\"]);\r\n }\r\n this.product = item || {};\r\n this.productOptions = item.ItemOptions || [];\r\n\r\n if(this.product) {\r\n this.setUpOrderOptions(this.product);\r\n }\r\n }\r\n\r\n value = [];\r\n isOptionsSelected: boolean;\r\n event;\r\n public orderOptions;\r\n\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n setUpOrderOptions(item) {\r\n if (!this.orderOptions) {\r\n this.orderOptions = {};\r\n }\r\n\r\n const dict = this.orderOptions;\r\n\r\n // If editing an item with selected customizations, find them and set the dropdowns\r\n let optionsMap;\r\n _.each(item.OptionsMap, (val) => {\r\n val.OptionNames = val.Key.split(\"|\");\r\n });\r\n if (item.selectedOptions) {\r\n item.OptionsMap.some((optMap) => {\r\n if (optMap.ItemId === (item.KitCustomItemCode || item.ItemID)) {\r\n optionsMap = optMap.OptionNames;\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n\r\n // Otherwise, default to the first options map\r\n const optionMapNames = item.OptionsMap\r\n ? item.OptionsMap.map((optMap) => {\r\n return optMap.OptionNames;\r\n })\r\n : [];\r\n\r\n if (!item.selectedOptions || !optionsMap) {\r\n optionsMap = optionMapNames[2];\r\n }\r\n\r\n // Loop through the OptionsMap\r\n let optionVal;\r\n let optionValues;\r\n for (const index in optionsMap) {\r\n if (Object.prototype.hasOwnProperty.call(optionsMap, index)) {\r\n optionVal = optionsMap[index];\r\n // For each option in the OptionsMap, loop through the ItemOptions\r\n for (const itemIndex in item.ItemOptions) {\r\n // Get all the values of the ItemOption\r\n if (\r\n Object.prototype.hasOwnProperty.call(item.ItemOptions, itemIndex)\r\n ) {\r\n optionValues =\r\n item.ItemOptions[itemIndex].Values.map(getOptionValueName);\r\n // If one of them is the value from the OptionsMap, use it\r\n const option = item.ItemOptions[itemIndex];\r\n if (\r\n !!~optionValues.indexOf(optionVal) &&\r\n !dict[this.getOrderOptionKey(item, option)]\r\n ) {\r\n dict[this.getOrderOptionKey(item, option)] = optionVal;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n function getOptionValueName(val) {\r\n return val.Option;\r\n }\r\n }\r\n\r\n checkOptions(option) {\r\n let count = 0;\r\n this.value.forEach((item) => {\r\n if (item) {\r\n count++;\r\n }\r\n });\r\n\r\n this.isOptionsSelected = count === option.length;\r\n console.log(\"getItemCode\", this.getItemCode(this.product));\r\n \r\n }\r\n\r\n openSelect(event) {\r\n this.event = event || this.event;\r\n // this is due to select input fields are not consistant in some browser\r\n if (window.screen.availWidth < 600 && !event) {\r\n setTimeout(() => {}, 100);\r\n }\r\n }\r\n\r\n getOrderOptionKey(item, option) {\r\n return item.ItemID + \"__\" + option.Option;\r\n }\r\n\r\n // Determine what values are available based on what's already been selected\r\n getValidValues(item, option, values) {\r\n // Get the already-selected option values (except this one and values from other items)\r\n const currentOption = this.getOrderOptionKey(item, option);\r\n const otherOptions = [];\r\n for (const key in this.orderOptions) {\r\n if (\r\n key === currentOption ||\r\n item.ItemID.toString() !== key.split(\"__\")[0]\r\n ) {\r\n continue;\r\n }\r\n otherOptions.push(this.orderOptions[key]);\r\n }\r\n // Whittle down the OptionMaps to the ones that have all the already-selected options\r\n const optionMapNames = item.OptionsMap\r\n ? item.OptionsMap.map((optMap) => {\r\n return optMap.OptionNames;\r\n })\r\n : [];\r\n const validOptionMaps = optionMapNames.filter((optNames) => {\r\n // For each OptionMap, ensure that it contains all the other selected options\r\n let optionValue1;\r\n for (const index in otherOptions) {\r\n if (Object.prototype.hasOwnProperty.call(otherOptions, index)) {\r\n optionValue1 = otherOptions[index];\r\n if (~optNames.indexOf(optionValue1)) {\r\n continue;\r\n }\r\n return false;\r\n }\r\n }\r\n return true;\r\n });\r\n\r\n // Union the validOptionMaps\r\n const validOptionValues = validOptionMaps.reduce((arr, optMap) => {\r\n let optionName;\r\n for (const index in optMap) {\r\n if (Object.prototype.hasOwnProperty.call(optMap, index)) {\r\n optionName = optMap[index];\r\n if (!~arr.indexOf(optionName)) {\r\n arr.push(optionName);\r\n }\r\n }\r\n }\r\n return arr;\r\n }, []);\r\n\r\n // Set `isAvailable: true` on each option that can be found in validOptionNames, and `isAvailable: false` on the others\r\n let optionValue;\r\n for (const index in values) {\r\n if (Object.prototype.hasOwnProperty.call(values, index)) {\r\n optionValue = values[index];\r\n optionValue.isAvailable = !!~validOptionValues.indexOf(\r\n optionValue.Option,\r\n );\r\n }\r\n }\r\n\r\n // return the original values\r\n return values.filter((itm) => {\r\n return itm.isAvailable;\r\n });\r\n } \r\n\r\n setInitialItemOption(option, value) {\r\n const defaultOption =\r\n this.orderOptions[this.getOrderOptionKey(this.product, option)] ||\r\n option.Option;\r\n if (value.Option === defaultOption) {\r\n option.selected = value.Option;\r\n }\r\n }\r\n\r\n selectOption(item, option, value, isKitItem) {\r\n option.selected = value.Option;\r\n this.orderOptions[this.getOrderOptionKey(item, option)] = value.Option;\r\n const tempOptData = [];\r\n Object.keys(this.orderOptions).forEach((optdata) => {\r\n tempOptData.push(optdata);\r\n });\r\n\r\n if (isKitItem) {\r\n item.KitCustomItemCode = this.getItemCode(item);\r\n }\r\n }\r\n\r\n getItemCode(item) {\r\n // If there are no customizations, just return the item code\r\n if (!item.ItemOptions || !item.ItemOptions.length || !item.HasOptions) {\r\n return this.product.ItemID;\r\n }\r\n\r\n // If there are customizations, find the right OptionsMap and use its code\r\n const optionValues = [];\r\n for (const key in this.orderOptions) {\r\n if (\r\n !Object.prototype.hasOwnProperty.call(this.orderOptions, key) ||\r\n item.ItemID.toString() !== key.split(\"__\")[0]\r\n ) {\r\n continue;\r\n }\r\n\r\n optionValues.push(this.orderOptions[key]);\r\n }\r\n\r\n optionValues.sort();\r\n\r\n item.selectedOptions = this.getOptionsText(optionValues);\r\n\r\n if (item.HasKitOptions) {\r\n item.KitGroups.forEach((kitGroup) => {\r\n kitGroup.Items.forEach(this.getItemCode);\r\n });\r\n }\r\n\r\n let mapping;\r\n for (const index in item.OptionsMap) {\r\n if (Object.prototype.hasOwnProperty.call(item.OptionsMap, index)) {\r\n mapping = item.OptionsMap[index];\r\n mapping.OptionNames.sort();\r\n if (_.isEqual(optionValues, mapping.OptionNames)) {\r\n return mapping.ItemId;\r\n }\r\n }\r\n }\r\n\r\n throw new Error(\r\n \"Error: \" +\r\n item.ProductName +\r\n \" does not have a mapping for \" +\r\n optionValues.toString() +\r\n \".\",\r\n );\r\n }\r\n\r\n getOptionsText(optionValArray) {\r\n return \"[\" + optionValArray.join(\", \") + \"]\";\r\n }\r\n\r\n addToCart(product) {\r\n\r\n this.cart1Service.addToCart(\r\n product,\r\n true,\r\n this.getItemCode(product),\r\n false,\r\n false,\r\n false,\r\n false,\r\n );\r\n this.dialogRef.close();\r\n this.sidenavBarService.showsideBarSummary = true;\r\n }\r\n\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\n@Pipe({\r\n name: \"productOrderBy\",\r\n})\r\nexport class ProductOrderByPipe implements PipeTransform {\r\n transform(array, val) {\r\n if (!val) {\r\n return array;\r\n }\r\n\r\n // ascending\r\n if (val.sorttype == \"desc\") {\r\n return Array.from(array).sort((item1, item2) => {\r\n return this.orderByComparator(item1[val.sortby], item2[val.sortby]);\r\n });\r\n } else if (val.sorttype == \"asc\") {\r\n // desc\r\n return Array.from(array).sort((item1, item2) => {\r\n return this.orderByComparator(item2[val.sortby], item1[val.sortby]);\r\n });\r\n }\r\n }\r\n\r\n orderByComparator(a, b): number {\r\n if (\r\n isNaN(parseFloat(a)) ||\r\n !isFinite(a) ||\r\n isNaN(parseFloat(b)) ||\r\n !isFinite(b)\r\n ) {\r\n // Isn't a number so lowercase the string to properly compare\r\n if (a.toLowerCase() < b.toLowerCase()) {\r\n return -1;\r\n }\r\n if (a.toLowerCase() > b.toLowerCase()) {\r\n return 1;\r\n }\r\n } else {\r\n // Parse strings as numbers to compare properly\r\n if (parseFloat(a) < parseFloat(b)) {\r\n return -1;\r\n }\r\n if (parseFloat(a) > parseFloat(b)) {\r\n return 1;\r\n }\r\n }\r\n return 0; // equal each other\r\n }\r\n}\r\n","\r\n\r\n
\r\n\r\n \r\n\r\n
\r\n \r\n \r\n\r\n \r\n \r\n
\r\n \r\n
\r\n\r\n
\r\n\r\n 0\"\r\n (load)=\"BuilderConfigurations.noBuilderPageForUrl = $event ? false : true\"\r\n (error)=\"BuilderConfigurations.noBuilderPageForUrl = true\"\r\n model=\"shop-page-products-list\" [data]=\"BuilderConfigurations.data\"\r\n [options]=\"BuilderConfigurations.options\" [context]=\"BuilderConfigurations.context\">\r\n \r\n\r\n
\r\n No Products found!!\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n {{ slide.button1.text }}\r\n
\r\n
\r\n {{ slide.button2.text }}\r\n
\r\n
\r\n {{ slide.button3.text }}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n {{keys.name | translate}} -\r\n {{keys.lname\r\n | translate}}\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n FILTER BY:\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n {{option.title}}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
Shop By Category
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{'shop_all_' | translate}}\r\n
\r\n
\r\n {{category.Category}}\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
0\">\r\n
\r\n
\r\n
Popular Products
\r\n
\r\n
\r\n \r\n
\r\n \"\"\r\n\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n {{product.ProductName}}\r\n\r\n \r\n {{ product?.Price |\r\n currency: companyService.selectedCurrency.CurrencyCode: 'symbol':'1.2-2' }}\r\n N/A\r\n\r\n \r\n
\r\n
Add
\r\n
Details
\r\n
\r\n
\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n search\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
0)}\" class=\"m-t-10 height-fit-content\"\r\n fxLayout=\"row wrap\" fxLayoutAlign=\"flex-start flex-start\" fxLayoutGap.gt-md=\"27px\">\r\n \r\n
\r\n \"\"\r\n\r\n \r\n
\r\n
\r\n
\r\n\r\n\r\n \r\n {{product.ProductName}}\r\n \r\n from\r\n {{product.oldPrice}} \r\n {{'$'+ (product.Price | number: '1.2-2') }}\r\n \r\n\r\n\r\n \r\n\r\n
\r\n
\r\n {{product.ProductName}}\r\n\r\n \r\n {{ product?.Price | currency:\r\n companyService.selectedCurrency.CurrencyCode: 'symbol':'1.2-2' }}\r\n N/A\r\n\r\n \r\n
\r\n
Add
\r\n
Details
\r\n
\r\n
\r\n\r\n \r\n\r\n\r\n
\r\n
\r\n

Sale

\r\n
\r\n
\r\n
\r\n
\r\n Loading Products...\r\n
\r\n
\r\n No Products found!!\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n\r\n\r\n \r\n\r\n\r\n \r\n \r\n
\r\n
\r\n

Featured collection

\r\n
\r\n
\r\n
\r\n \"\"\r\n \r\n
\r\n
\r\n
\r\n

{{product.ProductName}}

\r\n

{{product.oldPrice}} \r\n {{'$'+product.Price}}

\r\n
\r\n
\r\n

Sale

\r\n
\r\n
\r\n
\r\n
\r\n No Products found!!\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \"image\"\r\n
\r\n
\r\n

\r\n FAVOURITES\r\n

\r\n

Best Sellers

\r\n

Shop our best selling collection - everything from the perfect pair of tights, to\r\n totally\r\n matching sweat suits.

\r\n

Shop now

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n\r\n
","import { Component, OnInit, QueryList, ViewChildren } from \"@angular/core\";\r\nimport { ProductService } from \"src/app/components/shared/services/product.service\";\r\nimport { ActivatedRoute, Params, Router } from \"@angular/router\";\r\nimport { ColorFilter } from \"src/app/modals/product.model\";\r\nimport { FormGroup } from \"@angular/forms\";\r\nimport { ConfigService } from \"src/app/components/shared/services/config.service\";\r\nimport { DSProduct } from \"src/app/modals/dsproduct.modal\";\r\nimport { UtilityService } from \"src/app/components/shared/services/utility.service\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport * as _ from \"lodash\";\r\nimport { ItemsListService } from \"src/app/components/shared/services/itemsList.service\";\r\nimport { CompanyService } from \"src/app/components/shared/services/company.service\";\r\nimport { Cart1Service } from \"src/app/components/shared/services/cart1.service\";\r\nimport { environment } from \"src/environments/environment\";\r\nimport { LoaderService } from \"src/app/components/shared/services/loader.service\";\r\nimport { ProductSearchPipe } from \"src/app/components/shared/pipes/product-search.pipe\";\r\nimport { SideNavBarService } from \"src/app/components/shared/services/sidenavbar.service\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { UserService } from \"src/app/components/shared/services/user.service\";\r\nimport { AccountService } from \"src/app/components/shared/services/account.service\";\r\nimport { MatCheckbox } from \"@angular/material/checkbox\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { VariantSelectionComponent } from \"src/app/components/shared/model/variant-selection/variant-selection.component\";\r\nimport { SwiperConfigInterface } from \"ngx-swiper-wrapper\";\r\n\r\n@Component({\r\n selector: \"app-product-no-sidebar\",\r\n templateUrl: \"./product-no-sidebar.component.html\",\r\n styleUrls: [\"./product-no-sidebar.component.scss\"],\r\n animations: [],\r\n})\r\nexport class ProductNoSidebarComponent implements OnInit {\r\n env;\r\n searchFormGroup: FormGroup;\r\n categoryTypeGroup: FormGroup;\r\n sortByFormGroup: FormGroup;\r\n productSearchText: string = \"\";\r\n public sidenavOpen: boolean = true;\r\n public animation; // Animation\r\n public sortByOrder; // sorting\r\n public page;\r\n public tagsFilters = [];\r\n public viewType: string = \"grid\";\r\n public viewCol: number = 34;\r\n public filterForm: FormGroup;\r\n public colorFilters: ColorFilter[] = [];\r\n public searchProduct;\r\n public items: Array = [];\r\n public products: Array = [];\r\n public allItems = [];\r\n public featuredCollection: Array = [];\r\n userService: UserServiceModal;\r\n public tags = [];\r\n public colors = [];\r\n customCssCheckBox;\r\n Checkedall: boolean = false;\r\n Checkedmagnetic: boolean = false;\r\n CheckedwhatsHot: boolean = false;\r\n Checkedenrollment: boolean = false;\r\n Checkedlips: boolean = false;\r\n Checkedeyes: boolean = false;\r\n slides = [];\r\n sortKeys = [];\r\n selectedCategory: { Category?: string, CategoryId?:(number|string) } = { Category: \"all\", CategoryId: -1 };\r\n isAllunselect: boolean;\r\n regularDistribution = 100 / 3 + \"%\";\r\n RegionIDForRequest: number;\r\n public OrderQuantityCount;\r\n showNoProductsError: boolean = false;\r\n showIsLoading: boolean = true;\r\n filterBySelectedValue = {\r\n \"best-seller\" : false,\r\n \"new\" : false,\r\n };\r\n filterByOptions = [\r\n { \r\n title: \"Best Seller\",\r\n value: \"best-seller\"\r\n },\r\n { \r\n title: \"New\",\r\n value: \"new\"\r\n }\r\n ];\r\n public shopBannerConfig: SwiperConfigInterface = {};\r\n BannerSlider = [];\r\n\r\n isProductsFetched: boolean = false;\r\n images: string[] = [\r\n '../../../../../assets/images/BluetoothHeaderImage.jpg',\r\n '../../../../../assets/images/WiredHeaderImage.jpg'\r\n ];\r\n imagesMobile:string[] = [\r\n '../../../../../assets/images/BluetoothMobile.jpg',\r\n '../../../../../assets/images/WiredMobile.jpg'\r\n ];\r\n RedirectStarterID:any;\r\n RedirectBuilderID: any;\r\n RedirectHeadsetID:any;\r\n currentImage: string;\r\n @ViewChildren(MatCheckbox, { read: MatCheckbox }) matCheckboxes: QueryList;\r\n\r\n\r\n /** -----------------------------\r\n * BuilderConfigurations\r\n ----------------------------- */\r\n\r\n BuilderConfigurations = {\r\n noBuilderPageForUrl : false,\r\n options: {\r\n // cacheSeconds: 0,\r\n // cache: true,\r\n data: {\r\n locale: \"en-US\",\r\n },\r\n },\r\n data: {\r\n ProductWrapperList: []\r\n },\r\n context: {\r\n addToCart: (item) => this.cart1Service.addToCart(item, true, \"\", false, false, false, false, false),\r\n navigate: (itemId) => this.router.navigate([\"/product\", itemId])\r\n }\r\n };\r\n\r\n productFilters = {\r\n searchText: \"\",\r\n selectedCategory: \"all\"\r\n };\r\n\r\n \r\n /** ------------------------------------ */\r\n\r\n\r\n constructor(\r\n private translate: TranslateService,\r\n private titleService: Title,\r\n private productService: ProductService,\r\n private route: ActivatedRoute,\r\n public configService: ConfigService,\r\n public utilityService: UtilityService,\r\n public itemsListService: ItemsListService,\r\n public companyService: CompanyService,\r\n public cart1Service: Cart1Service,\r\n public router: Router,\r\n private loader: LoaderService,\r\n private sidenavBarService: SideNavBarService,\r\n public user: UserService,\r\n public accountService: AccountService,\r\n private dialog: MatDialog,\r\n // private productSearchPipe: ProductSearchPipe,\r\n // private productFilterByPipe: ProductFilterByPipe,\r\n // private productOrderBy: ProductOrderByPipe\r\n ) \r\n \r\n {\r\n\r\n this.productService.updateProductDetailPricing.subscribe((res) => {\r\n if(res) {\r\n if(window.location.pathname.includes('products/all')) {\r\n\r\n this.fetchProductsAndInitialize();\r\n\r\n }\r\n }\r\n });\r\n\r\n this.rotateImages();\r\n this.env = environment;\r\n this.userService = user.userServiceModal;\r\n // new functionality\r\n this.configService\r\n .getCommonSetting(\r\n sessionStorage.getItem(\"selectedCountry\"),\r\n sessionStorage.getItem(\"SelectedLanguage\"),\r\n false\r\n )\r\n .then(() => {\r\n\r\n if(configService.isSettingClientRegionsDone) {\r\n this.fetchProductsAndInitialize();\r\n } else {\r\n this.configService.ClientRegionsSetSuccessfully.subscribe((res) => {\r\n if (res) { \r\n this.fetchProductsAndInitialize();\r\n }\r\n });\r\n }\r\n\r\n });\r\n\r\n // somtimes common setting loaded in time then items are called otherwise no items called\r\n\r\n this.sortByOrder = this.utilityService.getSortKey()[6];\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_product\") + \" | \" + text,\r\n );\r\n });\r\n\r\n this.loader.isLoading.subscribe((v) => {\r\n this.showIsLoading = v;\r\n if (v == false) {\r\n this.showNoProductsError = true;\r\n }\r\n });\r\n }\r\n\r\n\r\n rotateImages() {\r\n\r\n return;\r\n\r\n let index = 0;\r\n this.RedirectStarterID = 779;\r\n this.RedirectBuilderID = 780;\r\n this.RedirectHeadsetID = 129;\r\n if(window.innerWidth < 599){\r\n setInterval(() => {\r\n this.currentImage = this.imagesMobile[index];\r\n index = (index + 1) % this.images.length;\r\n if(index == 1){\r\n this.RedirectStarterID = 779;\r\n this.RedirectBuilderID = 780;\r\n this.RedirectHeadsetID = 129;\r\n document.getElementById('headset') && ( document.getElementById('headset').style.display = 'block' );\r\n }\r\n else{\r\n this.RedirectStarterID = 777;\r\n this.RedirectBuilderID = 778;\r\n document.getElementById('headset') && ( document.getElementById('headset').style.display = 'none' );\r\n }\r\n }, 5000);\r\n }\r\n else{\r\n setInterval(() => {\r\n this.currentImage = this.images[index];\r\n index = (index + 1) % this.images.length;\r\n if(index == 1){\r\n this.RedirectStarterID = 779;\r\n this.RedirectBuilderID = 780;\r\n this.RedirectHeadsetID = 129;\r\n document.getElementById('headset') && ( document.getElementById('headset').style.display = 'block' );\r\n }\r\n else{\r\n this.RedirectStarterID = 777;\r\n this.RedirectBuilderID = 778;\r\n document.getElementById('headset') && ( document.getElementById('headset').style.display = 'none' );\r\n }\r\n }, 5000);\r\n }\r\n }\r\n\r\n fetchProductsAndInitialize() {\r\n this.RegionIDForRequest = this.companyService.getRegionID(\r\n sessionStorage.getItem(\"selectedCountry\"),\r\n );\r\n if (localStorage.getItem(\"CommonSettings\")) {\r\n this.RegionIDForRequest = this.companyService.getRegionID(\r\n this.configService.commonData.selectedCountry,\r\n );\r\n\r\n //update static customer type id for shopping\r\n // if (!this.accountService.isLoggedIn()) {\r\n // this.userService.customerTypeID = 2;\r\n // }\r\n // either call function this.getAllProductItems(this.RegionIDForRequest); but in this base code case we are using routing params for getting products so below is that functionality\r\n\r\n this.route.params.subscribe((params: Params) => {\r\n this.selectedCategory = { CategoryId: params[\"category\"] || \"all\" };\r\n\r\n this.isProductsFetched = false;\r\n\r\n // const priceGroup = (this.productService.selectedAutoOrderItems.length + this.productService.selectedPacks.length) == 0 ? this.configService.commonData.CustomerTypes[0].ID : (this.userService.customerTypeID || this.configService.commonData.CustomerTypes[0].ID);\r\n\r\n this.productService\r\n .getProductByCategory({\r\n CategoryId: \"\" ,\r\n PriceGroup: this.userService.customerTypeID || this.configService.commonData.PurchaseCustomerType.CUSTOMER,\r\n StoreID: this.configService.commonData.PurchaseStore.RETAIL,\r\n // PriceGroup: priceGroup,\r\n // StoreID: this.configService.commonData.Stores[0].ID,\r\n })\r\n .subscribe(\r\n (products) => {\r\n\r\n this.productService.orders = products.map((item) => {\r\n item.Price =\r\n item.Price ||\r\n (item.Prices && item.Prices[0] && item.Prices[0].Price);\r\n return item;\r\n });\r\n\r\n const uniqueItems = _.uniqBy(products, (x) => x.CategoryId);\r\n let uniqueRequireProduct = [];\r\n if (\r\n this.configService.localSettings.Global.CategoriesToFetch\r\n ?.length > 0\r\n ) {\r\n uniqueItems.filter((x) => {\r\n if (\r\n this.configService.localSettings.Global.CategoriesToFetch.indexOf(\r\n x.Category,\r\n ) > -1\r\n ) {\r\n uniqueRequireProduct.push(x);\r\n }\r\n });\r\n } else {\r\n uniqueRequireProduct = [...uniqueItems];\r\n }\r\n\r\n this.itemsListService.selectedCategories = {};\r\n if (this.selectedCategory.CategoryId == \"all\") {\r\n this.itemsListService.selectedCategories[\"all\"] = true;\r\n }\r\n this.itemsListService.categoryList = _.map(\r\n uniqueRequireProduct,\r\n (object) => {\r\n return _.pick(object, [\"CategoryId\", \"Category\"]);\r\n },\r\n );\r\n\r\n this.products = [];\r\n const product = (this.itemsListService.products =\r\n this.productService.orders);\r\n if (\r\n this.configService.localSettings.Global.CategoriesToFetch\r\n ?.length > 0\r\n ) {\r\n product.filter((x) => {\r\n if (\r\n this.configService.localSettings.Global.CategoriesToFetch.indexOf(\r\n x.Category,\r\n ) > -1\r\n ) {\r\n this.products.push(x);\r\n }\r\n });\r\n } else {\r\n this.products = [...product];\r\n }\r\n this.itemsListService.products = this.products;\r\n this.itemsListService.type = \"order\";\r\n let category;\r\n this.itemsListService.categoryList.filter((x) => {\r\n if (x.CategoryId == this.selectedCategory.CategoryId) {\r\n category = x.Category;\r\n }\r\n });\r\n if (this.selectedCategory.CategoryId == \"all\") {\r\n this.itemsListService.getItemsByCategory(\"all\");\r\n } else {\r\n this.itemsListService.getItemsByCategory(category);\r\n }\r\n }, () => {}\r\n , () => {\r\n this.highLightSelectedCategory(params[\"category\"]);\r\n this.isProductsFetched = true;\r\n\r\n // Send Products to builder.io\r\n const MappedProductsByCategory: any = this.MapProductsForBuilder(this.itemsListService.productList);\r\n this.BuilderConfigurations.data = MappedProductsByCategory;\r\n this.BuilderConfigurations.data['ProductWrapperList'] = MappedProductsByCategory;\r\n\r\n }\r\n );\r\n\r\n this.slides = this.configService.localSettings.Product.PrimaryBanner;\r\n });\r\n this.sortKeys = this.utilityService.getSortKey();\r\n this.env = environment;\r\n } else {\r\n // can use else for commonsetting not found in storage\r\n }\r\n }\r\n\r\n MapProductsForBuilder(productsArray: any) {\r\n return productsArray.reduce((WrapperList, item) => {\r\n const isCategoryExist = WrapperList.find((group) => group.CategoryId === item.CategoryId);\r\n \r\n if (isCategoryExist) {\r\n isCategoryExist.items.push(item);\r\n } else {\r\n WrapperList.push({\r\n Category: item.Category,\r\n CategoryId: item.CategoryId,\r\n items: [item],\r\n });\r\n }\r\n \r\n return WrapperList;\r\n }, []);\r\n }\r\n\r\n ngOnInit() {\r\n this.BannerSlider = [\r\n {\r\n desktopImage: \"../../../../../assets/images/banner-slides/JulyBannerDesktop.jpg\",\r\n tabletImage: \"../../../../../assets/images/banner-slides/JulyBannerMobile.jpg\",\r\n mobileImage: \"../../../../../assets/images/banner-slides/JulyBannerMobile.jpg\",\r\n button1: { allowed: false, id: 0, text: 'STARTER'},\r\n button2: { allowed: false, id: 0, text: 'BUILDER'},\r\n button3: { allowed: false, id: 0, text: 'HEADSET'}\r\n },\r\n {\r\n desktopImage: \"../../../../../assets/images/banner-slides/JuneIncentiveBanner.jpg\",\r\n tabletImage: \"../../../../../assets/images/banner-slides/JuneIncentiveBanner.jpg\",\r\n mobileImage: \"../../../../../assets/images/banner-slides/JuneIncentiveBanner.jpg\",\r\n button1: { allowed: false, id: 0, text: 'STARTER'},\r\n button2: { allowed: false, id: 0, text: 'BUILDER'},\r\n button3: { allowed: false, id: 0, text: 'HEADSET'}\r\n },\r\n {\r\n desktopImage: \"../../../../../assets/images/banner-slides/BluetoothImageDesktop.jpg\",\r\n tabletImage: \"../../../../../assets/images/banner-slides/Bundle1Image.jpg\",\r\n mobileImage: \"../../../../../assets/images/banner-slides/BluetoothImagePhone.jpg\",\r\n button1: { allowed: true, id: 779, text: 'STARTER'},\r\n button2: { allowed: true, id: 780, text: 'BUILDER'},\r\n button3: { allowed: true, id: 129, text: 'HEADSET'}\r\n },\r\n {\r\n desktopImage: \"../../../../../assets/images/banner-slides/SupplementBundleDesktop.jpg\",\r\n tabletImage: \"../../../../../assets/images/banner-slides/Bundle2Image.jpg\",\r\n mobileImage: \"../../../../../assets/images/banner-slides/SupplementBundlePhone.jpg\",\r\n button1: { allowed: true, id: 1201, text: 'BALANCE'},\r\n button2: { allowed: true, id: 1202, text: 'RADIANCE'},\r\n button3: { allowed: true, id: 1203, text: 'VITALITY'}\r\n },\r\n {\r\n desktopImage: \"../../../../../assets/images/banner-slides/WiredImageDesktop.jpg\",\r\n tabletImage: \"../../../../../assets/images/banner-slides/Bundle3Image.jpg\",\r\n mobileImage: \"../../../../../assets/images/banner-slides/WiredImagePhone.jpg\",\r\n button1: { allowed: true, id: 777, text: 'STARTER'},\r\n button2: { allowed: true, id: 778, text: 'BUILDER'},\r\n button3: { allowed: false, id: 0, text: ''}\r\n }\r\n ];\r\n\r\n this.shopBannerConfig = {\r\n autoplay: false,\r\n speed: 1000,\r\n observer: true,\r\n direction: \"horizontal\",\r\n slidesPerView: 1,\r\n spaceBetween: 10,\r\n keyboard: true,\r\n navigation: true,\r\n pagination: true,\r\n grabCursor: true,\r\n loop: true,\r\n preloadImages: false,\r\n lazy: true,\r\n breakpoints: {\r\n 480: {\r\n slidesPerView: 1,\r\n },\r\n 740: {\r\n slidesPerView: 1,\r\n },\r\n 960: {\r\n slidesPerView: 1,\r\n },\r\n 1280: {\r\n slidesPerView: 1,\r\n },\r\n },\r\n };\r\n\r\n this.route.queryParams.subscribe((params) => {\r\n const { searchtext } = params;\r\n if(searchtext) {\r\n this.productSearchText = searchtext?.toString();\r\n }\r\n });\r\n\r\n this.sortByOrder = this.utilityService.getSortKey()[0];\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_product\") + \" | \" + text,\r\n );\r\n });\r\n }\r\n\r\n\r\n\r\n compareObjects(o1,o2): boolean {\r\n return o1.name === o2.name && o1.id === o2.id;\r\n }\r\n\r\n // sorting type ASC / DESC / A-Z / Z-A etc.\r\n onChangeSorting($event) {\r\n this.sortByOrder = $event.value;\r\n }\r\n\r\n public onPageChanged(event) {\r\n this.page = event;\r\n window.scrollTo(0, 0);\r\n }\r\n\r\n highLightSelectedCategory(id) {\r\n if(id != \"all\") {\r\n this.productSearchText = \"\";\r\n for(const category in this.itemsListService.selectedCategories) {\r\n if(category == id) {\r\n this.itemsListService.selectedCategories[category] = true;\r\n } else {\r\n this.itemsListService.selectedCategories[category] = false;\r\n }\r\n }\r\n }\r\n else if(id === \"all\"){\r\n for(const category in this.itemsListService.selectedCategories) {\r\n this.itemsListService.selectedCategories[category] = true;\r\n }\r\n }\r\n }\r\n\r\n onChange(selectedCategories, id) {\r\n\r\n /**---------------------------------------------------------- */\r\n \r\n this.highLightSelectedCategory(id);\r\n \r\n /**---------------------------------------------------------- */\r\n\r\n\r\n let result = true;\r\n for (const i in selectedCategories) {\r\n if (selectedCategories[i] === false) {\r\n if (i !== \"all\") {\r\n result = false;\r\n break;\r\n }\r\n } else {\r\n result = true;\r\n }\r\n }\r\n\r\n if (result) {\r\n this.itemsListService.selectedCategories[\"all\"] = true;\r\n } else {\r\n this.isAllunselect = true;\r\n for (const k in selectedCategories) {\r\n if (selectedCategories[k] === true) {\r\n this.isAllunselect = false;\r\n break;\r\n }\r\n }\r\n if (this.isAllunselect) {\r\n this.itemsListService.selectedCategories[\"all\"] = false;\r\n this.itemsListService.selectedCategories[id] = true;\r\n } else {\r\n this.itemsListService.selectedCategories[\"all\"] = false;\r\n }\r\n }\r\n if (!this.isAllunselect) {\r\n this.itemsListService.getItemsByCategory(selectedCategories);\r\n }\r\n }\r\n\r\n mouseEnter(index) {\r\n return;\r\n if (screen.width > 960) {\r\n document.getElementById(\"btn\" + index).classList.add(\"faded-in\");\r\n document.getElementById(\"btn\" + index).classList.remove(\"faded-out\");\r\n setTimeout(() => {\r\n document.getElementById(\"btn\" + index).style.opacity = \"1\";\r\n }, 590);\r\n }\r\n }\r\n mouseOut(index) {\r\n return;\r\n if (screen.width > 960) {\r\n document.getElementById(\"btn\" + index).classList.add(\"faded-out\");\r\n document.getElementById(\"btn\" + index).classList.remove(\"faded-in\");\r\n }\r\n }\r\n\r\n handleProduct(item) {\r\n if (item.ItemOptions.length > 0) {\r\n this.router.navigate([\"/product\", item.ItemID]);\r\n } else {\r\n this.OrderQuantityCount = item && item.Quantity ? item.Quantity : 1;\r\n if (this.cart1Service[\"orderQuantity\"][item.ItemID] >= 1) {\r\n this.increaseQuantiy(\"order\", item);\r\n } else {\r\n this.cart1Service[\"orderQuantity\"][item.ItemID] =\r\n this.OrderQuantityCount;\r\n this.cart1Service.addToCart(\r\n item,\r\n true,\r\n item.ItemID,\r\n false,\r\n false,\r\n false,\r\n true,\r\n );\r\n }\r\n }\r\n }\r\n increaseQuantiy(type, item) {\r\n this.cart1Service.increaseQuantiy(item, type == \"autoship\", type == \"pack\");\r\n }\r\n\r\n goToShop(id) {\r\n this.router.navigate([\"/product\", id]);\r\n }\r\n\r\n addToCart(product) {\r\n\r\n if(product.ItemOptions.length > 0) {\r\n this.dialog.open(VariantSelectionComponent, {\r\n data: {item : product},\r\n width: '400px',\r\n });\r\n return;\r\n }\r\n\r\n if(product?.ItemID == 'e97') {\r\n this.addToBothCart(product);\r\n return;\r\n }\r\n\r\n this.cart1Service.addToCart(\r\n product,\r\n true,\r\n product.ItemID,\r\n false,\r\n false,\r\n false,\r\n false,\r\n );\r\n\r\n this.sidenavBarService.showsideBarSummary = true;\r\n }\r\n\r\n addToBothCart(product) {\r\n // Autoship\r\n this.cart1Service.addToCart(product, true, '', true, true, false, false);\r\n\r\n // Order\r\n this.cart1Service.addToCart(product, true, '', false, true, false, false);\r\n }\r\n\r\n checkBoxParentClicked($event:any, checkboxId: string | number) {\r\n $event.preventDefault();\r\n this.matCheckboxes.forEach(checkbox => {\r\n if(checkbox._elementRef.nativeElement.getAttribute('checkbox-id') == checkboxId )\r\n checkbox.checked = true;\r\n this.onChange(this.itemsListService.selectedCategories, checkboxId);\r\n return;\r\n });\r\n // const checkbox: any = document.querySelector(`[checkbox-id=\"${checkboxId}\"]`);\r\n // if(checkbox) {\r\n // checkbox.checked = true;\r\n // }\r\n }\r\n\r\n handleProductSearch() {\r\n\r\n let Products = [];\r\n\r\n if(this.BuilderConfigurations.data.ProductWrapperList.length === 0) {\r\n Products = this.itemsListService.productList;\r\n }\r\n\r\n if(this.productFilters.selectedCategory === \"all\") {\r\n Products = this.itemsListService.productList;\r\n } else {\r\n Products = this.itemsListService.productList;\r\n Products = Products.filter((product) => product.CategoryId == this.productFilters.selectedCategory);\r\n }\r\n\r\n // Products of the selected category\r\n if(Products?.length > 0) {\r\n\r\n const productSearchPipe = new ProductSearchPipe();\r\n const items = productSearchPipe.transform(Products, this.productFilters.searchText);\r\n\r\n // Send Products to builder.io\r\n const MappedProductsByCategory: any = this.MapProductsForBuilder(items);\r\n this.BuilderConfigurations.data = MappedProductsByCategory;\r\n this.BuilderConfigurations.data['ProductWrapperList'] = MappedProductsByCategory;\r\n\r\n }\r\n\r\n if(this.productFilters.searchText === \"\") {\r\n this.productFilters.selectedCategory = \"all\";\r\n // Send Products to builder.io\r\n const MappedProductsByCategory: any = this.MapProductsForBuilder(this.itemsListService.productList);\r\n this.BuilderConfigurations.data = MappedProductsByCategory;\r\n this.BuilderConfigurations.data['ProductWrapperList'] = MappedProductsByCategory;\r\n }\r\n\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { Routes, RouterModule } from \"@angular/router\";\r\nimport { ProductDetailsComponent } from \"./products/product-details/product-details.component\";\r\nimport { ProductNoSidebarComponent } from \"./products/product-no-sidebar/product-no-sidebar.component\";\r\n\r\n// Routes\r\nconst routes: Routes = [\r\n { path: \"products/:category\", component: ProductNoSidebarComponent },\r\n {\r\n path: \"product/:id\",\r\n component: ProductDetailsComponent,\r\n pathMatch: \"full\",\r\n },\r\n { path: ':dynamicPart/products/all', component: ProductNoSidebarComponent },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule],\r\n})\r\nexport class ShopRoutingModule {}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { RouterModule } from \"@angular/router\";\r\nimport { AppSettings } from \"./services/color-option.service\";\r\n\r\nimport { FlexLayoutModule } from \"@angular/flex-layout\";\r\n\r\nimport { MatToolbarModule } from \"@angular/material/toolbar\";\r\nimport { MatButtonModule } from \"@angular/material/button\";\r\nimport { MatMenuModule } from \"@angular/material/menu\";\r\nimport { MatSidenavModule } from \"@angular/material/sidenav\";\r\nimport { MatSelectModule } from \"@angular/material/select\";\r\nimport { MatTabsModule } from \"@angular/material/tabs\";\r\nimport { MatChipsModule } from \"@angular/material/chips\";\r\nimport { MatIconModule } from \"@angular/material/icon\";\r\nimport { MatTooltipModule } from \"@angular/material/tooltip\";\r\nimport { MatCardModule } from \"@angular/material/card\";\r\nimport { MatExpansionModule } from \"@angular/material/expansion\";\r\nimport { MatSnackBarModule } from \"@angular/material/snack-bar\";\r\nimport { MatDividerModule } from \"@angular/material/divider\";\r\nimport { MatRadioModule } from \"@angular/material/radio\";\r\nimport { MatListModule } from \"@angular/material/list\";\r\nimport { MatSliderModule } from \"@angular/material/slider\";\r\nimport { MatInputModule } from \"@angular/material/input\";\r\nimport { MatDialogModule } from \"@angular/material/dialog\";\r\nimport { MatTableModule } from \"@angular/material/table\";\r\nimport { HeaderComponent } from \"./header/header.component\";\r\nimport { FooterComponent } from \"./footer/footer.component\";\r\nimport { MenuComponent } from \"./menu/menu.component\";\r\nimport { ProductOrderByPipe } from \"./pipes/order-by.pipe\";\r\nimport { ProductService } from \"./services/product.service\";\r\nimport { CartService } from \"./services/cart.service\";\r\nimport { SidebarComponent } from \"./sidebar/sidebar.component\";\r\nimport { BannersComponent } from \"./banners/banners.component\";\r\nimport { ShoppingWidgetsComponent } from \"./shopping-widgets/shopping-widgets.component\";\r\nimport { MatBadgeModule } from \"@angular/material/badge\";\r\n\r\nimport { NgxSkeletonLoaderModule } from \"ngx-skeleton-loader\";\r\nimport { BreadcrumbComponent } from \"./breadcrumb/breadcrumb.component\";\r\nimport { ImagePreloadDirective } from \"./directive/default-img.directive\";\r\nimport { OrderService } from \"./services/order.service\";\r\nimport { NotificationService } from \"./services/notification.service\";\r\nimport { TranslateModule } from \"@ngx-translate/core\";\r\nimport { MatAutocompleteModule } from \"@angular/material/autocomplete\";\r\nimport { MatPaginatorModule } from \"@angular/material/paginator\";\r\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\r\nimport { ConfirmDialogComponent } from \"./model/confirm-dialog/confirm-dialog.component\";\r\nimport { HostedpaymentDialogComponent } from \"./model/hostedpayment-dialog/hostedpayment-dialog.component\";\r\nimport { FindEnrollerComponent } from \"./model/findenroller/findenroller.component\";\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { MatSortModule } from \"@angular/material/sort\";\r\nimport { AutoshipEditComponent } from \"./autoship-edit/autoship-edit.component\";\r\nimport { MarketSelectorComponent } from \"./model/market-selector/market-selector.component\";\r\nimport { UnsafePipe } from \"./pipes/Unsafe.pipe\";\r\nimport { GroupByCountPipe } from \"./pipes/group-by-count.pipe\";\r\nimport { PaymentTranslatePipe } from \"./pipes/payment-translate.pipe\";\r\nimport { RangePipe } from \"./pipes/eange.pipe\";\r\nimport { TrustAsUrlPipe } from \"./pipes/trustas-url.pipe\";\r\nimport { IsDecimalNumberPipe } from \"./pipes/decimal-number.pipe\";\r\nimport { AddSymbolWithNumberPipe } from \"./pipes/add-symbol-with-number.pipe\";\r\nimport { CheckValidDatePipe } from \"./pipes/check-valid-date.pipe\";\r\nimport { ChangeDateFormatPipe } from \"./pipes/date-format.pipe\";\r\nimport { TranslateSmartShipMonthPipe } from \"./pipes/smartship-month.pipe\";\r\nimport { IconClassDirective } from \"./directive/iconclass.directive\";\r\nimport { ShippingAddressComponent } from \"../pages/shippingaddress/shippingaddress.component\";\r\n\r\nimport { RemoveStarPipe } from \"./pipes/remove-star.pipe\";\r\nimport { NgInitDirective } from \"./directive/ng-init\";\r\nimport { SideBarSummaryCartComponent } from \"./sidebar-summary-cart/sidebar-summary-cart.component\";\r\nimport { MatDatepickerModule } from \"@angular/material/datepicker\";\r\nimport { MatNativeDateModule } from \"@angular/material/core\";\r\nimport { SafePipe } from \"./pipes/safe.pipe\";\r\nimport { ValidateDirective } from \"./directive/validation.directive\";\r\nimport { ItemsListService } from \"./services/itemsList.service\";\r\nimport { OrderModule } from \"ngx-order-pipe\";\r\nimport { ProductSearchPipe } from \"./pipes/product-search.pipe\";\r\nimport { ContactComponent } from \"./model/contact/contact.component\";\r\nimport { ProductDialogComponent } from \"../shop/products/product-dialog/product-dialog.component\";\r\nimport { CategoryPipe } from \"./pipes/category-filter.pipe\";\r\nimport { ShipMethodsComponent } from \"./model/ship-methods/ship-methods.component\";\r\nimport { AllowCvvComponent } from \"./model/allow-cvv/allow-cvv.component\";\r\nimport { ShippingAddressDialogComponent } from \"./model/shipping-address-dialog/shipping-address-dialog.component\";\r\nimport { UniquePipe } from \"./pipes/unique.pipe\";\r\nimport { PaymentService } from \"./services/payment.service\";\r\nimport { PersistentService } from \"./services/persistent.service\";\r\nimport { AutoshipConfigurationService } from \"./services/autoshipConfiguration.service\";\r\nimport { ProductFilterByPipe } from './pipes/product-filter-by.pipe';\r\nimport { LoyaltyProgramComponent } from \"./model/loyalty-program/loyalty-program.component\";\r\nimport { VariantSelectionComponent } from './model/variant-selection/variant-selection.component';\r\nimport { BuilderModule } from \"@builder.io/angular\";\r\n@NgModule({\r\n declarations: [\r\n HeaderComponent,\r\n FooterComponent,\r\n MenuComponent,\r\n SidebarComponent,\r\n SideBarSummaryCartComponent,\r\n ProductOrderByPipe,\r\n CategoryPipe,\r\n UniquePipe,\r\n SafePipe,\r\n UnsafePipe,\r\n RemoveStarPipe,\r\n GroupByCountPipe,\r\n PaymentTranslatePipe,\r\n ProductSearchPipe,\r\n RangePipe,\r\n TrustAsUrlPipe,\r\n GroupByCountPipe,\r\n IsDecimalNumberPipe,\r\n AddSymbolWithNumberPipe,\r\n CheckValidDatePipe,\r\n ChangeDateFormatPipe,\r\n TranslateSmartShipMonthPipe,\r\n BannersComponent,\r\n ShoppingWidgetsComponent,\r\n BreadcrumbComponent,\r\n ConfirmDialogComponent,\r\n HostedpaymentDialogComponent,\r\n FindEnrollerComponent,\r\n ContactComponent,\r\n ShippingAddressComponent,\r\n ImagePreloadDirective,\r\n IconClassDirective,\r\n NgInitDirective,\r\n ValidateDirective,\r\n AutoshipEditComponent,\r\n MarketSelectorComponent,\r\n AllowCvvComponent,\r\n ProductDialogComponent,\r\n ShipMethodsComponent,\r\n ShippingAddressDialogComponent,\r\n ProductFilterByPipe,\r\n LoyaltyProgramComponent,\r\n VariantSelectionComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n MatButtonModule,\r\n MatSnackBarModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n MatToolbarModule,\r\n MatListModule,\r\n MatSliderModule,\r\n MatExpansionModule,\r\n MatBadgeModule,\r\n MatMenuModule,\r\n MatTableModule,\r\n MatSortModule,\r\n MatRadioModule,\r\n MatDialogModule,\r\n MatChipsModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n MatSidenavModule,\r\n MatSelectModule,\r\n MatTabsModule,\r\n MatDividerModule,\r\n MatCardModule,\r\n FlexLayoutModule,\r\n NgxSkeletonLoaderModule,\r\n MatAutocompleteModule,\r\n MatPaginatorModule,\r\n MatCheckboxModule,\r\n TranslateModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n OrderModule,\r\n BuilderModule.forRoot(\"9421ee9b607e4eafa79be36c59cc5ce0\"),\r\n ],\r\n exports: [\r\n CommonModule,\r\n MatButtonModule,\r\n MatSnackBarModule,\r\n MatToolbarModule,\r\n MatListModule,\r\n MatExpansionModule,\r\n MatMenuModule,\r\n MatTableModule,\r\n MatSliderModule,\r\n MatRadioModule,\r\n MatDialogModule,\r\n MatChipsModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n MatAutocompleteModule,\r\n MatPaginatorModule,\r\n MatSortModule,\r\n MatCheckboxModule,\r\n MatSidenavModule,\r\n MatSelectModule,\r\n MatTabsModule,\r\n MatDividerModule,\r\n MatCardModule,\r\n ProductOrderByPipe,\r\n CategoryPipe,\r\n UniquePipe,\r\n SafePipe,\r\n UnsafePipe,\r\n RemoveStarPipe,\r\n GroupByCountPipe,\r\n PaymentTranslatePipe,\r\n ProductSearchPipe,\r\n RangePipe,\r\n TrustAsUrlPipe,\r\n GroupByCountPipe,\r\n IsDecimalNumberPipe,\r\n AddSymbolWithNumberPipe,\r\n CheckValidDatePipe,\r\n ChangeDateFormatPipe,\r\n TranslateSmartShipMonthPipe,\r\n HeaderComponent,\r\n FooterComponent,\r\n MenuComponent,\r\n SidebarComponent,\r\n SideBarSummaryCartComponent,\r\n BannersComponent,\r\n FlexLayoutModule,\r\n ShoppingWidgetsComponent,\r\n BreadcrumbComponent,\r\n ConfirmDialogComponent,\r\n HostedpaymentDialogComponent,\r\n FindEnrollerComponent,\r\n AllowCvvComponent,\r\n ShippingAddressComponent,\r\n MarketSelectorComponent,\r\n ContactComponent,\r\n AutoshipEditComponent,\r\n ImagePreloadDirective,\r\n IconClassDirective,\r\n NgInitDirective,\r\n ValidateDirective,\r\n ProductDialogComponent,\r\n ShipMethodsComponent,\r\n ShippingAddressDialogComponent,\r\n LoyaltyProgramComponent,\r\n VariantSelectionComponent\r\n ],\r\n providers: [\r\n NotificationService,\r\n MatDatepickerModule,\r\n OrderService,\r\n PaymentService,\r\n PersistentService,\r\n AutoshipConfigurationService,\r\n ProductService,\r\n CartService,\r\n ItemsListService,\r\n AppSettings,\r\n ],\r\n entryComponents: [\r\n ConfirmDialogComponent,\r\n HostedpaymentDialogComponent,\r\n FindEnrollerComponent,\r\n AllowCvvComponent,\r\n ShippingAddressComponent,\r\n MarketSelectorComponent,\r\n ContactComponent,\r\n AutoshipEditComponent,\r\n ProductDialogComponent,\r\n ShipMethodsComponent,\r\n ShippingAddressDialogComponent,\r\n LoyaltyProgramComponent,\r\n VariantSelectionComponent\r\n ],\r\n})\r\nexport class SharedModule {}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { ProductsComponent } from \"./products/products.component\";\r\nimport { ProductComponent } from \"./products/product/product.component\";\r\nimport { ProductDetailsComponent } from \"./products/product-details/product-details.component\";\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { ShopRoutingModule } from \"./shop-routing.module\";\r\nimport { SharedModule } from \"../shared/shared.module\";\r\nimport { SwiperModule } from \"ngx-swiper-wrapper\";\r\nimport { FlexLayoutModule } from \"@angular/flex-layout\";\r\nimport { NgxPaginationModule } from \"ngx-pagination\";\r\nimport { NgxImageZoomModule } from \"ngx-image-zoom\";\r\nimport { ProductNoSidebarComponent } from \"./products/product-no-sidebar/product-no-sidebar.component\";\r\nimport { ProductCarouselThreeComponent } from \"./products/product-carousel-three/product-carousel-three.component\";\r\nimport { ProductCarouselComponent } from \"./products/product-carousel/product-carousel.component\";\r\nimport { NgxSkeletonLoaderModule } from \"ngx-skeleton-loader\";\r\nimport { TranslateModule } from \"@ngx-translate/core\";\r\nimport { ProductBannerCarouselComponent } from \"../shared/product-banner-carousel/product-banner-carousel.component\";\r\nimport {\r\n BrowserAnimationsModule,\r\n NoopAnimationsModule,\r\n} from \"@angular/platform-browser/animations\";\r\nimport { BrowserModule } from \"@angular/platform-browser\";\r\nimport { MatTabsModule } from \"@angular/material/tabs\";\r\nimport { BuilderModule } from \"@builder.io/angular\";\r\n@NgModule({\r\n declarations: [\r\n ProductsComponent,\r\n ProductComponent,\r\n ProductDetailsComponent,\r\n ProductNoSidebarComponent,\r\n ProductCarouselThreeComponent,\r\n ProductCarouselComponent,\r\n ProductBannerCarouselComponent,\r\n ],\r\n imports: [\r\n CommonModule,\r\n BrowserModule,\r\n ShopRoutingModule,\r\n SharedModule,\r\n SwiperModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n FlexLayoutModule,\r\n NgxPaginationModule,\r\n NgxSkeletonLoaderModule,\r\n TranslateModule,\r\n BrowserAnimationsModule,\r\n NoopAnimationsModule,\r\n MatTabsModule,\r\n NgxImageZoomModule, // <-- Add this line\r\n BuilderModule.forRoot(\"9421ee9b607e4eafa79be36c59cc5ce0\"),\r\n ],\r\n exports: [],\r\n\r\n entryComponents: [],\r\n})\r\nexport class ShopModule {}\r\n","// loader-interceptor.service.ts\r\nimport { Injectable } from \"@angular/core\";\r\nimport {\r\n HttpResponse,\r\n HttpHandler,\r\n HttpEvent,\r\n HttpInterceptor,\r\n HttpRequest,\r\n} from \"@angular/common/http\";\r\nimport { Observable, throwError } from \"rxjs\";\r\nimport { LoaderService } from \"../loader.service\";\r\nimport { catchError, finalize, tap } from \"rxjs/operators\";\r\n\r\n@Injectable()\r\nexport class LoaderInterceptor implements HttpInterceptor {\r\n private requests = [];\r\n\r\n constructor(private loaderService: LoaderService) {}\r\n\r\n removeRequest(req) {\r\n const i = this.requests.indexOf(req);\r\n if (i >= 0) {\r\n this.requests.splice(i, 1);\r\n }\r\n this.loaderService.isLoading.next(this.requests.length > 0);\r\n }\r\n\r\n intercept(req: HttpRequest, next: HttpHandler): Observable> {\r\n this.requests.push(req);\r\n this.loaderService.isLoading.next(true);\r\n \r\n return next.handle(req).pipe(\r\n tap((event) => {\r\n if (event instanceof HttpResponse) {\r\n this.removeRequest(req);\r\n }\r\n }),\r\n catchError((err) => {\r\n console.log(\"Error:\", err);\r\n this.removeRequest(req);\r\n return throwError(() => err);\r\n }),\r\n finalize(() => {\r\n this.removeRequest(req);\r\n })\r\n );\r\n }\r\n \r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\n@Pipe({\r\n name: \"addsymbolwithnumber\",\r\n})\r\nexport class AddSymbolWithNumberPipe implements PipeTransform {\r\n transform(value, symbol, lastdigitcount, symbolcount) {\r\n if (!value) {\r\n return \"\";\r\n }\r\n value = value.substring(value.length - lastdigitcount, value.length);\r\n const maskLength = symbolcount;\r\n let mask = \"\";\r\n for (let i = 0; i < maskLength; i++) {\r\n mask += symbol;\r\n }\r\n return mask + value;\r\n }\r\n}\r\n","import { MatDialogRef } from \"@angular/material/dialog\";\r\nimport { Component, OnInit, ViewEncapsulation } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-allow-cvv\",\r\n templateUrl: \"./allow-cvv.component.html\",\r\n styleUrls: [\"./allow-cvv.component.scss\"],\r\n encapsulation: ViewEncapsulation.Emulated,\r\n})\r\nexport class AllowCvvComponent implements OnInit {\r\n cvvCode: number|string;\r\n constructor(private dialogRef: MatDialogRef) {}\r\n\r\n ngOnInit(): void {}\r\n save(cvvCode) {\r\n this.dialogRef.close(cvvCode);\r\n }\r\n close() {\r\n this.dialogRef.close(false);\r\n }\r\n}\r\n","\r\n\r\n
\r\n
\r\n
add_security_code
\r\n
\r\n \r\n
\r\n

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport { DomSanitizer } from \"@angular/platform-browser\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport * as _ from \"lodash\";\r\n@Pipe({\r\n name: \"paymentTranslate\",\r\n})\r\nexport class PaymentTranslatePipe implements PipeTransform {\r\n constructor(\r\n public translate: TranslateService,\r\n private sanitizer: DomSanitizer,\r\n ) {}\r\n transform(key, defaultValue) {\r\n try {\r\n if (key) {\r\n key =\r\n \"payment_method_\" +\r\n (typeof key === \"string\"\r\n ? key.replace(/[&/\\\\#,+()$~%.'\":*?<>{}\\s]/g, \"\")\r\n : key\r\n ).toLowerCase();\r\n const translated = this.translate.instant(key);\r\n if (_.isEqual(translated, key) || translated === \"\") {\r\n return this.sanitizer.bypassSecurityTrustHtml(defaultValue);\r\n } else {\r\n return this.sanitizer.bypassSecurityTrustHtml(translated);\r\n }\r\n }\r\n } catch (ex) {\r\n return this.translate.instant(key);\r\n }\r\n }\r\n}\r\n","import { Pipe, PipeTransform } from \"@angular/core\";\r\nimport * as moment from \"moment\";\r\n@Pipe({\r\n name: \"changedateformat\",\r\n})\r\nexport class ChangeDateFormatPipe implements PipeTransform {\r\n transform(value) {\r\n return moment(value).format(\"DD MMMM YYYY\");\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n  \r\n  \r\n  \r\n
\r\n  \r\n  \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n mail\r\n \r\n
\r\n
\r\n
\r\n

\r\n
\r\n

\r\n
\r\n \"VisaCard\"\r\n \"VisaCard\"\r\n
\r\n
\r\n
0\">\r\n  \r\n \r\n \r\n
\r\n \r\n {{'expires'|translate}} \r\n /\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n 0 && !userService.isPaymentChanged\"\r\n [textContent]=\"(userService.paymentMethods[0]?.CardType || 'Add a Payment Method') + ' ' + (userService.paymentMethods[0]?.Last4 || '')\">\r\n \r\n \r\n \r\n \r\n 0\">\r\n {{(userService.paymentMethods[0]?.CardType || 'Add a Payment Method')}} {{ ' ' }}\r\n {{(userService.paymentMethods[0]?.Last4 || '')}}\r\n \r\n \r\n \r\n \r\n credit_card\r\n \r\n \r\n \r\n {{'_exp'|translate}}  \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n

\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n 0\">\r\n \r\n \r\n card_giftcard \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n   \r\n -\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n 0\">\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n 0 ? (orderService.calculateOrderResponse.SubTotal - orderService.calculateOrderResponse.DiscountTotal) : orderService.calculateOrderResponse.SubTotal) | currency: companyService.selectedCurrency.CurrencyCode\">\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n {{'global_total'|translate}} ( {{'item_'|translate}} ):\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n 0\">\r\n
\r\n
\r\n
\r\n \r\n {{'autoship_order'|translate}}\r\n \r\n
\r\n
\r\n \r\n {{'your_autoship_will_process_frequency' | translate: getfrequencyName()}}\r\n  \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n {{'global_total'|translate}} ( {{'item_'|translate}} ):\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
    \r\n
  1. \r\n
    \r\n
    \r\n
  2. \r\n
  3. \r\n
    \r\n
    \r\n
  4. \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
","import { ShoppingCartService } from \"./../../shared/services/shopping-cart.service\";\r\nimport { Custom } from \"./../../../modals/createorderautoorder.modal\";\r\nimport { cloneDeep } from \"lodash\";\r\nimport { Component, OnInit } from \"@angular/core\";\r\nimport { CartService } from \"../../shared/services/cart.service\";\r\nimport { Observable, of } from \"rxjs\";\r\nimport { CartItem } from \"src/app/modals/cart-item\";\r\nimport { ProductService } from \"../../shared/services/product.service\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { Cart1Service } from \"../../shared/services/cart1.service\";\r\nimport { OrderService } from \"../../shared/services/order.service\";\r\nimport { PaymentService } from \"../../shared/services/payment.service\";\r\nimport { UserService } from \"../../shared/services/user.service\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport * as _ from \"lodash\";\r\nimport { NotificationService } from \"../../shared/services/notification.service\";\r\nimport { RestApiService } from \"../../shared/services/restapi.service\";\r\nimport { UtilityService } from \"../../shared/services/utility.service\";\r\nimport * as moment from \"moment\";\r\nimport { ConfigService } from \"../../shared/services/config.service\";\r\nimport {\r\n CreateAutoOrder,\r\n CreateOrder,\r\n CreateOrderAndAutoShip,\r\n Item,\r\n OrderShippingAddress,\r\n Payment,\r\n} from \"src/app/modals/createorderautoorder.modal\";\r\nimport { ShipAddress } from \"src/app/modals/autoship.modal\";\r\nimport { OrderCreditCard } from \"src/app/modals/enrollment.model\";\r\nimport { OrderPipe } from \"ngx-order-pipe\";\r\nimport { ConfirmDialogComponent } from \"../../shared/model/confirm-dialog/confirm-dialog.component\";\r\nimport { Router } from \"@angular/router\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { AddSymbolWithNumberPipe } from \"../../shared/pipes/add-symbol-with-number.pipe\";\r\nimport { ItemsListService } from \"../../shared/services/itemsList.service\";\r\nimport { PersistentService } from \"../../shared/services/persistent.service\";\r\nimport { AccountService } from \"../../shared/services/account.service\";\r\nimport { AllowCvvComponent } from \"../../shared/model/allow-cvv/allow-cvv.component\";\r\nimport { AutoshipConfigurationService } from \"../../shared/services/autoshipConfiguration.service\";\r\nimport { CompanyService } from \"../../shared/services/company.service\";\r\nimport { environment } from \"src/environments/environment\";\r\nimport { HostedpaymentDialogComponent } from \"../../shared/model/hostedpayment-dialog/hostedpayment-dialog.component\";\r\n@Component({\r\n selector: \"app-checkout\",\r\n templateUrl: \"./checkout.component.html\",\r\n styleUrls: [\"./checkout.component.scss\"],\r\n})\r\nexport class CheckoutComponent implements OnInit {\r\n public cartItems: Observable = of([]);\r\n public buyProducts: CartItem[] = [];\r\n public commonData;\r\n removable = true;\r\n amount: number;\r\n payments: string[] = [\"Create an Account?\", \"Flat Rate\"];\r\n paymantWay: string[] = [\"Direct Bank Transfer\", \"PayPal\"];\r\n OrderQuantityCount: number = 10;\r\n public AutoOrdersData = [];\r\n selectedAutoship;\r\n AutoshipEditFlag: boolean = false;\r\n createOrderRequest: CreateOrderAndAutoShip;\r\n userService: UserServiceModal;\r\n selectedshipmethod = 1;\r\n isStateRestrict: boolean = false;\r\n isDisabledCreateOrder: boolean = false;\r\n constructor(\r\n public notificationService: NotificationService,\r\n public user: UserService,\r\n private titleService: Title,\r\n public paymentService: PaymentService,\r\n public translate: TranslateService,\r\n public cart1Service: Cart1Service,\r\n public orderService: OrderService,\r\n private cartService1: CartService,\r\n public itemsService: ProductService,\r\n public apiService: RestApiService,\r\n public utilityService: UtilityService,\r\n public configService: ConfigService,\r\n private dialog: MatDialog,\r\n private router: Router,\r\n private orderPipe: OrderPipe,\r\n public itemsListService: ItemsListService,\r\n public persistentService: PersistentService,\r\n public accountService: AccountService,\r\n public autoshipConfigurationService: AutoshipConfigurationService,\r\n public companyService: CompanyService,\r\n public shoppingCartService: ShoppingCartService,\r\n ) {\r\n this.userService = this.user.userServiceModal;\r\n this.commonData = this.configService.getConfig();\r\n }\r\n\r\n ngOnInit() {\r\n sessionStorage.setItem(\"IsEnrollment\", null);\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_checkout\") + \" | \" + text,\r\n );\r\n });\r\n this.cartItems = this.cartService1.getItems();\r\n this.cartItems.subscribe((products) => (this.buyProducts = products));\r\n this.getTotal().subscribe((amount) => (this.amount = amount));\r\n this.persistentService.retailData.isNewAutoship =\r\n this.persistentService.retailData.isNewAutoship || false;\r\n this.selectedAutoship =\r\n this.persistentService.retailData.CurrentSelectedAutoOrder;\r\n if (\r\n this.itemsService.selectedPacks.length +\r\n this.itemsService.selectedOrderItems.length +\r\n this.itemsService.selectedAutoOrderItems.length <=\r\n 0 &&\r\n !this.utilityService.getAutoshipEditFlag()\r\n ) {\r\n this.notificationService.error(\r\n \"message_\",\r\n \"your_order_cart_empty_select_atleast_one_item\",\r\n );\r\n this.router.navigate([\"/products/all\"]);\r\n }\r\n\r\n if (\r\n this.userService.customerData.DefaultShippingAddress &&\r\n !this.utilityService.isEmptyObject(\r\n this.userService.customerData.DefaultShippingAddress,\r\n )\r\n ) {\r\n this.user.setShippingAddress();\r\n if (this.utilityService.getAutoshipEditFlag()) {\r\n this.updateAddressWithAutoshipAddress();\r\n }\r\n }\r\n\r\n if (this.userService.shippingMethods?.length > 0) {\r\n this.checkItems().then(() => { });\r\n } else {\r\n if (this.itemsService.selectedOrderItems.length) {\r\n this.checkItems().then(() => {\r\n this.orderService.calculateOrder().then(() => { });\r\n });\r\n }\r\n if (this.itemsService.selectedAutoOrderItems.length) {\r\n this.checkItems().then(() => {\r\n this.orderService.calculateAutoOrder().then(() => { });\r\n });\r\n }\r\n }\r\n\r\n if (this.utilityService.getAutoshipEditFlag()) {\r\n if (this.persistentService.retailData.SelectedAutoshipPayment) {\r\n const autoshipPayment = this.getPaymentByDisplayText(\r\n this.persistentService.retailData.SelectedAutoshipPayment\r\n .PaymentDisplay,\r\n this.persistentService.retailData.SelectedAutoshipPayment\r\n .PaymentTypeID,\r\n );\r\n this.userService.paymentMethods = autoshipPayment\r\n ? [autoshipPayment]\r\n : [];\r\n if (this.userService.paymentMethods.length > 0) {\r\n (this.userService.paymentMethods[0].CardType =\r\n this.userService.paymentMethods[0].Name),\r\n (this.userService.paymentMethods[0].Last4 =\r\n this.userService.paymentMethods[0].Ending),\r\n (this.userService.paymentMethods[0].ExpireMonth =\r\n this.persistentService.retailData.SelectedAutoshipPayment.ExpireMonth),\r\n (this.userService.paymentMethods[0].ExpireYear =\r\n this.persistentService.retailData.SelectedAutoshipPayment.ExpireYear),\r\n (this.userService.paymentMethods[0].Token =\r\n this.userService.paymentMethods[0].PaymentMethodID),\r\n (this.userService.paymentMethods[0].BillingAddress =\r\n this.persistentService.retailData.SelectedAutoshipPayment.BillingAddress),\r\n (this.userService.paymentMethods[0].BillingAddress2 =\r\n this.persistentService.retailData.SelectedAutoshipPayment.BillingAddress2),\r\n (this.userService.paymentMethods[0].BillingCity =\r\n this.persistentService.retailData.SelectedAutoshipPayment.BillingCity),\r\n (this.userService.paymentMethods[0].BillingCountry =\r\n this.persistentService.retailData.SelectedAutoshipPayment.BillingCountry),\r\n (this.userService.paymentMethods[0].BillingState =\r\n this.persistentService.retailData.SelectedAutoshipPayment.BillingState),\r\n (this.userService.paymentMethods[0].BillingZip =\r\n this.persistentService.retailData.SelectedAutoshipPayment.BillingZip);\r\n }\r\n }\r\n if (this.userService.paymentMethods.length == 0) {\r\n this.setDefaultPayment();\r\n }\r\n if (this.userService.paymentMethods.length > 0) {\r\n this.paymentService.selectedPaymentTypeName =\r\n this.userService.paymentMethods[0].CardType +\r\n \" \" +\r\n this.userService.paymentMethods[0].Last4;\r\n }\r\n localStorage.setItem(\"userService\", JSON.stringify(this.userService));\r\n }\r\n else {\r\n this.setDefaultPayment();\r\n }\r\n\r\n if (\r\n Object.keys(this.userService.customerData).length &&\r\n this.itemsService.selectedAutoOrderItems.length > 0\r\n ) {\r\n this.getAutoOrders();\r\n }\r\n this.userService.isPaymentChanged = false;\r\n this.getfrequencyName();\r\n // this.orderService.getstoreId();\r\n }\r\n\r\n public updateAddressWithAutoshipAddress() {\r\n console.log(\"chech the userservice\", this.userService.customerData)\r\n this.userService.shippingAddress.FirstName =\r\n this.persistentService.retailData.AutoOrderShippingAddress.FirstName;\r\n this.userService.shippingAddress.LastName =\r\n this.persistentService.retailData.AutoOrderShippingAddress.LastName;\r\n this.userService.shippingAddress.Street1 = this.userService.customerData.PrimaryAddress.Street1 ||\r\n this.persistentService.retailData.AutoOrderShippingAddress.Address;\r\n this.userService.shippingAddress.Street2 = this.userService.customerData.PrimaryAddress.Street2 ||\r\n this.persistentService.retailData.AutoOrderShippingAddress.Address2;\r\n this.userService.shippingAddress.City =\r\n this.persistentService.retailData.AutoOrderShippingAddress.City;\r\n this.userService.shippingAddress.CountryCode =\r\n this.persistentService.retailData.AutoOrderShippingAddress.Country;\r\n this.userService.shippingAddress.Region =\r\n this.persistentService.retailData.AutoOrderShippingAddress.State;\r\n this.userService.shippingAddress.PostalCode = this.userService.customerData.PrimaryAddress.PostalCode ||\r\n this.persistentService.retailData.AutoOrderShippingAddress.ZipCode;\r\n }\r\n\r\n setDefaultPayment() {\r\n this.paymentService.getPaymentType().then(() => {\r\n if (\r\n this.paymentService.PaymentTypeResponse[\"SaveMethods\"] &&\r\n this.paymentService.PaymentTypeResponse[\"SaveMethods\"][0]\r\n ) {\r\n this.addSavePayment(\r\n this.paymentService.PaymentTypeResponse[\"SaveMethods\"][0],\r\n );\r\n }\r\n });\r\n }\r\n\r\n getPaymentByDisplayText(text, paymentmethodid) {\r\n let matchingPayment = null;\r\n this.paymentService.PaymentTypeResponse[\"SaveMethods\"].some((method) => {\r\n try {\r\n let ending =\r\n method.Ending ||\r\n method.CreditCardNumberDisplay ||\r\n method.Last4 ||\r\n method.Name;\r\n\r\n if (ending) {\r\n ending = ending.replace(/\\*/g, \"\");\r\n }\r\n if (paymentmethodid == method.PaymentMethodID) {\r\n matchingPayment = method;\r\n return true;\r\n }\r\n if (!method.PaymentMethodID && ~text.indexOf(ending)) {\r\n matchingPayment = method;\r\n return true;\r\n }\r\n } catch (e) {\r\n console.error(\"Message\", e);\r\n return true;\r\n }\r\n });\r\n return matchingPayment;\r\n }\r\n\r\n public getTotal(): Observable {\r\n return this.cartService1.getTotalAmount();\r\n }\r\n getQuantityModel(type, item) {\r\n return this.cart1Service[\r\n type == \"pack\"\r\n ? \"packQuantity\"\r\n : type == \"autoship\"\r\n ? \"autoshipQuantity\"\r\n : item && item.UsePoints\r\n ? \"orderRewardQuantity\"\r\n : \"orderQuantity\"\r\n ];\r\n }\r\n // Payment Section\r\n addSavePayment(paymentData) {\r\n if (\r\n !this.utilityService.isEmptyObject(\r\n this.paymentService.SelectedPaymentTypes,\r\n ) &&\r\n this.paymentService.SelectedPaymentTypes.MerchantId !==\r\n paymentData.MerchantId\r\n ) {\r\n this.userService.paymentMethods = [];\r\n this.userService.isPaymentChanged = true;\r\n }\r\n this.paymentService.SelectedPaymentTypes = paymentData;\r\n this.paymentService.selectedPaymentTypeName =\r\n this.paymentService.SelectedPaymentTypes.DisplayName;\r\n if (this.paymentService.SelectedPaymentTypes.CanSavePayments) {\r\n this.paymentService.OldSelectedPaymentType =\r\n this.paymentService.SelectedPaymentTypes;\r\n this.paymentService.getPaymentData(paymentData);\r\n } else {\r\n this.paymentService.oldSelectedPaymentTypeName =\r\n this.paymentService.selectedPaymentTypeName;\r\n this.userService.paymentMethods = [];\r\n const selectpay = {\r\n CardType:\r\n this.paymentService.SelectedPaymentTypes.CardType ||\r\n this.paymentService.SelectedPaymentTypes.Name,\r\n Last4: this.paymentService.SelectedPaymentTypes.Ending,\r\n ExpireMonth: this.paymentService.SelectedPaymentTypes.Expires\r\n ? moment(this.paymentService.SelectedPaymentTypes.Expires).format(\"M\")\r\n : 0,\r\n ExpireYear: this.paymentService.SelectedPaymentTypes.Expires\r\n ? moment(this.paymentService.SelectedPaymentTypes.Expires).format(\r\n \"YYYY\",\r\n )\r\n : 0,\r\n Token: this.paymentService.SelectedPaymentTypes.PaymentMethodId\r\n ? this.paymentService.SelectedPaymentTypes.PaymentMethodId\r\n : \"\",\r\n MerchantId: this.paymentService.SelectedPaymentTypes.MerchantId,\r\n };\r\n this.userService.paymentMethods.push(selectpay);\r\n }\r\n localStorage.setItem(\"userService\", JSON.stringify(this.userService));\r\n }\r\n\r\n getPaymentDescription(payment) {\r\n if (!payment) {\r\n return \"\";\r\n }\r\n if (payment.CreditCardTypeDescription === \"Unknown\") {\r\n return payment.CreditCardTypeDescription;\r\n }\r\n const type =\r\n payment.CreditCardTypeDescription || payment.Name || payment.CardType;\r\n const numb =\r\n payment.CreditCardNumberDisplay ||\r\n new AddSymbolWithNumberPipe().transform(payment.Ending, \"*\", 4, 11) ||\r\n new AddSymbolWithNumberPipe().transform(payment.Last4, \"*\", 4, 11);\r\n return type + \" \" + numb;\r\n }\r\n\r\n removeCardDetail(payment) {\r\n const messageText =\r\n this.translate.instant(\"confirm_delete_payment_info\") +\r\n \" \" +\r\n this.getPaymentDescription(payment) +\r\n \"?\";\r\n const dialogRef1 = this.dialog.open(ConfirmDialogComponent, {\r\n maxWidth: \"400px\",\r\n data: {\r\n title: \"\",\r\n message: messageText,\r\n takeaction: this.translate.instant(\"Delete\"),\r\n noaction: this.translate.instant(\"cancel\"),\r\n },\r\n panelClass: \"\",\r\n disableClose: true,\r\n autoFocus: false,\r\n });\r\n dialogRef1.afterClosed().subscribe((dialogResult) => {\r\n if (dialogResult) {\r\n this.deleteCreditCard(payment);\r\n }\r\n });\r\n }\r\n\r\n deleteCreditCard(payment) {\r\n const DeleteCreditCardRequest = {\r\n customerId: 0,\r\n merchantid: payment.MerchantId,\r\n paymentmethodid: payment.PaymentMethodId,\r\n };\r\n this.apiService.deletePaymentMethod(DeleteCreditCardRequest).subscribe(\r\n (result) => {\r\n try {\r\n if (parseInt(result.Status, 10) === 0) {\r\n if (\r\n this.paymentService.selectedPaymentTypeName ==\r\n payment.Name + \" \" + payment.Ending\r\n ) {\r\n this.paymentService.SelectedPaymentTypes = {};\r\n this.userService.paymentMethods = [];\r\n this.paymentService.selectedPaymentTypeName = \"\";\r\n this.paymentService.selectedPaymentTypeName =\r\n this.translate.instant(\"Add_Payment_Method\");\r\n }\r\n this.notificationService.success(\r\n \"Success\",\r\n this.translate.instant(\"successfully_deleted\"),\r\n );\r\n this.paymentService.getPaymentType();\r\n } else {\r\n this.notificationService.error(\r\n \"Error\",\r\n result.Message\r\n ? result.Message\r\n : this.translate.instant(\"not_remove\"),\r\n );\r\n }\r\n } catch (ex) {\r\n console.error(\"ex\", ex);\r\n }\r\n },\r\n () => {\r\n this.notificationService.error(\r\n \"Error\",\r\n this.translate.instant(\"not_remove\"),\r\n );\r\n },\r\n () => { },\r\n );\r\n }\r\n\r\n getCvv(result) {\r\n if (result) {\r\n this.placeOrder();\r\n } else {\r\n this.isDisabledCreateOrder = false;\r\n }\r\n }\r\n\r\n checkPlaceOrder() {\r\n if (this.user.checkIfUserAuthenticatedOrNot()) {\r\n const showCvv = \"99\".split(\",\").filter((item) => {\r\n return (\r\n item && item == this.paymentService.SelectedPaymentTypes.MerchantId\r\n );\r\n }).length;\r\n if (\r\n this.paymentService.SelectedPaymentTypes &&\r\n Object.keys(this.paymentService.SelectedPaymentTypes).length &&\r\n this.userService.paymentMethods.length &&\r\n !this.isStateRestrict &&\r\n Object.keys(this.userService.shippingAddress).length > 0 &&\r\n showCvv\r\n ) {\r\n // SHow Allow CVV Model Popup\r\n const dialogData = this.dialog.open(AllowCvvComponent, {\r\n disableClose: true,\r\n panelClass: \"allowCvvModel-dialog\",\r\n autoFocus: false,\r\n });\r\n dialogData.afterClosed().subscribe((dialogResult) => {\r\n if (dialogResult) {\r\n this.getCvv(dialogResult);\r\n }\r\n });\r\n } else {\r\n this.placeOrder();\r\n }\r\n } else {\r\n // Logout and go to login\r\n this.accountService.logout();\r\n this.router.navigate([\"/login\"]);\r\n\r\n }\r\n }\r\n\r\n placeOrder() {\r\n const userData = JSON.parse(localStorage.getItem(\"user\"));\r\n const placeOrderPromise = new Promise((resolve, reject) => {\r\n // eslint-disable-next-line no-constant-condition\r\n // if (this.itemsService.selectedAutoOrderItems.length > 0 && false) {\r\n // this.notificationService.error(\"error_\", \"choose_frequency_sidecart\");\r\n // this.isDisabledCreateOrder = false;\r\n // return;\r\n // }\r\n\r\n // if (\r\n // this.userService.newUser &&\r\n // this.itemsService.selectedAutoOrderItems.length == 0\r\n // ) {\r\n // this.notificationService.error(\"error_\", \"autoship_required_msg\");\r\n // this.isDisabledCreateOrder = false;\r\n // return;\r\n // }\r\n if (this.userService.paymentMethods.length > 0) {\r\n if (\r\n this.userService.paymentMethods[0].Last4 ||\r\n this.userService.paymentMethods[0].Last4 === undefined\r\n ) {\r\n //\r\n } else {\r\n this.notificationService.error(\"error_\", \"shop_please_add_payment\");\r\n this.isDisabledCreateOrder = false;\r\n return;\r\n }\r\n } else {\r\n this.notificationService.error(\"error_\", \"shop_please_add_payment\");\r\n this.isDisabledCreateOrder = false;\r\n return;\r\n }\r\n if (\r\n this.isStateRestrict ||\r\n !Object.keys(this.userService.shippingAddress).length ||\r\n !this.userService.shippingAddress.FirstName ||\r\n !this.userService.shippingAddress.LastName ||\r\n !this.userService.shippingAddress.Street1 ||\r\n !this.userService.shippingAddress.PostalCode\r\n ) {\r\n this.notificationService.error(\"error_\", \"please_add_address\");\r\n this.isDisabledCreateOrder = false;\r\n return;\r\n }\r\n const productdetails: Array = [];\r\n _.each(this.itemsService.selectedOrderItems, (item) => {\r\n productdetails.push({\r\n ItemId: item.ItemID,\r\n IsReward: false,\r\n Quantity: !item.UsePoints ? item.Quantity : item.rewardQuantity,\r\n });\r\n });\r\n\r\n const autoshipproductdetails: Array = [];\r\n _.each(this.itemsService.selectedAutoOrderItems, (item) => {\r\n if (parseInt(item.Quantity, 10) > 0) {\r\n autoshipproductdetails.push({\r\n ItemId: item.ItemID,\r\n IsReward: false,\r\n Quantity: item.Quantity,\r\n });\r\n }\r\n });\r\n this.createOrderRequest = {\r\n customerId: userData.CustomerId,\r\n createOrder: {\r\n ShippingAddress: {\r\n Line1: this.userService.shippingAddress.Street1 || \"\",\r\n Line2: this.userService.shippingAddress.Street2 || \"\",\r\n State: this.userService.shippingAddress.Region || \"\",\r\n City: this.userService.shippingAddress.City || \"\",\r\n Zip: this.userService.shippingAddress.PostalCode || \"\",\r\n CountryCode: this.userService.shippingAddress.CountryCode || \"US\",\r\n } as OrderShippingAddress,\r\n CountryCode: this.userService.shippingAddress.CountryCode,\r\n // Attention: \"No Attention Needed\",\r\n CouponCodes: [],\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode,\r\n // FirstName: this.userService.shippingAddress.FirstName,\r\n Items: productdetails,\r\n // LastName: this.userService.shippingAddress.LastName,\r\n // OrderType: 1,\r\n // PartyId: 0,\r\n Payments: [\r\n {\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode,\r\n MerchantId: this.userService.paymentMethods[0].MerchantId,\r\n OnFileCard: \"\",\r\n OrderCreditCard: {\r\n CardToken: this.userService.paymentMethods[0].Token,\r\n NameOnCard: (this.userService.paymentMethods[0].billingInfo &&\r\n this.userService.paymentMethods[0].billingInfo.fullName) ||\r\n \"\",\r\n Last4: this.userService.paymentMethods[0].Last4,\r\n CardType: this.userService.paymentMethods[0].CardType,\r\n ExpirationMonth: this.userService.paymentMethods[0].ExpireMonth || 1,\r\n ExpirationYear: this.userService.paymentMethods[0].ExpireYear,\r\n } as OrderCreditCard,\r\n SavePayment: true,\r\n SavePaymentMethodId: this.userService.paymentMethods[0].token,\r\n },\r\n ] as Array,\r\n // Phone: this.userService.shippingAddress.Phone,\r\n PriceGroup: userData.CustomerType,\r\n ShipMethodId: this.userService.selectedShippingMethod || '0',\r\n // SpecialInstructions: \"No Instruction\",\r\n StoreId: '9D770BC91C' //this.shoppingCartService.getShoppingCart(1)[0]?.StoreID,\r\n // Custom: null,\r\n } as unknown as CreateOrder,\r\n } as CreateOrderAndAutoShip;\r\n\r\n if (autoshipproductdetails.length > 0) {\r\n this.createOrderRequest.createAutoOrder = {\r\n ShipMethodId: this.userService.selectedShippingMethod || 1,\r\n Frequency:\r\n this.persistentService.retailData.Autoship\r\n .FrequencyTypeDescription || \"Monthly\",\r\n Items: autoshipproductdetails,\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode,\r\n MerchantId: this.userService.paymentMethods[0].MerchantId,\r\n PaymentMerchantId: this.userService.paymentMethods[0].MerchantId,\r\n PaymentMethodId: this.userService.paymentMethods[0].token || this.userService.paymentMethods[0].Token,\r\n ShipAddress: {\r\n Street1: this.userService.shippingAddress.Street1 || \"\",\r\n Street2: this.userService.shippingAddress.Street2 || \"\",\r\n Street3: this.userService.shippingAddress.Street3 || \"\",\r\n Region: this.userService.shippingAddress.Region || \"\",\r\n City: this.userService.shippingAddress.City || \"\",\r\n PostalCode: this.userService.shippingAddress.PostalCode || \"\",\r\n CountryCode: this.userService.shippingAddress.CountryCode || \"US\",\r\n } as ShipAddress,\r\n ShippingAddress: {\r\n Street1: this.userService.shippingAddress.Street1 || \"\",\r\n Street2: this.userService.shippingAddress.Street2 || \"\",\r\n Street3: this.userService.shippingAddress.Street3 || \"\",\r\n Region: this.userService.shippingAddress.Region || \"\",\r\n City: this.userService.shippingAddress.City || \"\",\r\n PostalCode: this.userService.shippingAddress.PostalCode || \"\",\r\n CountryCode: this.userService.shippingAddress.CountryCode || \"US\",\r\n } as ShipAddress,\r\n StartDate: this.autoshipConfigurationService.autoshipDate,\r\n } as CreateAutoOrder;\r\n\r\n if (!this.persistentService.retailData.isNewAutoship) {\r\n this.createOrderRequest.createAutoOrder.Custom = {\r\n AutoShipId: 0,\r\n Field1: \"\",\r\n Field2: \"\",\r\n Field3: \"\",\r\n Field4: \"\",\r\n Field5: \"\",\r\n } as Custom;\r\n }\r\n }\r\n this.createOrderRequest.createOrder.PartyId =\r\n this.utilityService.getQueryParam(\"partyid\") ||\r\n localStorage.getItem(\"partyId\") ||\r\n 0;\r\n this.apiService\r\n .createCustomerOrderAndAutoship(this.createOrderRequest)\r\n .subscribe(\r\n (result) => {\r\n console.log(\"check the details in result\", result)\r\n this.isDisabledCreateOrder = false;\r\n if (result.ErrorMessage === \"CreateOrder_Failed\") {\r\n const whichCard = result.Index === \"0\" ? \"First\" : \"Second\";\r\n const message =\r\n whichCard + \" Card failed with Amount: \" + result.Amount;\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(message),\r\n );\r\n reject(this.translate.instant(message));\r\n return;\r\n }\r\n\r\n if (result.ErrorMessage === \"invalid_credit_card\") {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(result.ErrorMessage),\r\n );\r\n reject(this.translate.instant(result.ErrorMessage));\r\n return;\r\n }\r\n\r\n if (!result.Order?.OrderId && !result.AutoOrder?.AutoorderId) {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(result.ErrorMessage),\r\n );\r\n reject(this.translate.instant(result.ErrorMessage));\r\n return;\r\n }\r\n\r\n result.OrderID = result.Order?.OrderID || result.Order?.OrderId;\r\n result.AutoOrderId =\r\n result.AutoOrder?.AutoOrderID || result.AutoOrder?.AutoorderId;\r\n if (result.OrderID || result.AutoOrderId) {\r\n this.userService.newUser = false;\r\n console.log(\"check the data in environment before\")\r\n\r\n if (environment.linkTracking.isAllowed) {\r\n console.log(\"check the data in environment after\")\r\n let autoshipItems = [];\r\n // const standardItems:any = [];\r\n try {\r\n autoshipItems =\r\n JSON.parse(localStorage.getItem(\"cart.autoship\")) || [];\r\n // standardItems = JSON.parse(localStorage.getItem('cart.order')) || [];\r\n } catch (error) {\r\n //\r\n }\r\n if (result.OrderID) {\r\n try {\r\n const items = [];\r\n this.createOrderRequest.createOrder?.Items.forEach(\r\n (ele) => {\r\n this.itemsService\r\n .getProduct(ele.ItemId)\r\n .subscribe((product) => {\r\n items.push({\r\n itemId: product.ItemID,\r\n productName: product.ProductName,\r\n sku: product.SKU,\r\n quantity: ele.Quantity,\r\n qv: product.QV,\r\n cv: product.CV,\r\n bonus: product.Bonus,\r\n price: product.Price,\r\n languageCode: product.LanguageCode,\r\n currencyCode: product.CurrencyCode,\r\n });\r\n });\r\n },\r\n );\r\n const data = [\r\n {\r\n orderId: result.OrderID,\r\n customerId:\r\n this.user.userServiceModal.customerData.CustomerId,\r\n sponsorId:\r\n this.user.userServiceModal.customerData.SponsorId,\r\n orderDetail: {\r\n items: items,\r\n subTotal:\r\n this.orderService.calculateOrderResponse.SubTotal ||\r\n 0,\r\n totalAmount:\r\n this.orderService.calculateOrderResponse.Total || 0,\r\n },\r\n },\r\n ];\r\n const tempData = JSON.stringify(data);\r\n window[\"ZTM\"].setStats(\r\n environment.linkTracking.companyName,\r\n \"PlaceOrder\",\r\n tempData,\r\n );\r\n } catch (error) {\r\n //\r\n }\r\n }\r\n if (result.AutoOrderId > 0) {\r\n try {\r\n const items = [];\r\n this.createOrderRequest.createAutoOrder?.Items.forEach(\r\n (ele) => {\r\n autoshipItems.forEach((product) => {\r\n if (parseInt(product.ItemID) == ele.ItemId) {\r\n items.push({\r\n itemId: product.ItemID,\r\n productName: product.ProductName,\r\n sku: product.SKU,\r\n quantity: ele.Quantity,\r\n qv: product.QV,\r\n cv: product.CV,\r\n bonus: product.Bonus,\r\n price: product.Price,\r\n languageCode: product.LanguageCode,\r\n currencyCode: product.CurrencyCode,\r\n });\r\n }\r\n });\r\n },\r\n );\r\n const Autodata = [\r\n {\r\n orderId: result.AutoOrderId,\r\n customerId:\r\n this.user.userServiceModal.customerData.CustomerId,\r\n sponsorId:\r\n this.user.userServiceModal.customerData.SponsorId,\r\n orderDetail: {\r\n items: items,\r\n subTotal:\r\n this.orderService.calculateAutoOrderResponse\r\n .SubTotal || 0,\r\n totalAmount:\r\n this.orderService.calculateAutoOrderResponse\r\n .Total || 0,\r\n },\r\n },\r\n ];\r\n const tempData = JSON.stringify(Autodata);\r\n window[\"ZTM\"].setStats(\r\n environment.linkTracking.companyName,\r\n \"PlaceOrder\",\r\n tempData,\r\n );\r\n } catch (error) {\r\n //\r\n }\r\n }\r\n }\r\n\r\n localStorage.setItem(\"SubmitApplication\", JSON.stringify(result));\r\n if (result.Order.OrderId) {\r\n if (result.Order.Payment?.PaymentUrl) {\r\n\r\n const iframeData = result.Order.Payment?.PaymentUrl\r\n this.getpaymentMethodIframe(iframeData)\r\n } else {\r\n this.router.navigate([\"/complete\"]);\r\n }\r\n } else {\r\n this.utilityService.setAutoshipEditFlag(false);\r\n this.persistentService.retailData.isChanged = true;\r\n this.userService.isAddressChanged = false;\r\n this.userService.isPaymentChanged = false;\r\n this.userService.isShipMethodChanged = false;\r\n this.persistentService.retailData.isNewAutoship = false;\r\n this.persistentService.retailData.editAutoshipItems = [];\r\n if (\r\n result.Order?.Redirect &&\r\n result.Order.RedirectUrl &&\r\n result.Order.RedirectUrl.length > 0\r\n ) {\r\n window.location = result.Order.RedirectUrl;\r\n }\r\n if (\r\n result.AutoOrder?.Redirect &&\r\n result.AutoOrder.RedirectUrl &&\r\n result.AutoOrder.RedirectUrl.length > 0\r\n ) {\r\n window.location = result.AutoOrder.RedirectUrl;\r\n }\r\n this.router.navigate([\"/complete\"]);\r\n }\r\n\r\n }\r\n resolve(result);\r\n },\r\n () => {\r\n reject(this.translate.instant(\"some_error_occur_try_again\"));\r\n this.isDisabledCreateOrder = false;\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"some_error_occur_try_again\"),\r\n );\r\n },\r\n () => { },\r\n );\r\n });\r\n return placeOrderPromise;\r\n }\r\n getpaymentMethodIframe(data: any) {\r\n const dialogRef = this.dialog.open(HostedpaymentDialogComponent, {\r\n panelClass: \"hosted_payment-Dialog\",\r\n data: {\r\n Width: data.Width,\r\n Height: data.Height,\r\n IFrameUrl: data,\r\n isCheckout: true\r\n }\r\n });\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n this.router.navigate([\"/complete\"]);\r\n }\r\n });\r\n }\r\n showBirthWarnings() {\r\n const orderItem = this.itemsService.selectedOrderItems.some((item) => {\r\n return item.FlagCancer || item.FlagBirthDefects;\r\n });\r\n const autoshipItem = this.itemsService.selectedAutoOrderItems.some(\r\n (item) => {\r\n return item.FlagCancer || item.FlagBirthDefects;\r\n },\r\n );\r\n if (\r\n (orderItem || autoshipItem) &&\r\n this.configService.localSettings.Global.ShowBirthWarning\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n showCancerWarnings() {\r\n const orderItem = this.itemsService.selectedOrderItems.some((item) => {\r\n return item.FlagCancer || item.FlagBirthDefects;\r\n });\r\n const autoshipItem = this.itemsService.selectedAutoOrderItems.some(\r\n (item) => {\r\n return item.FlagCancer || item.FlagBirthDefects;\r\n },\r\n );\r\n if (\r\n (orderItem || autoshipItem) &&\r\n this.configService.localSettings.Global.ShowCancerWarning\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n checkQuantity(type, item) {\r\n const quantity = this.getQuantityModel(type, item)[item.ItemID];\r\n if (!Number(quantity)) {\r\n this.cart1Service.removeFromCart(\r\n item,\r\n type == \"autoship\",\r\n type == \"pack\",\r\n true,\r\n );\r\n } else {\r\n if (!item.UsePoints) {\r\n item.Quantity = quantity;\r\n } else if (item.UsePoints) {\r\n item.rewardQuantity = quantity;\r\n }\r\n if (type == \"autoship\") {\r\n localStorage.setItem(\r\n \"cart.autoship\",\r\n JSON.stringify(this.itemsService.selectedAutoOrderItems),\r\n );\r\n this.orderService.calculateAutoOrder();\r\n } else {\r\n localStorage.setItem(\r\n type == \"pack\" ? \"cart.packs\" : \"cart.order\",\r\n JSON.stringify(\r\n type == \"pack\"\r\n ? this.itemsService.selectedPacks\r\n : this.itemsService.selectedOrderItems,\r\n ),\r\n );\r\n this.orderService.calculateOrder();\r\n }\r\n }\r\n if (!this.utilityService.getAutoshipEditFlag()) {\r\n //\r\n }\r\n }\r\n getAutoOrders() {\r\n this.apiService\r\n .getCustomerAutoships(this.userService.customerData.CustomerId)\r\n .subscribe(\r\n (result: any) => {\r\n try {\r\n if (Number(result.Status) === 0) {\r\n if (result.Data && result.Data.length > 0) {\r\n\r\n // Filtering Autoships without installments\r\n result.Data = this.itemsListService.getAutoships_WithoutInstallment(result.Data);\r\n\r\n this.AutoOrdersData = this.orderPipe.transform(\r\n result.Data,\r\n \"AutoShipID\",\r\n true,\r\n );\r\n // Show selected Autoship in dropdown\r\n this.selectedAutoship =\r\n this.persistentService.retailData.CurrentSelectedAutoOrder ||\r\n this.AutoOrdersData[0].AutoShipID;\r\n }\r\n }\r\n } catch (ex) {\r\n console.error(\"ex\", ex);\r\n }\r\n },\r\n () => {\r\n this.AutoOrdersData = [];\r\n },\r\n () => { },\r\n );\r\n }\r\n\r\n changeSelectedAutosipId(id: number) {\r\n this.selectedAutoship = id;\r\n }\r\n\r\n backStep() {\r\n this.router.navigate([\"/products/all\"]);\r\n }\r\n\r\n isAutoshipChanged() {\r\n if (\r\n !moment(this.autoshipConfigurationService.autoshipDate).isSame(\r\n this.autoshipConfigurationService.autoshipDate,\r\n \"day\",\r\n )\r\n ) {\r\n return true;\r\n }\r\n if (\r\n this.persistentService.retailData.Autoship &&\r\n this.commonData.FrequencyTypes[0].ID !=\r\n this.persistentService.retailData.Autoship.FrequencyTypeID\r\n ) {\r\n return true;\r\n }\r\n if (\r\n this.userService.isAddressChanged ||\r\n this.userService.isPaymentChanged ||\r\n this.userService.isShipMethodChanged\r\n ) {\r\n return true;\r\n }\r\n\r\n if (this.utilityService.getAutoshipEditFlag()) {\r\n if (this.persistentService.retailData.isChanged) {\r\n if (\r\n _.isEqual(\r\n this.persistentService.retailData.editAutoshipItems,\r\n this.itemsService.selectedAutoOrderItems,\r\n ) &&\r\n this.itemsService.selectedOrderItems.length == 0\r\n ) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n validatePromoCode() {\r\n if (this.userService.couponInfo.promoCode) {\r\n if (this.userService.couponInfo.availableRewards.length > 0) {\r\n _.each(this.userService.couponInfo.availableRewards, (avlreward) => {\r\n if (\r\n avlreward.Code.toLowerCase() ==\r\n this.userService.couponInfo.promoCode.toLowerCase()\r\n ) {\r\n this.userService.couponInfo.RewardsForUse.push(avlreward);\r\n }\r\n });\r\n }\r\n }\r\n this.userService.couponInfo.IsAppliedcode = true;\r\n this.orderService.calculateOrder().then((result: any) => {\r\n if (result && this.userService.couponInfo.promoCode) {\r\n _.each(\r\n this.orderService.calculateOrderResponse.CouponResults,\r\n (item) => {\r\n const isInCart = this.userService.couponInfo.Allcoupons.some(\r\n (code) => {\r\n if (code.toLowerCase() == item.Code.toLowerCase()) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n );\r\n\r\n if (item.IsValid) {\r\n if (!isInCart) {\r\n this.userService.couponInfo.Allcoupons.push(item.Code);\r\n }\r\n if (this.userService.couponInfo.promoCode == item.Code) {\r\n this.notificationService.success(\r\n \"success\",\r\n \"coupon_added_success\",\r\n );\r\n }\r\n this.userService.couponInfo.promoCodeValid = true;\r\n this.userService.couponInfo.promoCode = \"\";\r\n } else {\r\n this.userService.couponInfo.promoCodeValid = false;\r\n this.userService.couponInfo.IsAppliedcode = false;\r\n this.userService.couponInfo.promoCode = \"\";\r\n if (isInCart && this.itemsService.selectedOrderItems.length) {\r\n this.userService.couponInfo.Allcoupons =\r\n this.userService.couponInfo.Allcoupons.filter((code) => {\r\n return code.toLowerCase() != item.Code.toLowerCase();\r\n });\r\n this.userService.couponInfo.RewardsForUse =\r\n this.userService.couponInfo.RewardsForUse.filter((e) => {\r\n return e.Code.toLowerCase() != item.Code.toLowerCase();\r\n });\r\n }\r\n }\r\n },\r\n );\r\n }\r\n });\r\n }\r\n\r\n promoShowHide() {\r\n let isExitCoupon = [];\r\n if (this.orderService.calculateOrderResponse.CouponResults != null) {\r\n isExitCoupon =\r\n this.orderService.calculateOrderResponse.CouponResults.filter(\r\n (Coupon: any) => {\r\n if (\r\n Coupon.Code ===\r\n \"NewCustomerPromo_\" + this.userService.customerData.BackOfficeId\r\n ) {\r\n return Coupon.Code;\r\n } else if (\r\n Coupon.IsValid &&\r\n Coupon.Code === this.userService.DynamicCouponCode.promoCode\r\n ) {\r\n return Coupon.Code;\r\n }\r\n },\r\n );\r\n }\r\n if (isExitCoupon.length > 0) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }\r\n\r\n removePromo(code) {\r\n this.userService.couponInfo.RewardsForUse = _.reject(\r\n this.userService.couponInfo.RewardsForUse,\r\n (e) => {\r\n return e.Code.toLowerCase() == code.toLowerCase();\r\n },\r\n );\r\n this.userService.couponInfo.promoCode = \"\";\r\n this.userService.couponInfo.promoCodeValid = true;\r\n this.userService.couponInfo.IsAppliedcode = false;\r\n this.userService.couponInfo.Allcoupons = _.without(\r\n this.userService.couponInfo.Allcoupons,\r\n code,\r\n );\r\n this.orderService.calculateOrder();\r\n }\r\n\r\n isCouponCode(Coupon) {\r\n const NewCustomerPromo =\r\n \"NewCustomerPromo_\" + this.userService.customerData.BackOfficeId;\r\n if (Coupon.Code === NewCustomerPromo) {\r\n return false;\r\n } else if (Coupon.Code === this.userService.DynamicCouponCode.promoCode) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }\r\n\r\n updateShipmethod(shipmethodID) {\r\n this.userService.selectedShippingMethod = shipmethodID;\r\n if (this.itemsService.selectedOrderItems.length > 0) {\r\n this.orderService.calculateOrder();\r\n }\r\n if (this.itemsService.selectedAutoOrderItems.length) {\r\n this.orderService.calculateAutoOrder();\r\n }\r\n }\r\n\r\n checkItems() {\r\n const promise = new Promise((resolve) => {\r\n if (this.userService.checkItems) {\r\n this.itemsListService\r\n .checkRestrictedState(\"\", \"\", true, true, 0, false, \"\", true, false)\r\n .then(() => {\r\n if (this.userService.shippingAddress.Region) {\r\n _.each(this.userService.restrictedStates, (state) => {\r\n if (\r\n state.toLowerCase() ===\r\n this.userService.shippingAddress.Region.toLowerCase()\r\n ) {\r\n this.isStateRestrict = true;\r\n }\r\n });\r\n }\r\n resolve(true);\r\n });\r\n } else {\r\n if (this.userService.shippingAddress.Region) {\r\n _.each(this.userService.restrictedStates, (state) => {\r\n if (\r\n state.toLowerCase() ===\r\n this.userService.shippingAddress.Region.toLowerCase()\r\n ) {\r\n this.isStateRestrict = true;\r\n }\r\n });\r\n }\r\n if (this.itemsService.selectedOrderItems.length) {\r\n this.orderService.calculateOrder(false, 1);\r\n }\r\n if (this.itemsService.selectedAutoOrderItems.length) {\r\n this.orderService.calculateAutoOrder();\r\n }\r\n }\r\n });\r\n return promise;\r\n }\r\n\r\n getfrequencyName() {\r\n return {\r\n frequency:\r\n this.persistentService.retailData.Autoship.FrequencyTypeDescription,\r\n };\r\n }\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { NotificationService } from \"../../shared/services/notification.service\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { ProductService } from \"../../shared/services/product.service\";\r\nimport { UserService } from \"../../shared/services/user.service\";\r\nimport { OrderService } from \"../../shared/services/order.service\";\r\nimport { Cart1Service } from \"../../shared/services/cart1.service\";\r\nimport { RestApiService } from \"../../shared/services/restapi.service\";\r\nimport { AccountService } from \"../../shared/services/account.service\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { CookieService } from \"ngx-cookie-service\";\r\nimport { UtilityService } from \"../../shared/services/utility.service\";\r\nimport { AutoshipConfigurationService } from \"../../shared/services/autoshipConfiguration.service\";\r\nimport { ConfigService } from \"../../shared/services/config.service\";\r\nimport { getSubdomain } from \"tldts\";\r\nimport { cloneDeep } from \"lodash\";\r\n@Component({\r\n selector: \"app-login\",\r\n templateUrl: \"./login.component.html\",\r\n styleUrls: [\"./login.component.scss\"],\r\n})\r\nexport class LoginComponent implements OnInit {\r\n public userInfo = {\r\n username: \"\",\r\n password: \"\",\r\n guestemail: \"\",\r\n };\r\n userService: UserServiceModal;\r\n public ViewSection = [];\r\n public SignupSetting = [];\r\n public guestUser = {};\r\n public issignin = true;\r\n public isguest = true;\r\n public showLoginSection: boolean = false;\r\n autoLogin: boolean = false;\r\n previousType;\r\n public checkoutpage: boolean;\r\n constructor(\r\n private titleService: Title,\r\n private router: Router,\r\n private accountService: AccountService,\r\n public user: UserService,\r\n private route: ActivatedRoute,\r\n public orderService: OrderService,\r\n public cartsService: Cart1Service,\r\n public notificationService: NotificationService,\r\n public translate: TranslateService,\r\n public itemsService: ProductService,\r\n public apiService: RestApiService,\r\n private cookieService: CookieService,\r\n public utilityService: UtilityService,\r\n public autoshipConfigurationService: AutoshipConfigurationService,\r\n public configService: ConfigService,\r\n ) {\r\n this.userService = user.userServiceModal;\r\n this.cookieService.deleteAll(\"/\");\r\n }\r\n\r\n ngOnInit() {\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_login\") + \" | \" + text,\r\n );\r\n });\r\n window.scrollTo(0, 0);\r\n this.previousType = this.userService.customerTypeID;\r\n this.load();\r\n this.route.queryParams.subscribe((param) => {\r\n if (param.type == \"checkout\") {\r\n this.checkoutpage = true;\r\n } else {\r\n this.checkoutpage = false;\r\n }\r\n });\r\n }\r\n\r\n private load() {\r\n localStorage.setItem(\"PostLoginEvents\", null);\r\n }\r\n\r\n checkitem() {\r\n return (\r\n this.itemsService.selectedOrderItems.length > 0 ||\r\n this.itemsService.selectedAutoOrderItems.length > 0\r\n );\r\n }\r\n\r\n manageflow(guest, signin) {\r\n this.isguest = guest;\r\n if (signin) {\r\n this.clearStorage();\r\n const url = \"Home\";\r\n window.open(url, \"_self\");\r\n } else {\r\n this.issignin = signin;\r\n }\r\n }\r\n\r\n private clearStorage() {\r\n this.orderService.calculateOrderResponse = {};\r\n this.cartsService.clearCart();\r\n this.user.clearData();\r\n this.user.setDefault();\r\n localStorage.removeItem(\"guestLogin\");\r\n }\r\n\r\n loginFunction(username?: string, password?: string) {\r\n localStorage.setItem(\"guestLogin\", \"false\");\r\n this.user.clearCustomerData();\r\n localStorage.removeItem(\"guestLogin\");\r\n const loginrequest = {\r\n granttype: \"password\",\r\n scope: \"office\",\r\n username: username || this.userInfo.username,\r\n password: password || this.userInfo.password,\r\n };\r\n this.apiService.Login(loginrequest).subscribe(\r\n (result) => {\r\n if (result && result.status == 200 && result.body.Status != 1) {\r\n try {\r\n localStorage.setItem(\"isLoggedIn\", \"true\");\r\n this.accountService\r\n .getCustomerData(result.body.CustomerId)\r\n .then((data: any) => {\r\n if (data && data.Data) {\r\n\r\n\r\n // Clear cart\r\n this.cartsService.clearCart();\r\n\r\n // getting userdata\r\n localStorage.setItem(\"user\", JSON.stringify(data.Data));\r\n this.userService.customerData = data.Data;\r\n localStorage.setItem(\r\n \"userService\",\r\n JSON.stringify(this.userService),\r\n );\r\n this.userService.customerTypeID =\r\n this.userService.customerData.CustomerType;\r\n if (this.previousType !== this.userService.customerTypeID) {\r\n this.userService.couponInfo.Allcoupons = [];\r\n // this.autoshipConfigurationService.autoshipDate = \"\";\r\n this.userService.shippingMethods = [];\r\n this.userService.selectedShippingMethod = 0;\r\n // this.autoshipConfigurationService.init();\r\n }\r\n // if (\r\n // !this.utilityService.isEmptyObject(\r\n // this.userService.customerData.DefaultShippingAddress,\r\n // )\r\n // ) {\r\n // this.user.setShippingAddress();\r\n // } else {\r\n // this.userService.shippingAddress =\r\n // new UserServiceModal().newshippingAddress;\r\n // }\r\n if (this.userService.customerData.DefaultShippingAddress == null) {\r\n this.userService.shippingAddress = cloneDeep(this.userService.shippingAddress);\r\n }\r\n\r\n if (this.userService.customerData.WebAlias) {\r\n this.apiService\r\n .validateWebAlias(this.userService.customerData.WebAlias)\r\n .subscribe(\r\n (res: any) => {\r\n if (!res.Data) {\r\n // calling redirect function\r\n this.userService.WebAlias =\r\n this.userService.customerData.WebAlias;\r\n this.loginredirect(this.userService.WebAlias);\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data.WebAlias) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n () => {},\r\n );\r\n } else if (this.userService.customerData.SponsorId) {\r\n this.apiService\r\n .getSearchCustomerDetail(\r\n this.userService.customerData.SponsorId,\r\n )\r\n .subscribe(\r\n (resp: any) => {\r\n if (resp.Data) {\r\n this.apiService\r\n .validateWebAlias(resp.Data.WebAlias)\r\n .subscribe(\r\n (res: any) => {\r\n if (res.Data) {\r\n // calling redirect function\r\n this.userService.WebAlias =\r\n resp.Data.WebAlias;\r\n this.loginredirect(\r\n this.userService.WebAlias,\r\n );\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n () => {},\r\n );\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data.WebAlias) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n () => {},\r\n );\r\n }\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"error_occured_try_again\",\r\n );\r\n }\r\n })\r\n .catch((error) => {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"error_occured_try_again\",\r\n );\r\n console.error(\"ex\", error);\r\n });\r\n } catch (successEx) {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n console.error(\"ex\", successEx);\r\n }\r\n } else {\r\n this.notificationService.error(\"error_\", \"Authentication Failed\");\r\n }\r\n },\r\n () => {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n },\r\n () => {},\r\n );\r\n }\r\n\r\n // *********** new method from neumi ****************\r\n private loginredirect(alias) {\r\n // let newUrl: string;\r\n // if (this.checkoutpage) {\r\n // newUrl = `${location.origin}/${alias}/checkout`;\r\n // } else {\r\n // newUrl = `${location.origin}/${alias}`;\r\n // }\r\n let newUrl: any;\r\n const subdomain = getSubdomain(window.location.host);\r\n newUrl = `${location.origin}/${alias}`;\r\n if (this.checkitem()) {\r\n this.userService.checkItems = true;\r\n window.location.assign(newUrl.replace(\"login\", \"/checkout\"));\r\n }\r\n // else if (this.itemsService.selectedAutoOrderItems.length) {\r\n // this.userService.checkItems = true;\r\n // window.location.assign(newUrl.replace(\"login\", \"products/all\"));\r\n // } \r\n else {\r\n window.location.assign(newUrl+'/products/all');\r\n }\r\n }\r\n\r\n navLoginPath(state) {\r\n this.router.navigate([state], {\r\n queryParams: { WebAlias: this.userService.WebAlias },\r\n });\r\n }\r\n\r\n redirectToForgotPassword() {\r\n this.router.navigateByUrl(\"/ForgotPassword\", { skipLocationChange: false });\r\n }\r\n isMobile(): boolean {\r\n return false;\r\n }\r\n\r\n createGuestCustomer(guestemail) {\r\n this.userService.customerTypeID = 2;\r\n const randomPassword = \"6Zy$Ce6yrzz\";\r\n const request = {\r\n CustomerType: 2,\r\n EmailAddress: guestemail,\r\n FirstName: \"Guest User\",\r\n LastName: \"Guest User\",\r\n PrimaryAddress: {\r\n Street1: \"No Address\",\r\n Region: this.userService.regionMainState || \"UT\",\r\n CountryCode: this.configService.commonData.selectedCountry || \"us\",\r\n },\r\n SponsorId: this.userService.enrollerInfo.CustomerId || 2,\r\n Username: guestemail,\r\n Password: randomPassword,\r\n };\r\n this.accountService.createGuestUser(request).subscribe(\r\n (result) => {\r\n try {\r\n if (Number(result.Data) > 0) {\r\n this.loginFunction(this.userInfo.guestemail, randomPassword);\r\n this.userService.newUser = true;\r\n\r\n this.notificationService.success(\r\n \"Success\",\r\n \"customer_created_successfully\",\r\n );\r\n } else {\r\n this.notificationService.error(\"error_\", result.ErrorDescription);\r\n }\r\n } catch (ex) {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n }\r\n },\r\n () => {\r\n // Do stuff whith your error\r\n },\r\n () => {},\r\n );\r\n }\r\n\r\n showLogin(value: boolean) {\r\n this.showLoginSection = value;\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

SIGN In

\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n\r\n\r\n\r\n\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\n@Component({\r\n selector: \"app-faq\",\r\n templateUrl: \"./faq.component.html\",\r\n styleUrls: [\"./faq.component.scss\"],\r\n})\r\nexport class FaqComponent implements OnInit {\r\n constructor(\r\n private titleService: Title,\r\n public translate: TranslateService,\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\"FAQ\" + \" | \" + text);\r\n });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n What is do i have to tell you a few lorem?\r\n \r\n \r\n

\r\n Lorem ipsum dolor sit amet, consectetur adi pisi cing elit, sed do eiusmod tempor exercitationemut labore. Love life’s sweetest reward Let it flow it floats back to you.\r\n

\r\n
\r\n \r\n \r\n \r\n What is do i have to tell you a few lorem?\r\n \r\n \r\n

\r\n Lorem ipsum dolor sit amet, consectetur adi pisi cing elit, sed do eiusmod tempor exercitationemut labore. Love life’s sweetest reward Let it flow it floats back to you.\r\n

\r\n
\r\n \r\n \r\n \r\n What is do i have to tell you a few lorem?\r\n \r\n \r\n

\r\n Lorem ipsum dolor sit amet, consectetur adi pisi cing elit, sed do eiusmod tempor exercitationemut labore. Love life’s sweetest reward Let it flow it floats back to you.\r\n

\r\n
\r\n \r\n \r\n \r\n What is do i have to tell you a few lorem?\r\n \r\n \r\n

\r\n Lorem ipsum dolor sit amet, consectetur adi pisi cing elit, sed do eiusmod tempor exercitationemut labore. Love life’s sweetest reward Let it flow it floats back to you.\r\n

\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Product1233 } from \"src/app/modals/product.model\";\r\n\r\n@Component({\r\n selector: \"app-error-page\",\r\n templateUrl: \"./error-page.component.html\",\r\n styleUrls: [\"./error-page.component.sass\"],\r\n})\r\nexport class ErrorPageComponent implements OnInit {\r\n constructor(\r\n private titleService: Title,\r\n public translate: TranslateService,\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_404\") + \" | \" + text,\r\n );\r\n });\r\n this.filterdata();\r\n }\r\n filterdata() {\r\n const json: Product1233[] = [\r\n {\r\n Id: 340,\r\n Sku: \"30FCD\",\r\n KitLevel: 0,\r\n Category: {\r\n Id: 14,\r\n Name: \"Energy\",\r\n Description: \"\",\r\n DisplayIndex: 2,\r\n ImageUrl: null,\r\n ParentId: 0,\r\n ProductLineId: 1,\r\n ShortDescription: \"\",\r\n StoreIds: [1, 2, 3, 4, 5],\r\n HasChildren: false,\r\n },\r\n ChargeShipping: true,\r\n Disabled: false,\r\n Height: 0,\r\n Image: \"/focus_30_nobackground.png\",\r\n Length: 0,\r\n LengthUnitOfMeasure: \"cm\",\r\n ManufacturerPartNum: \"\",\r\n OutOfStockStatus: 1,\r\n PackCount: 0,\r\n PackageGroupId: 1,\r\n PreferedVendorId: 0,\r\n SortOrder: 8,\r\n TaxClassId: 18,\r\n ProductClass: 1,\r\n TrackStock: true,\r\n UnitOfMeasure: \"\",\r\n Upc: \"\",\r\n Weight: 12,\r\n WeightUnitOfMeasure: \"oz\",\r\n Width: 0,\r\n FlagCancer: false,\r\n FlagBirthDefects: false,\r\n HasKitGroups: false,\r\n HsCode: \"\",\r\n Custom: {\r\n ItemId: 0,\r\n Field1: \"\",\r\n Field2: \"\",\r\n Field3: \"\",\r\n Field4: \"\",\r\n Field5: \"\",\r\n },\r\n FastStart: {\r\n Gen1: 0,\r\n Gen2: 0,\r\n Gen3: 0,\r\n Gen4: 0,\r\n Gen5: 0,\r\n Gen6: 0,\r\n Gen7: 0,\r\n Gen8: 0,\r\n Gen9: 0,\r\n Gen10: 0,\r\n },\r\n Images: [\r\n {\r\n Description: \"/Focus_Single_Serve-Web-Top.png\",\r\n Path: \"/Focus_Single_Serve-Web-Top.png\",\r\n },\r\n {\r\n Description: \"/Focus-Stick_Pack-Front.png\",\r\n Path: \"/Focus-Stick_Pack-Front.png\",\r\n },\r\n {\r\n Description: \"/Focus-Stick_Pack-Back2.png\",\r\n Path: \"/Focus-Stick_Pack-Back2.png\",\r\n },\r\n ],\r\n Languages: [\r\n {\r\n Description: \"

Energy* / Clarity* / Memory*

\\n

Focus is a proprietary, nootropic blend made with clean, natural energy sources to help you achieve a zen-like state of concentration. Incorporate Focus into your daily routine to help battle distractions and stay on top of your game all day long. 

\\n
    \\n
  • ALPHASIZE® - Helps maintain and improve memory, concentration, focus & helps to increase peak force & power output, strength & agility*
  • \\n
  • Beet Root Powder - Promotes improved natural energy and stamina*
  • \\n
  • Natural Green Tea Extract + L-Theanine - Combination promotes heightened focus, awareness, energy and mental endurance*
  • \\n
  • L-Tyrosine - Supports learning, memory, and alertness*
  • \\n
  • Naturally flavored, no added sugars - Dragon Fruit
  • \\n
  • Informed-Sport & Informed-Choice Certified**
  • \\n
\",\r\n LanguageCode: \"en\",\r\n ProductName: \"Focus Single Serves (30)\",\r\n SeoKeywords: \"\",\r\n Specifications: \"

Directions:
1 stick pack + 8 oz of water

\\n

Non-GMO - Dairy Free - Preservative Free - No Gluten, Wheat, Yeast, or Diary - No Added Preservatives or Colors - Vegan & Vegetarian friendly

\\n

**This product has been tested by Informed-Choice & Informed-Sport. Informed-Choice & Informed-Sport are  quality assurance programs for sports nutrition products which certifies that a supplement or product has been 'skip-lot' tested (tested at least on a monthly basis) for banned substances by LGC's world class sports anti-doping lab. Verify your product: click here to search your lot numberto confirm certification.

\\n

*These statements have not been evaluated by the Food and Drug Administration. This product is not intended to diagnose, treat, cure or prevent any disease.

\",\r\n },\r\n ],\r\n Options: [],\r\n OptionsMap: [],\r\n Discounts: [\r\n {\r\n Id: 32184,\r\n Bonus: 7.4,\r\n End: null,\r\n Price: 66.5,\r\n PriceCurrency: \"USD\",\r\n Cv: 37,\r\n Qv: 37,\r\n RewardPointsEarned: 0,\r\n Start: null,\r\n Type: 1,\r\n Stores: [3, 5],\r\n OrderType: [1, 2],\r\n PriceGroups: [2, 7],\r\n Regions: [4, 1],\r\n },\r\n {\r\n Id: 32185,\r\n Bonus: null,\r\n End: null,\r\n Price: 49.95,\r\n PriceCurrency: \"USD\",\r\n Cv: 37,\r\n Qv: 37,\r\n RewardPointsEarned: 0,\r\n Start: null,\r\n Type: 1,\r\n Stores: [1, 2, 5],\r\n OrderType: [1, 2],\r\n PriceGroups: [1, 3, 4, 5, 6],\r\n Regions: [1],\r\n },\r\n {\r\n Id: 32186,\r\n Bonus: null,\r\n End: null,\r\n Price: 50,\r\n PriceCurrency: \"RWD\",\r\n Cv: 0,\r\n Qv: null,\r\n RewardPointsEarned: 0,\r\n Start: null,\r\n Type: 1,\r\n Stores: [1, 2],\r\n OrderType: [1],\r\n PriceGroups: [1, 3, 4, 5, 6],\r\n Regions: [1],\r\n },\r\n ],\r\n },\r\n ];\r\n try {\r\n json.filter((poiDataArray: Product1233) => {\r\n return poiDataArray.Discounts.some((discount) => {\r\n return (\r\n discount.Regions.indexOf(1) > -1 &&\r\n discount.PriceCurrency === \"USD\" &&\r\n discount.PriceGroups.indexOf(2) > -1 &&\r\n discount.Stores.indexOf(3) > -1\r\n );\r\n });\r\n });\r\n } catch (e) {\r\n //\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n Oops! Error 404\r\n
\r\n
\r\n Page Not Found\r\n
\r\n
\r\n

We can't seem to find the page you're looking for.

\r\n
\r\n \r\n
\r\n
\r\n","import { Injectable } from \"@angular/core\";\r\n\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class ValidateKeywordService {\r\n thisobj = {};\r\n WordsObject: any = {};\r\n arr = [];\r\n constructor() {}\r\n\r\n searchStringInArray(str, strArray) {\r\n try {\r\n const wordlist = str.split(\" \");\r\n\r\n for (const val of strArray) {\r\n if (val) {\r\n const strg = val.toLowerCase().trim();\r\n const re = new RegExp(\r\n \"(^|\\\\+|\\\\W)\" + strg.toString() + \"($|\\\\+|\\\\W)\",\r\n );\r\n if (str.toLowerCase().match(re) || val === str) {\r\n this.arr.push(val);\r\n this.WordsObject = {\r\n key: this.arr,\r\n };\r\n break;\r\n } else {\r\n for (const val1 of wordlist) {\r\n if (strg === val1) {\r\n this.arr.push(val);\r\n this.WordsObject = {\r\n key: this.arr,\r\n };\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (ex) {\r\n console.warn(ex);\r\n }\r\n }\r\n\r\n CheckValidation(array, text) {\r\n this.WordsObject = {};\r\n this.arr = [];\r\n if (array && text) {\r\n this.searchStringInArray(text, array);\r\n }\r\n if (this.arr.length > 0) {\r\n this.WordsObject.isvalid = false;\r\n return this.WordsObject;\r\n } else {\r\n this.WordsObject.key = [];\r\n this.WordsObject.isvalid = true;\r\n return this.WordsObject;\r\n }\r\n }\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { NotificationService } from \"../../shared/services/notification.service\";\r\nimport { ProductService } from \"../../shared/services/product.service\";\r\nimport { RestApiService } from \"../../shared/services/restapi.service\";\r\nimport { UserService } from \"../../shared/services/user.service\";\r\nimport { getSubdomain } from \"tldts\";\r\nimport { ConfigService } from \"../../shared/services/config.service\";\r\nimport { ValidateKeywordService } from \"../../shared/services/validatekeyword.service\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { UtilityService } from \"../../shared/services/utility.service\";\r\ndeclare const Object: {\r\n // eslint-disable-next-line @typescript-eslint/ban-types\r\n keys(object: T): (keyof T)[];\r\n};\r\n\r\n@Component({\r\n selector: \"app-signup\",\r\n templateUrl: \"./signup.component.html\",\r\n styleUrls: [\"./signup.component.scss\"],\r\n})\r\nexport class SignupComponent implements OnInit {\r\n public userInfo: any = {\r\n firstName: \"\",\r\n lastName: \"\",\r\n email: \"\",\r\n username: \"\",\r\n password: \"\",\r\n confirmpassword: \"\",\r\n };\r\n userService: UserServiceModal;\r\n public loadingDetails: boolean = false;\r\n public UserNameCheck: boolean = false;\r\n public EmailCheck: boolean = true;\r\n constructor(\r\n public user: UserService,\r\n private router: Router,\r\n public notificationService: NotificationService,\r\n public apiService: RestApiService,\r\n public translate: TranslateService,\r\n public itemsService: ProductService,\r\n public configService: ConfigService,\r\n public validateKeywordService: ValidateKeywordService,\r\n public titleService: Title,\r\n public utilityService: UtilityService,\r\n ) {\r\n this.userService = user.userServiceModal;\r\n }\r\n\r\n ngOnInit(): void {\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_signup\") + \" | \" + text,\r\n );\r\n });\r\n if (\r\n Object.keys(this.userService.customerData).length ||\r\n this.userService.guestUserData.Email\r\n ) {\r\n this.notificationService.error(\"message_\", \"you_are_already_logged_in\");\r\n this.router.navigate([\"products/all\"], { skipLocationChange: false });\r\n }\r\n }\r\n\r\n createCustomer() {\r\n if (!(this.UserNameCheck && this.EmailCheck)) {\r\n return;\r\n }\r\n this.loadingDetails = true;\r\n this.userService.customerTypeID = 2;\r\n const request = {\r\n CustomerType: 2,\r\n EmailAddress: this.userInfo.email,\r\n FirstName: this.userInfo.firstName,\r\n LastName: this.userInfo.lastName,\r\n Password: this.userInfo.password,\r\n PrimaryAddress: {\r\n Street1: \"No Address\",\r\n Region: this.userService.regionMainState || \"UT\",\r\n CountryCode: this.configService.commonData.selectedCountry || \"us\",\r\n },\r\n SponsorId: this.userService.enrollerInfo.CustomerId || 2,\r\n Username: this.userInfo.username,\r\n };\r\n this.apiService.createCustomer(request).subscribe(\r\n (result) => {\r\n this.loadingDetails = false;\r\n try {\r\n if (Number(result.Data) > 0) {\r\n this.loginFunction(this.userInfo.username, this.userInfo.password);\r\n this.userService.newUser = true;\r\n this.userInfo = {};\r\n this.notificationService.success(\r\n \"Success\",\r\n \"customer_created_successfully\",\r\n );\r\n } else {\r\n this.notificationService.error(\"error_\", result.ErrorDescription);\r\n }\r\n } catch (ex) {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n }\r\n },\r\n () => {\r\n // Do stuff whith your error\r\n this.loadingDetails = false;\r\n },\r\n () => {},\r\n );\r\n }\r\n\r\n verifyUsername(username: string) {\r\n this.UserNameCheck = false;\r\n if (this.userInfo.username) {\r\n const isValidPost = this.validateKeywordService.CheckValidation(\r\n this.configService.localSettings.Global.blockword,\r\n username,\r\n );\r\n if (isValidPost && !isValidPost.isvalid) {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"username_not_available_\"),\r\n );\r\n this.UserNameCheck = false;\r\n this.userInfo.username = \"\";\r\n } else {\r\n this.loadingDetails = true;\r\n\r\n this.apiService.validateUsername(this.userInfo.username).subscribe(\r\n (result) => {\r\n this.loadingDetails = false;\r\n try {\r\n if (!result.Data) {\r\n this.UserNameCheck = true;\r\n this.notificationService.success(\r\n \"success\",\r\n this.translate.instant(\"username_available_\"),\r\n );\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"username_not_available_\"),\r\n );\r\n this.userInfo.username = \"\";\r\n }\r\n } catch (ex) {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"error_occured_try_again\"),\r\n );\r\n }\r\n },\r\n () => {\r\n // Do stuff whith your error\r\n this.loadingDetails = false;\r\n },\r\n () => {},\r\n );\r\n }\r\n }\r\n }\r\n\r\n loginFunction(userName, pass) {\r\n this.loadingDetails = true;\r\n const loginrequest = {\r\n granttype: \"password\",\r\n scope: \"office\",\r\n username: userName,\r\n password: pass,\r\n };\r\n this.apiService.Login(loginrequest).subscribe(\r\n (result) => {\r\n if (result) {\r\n try {\r\n localStorage.setItem(\"isLoggedIn\", \"true\");\r\n this.apiService.getCustomer().subscribe(\r\n (data) => {\r\n this.loadingDetails = false;\r\n if (data && data.Data) {\r\n this.userService.customerData = data.Data;\r\n this.userService.customerTypeID =\r\n this.userService.customerData.CustomerType;\r\n if (\r\n !this.utilityService.isEmptyObject(\r\n this.userService.customerData.DefaultShippingAddress,\r\n )\r\n ) {\r\n this.user.setShippingAddress();\r\n } else {\r\n this.userService.shippingAddress =\r\n new UserServiceModal().newshippingAddress;\r\n }\r\n if (this.userService.customerData.Webalias) {\r\n this.apiService\r\n .validateWebAlias(this.userService.customerData.Webalias)\r\n .subscribe(\r\n (res: any) => {\r\n if (res.Data) {\r\n this.userService.WebAlias =\r\n this.userService.customerData.Webalias;\r\n this.loginredirect();\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data.WebAlias) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n () => {},\r\n );\r\n } else if (this.userService.customerData.SponsorId) {\r\n this.apiService\r\n .getSearchCustomerDetail(\r\n this.userService.customerData.SponsorId,\r\n )\r\n .subscribe(\r\n (resp: any) => {\r\n if (resp.Data) {\r\n this.apiService\r\n .validateWebAlias(resp.Data.WebAlias)\r\n .subscribe(\r\n (res: any) => {\r\n if (res.Data) {\r\n this.userService.WebAlias =\r\n resp.Data.WebAlias;\r\n this.loginredirect();\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n () => {},\r\n );\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data.WebAlias) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n () => {},\r\n );\r\n }\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"error_occured_try_again\",\r\n );\r\n }\r\n },\r\n () => {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"error_occured_try_again\",\r\n );\r\n this.loadingDetails = false;\r\n },\r\n () => {},\r\n );\r\n } catch (successEx) {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n this.loadingDetails = false;\r\n console.error(\"ex\", successEx);\r\n }\r\n } else {\r\n this.loadingDetails = false;\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n }\r\n },\r\n () => {\r\n this.loadingDetails = false;\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n },\r\n () => {},\r\n );\r\n }\r\n\r\n loginredirect() {\r\n let newUrl: string;\r\n const subdomain = getSubdomain(window.location.host);\r\n if (subdomain) {\r\n newUrl = window.location.href.replace(\r\n subdomain,\r\n this.userService.WebAlias,\r\n );\r\n }\r\n\r\n if (\r\n this.itemsService.selectedPacks.length ||\r\n this.itemsService.selectedOrderItems.length\r\n ) {\r\n this.userService.checkItems = true;\r\n\r\n window.location.assign(newUrl.replace(\"signup\", \"checkout\"));\r\n } else if (this.itemsService.selectedAutoOrderItems.length) {\r\n this.userService.checkItems = true;\r\n\r\n window.location.assign(newUrl.replace(\"signup\", \"products/all\"));\r\n } else {\r\n window.location.assign(newUrl.replace(\"signup\", \"products/all\"));\r\n }\r\n }\r\n\r\n // For check android Mobile only\r\n validEmailData(value) {\r\n this.userInfo.email = value.replace(/\\s/g, \"\");\r\n this.verifyUserNameAndEmail();\r\n }\r\n\r\n verifyUserNameAndEmail() {\r\n const filter = new RegExp(\r\n \"^([\\\\w-\\\\.+]+)@((\\\\[[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.)|(([\\\\w-]+\\\\.)+))([a-zA-Z]{2,10}|[0-9]{1,3})(\\\\]?)$\",\r\n );\r\n if (this.userInfo.email && filter.test(this.userInfo.email)) {\r\n this.apiService\r\n .validateEmailAddress({ EmailAddress: this.userInfo.email })\r\n .subscribe((result) => {\r\n if (!result.Data) {\r\n this.EmailCheck = true;\r\n this.notificationService.success(\"success\", \"email_available_\");\r\n } else {\r\n this.notificationService.error(\"error_\", \"error_email_exists\");\r\n this.userInfo.email = \"\";\r\n }\r\n });\r\n }\r\n }\r\n\r\n back() {\r\n this.router.navigateByUrl(\"/login\", { skipLocationChange: true });\r\n }\r\n}\r\n","
\r\n
\r\n \r\n
\r\n

Create an Account

\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","
\r\n
\r\n
\r\n \r\n
\r\n \r\n \"\"\r\n \r\n
\r\n
\r\n
\r\n

10 ? '...':'')\">\r\n

\r\n
\r\n
\r\n

{{ (product.Price | currency: companyService.selectedCurrency.CurrencyCode: 'symbol':'1.2-2' ) }}

\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
","import { Component, OnInit, Input } from \"@angular/core\";\r\nimport { SwiperConfigInterface } from \"ngx-swiper-wrapper\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { ConfigService } from \"src/app/components/shared/services/config.service\";\r\nimport { ProductDialogComponent } from \"src/app/components/shop/products/product-dialog/product-dialog.component\";\r\nimport { Cart1Service } from \"../services/cart1.service\";\r\nimport { ItemsListService } from \"../services/itemsList.service\";\r\nimport { CompanyService } from \"../services/company.service\";\r\nimport { ProductService } from \"../services/product.service\";\r\n\r\n@Component({\r\n selector: \"app-pack-carousel\",\r\n templateUrl: \"./pack-carousel.component.html\",\r\n styleUrls: [\"./pack-carousel.component.scss\"],\r\n})\r\nexport class PackCarouselComponent implements OnInit {\r\n \r\n @Input(\"products\") products;\r\n @Input(\"type\") type: string;\r\n public config: SwiperConfigInterface = {};\r\n constructor(\r\n public configService: ConfigService,\r\n private dialog: MatDialog,\r\n public cart1Service: Cart1Service,\r\n public itemListService: ItemsListService,\r\n public companyService: CompanyService,\r\n public itemsService: ProductService,\r\n ) {}\r\n public checkItem : boolean;\r\n\r\n ngOnInit() {\r\n this.config = {\r\n observer: true,\r\n slidesPerView: 3.1,\r\n spaceBetween: 16,\r\n keyboard: true,\r\n navigation: true,\r\n pagination: false,\r\n grabCursor: true,\r\n loop: false,\r\n preloadImages: false,\r\n lazy: true,\r\n breakpoints: {\r\n 480: {\r\n slidesPerView: 1,\r\n },\r\n 740: {\r\n slidesPerView: 2,\r\n },\r\n 960: {\r\n slidesPerView: 3,\r\n },\r\n 1280: {\r\n slidesPerView: 4,\r\n },\r\n },\r\n }; \r\n }\r\n\r\n public openProductDialog(product) {\r\n this.dialog.open(ProductDialogComponent, {\r\n data: product,\r\n panelClass: \"product-dialog\",\r\n });\r\n }\r\n\r\n // Add to cart\r\n public addToCart(product, type) {\r\n if (type == \"pack\") {\r\n // enroll store id 4 in this base code case\r\n this.cart1Service.addToCart(product, true, \"\", false, false, true, true);\r\n this.cart1Service.addAOScanToCart.emit();\r\n } else if (type == \"autoship\") {\r\n // autoship store id 5 in this base code case\r\n // this.cart1Service.addToCart(product, true, \"\", true, false, false, true);\r\n\r\n this.addToBothCart(product);\r\n\r\n } else if (type == \"order\") {\r\n // initial order store id 2 in this base code case\r\n this.cart1Service.addToCart(product, true, \"\", false, false, false, true);\r\n }\r\n }\r\n\r\n addToBothCart(product) {\r\n\r\n if(product.ItemID == 'e97') {\r\n\r\n const inInCart = this.itemsService.selectedOrderItems.find(i => i.ItemID == product.ItemID);\r\n const inInAutoshipCart = this.itemsService.selectedAutoOrderItems.find(i => i.ItemID == product.ItemID);\r\n \r\n if(!inInAutoshipCart) {\r\n this.cart1Service.addToCart(product, true, \"\", true, false, false, true);\r\n }\r\n \r\n if(!inInCart) {\r\n this.cart1Service.addToCart(product, true, \"\", false, false, false, true);\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Autoship\r\n this.cart1Service.addToCart(product, true, \"\", true, false, false, true);\r\n\r\n // Order\r\n this.cart1Service.addToCart(product, true, \"\", false, false, false, true);\r\n }\r\n\r\n\r\n public isAOScanInCart() {\r\n\r\n if(this.type == 'autoship') {\r\n const item = this.itemsService.selectedAutoOrderItems.find(i => i.ItemID == 'e97');\r\n return item;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n \r\n}\r\n","
\r\n
\r\n
\r\n \r\n
\r\n
{{'unifiedapplication_guest_customer' | translate}}
\r\n {{'unifiedapplication_guest_description' | translate}}\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n","import {\r\n Component,\r\n Input,\r\n AfterViewInit,\r\n} from \"@angular/core\";\r\nimport { SwiperConfigInterface } from \"ngx-swiper-wrapper\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { CartService } from \"src/app/components/shared/services/cart.service\";\r\nimport { ProductService } from \"src/app/components/shared/services/product.service\";\r\nimport { ConfigService } from \"src/app/components/shared/services/config.service\";\r\nimport { ProductDialogComponent } from \"src/app/components/shop/products/product-dialog/product-dialog.component\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport $ from \"jquery\";\r\nimport { ConfirmDialogComponent } from \"../model/confirm-dialog/confirm-dialog.component\";\r\nimport { UserService } from \"../services/user.service\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { Cart1Service } from \"../services/cart1.service\";\r\nimport { OrderService } from \"../services/order.service\";\r\n@Component({\r\n selector: \"app-customer-type-carousel\",\r\n templateUrl: \"./customer-type-carousel.component.html\",\r\n styleUrls: [\"./customer-type-carousel.component.scss\"],\r\n})\r\nexport class CustomerTypeCarouselComponent implements AfterViewInit {\r\n @Input(\"customerTypes\") customerTypes = [];\r\n @Input(\"typeSelected\") typeSelected;\r\n userService: UserServiceModal;\r\n public config: SwiperConfigInterface = {};\r\n scrollPosition;\r\n scrollDuration;\r\n paddleMargin;\r\n constructor(\r\n public configService: ConfigService,\r\n private dialog: MatDialog,\r\n private router: Router,\r\n private cartService: CartService,\r\n private cart1Service: Cart1Service,\r\n private productService: ProductService,\r\n public translate: TranslateService,\r\n public user: UserService,\r\n public activatedRoute: ActivatedRoute,\r\n private itemsService: ProductService,\r\n private orderService: OrderService\r\n ) {\r\n this.userService = user.userServiceModal;\r\n }\r\n ngAfterViewInit() {\r\n this.config = {\r\n observer: true,\r\n slidesPerView: 3,\r\n spaceBetween: 16,\r\n keyboard: true,\r\n navigation: true,\r\n pagination: false,\r\n grabCursor: true,\r\n loop: false,\r\n preloadImages: false,\r\n lazy: true,\r\n breakpoints: {\r\n 480: {\r\n slidesPerView: 1,\r\n },\r\n 740: {\r\n slidesPerView: 2,\r\n },\r\n 960: {\r\n slidesPerView: 3,\r\n },\r\n 1280: {\r\n slidesPerView: 4,\r\n },\r\n },\r\n };\r\n }\r\n\r\n public openProductDialog(product) {\r\n const dialogRef = this.dialog.open(ProductDialogComponent, {\r\n data: product,\r\n panelClass: \"product-dialog\",\r\n autoFocus: false,\r\n });\r\n dialogRef.afterClosed().subscribe((products) => {\r\n if (products) {\r\n this.router.navigate([\"/products\", product.id, product.name]);\r\n }\r\n });\r\n }\r\n\r\n // Add to cart\r\n public addToCart(product, quantity: number = 1) {\r\n this.cartService.addToCart(product, quantity);\r\n }\r\n haveScroll() {\r\n const menuInvisibleSize =\r\n this.getMenuSize() - $(\".user-types\").outerWidth() - this.paddleMargin;\r\n if (menuInvisibleSize <= 0) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n setScrollPosition() {\r\n if (\r\n $(\"#status-user-type-\" + this.typeSelected) &&\r\n $(\"#status-user-type-\" + this.typeSelected).position()\r\n ) {\r\n this.scrollPosition = $(\r\n \"#status-user-type-\" + this.typeSelected,\r\n ).position().left;\r\n $(\".user-types\").animate(\r\n { scrollLeft: this.scrollPosition },\r\n this.scrollDuration,\r\n );\r\n }\r\n }\r\n slideSectionRight() {\r\n this.scrollPosition += 250;\r\n const scrollSize =\r\n $(\".user-type\").length * $(\".user-type\").outerWidth(true);\r\n if (this.scrollPosition > scrollSize) {\r\n this.scrollPosition = scrollSize;\r\n }\r\n $(\".user-types\").animate(\r\n { scrollLeft: this.scrollPosition },\r\n this.scrollDuration,\r\n );\r\n }\r\n getMenuSize() {\r\n return $(\".user-type\").length * $(\".user-type\").outerWidth(true) - 10;\r\n }\r\n\r\n selectType(type) {\r\n if (type == this.typeSelected) {\r\n sessionStorage.setItem(\"customerSelected\", \"true\");\r\n return;\r\n }\r\n\r\n const dialogRef1 = this.dialog.open(ConfirmDialogComponent, {\r\n data: {\r\n title: this.translate.instant(\"update_customer_title\"),\r\n message: this.translate.instant(\"update_customer_text\"),\r\n takeaction: this.translate.instant(\"YES\"),\r\n noaction: this.translate.instant(\"NO\"),\r\n },\r\n disableClose: true,\r\n panelClass: \"\",\r\n autoFocus: false,\r\n });\r\n dialogRef1.afterClosed().subscribe((dialogResult) => {\r\n if (dialogResult) {\r\n sessionStorage.removeItem('items');\r\n this.typeSelected = type;\r\n sessionStorage.setItem(\"customerSelected\", \"true\");\r\n if (this.typeSelected != \"0\") {\r\n sessionStorage.setItem(\"selectedCustomerTypeID\", this.typeSelected);\r\n this.userService.customerTypeID = this.typeSelected;\r\n } else {\r\n this.typeSelected = 2;\r\n }\r\n this.router\r\n .navigate([\"/join\"], {\r\n relativeTo: this.activatedRoute,\r\n queryParams: { type: this.typeSelected },\r\n queryParamsHandling: \"merge\",\r\n })\r\n .then(() => {\r\n this.preventCartItemsOnSelectionChange(this.typeSelected);\r\n });\r\n // this.cart1Service.clearCart();\r\n }\r\n });\r\n }\r\n collapseSection(type) {\r\n if (type == this.typeSelected) {\r\n this.userService.sponsorSectionPanel = false;\r\n }\r\n }\r\n\r\n preventCartItemsOnSelectionChange(selectedCustomerType) {\r\n\r\n // Remove all Subscription Items if RETAIL type!\r\n\r\n if(selectedCustomerType == 2) {\r\n this.itemsService.selectedAutoOrderItems.length = 0;\r\n localStorage.setItem(\"cart.autoship\", JSON.stringify(this.itemsService.selectedAutoOrderItems));\r\n this.orderService.calculateAutoOrder();\r\n }\r\n\r\n // Remove AO from cart if RETAIL type!\r\n\r\n if(selectedCustomerType == 2) {\r\n const AO = this.itemsService.selectedOrderItems.find((item: any) => item.ItemID == 'e97');\r\n if(AO) {\r\n this.removeCartItems(\"order\", AO);\r\n }\r\n }\r\n\r\n const CartItems = {\r\n \"order\" : this.itemsService.selectedOrderItems || [],\r\n \"pack\" : this.itemsService.selectedPacks || [],\r\n \"autoship\" : this.itemsService.selectedAutoOrderItems || [],\r\n };\r\n\r\n const retailRequest = {\r\n CategoryId: \"all\" ,\r\n PriceGroup: selectedCustomerType,\r\n StoreID: 3,\r\n };\r\n \r\n this.itemsService.getProductByCategory(retailRequest)\r\n .subscribe((RetailStoreItems: any) => {\r\n\r\n const enrollRequest = {\r\n CategoryId: \"all\" ,\r\n PriceGroup: selectedCustomerType,\r\n StoreID: 4,\r\n };\r\n\r\n this.itemsService.getProductByCategory(enrollRequest)\r\n .subscribe((EnrollStoreItems: any) => { \r\n\r\n const AllItems = [...RetailStoreItems, ...EnrollStoreItems] || [];\r\n\r\n // Filter Items present in cart, not in API response as per new customer type\r\n\r\n const orderItemsNotExist = CartItems.order.filter((item:any) => !AllItems.some(obj => obj.ItemID == item.ItemID));\r\n const autoshipItemsNotExist = CartItems.autoship.filter((item:any) => !AllItems.some(obj => obj.ItemID == item.ItemID));\r\n const packItemsNotExist = CartItems.pack.filter((item:any) => !AllItems.some(obj => obj.ItemID == item.ItemID));\r\n\r\n // Items Removal from Cart\r\n \r\n if(orderItemsNotExist.length > 0) {\r\n for (let i = 0; i < orderItemsNotExist.length; i++) {\r\n const item = orderItemsNotExist[i];\r\n this.removeCartItems(\"order\", item);\r\n }\r\n }\r\n\r\n if(autoshipItemsNotExist.length > 0) {\r\n for (let i = 0; i < autoshipItemsNotExist.length; i++) {\r\n const item = autoshipItemsNotExist[i];\r\n this.removeCartItems(\"autoship\", item);\r\n }\r\n }\r\n\r\n if(packItemsNotExist.length > 0) {\r\n for (let i = 0; i < packItemsNotExist.length; i++) {\r\n const item = packItemsNotExist[i];\r\n this.removeCartItems(\"pack\", item);\r\n }\r\n }\r\n\r\n setTimeout(() => {\r\n window.location.reload();\r\n }, 1500);\r\n\r\n });\r\n\r\n }, () => {\r\n this.cart1Service.clearCart();\r\n window.location.reload();\r\n });\r\n }\r\n\r\n removeCartItems(type, item) {\r\n this.cart1Service.removeFromCart(item, type == \"autoship\", type == \"pack\", false);\r\n }\r\n}\r\n","
\r\n
\r\n \r\n \"\"\r\n \r\n
\r\n
\r\n
\r\n {{ \"Checkout\" | translate }}\r\n {{\"(\" + getQuanity() + \" \" + \"items\" + \")\"}}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \"companylogo\"\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n keyboard_arrow_down\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n {{country.CountryCode.toUpperCase() +\" | \"\r\n +selectedLanguageCode.toUpperCase()}}\r\n \r\n
\r\n
\r\n
\r\n keyboard_arrow_down\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n keyboard_arrow_down\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \"companylogo\"\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n Select An Enrollment Bundle\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n Select A Service\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n \r\n Select An Initial Kit\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n \r\n Select An Autoship Kit\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n location_on\r\n \r\n

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n keyboard_arrow_down\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {{ state.StateName }}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n Zip\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n account_circle\r\n \r\n

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n keyboard_arrow_down\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {{ day }}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {{ month.text }}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n {{ year.text }}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n

\r\n According to your date of birth, you are under the minimum\r\n age requirement of 18. You must be 18 or above to be a\r\n Affiliate\r\n

\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n credit_card\r\n \r\n

\r\n Payment Method\r\n

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n keyboard_arrow_down\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n 0 &&\r\n !userService.isPaymentChanged\r\n \">\r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\">\r\n {{ userService.paymentMethods[0].CardType }}\r\n {{ \" \" }}\r\n {{ userService.paymentMethods[0].Last4 }}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
0 &&\r\n (paymentService.SelectedPaymentTypes.CanSavePayments ==\r\n false ||\r\n paymentService.SelectedPaymentTypes.CanSavePayments ==\r\n 'false')\r\n \">\r\n \r\n \r\n \r\n \r\n
\r\n
0\">\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n {{ \"expires\" | translate }} \r\n \r\n /\r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n {{\r\n \"unifiedapplication_use_same_address\" | translate\r\n }}\r\n \r\n {{\r\n \"unifiedapplication_different_shipping_adddress\"\r\n | translate\r\n }}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n   \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n 0\r\n \">\r\n \r\n
\r\n
\r\n
\r\n 0\r\n \">\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n    -\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n   \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n \r\n

I accept the terms of the installment payment option for my product\r\n purchase.

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \"companylogo\"\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n shopping_cart\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n shopping_cart\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n 0\" class=\"itemCount\"\r\n [textContent]=\"': (' + getOrderQuanity() + ' items)'\">\r\n
\r\n
\r\n
\r\n
0\">\r\n \r\n
\r\n
\r\n \r\n 0\">: {{\r\n orderService?.orderBusinessVolume || 0 }}\r\n : {{\r\n orderService?.autoorderBusinessVolume || 0 }}\r\n
\r\n
\r\n
\r\n \r\n
0\">\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

\r\n \r\n \r\n
\r\n \r\n \r\n \r\n\r\n Qty:\r\n\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n close\r\n \r\n
\r\n
\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
0\">\r\n \r\n \r\n
\r\n
\r\n
\r\n What you owe\r\n today\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n\r\n 0 ? (orderService.calculateOrderResponse.SubTotal - orderService.calculateOrderResponse.DiscountTotal) : orderService.calculateOrderResponse.SubTotal ) : 0) | currency: companyService.selectedCurrency.CurrencyCode: 'symbol':'1.2-2'\">\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

\r\n \r\n \r\n
\r\n \r\n \r\n remove\r\n \r\n \r\n\r\n Qty:\r\n\r\n \r\n \r\n \r\n add\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n close\r\n \r\n
\r\n
\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
0 ||\r\n itemsService.selectedPacks.length > 0\r\n \">\r\n
\r\n
\r\n \r\n
\r\n
\r\n 0 ? (orderService.calculateOrderResponse.SubTotal - orderService.calculateOrderResponse.DiscountTotal) : orderService.calculateOrderResponse.SubTotal)\r\n : 0\r\n )\r\n | currency\r\n : companyService.selectedCurrency.CurrencyCode\r\n \">\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
0\">\r\n \r\n \r\n
\r\n
\r\n
\r\n What you'll owe next\r\n month\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n :\r\n {{\r\n orderService?.autoorderBusinessVolume || 0\r\n }}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n Qty:\r\n\r\n \r\n \r\n \r\n add\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n close\r\n \r\n
\r\n
\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
0\">\r\n
\r\n
\r\n \r\n calendar_today\r\n
\r\n
\r\n

\r\n

\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n \r\n Choose a date\r\n \r\n \r\n keyboard_arrow_down\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {{ freq.Description | translate }}\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \"companylogo\"\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { ShoppingCartService } from \"./../../shared/services/shopping-cart.service\";\r\nimport { Component, OnInit, OnDestroy, HostListener, ViewChildren, QueryList } from \"@angular/core\";\r\nimport { FormControl, FormGroup } from \"@angular/forms\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { HostedpaymentDialogComponent } from \"../../shared/model/hostedpayment-dialog/hostedpayment-dialog.component\";\r\nimport { NotificationService } from \"../../shared/services/notification.service\";\r\nimport { PaymentService } from \"../../shared/services/payment.service\";\r\nimport { ProductService } from \"../../shared/services/product.service\";\r\nimport { RestApiService } from \"../../shared/services/restapi.service\";\r\nimport { UserService } from \"../../shared/services/user.service\";\r\nimport * as _ from \"lodash\";\r\nimport * as moment from \"moment\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { ActivatedRoute, NavigationEnd, Router } from \"@angular/router\";\r\nimport { ApplicantAddress, Enrollment } from \"src/app/modals/enrollment.model\";\r\nimport { EnrollmentResponse } from \"src/app/modals/enrollmentrespnse.modal\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { ConfigService } from \"../../shared/services/config.service\";\r\nimport { State } from \"src/app/modals/state.modal\";\r\nimport { UtilityService } from \"../../shared/services/utility.service\";\r\nimport { FindEnrollerComponent } from \"../../shared/model/findenroller/findenroller.component\";\r\nimport { Cart1Service } from \"../../shared/services/cart1.service\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { OrderService } from \"../../shared/services/order.service\";\r\nimport { DSProduct } from \"src/app/modals/dsproduct.modal\";\r\nimport { ValidateKeywordService } from \"../../shared/services/validatekeyword.service\";\r\nimport { ItemsListService } from \"../../shared/services/itemsList.service\";\r\nimport $ from \"jquery\";\r\nimport { Location } from \"@angular/common\";\r\nimport { RegexService } from \"../../shared/services/regex.service\";\r\nimport { AllowCvvComponent } from \"../../shared/model/allow-cvv/allow-cvv.component\";\r\nimport { AutoshipConfigurationService } from \"../../shared/services/autoshipConfiguration.service\";\r\nimport { CompanyService } from \"../../shared/services/company.service\";\r\nimport { AccountService } from \"../../shared/services/account.service\";\r\nimport { PersistentService } from \"../../shared/services/persistent.service\";\r\nimport { environment } from \"src/environments/environment\";\r\nimport { MatExpansionPanel } from \"@angular/material/expansion\";\r\n\r\n\r\n@Component({\r\n selector: \"app-application\",\r\n templateUrl: \"./application.component.html\",\r\n styleUrls: [\"./application.component.scss\"],\r\n})\r\nexport class ApplicationComponent implements OnInit, OnDestroy {\r\n GetReplicatedSiteDomain(): string {\r\n return window.location.host;\r\n }\r\n\r\n userService: UserServiceModal;\r\n enrollmentForm: Enrollment;\r\n legacyGuestCheckout: boolean = false;\r\n IsSubmitDisable: boolean = false;\r\n ageError: boolean = false;\r\n loadingDetails: boolean = true;\r\n SubmitApplicationResponse = {};\r\n submitApplicationRequest: Enrollment;\r\n frequencyTypeID: number = 0;\r\n AutoshipItemRequired: Array = [1, 3];\r\n IsAllowKitItems: boolean = true;\r\n OrderItemRequired: boolean = true;\r\n allowedCountries = [];\r\n selectedCountry: string = \"us\";\r\n shippingAddressGroup: FormGroup;\r\n accountInfoGroup: FormGroup;\r\n paymentMethodGroup: FormGroup;\r\n shippingNewAddressGroup: FormGroup;\r\n isShowKit: boolean = false;\r\n public country;\r\n public userType;\r\n selectedLanguageCode;\r\n states: Array = [];\r\n selectedState: string = \"UT\";\r\n model = {};\r\n days = [];\r\n months = [];\r\n years = [];\r\n selectedStateControl = new FormControl(this.selectedState);\r\n panelShippingAddress: boolean = true;\r\n panelAccountInfo: boolean = false;\r\n panelPaymentMethod: boolean = false;\r\n noOfStepsVerified: number = 0;\r\n UserNameCheck;\r\n ApplicationSteps: any = {};\r\n public currentStep;\r\n isShowUpDown = [];\r\n CurrentSection = {};\r\n finalStep;\r\n typeSelected;\r\n scrollDuration: number = 2;\r\n scrollPosition: number = 0;\r\n paddleMargin: number = 24;\r\n lastQuantity: 0;\r\n public commonData;\r\n public AutoshipMinDate: Date;\r\n public AutoshipMaxDate: Date;\r\n selectedfrequencyTypeID: 0;\r\n ReplicatedSiteUrl: string = this.GetReplicatedSiteDomain();\r\n checkboxes: any = {};\r\n StatesResponse: [];\r\n StateNameToggel: boolean = false;\r\n isPanelOpen: boolean = false;\r\n productsAutoshipStore: Array = [];\r\n productskitStore: Array = [];\r\n productswholesaleStore: Array = [];\r\n productsRetailPriceAutoship: Array = [];\r\n productsRetailPriceKit: Array = [];\r\n productsRetailPriceWholesale: Array = [];\r\n RegionIDForRequest: number;\r\n productsSmartServices = [];\r\n AllEnrollmentKitItems: Array = [];\r\n installmentAutoshipEligibleItems = [];\r\n @ViewChildren(MatExpansionPanel) MatExpansionPanels: QueryList;\r\n CartSidebar: any = null;\r\n AoScanCode: string | number = 'e97';\r\n\r\n constructor(\r\n public utilityService: UtilityService,\r\n private titleService: Title,\r\n public configService: ConfigService,\r\n public route: ActivatedRoute,\r\n public dialog: MatDialog,\r\n public itemsService: ProductService,\r\n public apiService: RestApiService,\r\n public user: UserService,\r\n public notificationService: NotificationService,\r\n public paymentService: PaymentService,\r\n public translate: TranslateService,\r\n public cart1Service: Cart1Service,\r\n public orderService: OrderService,\r\n public validateKeyword: ValidateKeywordService,\r\n public itemsListService: ItemsListService,\r\n public location: Location,\r\n public regexService: RegexService,\r\n public router: Router,\r\n public autoshipConfigurationService: AutoshipConfigurationService,\r\n public companyService: CompanyService,\r\n public accountService: AccountService,\r\n public shoppingCartService: ShoppingCartService,\r\n public persistentService: PersistentService,\r\n ) {\r\n this.userService = this.user.userServiceModal;\r\n this.utilityService.isShowSimplifiedheader = true;\r\n this.allowedCountries = JSON.parse(\r\n sessionStorage.getItem(\"allowedCountries\"),\r\n );\r\n const selectedCountry =\r\n sessionStorage.getItem(\"selectedCountry\") === \"undefined\"\r\n ? null\r\n : sessionStorage.getItem(\"selectedCountry\");\r\n\r\n this.selectedCountry = selectedCountry;\r\n\r\n const selectedCustomerTypeID =\r\n sessionStorage.getItem(\"selectedCustomerTypeID\") === \"undefined\"\r\n ? null\r\n : sessionStorage.getItem(\"selectedCustomerTypeID\");\r\n this.selectedLanguageCode = sessionStorage.getItem(\"selectedLanguageCode\");\r\n\r\n const userType = _.find(\r\n configService.commonSettings.CustomerTypes,\r\n (customerType) => {\r\n return (\r\n customerType.ID ===\r\n (parseInt(this.route.snapshot.queryParams.type, 10) ||\r\n this.typeSelected ||\r\n parseInt(selectedCustomerTypeID, 10) ||\r\n 1)\r\n );\r\n },\r\n );\r\n\r\n\r\n // Defaulting to QLA, if direct comes to join page\r\n\r\n try {\r\n const url = new URL(window.location.href);\r\n if(!url.searchParams.get(\"type\")) {\r\n this.userService.customerTypeID = 1;\r\n }\r\n } catch (error) {\r\n //\r\n }\r\n\r\n\r\n const country = _.find(this.allowedCountries, (item) => {\r\n return item.CountryCode.toLowerCase() === (selectedCountry || \"us\");\r\n });\r\n this.country = country;\r\n this.configService\r\n .getCommonSetting(\r\n this.country.CountryCode,\r\n this.selectedLanguageCode || this.commonData.selectedLanguage,\r\n )\r\n .then(() => {\r\n \r\n this.handlePaymentMethodServices(); // Get Payment Methods !\r\n\r\n if(configService.isSettingClientRegionsDone) {\r\n this.handleProductsFetching();\r\n } else {\r\n this.configService.ClientRegionsSetSuccessfully.subscribe((res) => {\r\n if (res) { \r\n this.handleProductsFetching();\r\n }\r\n });\r\n }\r\n });\r\n this.userType = userType;\r\n if (this.userType) {\r\n this.userService.customerTypeID = this.userType.ID;\r\n }\r\n this.typeSelected = this.userType.ID || \"0\";\r\n\r\n this.enrollmentForm = {} as Enrollment;\r\n this.enrollmentForm.ApplicantAddress =\r\n this.enrollmentForm.ApplicantAddress || ({} as ApplicantAddress);\r\n this.enrollmentForm.billingAddressSame = true;\r\n this.commonData = this.configService.getConfig();\r\n this.selectedfrequencyTypeID =\r\n this.persistentService.retailData.Autoship.FrequencyTypeID;\r\n this.AutoshipMinDate = moment()\r\n .add(this.configService.localSettings.Autoship.AutoshipMinDate, \"days\")\r\n .toDate();\r\n this.AutoshipMaxDate = moment()\r\n .add(this.configService.localSettings.Autoship.AutoshipMaxDate, \"days\")\r\n .toDate();\r\n\r\n // Maipulating formdata from sessionstorage when page changes\r\n this.router.events.subscribe((event) => {\r\n if (\r\n event instanceof NavigationEnd &&\r\n event.url.indexOf(\"complete\") == -1 &&\r\n event.url.indexOf(\"join\") == -1\r\n ) {\r\n sessionStorage.setItem(\"FormData\", JSON.stringify(this.enrollmentForm));\r\n } else if (event instanceof NavigationEnd && event.url == \"/join\") {\r\n this.setFormData();\r\n } else if (event instanceof NavigationEnd && event.url == \"/complete\") {\r\n sessionStorage.removeItem(\"FormData\");\r\n }\r\n });\r\n\r\n // if(this.userService.customerTypeID == 2) {\r\n // this.userService.sponsorSectionPanel = false;\r\n // }\r\n }\r\n\r\n\r\n // Products Fetching and Other work\r\n handleProductsFetching() {\r\n \r\n this.RegionIDForRequest = this.companyService.getRegionID(\r\n this.country.CountryCode,\r\n );\r\n\r\n if (this.userService.customerTypeID == 3) {\r\n setTimeout(() => this.itemsForCustomerPC(), 0);\r\n } \r\n // else if (this.userService.customerTypeID == 2) {\r\n // setTimeout(() => this.itemsForCustomerRetail(), 0);\r\n // } \r\n else if (this.userService.customerTypeID == 1) {\r\n setTimeout(() => this.itemsForCustomerIBO(), 0);\r\n }\r\n\r\n // Handle MemberShipFees\r\n if (this.userService.customerTypeID != 1) {\r\n this._handleMembershipFee(); // It's basically removing if exist and not type 1!\r\n }\r\n\r\n // replace this if api accept string instead of integer\r\n // this.paymentService.getPaymentType(this.enrollmentForm.ShippingAddress?.CountryCode?.toLowerCase() == 'us' ? 'ut' : this.enrollmentForm.ShippingAddress?.Region, this.enrollmentForm.ShippingAddress?.CountryCode).then(() => {\r\n \r\n \r\n }\r\n\r\n handlePaymentMethodServices() {\r\n\r\n /**\r\n * Now, Payment Merchants with real REGION ID is fetched from getStateName() method.\r\n * Check for more reference!\r\n */\r\n return;\r\n\r\n \r\n this.RegionIDForRequest = this.companyService.getRegionID(\r\n this.country.CountryCode,\r\n );\r\n\r\n this.paymentService\r\n .getPaymentType(\r\n this.RegionIDForRequest,\r\n this.enrollmentForm.ShippingAddress?.CountryCode,\r\n )\r\n .then(() => {\r\n\r\n this.userService.paymentMethods = this.userService.paymentMethods || [];\r\n this.userService.couponInfo.promoCodeValid = undefined;\r\n this.paymentService.PaymentDataResponse =\r\n this.paymentService.PaymentDataResponse || {};\r\n // If they've already set up a split payment and try to add autoship items, only allow one payment method\r\n if (this.countPaymentMethods() > 1) {\r\n this.userService.paymentMethods = [\r\n this.userService.paymentMethods[0],\r\n ];\r\n }\r\n });\r\n }\r\n\r\n // Setting formdata from session storage to page\r\n setFormData() {\r\n if (sessionStorage.getItem(\"FormData\")) {\r\n this.enrollmentForm = JSON.parse(sessionStorage.getItem(\"FormData\"));\r\n }\r\n }\r\n //\r\n\r\n // Setting formdata into session before reload event starts\r\n @HostListener(\"window:beforeunload\", [\"$event\"]) saveFormData() {\r\n sessionStorage.setItem(\"FormData\", JSON.stringify(this.enrollmentForm));\r\n }\r\n //\r\n\r\n ngOnInit(): void {\r\n\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\"Join\" + \" | \" + text);\r\n });\r\n\r\n this.getStates();\r\n\r\n this.cart1Service.addAOScanToCart.subscribe(() => {\r\n this._handleAOScanWithBundle();\r\n });\r\n\r\n this.days = this.utilityService.birthDays();\r\n this.months = this.utilityService.birthMonths();\r\n this.years = this.utilityService.birthYears();\r\n sessionStorage.setItem(\"IsEnrollment\", \"true\");\r\n this.setSteps(1);\r\n\r\n this.autoshipConfigurationService.autoshipDate = this\r\n .autoshipConfigurationService.autoshipDate\r\n ? this.autoshipConfigurationService.autoshipDate\r\n : $(\"#startdate\").val();\r\n\r\n if (this.autoshipConfigurationService.autoshipDate) {\r\n $(\"#startdate\").val(this.autoshipConfigurationService.autoshipDate);\r\n }\r\n\r\n // Enable Disable Steps\r\n if (this.userService.customerTypeID == 1) {\r\n setTimeout(() => {\r\n $(\".card\")\r\n .find(\".toggle-ul.step_\" + 1)\r\n .slideDown(200);\r\n }, 2500);\r\n } else {\r\n setTimeout(() => {\r\n $(\".card\")\r\n .find(\".toggle-ul.step_\" + 1)\r\n .slideDown(200);\r\n }, 200);\r\n }\r\n\r\n $(\"#ds_application2\").on(\"click\", (event) => {\r\n const $target = $(event.target);\r\n for (let index = 1; index <= this.userService.TotalSteps; index++) {\r\n if (\r\n !$target.closest(\"#step_\" + index).length &&\r\n $(\"#step_\" + index + \" .step_\" + index + \".toggle-ul\").length &&\r\n $(\"#step_\" + index + \" .step_\" + index + \".toggle-ul\").css(\r\n \"display\",\r\n ) != \"none\"\r\n ) {\r\n $(\"#step_\" + index + \" .step_\" + index + \".toggle-ul\").slideToggle(\r\n \"slow\",\r\n \"swing\",\r\n () => {},\r\n );\r\n }\r\n }\r\n });\r\n this.isShowUpDown[3] = true;\r\n this.finalStep = this.userService.customerTypeID == 1 ? 6 : 5;\r\n\r\n setTimeout(() => {\r\n $(\"html,body\").animate({ scrollTop: 0 }, \"slow\");\r\n $(() => {\r\n this.CurrentSection = {};\r\n this.CurrentSection[3] = true;\r\n let countDefault = 0;\r\n $(\"#step_3\")\r\n .find(\"input[type='tel'],input[type='text']\")\r\n .each(() => {\r\n if (!$(this).val() && countDefault == 0) {\r\n $(this).trigger(\"focus\");\r\n $(this).trigger(\"select\");\r\n countDefault++;\r\n }\r\n });\r\n });\r\n }, 1000);\r\n\r\n if (sessionStorage.getItem(\"FormData\")) {\r\n this.enrollmentForm = JSON.parse(sessionStorage.getItem(\"FormData\"));\r\n }\r\n }\r\n\r\n updateStickyCart() {\r\n // this.CartSidebar && this.CartSidebar.updateSticky();\r\n }\r\n\r\n ngAfterViewInit() {\r\n\r\n this.cart1Service.errorExist.subscribe(() => {\r\n this.MatExpansionPanels.forEach((panel) => panel.open());\r\n this.updateStickyCart();\r\n });\r\n\r\n // try {\r\n // // Not for Mobile\r\n // if(window.innerWidth > 1024) {\r\n // const websiteSidebar = document.getElementById('5star-sidebar');\r\n // // eslint-disable-next-line @typescript-eslint/ban-ts-comment\r\n // // @ts-ignore\r\n // this.CartSidebar = new window.StickySidebar(websiteSidebar, {\r\n // containerSelector: '#5star-main-content',\r\n // innerWrapperSelector: '#5star-sidebar__inner',\r\n // topSpacing: 40,\r\n // bottomSpacing: 40\r\n // });\r\n // }\r\n // } catch (error) {\r\n // //\r\n // } \r\n }\r\n \r\n async itemsForCustomerIBO() {\r\n const retailPriceComparison = () => {\r\n // comparing retail kit and normal kit\r\n this.productskitStore.forEach((item) => {\r\n this.productsRetailPriceKit.forEach((item2) => {\r\n if (item.ItemID == item2.ItemID) {\r\n item[\"RetailPrice\"] = item2.Price;\r\n }\r\n });\r\n });\r\n // comparing retail autoship and normal autoship\r\n this.productsAutoshipStore.forEach((item) => {\r\n this.productsRetailPriceAutoship.forEach((item2) => {\r\n if (item.ItemID == item2.ItemID) {\r\n item[\"RetailPrice\"] = item2.Price;\r\n }\r\n });\r\n });\r\n // comparing retail wholesale and normal wholesale\r\n this.productswholesaleStore.forEach((item) => {\r\n this.productsRetailPriceWholesale.forEach((item2) => {\r\n if (item.ItemID == item2.ItemID) {\r\n item[\"RetailPrice\"] = item2.Price;\r\n }\r\n });\r\n });\r\n };\r\n\r\n if (this.userService.customerTypeID == 1) {\r\n const requestForkit = {\r\n CurrencyCode:\r\n this.companyService.selectedCurrency?.CurrencyCode || \"USD\",\r\n LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n RegionID: this.RegionIDForRequest,\r\n PriceGroup: this.userService.customerTypeID,\r\n StoreID: 4,\r\n CategoryId: 0,\r\n };\r\n // const requestforAuto = {\r\n // CurrencyCode:\r\n // this.companyService.selectedCurrency?.CurrencyCode || \"USD\",\r\n // LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n // RegionID: this.RegionIDForRequest,\r\n // PriceGroup: this.userService.customerTypeID,\r\n // StoreID: 5,\r\n // CategoryId: 0,\r\n // };\r\n const requestforInitial = {\r\n CurrencyCode:\r\n this.companyService.selectedCurrency?.CurrencyCode || \"USD\",\r\n LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n RegionID: this.RegionIDForRequest,\r\n PriceGroup: this.userService.customerTypeID,\r\n StoreID: 2,\r\n CategoryId: 0,\r\n };\r\n\r\n // const requestRetailPriceWholesale = {\r\n // CurrencyCode:\r\n // this.companyService.selectedCurrency?.CurrencyCode || \"USD\",\r\n // LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n // RegionID: this.RegionIDForRequest,\r\n // PriceGroup: 2,\r\n // StoreID: 2,\r\n // CategoryId: 0,\r\n // };\r\n // const requestRetailPriceAutoship = {\r\n // CurrencyCode:\r\n // this.companyService.selectedCurrency?.CurrencyCode || \"USD\",\r\n // LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n // RegionID: this.RegionIDForRequest,\r\n // PriceGroup: 2,\r\n // StoreID: 5,\r\n // CategoryId: 0,\r\n // };\r\n // const requestRetailPriceKit = {\r\n // CurrencyCode:\r\n // this.companyService.selectedCurrency?.CurrencyCode || \"USD\",\r\n // LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n // RegionID: this.RegionIDForRequest,\r\n // PriceGroup: 2,\r\n // StoreID: 4,\r\n // CategoryId: 0,\r\n // };\r\n\r\n // Fethching Retail Prices for all Stores\r\n // this.productsRetailPriceWholesale = await this.itemsService.getProducts(requestRetailPriceWholesale).toPromise();\r\n // this.productsRetailPriceKit = await this.itemsService.getProducts(requestRetailPriceKit).toPromise();\r\n // this.productsRetailPriceAutoship = await this.itemsService.getProducts(requestRetailPriceAutoship).toPromise();\r\n\r\n // Fethching Actual Prices for all Stores\r\n\r\n const fetchProductsFromAllStores = () => {\r\n const promise1 = new Promise((resolve) => {\r\n this.itemsService\r\n .getProducts(requestforInitial)\r\n .subscribe(\r\n (items: any) =>\r\n (this.productswholesaleStore = items) && resolve(items),\r\n );\r\n });\r\n // const promise2 = new Promise((resolve) => {\r\n // this.itemsService\r\n // .getProducts(requestforAuto)\r\n // .subscribe(\r\n // (items: any) =>\r\n // (this.productsAutoshipStore = items) && resolve(items),\r\n // );\r\n // });\r\n const promise3 = new Promise((resolve) => {\r\n this.itemsService\r\n .getProducts(requestForkit)\r\n .subscribe(\r\n (items: any) => {\r\n this.AllEnrollmentKitItems = items;\r\n this._handleMembershipFee();\r\n this._handleAOScanWithBundle();\r\n this.productskitStore = items.filter(item => { return item.CategoryId == \"36\" && item.ItemID != this.itemsListService.MembershipItemCode; });\r\n\r\n this.productskitStore = items;\r\n resolve(items);\r\n },\r\n );\r\n });\r\n // return Promise.all([promise1, promise2, promise3]);\r\n return Promise.all([promise1, promise3]);\r\n };\r\n\r\n fetchProductsFromAllStores().then((AllProducts) => {\r\n if (AllProducts) {\r\n this._getSmartServicesItems();\r\n retailPriceComparison();\r\n }\r\n });\r\n\r\n // this.productswholesaleStore = await this.itemsService.getProducts(requestforInitial).toPromise();\r\n // this.productsAutoshipStore = await this.itemsService.getProducts(requestforAuto).toPromise();\r\n // this.productskitStore = await this.itemsService.getProducts(requestForkit).toPromise();\r\n // retailPriceComparison();\r\n\r\n // first call\r\n // this.itemsService\r\n // .getProducts(requestRetailPriceWholesale)\r\n // .subscribe((p) => {\r\n // this.productsRetailPriceWholesale = p;\r\n // // second call\r\n // this.itemsService\r\n // .getProducts(requestRetailPriceKit)\r\n // .subscribe((p) => {\r\n // this.productsRetailPriceKit = p;\r\n // // third call\r\n // this.itemsService\r\n // .getProducts(requestRetailPriceAutoship)\r\n // .subscribe((p) => {\r\n // this.productsRetailPriceAutoship = p;\r\n // // fourth call\r\n // this.itemsService\r\n // .getProducts(requestforInitial)\r\n // .subscribe((p) => {\r\n // this.productswholesaleStore = p;\r\n // // fifth call\r\n // this.itemsService\r\n // .getProducts(requestforAuto)\r\n // .subscribe((p) => {\r\n // this.productsAutoshipStore = p;\r\n // // sixth call\r\n // this.itemsService\r\n // .getProducts(requestForkit)\r\n // .subscribe((p) => {\r\n // this.productskitStore = p;\r\n\r\n // // retailPriceComparison\r\n // retailPriceComparison();\r\n // });\r\n // });\r\n // });\r\n // });\r\n // });\r\n // });\r\n }\r\n }\r\n\r\n itemsForCustomerPC() {\r\n if (this.userService.customerTypeID == 3) {\r\n const requestForkit = {\r\n CurrencyCode:\r\n this.companyService.selectedCurrency?.CurrencyCode || \"USD\",\r\n LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n RegionID: this.RegionIDForRequest,\r\n PriceGroup: this.userService.customerTypeID,\r\n StoreID: 4,\r\n CategoryId: 0,\r\n };\r\n // const requestforAuto = {\r\n // CurrencyCode:\r\n // this.companyService.selectedCurrency?.CurrencyCode || \"USD\",\r\n // LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n // RegionID: this.RegionIDForRequest,\r\n // PriceGroup: this.userService.customerTypeID,\r\n // StoreID: 5,\r\n // CategoryId: 0,\r\n // };\r\n const requestforInitial = {\r\n CurrencyCode:\r\n this.companyService.selectedCurrency?.CurrencyCode || \"USD\",\r\n LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n RegionID: this.RegionIDForRequest,\r\n PriceGroup: this.userService.customerTypeID,\r\n StoreID: 2,\r\n CategoryId: 0,\r\n };\r\n // const requestRetailPriceWholesale = {\r\n // CurrencyCode:\r\n // this.companyService.selectedCurrency?.CurrencyCode || \"USD\",\r\n // LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n // RegionID: this.RegionIDForRequest,\r\n // PriceGroup: 2,\r\n // StoreID: 2,\r\n // CategoryId: 0,\r\n // };\r\n // const requestRetailPriceAutoship = {\r\n // CurrencyCode:\r\n // this.companyService.selectedCurrency?.CurrencyCode || \"USD\",\r\n // LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n // RegionID: this.RegionIDForRequest,\r\n // PriceGroup: 2,\r\n // StoreID: 5,\r\n // CategoryId: 0,\r\n // };\r\n // first call\r\n // this.itemsService\r\n // .getProducts(requestRetailPriceWholesale)\r\n // .subscribe((p) => {\r\n // this.productsRetailPriceWholesale = p;\r\n // second call\r\n // this.itemsService\r\n // .getProducts(requestRetailPriceAutoship)\r\n // .subscribe((p) => {\r\n // this.productsRetailPriceAutoship = p;\r\n // third call\r\n this.itemsService\r\n .getProducts(requestforInitial)\r\n .subscribe((p) => {\r\n this.productswholesaleStore = p;\r\n this._getSmartServicesItems();\r\n // fourth call\r\n // this.itemsService\r\n // .getProducts(requestforAuto)\r\n // .subscribe((p) => {\r\n // this.productsAutoshipStore = p;\r\n\r\n // fifth call\r\n this.itemsService\r\n .getProducts(requestForkit)\r\n .subscribe((p) => {\r\n // this.productskitStore = p.filter((item:any) => (item.ItemID != this.itemsListService.MembershipItemCode && item.ItemID != this.AoScanCode));\r\n\r\n this.productskitStore = p.filter((item:any) => { return item.CategoryId == \"36\" && item.ItemID != this.itemsListService.MembershipItemCode && item.ItemID != this.AoScanCode; });\r\n\r\n this.productskitStore = p;\r\n\r\n });\r\n\r\n // comparing retail autoship and normal autoship\r\n // this.productsAutoshipStore.forEach((item) => {\r\n // this.productsRetailPriceAutoship.forEach((item2) => {\r\n // if (item.ItemID == item2.ItemID) {\r\n // item[\"RetailPrice\"] = item2.Price;\r\n // }\r\n // });\r\n // });\r\n // comparing retail wholesale and normal wholesale\r\n // this.productswholesaleStore.forEach((item) => {\r\n // this.productsRetailPriceWholesale.forEach((item2) => {\r\n // if (item.ItemID == item2.ItemID) {\r\n // item[\"RetailPrice\"] = item2.Price;\r\n // }\r\n // });\r\n // });\r\n \r\n // end\r\n // });\r\n });\r\n // });\r\n // });\r\n }\r\n }\r\n\r\n scrollToTop() {\r\n window.scrollTo({\r\n top: 0,\r\n behavior: 'smooth'\r\n });\r\n }\r\n\r\n itemsForCustomerRetail() {\r\n if (this.userService.customerTypeID == 2) {\r\n const requestforInitial = {\r\n CurrencyCode:\r\n this.companyService.selectedCurrency?.CurrencyCode || \"USD\",\r\n LanguageCode: this.configService.commonData.selectedLanguage || \"en\",\r\n RegionID: this.RegionIDForRequest,\r\n PriceGroup: this.userService.customerTypeID,\r\n StoreID: 2,\r\n CategoryId: 0,\r\n };\r\n this.itemsService\r\n .getProducts(requestforInitial)\r\n .subscribe(\r\n (items: any) => {\r\n (this.productswholesaleStore = items);\r\n this._getSmartServicesItems();\r\n }\r\n );\r\n }\r\n }\r\n\r\n changeAffiliate() {\r\n this.dialog.open(FindEnrollerComponent, {\r\n disableClose: true,\r\n panelClass: \"findenroller-dialog\",\r\n autoFocus: false,\r\n });\r\n }\r\n\r\n customerTypeDescription() {\r\n if (!this.configService.commonSettings.CustomerTypes) {\r\n return \"\";\r\n }\r\n return _.find(\r\n this.configService.commonSettings.CustomerTypes,\r\n (customerType) => {\r\n return this.userService.customerTypeID == customerType.ID;\r\n },\r\n ).Description;\r\n }\r\n\r\n setSteps(type) {\r\n this.ApplicationSteps = {\r\n step1: { currentStep: type == 1 ? 2 : 1 },\r\n step2: { currentStep: type == 1 ? 3 : 2 },\r\n step3: { currentStep: type == 1 ? 4 : 3 },\r\n step4: { currentStep: type == 1 ? 5 : 4 },\r\n step5: { currentStep: type == 1 ? 6 : 5 },\r\n };\r\n }\r\n\r\n getpaymentMethodIframe() {\r\n this.dialog.open(HostedpaymentDialogComponent, {\r\n panelClass: \"hosted_payment-Dialog\",\r\n data: { Width: 300 }\r\n });\r\n }\r\n saveApplicationDetail() {\r\n if (\r\n !this.userService.commissionPayment &&\r\n this.userService.customerTypeID == 1\r\n ) {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"unifiedapplication_add_ssn_required\"),\r\n );\r\n return;\r\n }\r\n if (this.orderService.calculateOrderResponse.Result) {\r\n if (this.orderService.calculateOrderResponse.Result.Status !== 0) {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.orderService.calculateOrderResponse.Result.Errors,\r\n );\r\n return;\r\n }\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"unifiedapplication_error_occured_try_again\"),\r\n );\r\n return;\r\n }\r\n\r\n if (this.userService.paymentMethods.length > 0) {\r\n if (\r\n this.userService.paymentMethods[0].Last4 ||\r\n this.userService.paymentMethods[0].Last4 === undefined\r\n ) {\r\n this.scrollTo(this.ApplicationSteps.step4.currentStep);\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"unifiedapplication_add_payment_error\"),\r\n );\r\n return;\r\n }\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"unifiedapplication_add_payment_error\"),\r\n );\r\n return;\r\n }\r\n }\r\n\r\n getShipName(shipmethodID) {\r\n this.userService.selectedShippingMethod = shipmethodID;\r\n this.orderService.calculateOrder();\r\n if (this.itemsService.selectedAutoOrderItems.length > 0) {\r\n this.orderService.calculateAutoOrder();\r\n }\r\n }\r\n\r\n clearApplicationData(element) {\r\n const id = \"#\" + element.target.id;\r\n if ($(id).is(\":checked\")) {\r\n $(id).closest(\".control-group\").find(\".has-error.help-block\").remove();\r\n $(id).closest(\".control-group\").removeClass(\"has-error\");\r\n }\r\n }\r\n\r\n countPaymentMethods() {\r\n const paymentMethods = this.userService.paymentMethods;\r\n return paymentMethods ? paymentMethods.length : 0;\r\n }\r\n\r\n scrollTo(num) {\r\n $(\"html, body\").animate(\r\n {\r\n scrollTop: $(\"#step_\" + parseInt(num, 10).toString()).offset().top,\r\n },\r\n 50,\r\n );\r\n }\r\n\r\n scrollToSection(num) {\r\n $(\"html, body\").animate(\r\n {\r\n scrollTop:\r\n $(\"#step_\" + parseInt(num, 10).toString()).offset().top - 100,\r\n },\r\n 1000,\r\n );\r\n }\r\n\r\n collapseExpendSteps(num) {\r\n this.CurrentSection[num] = true;\r\n for (let index = 1; index <= this.userService.TotalSteps; index++) {\r\n if (!this.isShowUpDown[index] || num == index) {\r\n $(\"#step_\" + index)\r\n .find(\":input\")\r\n .each((i, e) => {\r\n const element = $(e);\r\n element.closest(\".control-group\").removeClass(\"has-error\");\r\n element.closest(\".control-group\").find(\".has-error\").remove();\r\n });\r\n }\r\n }\r\n\r\n setTimeout(() => {\r\n if (this.UserNameCheck) {\r\n this.noOfStepsVerified = num;\r\n for (let index = 1; index <= this.userService.TotalSteps; index++) {\r\n if (index != num) {\r\n if (\r\n $(\"#step_\" + index + \" .control-group.has-error\").length > 0 ||\r\n (this.isShowUpDown[index] && !this.isStepValidated(index))\r\n ) {\r\n $(\".card\")\r\n .find(\".step_\" + index)\r\n .slideDown(500);\r\n this.isShowUpDown[index] = true;\r\n } else {\r\n $(\".card\")\r\n .find(\".step_\" + index)\r\n .slideUp(500);\r\n this.isShowUpDown[index] = false;\r\n }\r\n } else {\r\n $(\".card\")\r\n .find(\".step_\" + index)\r\n .slideDown(500);\r\n this.isShowUpDown[index] = true;\r\n }\r\n }\r\n if (num) {\r\n setTimeout(() => {\r\n if (this.finalStep < num) {\r\n this.scrollToSection(num);\r\n }\r\n let count = 0;\r\n $(\"#step_\" + num)\r\n .find(\":input\")\r\n .each(() => {\r\n if (!$(this).val() && count == 0) {\r\n $(this).trigger(\"focus\");\r\n $(this).trigger(\"select\");\r\n count++;\r\n }\r\n });\r\n }, 500);\r\n }\r\n }\r\n }, 50);\r\n }\r\n\r\n stepCollapsed(index) {\r\n return (\r\n $(\"#step_\" + index + \" .step_\" + index + \".toggle-ul\").css(\"display\") ==\r\n \"none\"\r\n );\r\n }\r\n\r\n isStepValidated(index) {\r\n if ($(\"#step_\" + index + \" .control-group.has-error\").length > 0) {\r\n return false;\r\n } else {\r\n const required = $(\"#step_\" + index + \" .control-group [validate]\");\r\n let validated = true;\r\n _.each(required, (field) => {\r\n if (field.hasAttribute(\"validate-select\")) {\r\n const value = $(field).find(\"option:selected\").text();\r\n if (value.match(/Select/) || value === \"\") {\r\n validated = false;\r\n return;\r\n }\r\n } else if (field.hasAttribute(\"checkbox-validate\")) {\r\n if (!$(field).is(\":checked\")) {\r\n validated = false;\r\n return;\r\n }\r\n } else if (!field.value) {\r\n validated = false;\r\n return;\r\n }\r\n });\r\n return validated;\r\n }\r\n }\r\n\r\n readyForCheckout() {\r\n let validated = true;\r\n for (let index = 1; index <= this.userService.TotalSteps; index++) {\r\n validated = !!this.isStepValidated(index);\r\n if (!validated) {\r\n break;\r\n }\r\n }\r\n return validated;\r\n }\r\n\r\n submitApplication(cvv?: number) {\r\n\r\n // Products Checks\r\n\r\n /* 1) Membership Item Check */\r\n\r\n const isMembershipItemAvailable = (itemList = []) => {\r\n return itemList.find((i) => i.ItemID == this.itemsListService.MembershipItemCode);\r\n };\r\n\r\n if(this.userService.customerTypeID == 1 && !isMembershipItemAvailable(this.itemsService.selectedOrderItems)) {\r\n this._handleMembershipFee();\r\n return;\r\n }\r\n\r\n /* 2) Pick a Service Item Check */\r\n\r\n // const isSmartItemAvailable = (itemList = []) => {\r\n // return itemList.find((i) => i.isSmartItem == true) || 0;\r\n // };\r\n\r\n // if((this.userService.customerTypeID == 1) && !isSmartItemAvailable(this.itemsService.selectedAutoOrderItems)) {\r\n // this.notificationService.error(\r\n // \"error_\",\r\n // this.translate.instant(\"Please select a service\"),\r\n // );\r\n // return;\r\n // }\r\n\r\n if (\r\n this.userService.paymentMethods.length === 0 &&\r\n (this.userService.customerTypeID == 1 || this.userService.customerTypeID == 3)\r\n ) {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"Please select payment method\"),\r\n );\r\n return;\r\n }\r\n\r\n if (\r\n this.itemsService.selectedAutoOrderItems.length > 0 &&\r\n this.persistentService.retailData.Autoship.FrequencyTypeID <= 0\r\n ) {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"unifiedapplication_choose_frequency_sidecart\"),\r\n );\r\n return;\r\n }\r\n if (\r\n this.itemsService.selectedOrderItems.length == 0 &&\r\n this.configService.localSettings.Global.OrderItemRequired[\r\n this.userService.customerTypeID\r\n ]\r\n ) {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"unifiedapplication_order_item_required\"),\r\n );\r\n return;\r\n }\r\n\r\n if (\r\n this.itemsService.selectedAutoOrderItems.length == 0 &&\r\n this.configService.localSettings.Global.AutoshipItemRequired[\r\n this.userService.customerTypeID\r\n ]\r\n ) {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"unified_auto_order_item_required\"),\r\n );\r\n return;\r\n }\r\n\r\n // if (\r\n // this.userService.customerTypeID == 1 &&\r\n // this.IsAllowKitItems &&\r\n // this.itemsService.selectedPacks.length == 0\r\n // ) {\r\n // this.notificationService.error(\r\n // \"error_\",\r\n // \"unifiedapplication_kit_item_required\",\r\n // );\r\n // return;\r\n // }\r\n\r\n this.IsSubmitDisable = true;\r\n const productdetails = [];\r\n\r\n _.each(this.itemsService.selectedOrderItems, (item) => {\r\n productdetails.push({\r\n ItemID: item.ItemID,\r\n Quantity: item.Quantity,\r\n IsKit: false,\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode,\r\n });\r\n });\r\n\r\n _.each(this.itemsService.selectedPacks, (item) => {\r\n productdetails.push({\r\n ItemID: item.ItemID,\r\n Quantity: item.Quantity,\r\n IsKit: item.IsKitItem,\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode,\r\n });\r\n });\r\n\r\n /* ----------------------------------------------------------------\r\n 👇 Excluding Installment Items from Autoship ( will create later )\r\n -----------------------------------------------------------------*/\r\n\r\n const autoshipEligibleItems = this.itemsService.selectedAutoOrderItems.filter((item) => !item?.SKU.endsWith(\"-ins\"));\r\n this.installmentAutoshipEligibleItems = this.itemsService.selectedAutoOrderItems.filter((item) => item?.SKU.endsWith(\"-ins\"));\r\n\r\n /* ---------------------------------------------------------------- */\r\n \r\n const autoshipproductdetails = [];\r\n _.each(autoshipEligibleItems, (item) => {\r\n autoshipproductdetails.push({\r\n ItemID: item.ItemID,\r\n Quantity: item.Quantity,\r\n IsKit: false,\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode,\r\n });\r\n });\r\n this.submitApplicationRequest = {\r\n AssociateID: this.paymentService.PaymentDataResponse.customerId || 0,\r\n AcceptTerms: true,\r\n billingAddressSame: false,\r\n FirstName: this.enrollmentForm.FirstName,\r\n LastName: this.enrollmentForm.LastName,\r\n RomanizedFirstName: \"\",\r\n RomanizedLastName: \"\",\r\n LegalFirstName: \"\",\r\n LegalLastName: \"\",\r\n TaxID: this.enrollmentForm.TaxID,\r\n BirthDate: (\r\n (this.enrollmentForm.BirthYear || 2000) +\r\n \"-\" +\r\n (this.enrollmentForm.BirthMonth || 1) +\r\n \"-\" +\r\n (this.enrollmentForm.BirthDay || 1)\r\n ).toString(),\r\n PrimaryPhone: this.enrollmentForm.PrimaryPhone,\r\n SecondaryPhone: \"\",\r\n TextNumber: \"\",\r\n Email: this.enrollmentForm.Email,\r\n Username: this.enrollmentForm.Username,\r\n Password: this.enrollmentForm.Password,\r\n LanguageCode: this.enrollmentForm.LanguageCode || \"en\",\r\n ApplicantAddress: {\r\n Street1: this.enrollmentForm.ApplicantAddress.Street1,\r\n Street2: this.enrollmentForm.ApplicantAddress.Street2,\r\n Street3: this.enrollmentForm.ApplicantAddress.Street3,\r\n City: this.enrollmentForm.ApplicantAddress.City,\r\n Region: this.enrollmentForm.ApplicantAddress.Region,\r\n PostalCode: this.enrollmentForm.ApplicantAddress.PostalCode,\r\n CountryCode: this.enrollmentForm.ApplicantAddress.CountryCode || \"us\",\r\n },\r\n ShippingAddress: {\r\n Street1: this.enrollmentForm.ApplicantAddress.Street1,\r\n Street2: this.enrollmentForm.ApplicantAddress.Street2,\r\n Street3: this.enrollmentForm.ApplicantAddress.Street3,\r\n City: this.enrollmentForm.ApplicantAddress.City,\r\n Region: this.enrollmentForm.ApplicantAddress.Region,\r\n PostalCode: this.enrollmentForm.ApplicantAddress.PostalCode,\r\n CountryCode: this.enrollmentForm.ApplicantAddress.CountryCode || \"us\",\r\n },\r\n AssociateTypeID: this.userService.customerTypeID,\r\n AssociateBaseType: this.userService.customerTypeID,\r\n SponsorID: this.userService.enrollerInfo.CustomerId,\r\n WebPageURL:\r\n this.userService.customerTypeID === 1\r\n ? this.enrollmentForm.Username\r\n : \"\",\r\n WebPageItemID: 0,\r\n SendEmails: this.enrollmentForm.SendEmails || false,\r\n AssociateCustom: null,\r\n PlacementOverrides: null,\r\n Order: {\r\n ShipMethodID: this.userService.selectedShippingMethod || 1,\r\n StoreID: this.shoppingCartService.getShoppingCart(-1)[0]?.StoreID,\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode,\r\n Items: productdetails,\r\n CouponCodes: this.userService.couponInfo.Allcoupons || [],\r\n Payments: [\r\n {\r\n SavePaymentMethodId: this.userService.paymentMethods[0].token,\r\n OnFileCard: \"\",\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode,\r\n MerchantId: this.userService.paymentMethods[0].MerchantId,\r\n SavePayment: true,\r\n OrderRewardPoints: null,\r\n OrderCreditCard: {\r\n CardToken: this.userService.paymentMethods[0].token,\r\n NameOnCard:\r\n (this.userService.paymentMethods[0].billingInfo &&\r\n this.userService.paymentMethods[0].billingInfo.fullName) ||\r\n \"\",\r\n Last4: this.userService.paymentMethods[0].lastFour,\r\n CardType: this.userService.paymentMethods[0].CardType,\r\n ExpirationMonth:\r\n this.userService.paymentMethods[0].expireMonth || 1,\r\n ExpirationYear: this.userService.paymentMethods[0].expireYear,\r\n },\r\n AuthorizationNumber: cvv,\r\n },\r\n ],\r\n RequireSuccess: true,\r\n },\r\n };\r\n\r\n if (autoshipproductdetails.length > 0) {\r\n this.submitApplicationRequest.AutoShip = {\r\n StartDate: this.autoshipConfigurationService.autoshipDate,\r\n Frequency:\r\n this.persistentService.retailData.Autoship.FrequencyTypeID.toString(),\r\n ShipMethodID: this.userService.selectedShippingMethod || 1,\r\n Items: autoshipproductdetails,\r\n };\r\n }\r\n\r\n this.apiService\r\n .submitEnrollmentForm(this.submitApplicationRequest)\r\n .subscribe(\r\n (result: EnrollmentResponse) => {\r\n if (result.Message === \"Success\" && result.ErrorDescription == \"\") {\r\n localStorage.setItem(\r\n \"SubmitApplication\",\r\n JSON.stringify(result.Data),\r\n );\r\n \r\n sessionStorage.removeItem(\"statusVerified\");\r\n this.userService.webOffice.UserName = this.enrollmentForm.Username;\r\n this.userService.webOffice.Password = this.enrollmentForm.Password;\r\n\r\n this.loginFunction(\r\n this.enrollmentForm.Username,\r\n this.enrollmentForm.Password,\r\n result.Data.OrderStatus.OrderNumber,\r\n );\r\n this.notificationService.success(\r\n \"success\",\r\n this.translate.instant(\r\n \"unifiedapplication_successfully_enrolled\",\r\n ),\r\n );\r\n sessionStorage.removeItem(\"FormData\");\r\n } else {\r\n this.notificationService.error(\"error_\", result.Message);\r\n try {\r\n this.IsSubmitDisable = false;\r\n this.loadingDetails = false;\r\n document\r\n .getElementById(\"placeorder\")\r\n .setAttribute(\"disabled\", \"\");\r\n // Check for payment error\r\n const error = result.Message;\r\n if (error && error.length && !!~error.indexOf(\"Failed Payment\")) {\r\n const cardNumberText = \"Index:\";\r\n if (error.indexOf(cardNumberText) > -1) {\r\n const cardNumberIndex =\r\n error.indexOf(cardNumberText) + cardNumberText.length;\r\n const cardNumber =\r\n Number(error.slice(cardNumberIndex, cardNumberIndex + 1)) +\r\n 1;\r\n const cardAmountText = \"Amount:\";\r\n const cardAmountIndex =\r\n error.indexOf(cardAmountText) + cardAmountText.length;\r\n const cardAmountEndIndex = error.indexOf(\r\n \" \",\r\n cardAmountIndex,\r\n );\r\n const cardAmount = error.slice(\r\n cardAmountIndex,\r\n cardAmountEndIndex,\r\n );\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\r\n \"unifiedapplication_enrollment_invalid_card\",\r\n {\r\n cardNumber: cardNumber.toString(),\r\n cardAmount: this.currencyFilter(cardAmount),\r\n },\r\n ),\r\n );\r\n } else {\r\n this.notificationService.error(\"error_\", result.Message);\r\n }\r\n return;\r\n }\r\n\r\n this.SubmitApplicationResponse = {};\r\n sessionStorage.removeItem(\"FormData\");\r\n localStorage.removeItem(\"SubmitApplication\");\r\n localStorage.setItem(\r\n \"SubmitApplication\",\r\n JSON.stringify(result.Data),\r\n );\r\n this.SubmitApplicationResponse = result.Data;\r\n } catch (ex) {\r\n console.warn(\"ex\", ex);\r\n document\r\n .getElementById(\"placeorder\")\r\n .setAttribute(\"disabled\", \"\");\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\r\n \"unifiedapplication_error_occured_try_again\",\r\n ),\r\n );\r\n this.IsSubmitDisable = false;\r\n }\r\n }\r\n },\r\n (err) => {\r\n document.getElementById(\"placeorder\").setAttribute(\"disabled\", \"\");\r\n this.IsSubmitDisable = false;\r\n this.loadingDetails = false;\r\n console.error(err);\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\r\n \"unifiedapplication_error_occured_try_again\",\r\n ),\r\n );\r\n },\r\n );\r\n }\r\n currencyFilter(amount) {\r\n return amount;\r\n }\r\n togglePanel() {\r\n this.userService.sponsorSectionPanel =\r\n !this.userService.sponsorSectionPanel;\r\n }\r\n verifyUsername(username: string) {\r\n if (username) {\r\n const blockword = [\"test,abuse\"];\r\n const isValidPost = this.validateKeyword.CheckValidation(\r\n blockword,\r\n this.userService.webOffice.UserName,\r\n );\r\n if (isValidPost && !isValidPost.isvalid) {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"username_not_available_\"),\r\n );\r\n this.enrollmentForm.Username = \"\";\r\n } else {\r\n this.apiService.validateUsername(username).subscribe((result) => {\r\n try {\r\n if (result.Status == 1 && !result.Data) {\r\n this.notificationService.success(\r\n \"success\",\r\n this.translate.instant(\"username_available_\"),\r\n );\r\n } else {\r\n this.enrollmentForm.Username = \"\";\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"username_not_available_\"),\r\n );\r\n }\r\n } catch (ex) {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"error_occured_try_again\"),\r\n );\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n verifyUserNameAndEmail(email: string) {\r\n if (email) {\r\n this.enrollmentForm.Email = email.replace(/\\s/g, \"\");\r\n const filter = new RegExp(\r\n \"^([\\\\w-\\\\.+]+)@((\\\\[[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.)|(([\\\\w-]+\\\\.)+))([a-zA-Z]{2,10}|[0-9]{1,3})(\\\\]?)$\",\r\n );\r\n if (this.enrollmentForm.Email && filter.test(this.enrollmentForm.Email)) {\r\n this.apiService\r\n .validateEmailAddress({ EmailAddress: email })\r\n .subscribe((result) => {\r\n if (!result.Data) {\r\n this.userService.personalInfo.Email = email;\r\n this.notificationService.success(\"success\", \"email_available_\");\r\n } else {\r\n this.notificationService.error(\"error_\", \"error_email_exists\");\r\n this.enrollmentForm.Email = \"\";\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n public updatecountry(country, languagecode) {\r\n this.cart1Service.updateCountry(country, languagecode, false, false);\r\n }\r\n\r\n // Mailing Address\r\n\r\n getShippingTypes(statecall, isMailingAddress, zipCode?) {\r\n if (this.checkAddress()) {\r\n const filter = new RegExp(\r\n this.regexService.getRegex(\r\n this.configService.commonData.selectedCountry.toUpperCase(),\r\n ),\r\n );\r\n if (statecall || filter.test(zipCode)) {\r\n this.orderService.calculateOrderCall = true;\r\n this.userService.shippingAddress.Street1 =\r\n this.enrollmentForm.ApplicantAddress.Street1;\r\n this.userService.shippingAddress.Street2 =\r\n this.enrollmentForm.ApplicantAddress.Street2;\r\n this.userService.shippingAddress.City =\r\n this.enrollmentForm.ApplicantAddress.City;\r\n this.userService.shippingAddress.PostalCode =\r\n this.enrollmentForm.ApplicantAddress.PostalCode;\r\n this.userService.shippingAddress.Region =\r\n this.enrollmentForm.ApplicantAddress.Region;\r\n this.orderService.calculateOrder().then(() => {\r\n let shipM = \"\";\r\n _.each(this.userService.shippingMethods, (shipmethod) => {\r\n if (\r\n this.userService.selectedShippingMethod &&\r\n this.userService.selectedShippingMethod == shipmethod.ShipMethodID\r\n ) {\r\n shipM = shipmethod.ShipMethodID;\r\n }\r\n });\r\n if (shipM == \"\") {\r\n shipM =\r\n this.userService.shippingMethods &&\r\n (this.userService.shippingMethods[0].ShipMethodID ||\r\n this.userService.shippingMethods[0].ShipMethodId);\r\n }\r\n this.userService.selectedShippingMethod = Number(shipM);\r\n });\r\n if (this.itemsService.selectedAutoOrderItems.length > 0) {\r\n this.orderService.calculateAutoOrder();\r\n }\r\n }\r\n }\r\n }\r\n\r\n getStates() {\r\n const country = this.country.CountryCode || \"US\";\r\n this.apiService\r\n .getStates(country)\r\n .subscribe((result) => {\r\n sessionStorage.setItem(\r\n JSON.stringify(this.country.CountryCode),\r\n JSON.stringify(result.Data),\r\n );\r\n if (result.Data && result.Data.length > 0) {\r\n this.StatesResponse = result.Data;\r\n this.states = result.Data;\r\n\r\n /**\r\n * Filter out states for US;\r\n */\r\n if (country.toUpperCase() === \"US\") {\r\n const excludedStates = [\"FM\", \"AE\", \"AA\", \"AP\"];\r\n this.states = this.states.filter(state => excludedStates.indexOf(state.StateCode) == -1);\r\n }\r\n\r\n\r\n this.enrollmentForm.ApplicantAddress.Region =\r\n this.states[0]?.StateCode || result.Data[0]?.StateCode;\r\n this.userService.mailingAddress.StateName =\r\n this.userService.mailingAddress?.StateName ||\r\n this.states[0]?.StateName ||\r\n result.Data[0]?.StateName ||\r\n \"UT\";\r\n if (!this.StateNameToggel) {\r\n this.getStateName(false);\r\n this.StateNameToggel = true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n getStateName(isMailingAddress) {\r\n if (isMailingAddress) {\r\n this.userService.mailingAddress.StateName = _.filter(\r\n this.StatesResponse,\r\n (state: any) => {\r\n return (\r\n state.StateCode ===\r\n (this.userService.mailingAddress.State ||\r\n this.userService.defaultState)\r\n );\r\n },\r\n )[0]?.StateName;\r\n if (this.userService.paymentMethods.length > 0) {\r\n this.userService.paymentMethods = [];\r\n this.notificationService.warning(\r\n \"warn_\",\r\n \"unifiedapplication_fill_payment_again_state\",\r\n );\r\n }\r\n } else {\r\n this.userService.shippingAddress.Region = _.filter(\r\n this.StatesResponse,\r\n (state: any) => {\r\n return (\r\n state.StateCode ===\r\n (this.userService.shippingAddress.Region ||\r\n this.userService.defaultState)\r\n );\r\n },\r\n )[0]?.StateName;\r\n }\r\n // update this to shipping address when field available in UI and remove parse from session\r\n const country = sessionStorage.getItem(\"selectedCountry\");\r\n this.enrollmentForm.ApplicantAddress.CountryCode = country;\r\n // this.paymentService.getPaymentType(this.enrollmentForm.ApplicantAddress?.CountryCode?.toLowerCase() == 'us' ? 'ut' : this.enrollmentForm.ApplicantAddress?.Region, this.enrollmentForm.ApplicantAddress?.CountryCode).then(() => {\r\n this.paymentService\r\n .getPaymentType(\r\n this.RegionIDForRequest,\r\n this.enrollmentForm.ApplicantAddress?.CountryCode,\r\n )\r\n .then(() => {\r\n this.userService.paymentMethods = this.userService.paymentMethods || [];\r\n this.userService.couponInfo.promoCodeValid = undefined;\r\n this.paymentService.PaymentDataResponse =\r\n this.paymentService.PaymentDataResponse || {};\r\n // If they've already set up a split payment and try to add autoship items, only allow one payment method\r\n if (this.countPaymentMethods() > 1) {\r\n this.userService.paymentMethods = [\r\n this.userService.paymentMethods[0],\r\n ];\r\n }\r\n });\r\n\r\n this.getShippingTypes(false, isMailingAddress);\r\n }\r\n\r\n checkAddress() {\r\n if (this.enrollmentForm.ApplicantAddress.PostalCode) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n getQuanity() {\r\n let quantity = 0;\r\n _.each(this.itemsService.selectedPacks, (item) => {\r\n quantity += item.Quantity ? parseInt(item.Quantity, 10) : 0;\r\n });\r\n\r\n _.each(this.itemsService.selectedOrderItems, (item) => {\r\n if (!item.UsePoints) {\r\n quantity += item.Quantity ? parseInt(item.Quantity, 10) : 0;\r\n }\r\n if (item.UsePoints) {\r\n quantity += item.rewardQuantity ? parseInt(item.rewardQuantity, 10) : 0;\r\n }\r\n });\r\n _.each(this.itemsService.selectedAutoOrderItems, (item) => {\r\n quantity += item.Quantity ? parseInt(item.Quantity, 10) : 0;\r\n });\r\n return quantity;\r\n }\r\n\r\n getOrderQuanity() {\r\n let quantity = 0;\r\n _.each(this.itemsService.selectedOrderItems, (item) => {\r\n if (!item.UsePoints) {\r\n quantity += item.Quantity ? parseInt(item.Quantity, 10) : 0;\r\n }\r\n if (item.UsePoints) {\r\n quantity += item.rewardQuantity ? parseInt(item.rewardQuantity, 10) : 0;\r\n }\r\n });\r\n return quantity;\r\n }\r\n\r\n getPacksQuanity() {\r\n let quantity = 0;\r\n _.each(this.itemsService.selectedPacks, (item) => {\r\n quantity += item.Quantity ? parseInt(item.Quantity, 10) : 0;\r\n });\r\n return quantity;\r\n }\r\n\r\n getAutoOrderQuanity() {\r\n let quantity = 0;\r\n _.each(this.itemsService.selectedAutoOrderItems, (item) => {\r\n quantity += item.Quantity ? parseInt(item.Quantity, 10) : 0;\r\n });\r\n return quantity;\r\n }\r\n\r\n getItems(type: string) {\r\n return this.itemsService[\r\n type == \"pack\"\r\n ? \"selectedPacks\"\r\n : type == \"autoship\"\r\n ? \"selectedAutoOrderItems\"\r\n : \"selectedOrderItems\"\r\n ];\r\n }\r\n\r\n getImage(item) {\r\n let imageUrl = (\r\n (item.OptionsImage &&\r\n item.ImageUrl.substr(0, item.ImageUrl.lastIndexOf(\"/\")).concat(\r\n item.OptionsImage,\r\n )) ||\r\n item.ImageUrl\r\n );\r\n\r\n if(!imageUrl) {\r\n imageUrl = item.imageUrl;\r\n }\r\n\r\n // If local image \r\n\r\n if (imageUrl && imageUrl.includes(\"assets/images\")) {\r\n return imageUrl;\r\n }\r\n\r\n return (imageUrl && imageUrl.includes(\"CMS/images/inventory\")) ? (this.configService.localSettings.Disco.DiscoUrl + imageUrl) : this.configService.localSettings.Disco.DiscoUrl + '/CMS/images/inventory' + imageUrl;\r\n }\r\n\r\n increaseQuantiy(type, item) {\r\n this.cart1Service.increaseQuantiy(item, type == \"autoship\", type == \"pack\");\r\n }\r\n\r\n decreaseQuantiy(type, item) {\r\n if (\r\n this.getQuantityModel(type, item)[item.ItemID] == 1 &&\r\n this.userService.customerTypeID === 1\r\n ) {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"unifiedapplication_cannot_delete_item\"),\r\n );\r\n } else {\r\n this.cart1Service.decreaseQuantiy(\r\n item,\r\n type == \"autoship\",\r\n type == \"pack\",\r\n );\r\n }\r\n }\r\n\r\n removeFromCart(type, item) {\r\n item.Quantity = 0;\r\n\r\n // If Installment replica is removed, remove installment item and it's autoship\r\n if(item?.SKU?.endsWith(\"-i\")) {\r\n this.cart1Service.removeInstallmentItemFromCart(item);\r\n return;\r\n } \r\n\r\n if(type == \"order\" && item.ItemID == this.AoScanCode) {\r\n this.DeleteItemFromBothCarts(item);\r\n return;\r\n }\r\n\r\n this.cart1Service.removeFromCart(\r\n item,\r\n type == \"autoship\",\r\n type == \"pack\",\r\n true,\r\n );\r\n }\r\n\r\n /**\r\n * @param ItemID\r\n * @description This will delete the item from Both Carts ( Today's Order and Subscription/Autoship )\r\n */\r\n DeleteItemFromBothCarts(item) {\r\n\r\n const inInCart = this.itemsService.selectedOrderItems.find(i => i.ItemID == item.ItemID);\r\n const inInAutoshipCart = this.itemsService.selectedAutoOrderItems.find(i => i.ItemID == item.ItemID);\r\n\r\n if(inInAutoshipCart) { // autoship\r\n this.cart1Service.removeFromCart(inInAutoshipCart, true, false, true);\r\n }\r\n if(inInCart) { // order\r\n this.cart1Service.removeFromCart(inInCart, false, false, true);\r\n }\r\n\r\n if(this.itemsService.selectedOrderItems.length > 0) {\r\n this.orderService.calculateOrder();\r\n }\r\n }\r\n\r\n getQuantityModel(type, item) {\r\n return this.cart1Service[\r\n type == \"pack\"\r\n ? \"packQuantity\"\r\n : type == \"autoship\"\r\n ? \"autoshipQuantity\"\r\n : item && item.UsePoints\r\n ? \"orderRewardQuantity\"\r\n : \"orderQuantity\"\r\n ];\r\n }\r\n\r\n checkQuantity(type, item) {\r\n const quantity = this.getQuantityModel(type, item)[item.ItemID];\r\n if (!Number(quantity)) {\r\n this.cart1Service.removeFromCart(\r\n item,\r\n type == \"autoship\",\r\n type == \"pack\",\r\n true,\r\n );\r\n } else {\r\n item.Quantity = quantity;\r\n if (type == \"autoship\") {\r\n localStorage.setItem(\r\n \"cart.autoship\",\r\n JSON.stringify(this.itemsService.selectedAutoOrderItems),\r\n );\r\n this.orderService.calculateAutoOrder();\r\n } else {\r\n localStorage.setItem(\r\n type == \"pack\" ? \"cart.packs\" : \"cart.order\",\r\n JSON.stringify(\r\n type == \"pack\"\r\n ? this.itemsService.selectedPacks\r\n : this.itemsService.selectedOrderItems,\r\n ),\r\n );\r\n this.orderService.calculateOrder();\r\n }\r\n }\r\n }\r\n\r\n getLastQuantity(type, item) {\r\n this.lastQuantity = this.getQuantityModel(type, item)[item.ItemID];\r\n }\r\n\r\n getCvv(result) {\r\n if (result) {\r\n this.submitApplication(result);\r\n }\r\n }\r\n\r\n checkPayment() {\r\n if (this.userService.paymentMethods.length > 0) {\r\n if (\r\n this.userService.paymentMethods[0].Last4 ||\r\n this.userService.paymentMethods[0].Last4 === undefined\r\n ) {\r\n return true;\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"unifiedapplication_add_payment_error\"),\r\n );\r\n return false;\r\n }\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"unifiedapplication_add_payment_error\"),\r\n );\r\n return false;\r\n }\r\n }\r\n\r\n // Payment Section\r\n addSavePayment(paymentData) {\r\n if (this.enrollmentForm.ApplicantAddress.Region) {\r\n if (\r\n !this.utilityService.isEmptyObject(\r\n this.paymentService.SelectedPaymentTypes,\r\n ) &&\r\n this.paymentService.SelectedPaymentTypes.MerchantId !==\r\n paymentData.MerchantId\r\n ) {\r\n this.userService.paymentMethods = [];\r\n }\r\n this.paymentService.SelectedPaymentTypes = paymentData;\r\n this.paymentService.selectedPaymentTypeName =\r\n this.paymentService.SelectedPaymentTypes.DisplayName;\r\n if (this.paymentService.SelectedPaymentTypes.CanSavePayments) {\r\n this.paymentService.OldSelectedPaymentType =\r\n this.paymentService.SelectedPaymentTypes;\r\n this.paymentService.getPaymentData(paymentData, undefined, true);\r\n } else {\r\n this.paymentService.oldSelectedPaymentTypeName =\r\n this.paymentService.selectedPaymentTypeName;\r\n this.userService.paymentMethods = [];\r\n const selectpay = {\r\n CardType:\r\n this.paymentService.SelectedPaymentTypes.CardType ||\r\n this.paymentService.SelectedPaymentTypes.Name,\r\n Last4: this.paymentService.SelectedPaymentTypes.Ending,\r\n ExpireMonth: this.paymentService.SelectedPaymentTypes.Expires\r\n ? moment(this.paymentService.SelectedPaymentTypes.Expires).format(\r\n \"M\",\r\n )\r\n : 0,\r\n ExpireYear: this.paymentService.SelectedPaymentTypes.Expires\r\n ? moment(this.paymentService.SelectedPaymentTypes.Expires).format(\r\n \"YYYY\",\r\n )\r\n : 0,\r\n Token: this.paymentService.SelectedPaymentTypes.PaymentMethodId\r\n ? this.paymentService.SelectedPaymentTypes.PaymentMethodId\r\n : \"\",\r\n MerchantId: this.paymentService.SelectedPaymentTypes.MerchantId,\r\n };\r\n this.userService.paymentMethods.push(selectpay);\r\n this.userService.isPaymentChanged = true;\r\n }\r\n localStorage.setItem(\"userService\", JSON.stringify(this.userService));\r\n } else {\r\n this.notificationService.error(\"error_\", \"please_enter_your_address\");\r\n }\r\n }\r\n\r\n checkCvvModal() {\r\n this.submitApplication();\r\n return;\r\n\r\n if (!this.checkPayment()) {\r\n return;\r\n }\r\n if (\r\n this.userService.paymentMethods[0].MerchantId != \"13\" &&\r\n this.configService.localSettings.Global.AllowCVVModel\r\n ) {\r\n const dialogdata = this.dialog.open(AllowCvvComponent, {\r\n disableClose: true,\r\n panelClass: \"allowCvvModel-dialog\",\r\n autoFocus: false,\r\n });\r\n dialogdata.afterClosed().subscribe((dialogResult) => {\r\n if (dialogResult) {\r\n this.getCvv(dialogResult);\r\n }\r\n });\r\n } else {\r\n this.submitApplication();\r\n }\r\n }\r\n\r\n validatePromoCode() {\r\n if (this.userService.couponInfo.promoCode) {\r\n if (this.userService.couponInfo.availableRewards.length) {\r\n _.each(\r\n this.userService.couponInfo.availableRewards,\r\n (awailablereward) => {\r\n if (\r\n awailablereward.Code.toLowerCase() ==\r\n this.userService.couponInfo.promoCode.toLowerCase()\r\n ) {\r\n this.userService.couponInfo.RewardsForUse.push(awailablereward);\r\n }\r\n },\r\n );\r\n }\r\n }\r\n this.userService.couponInfo.IsAppliedcode = true;\r\n this.orderService.calculateOrder().then((result) => {\r\n if (result && this.userService.couponInfo.promoCode) {\r\n _.each(\r\n this.orderService.calculateOrderResponse.CouponResults,\r\n (item) => {\r\n const isInCart = this.userService.couponInfo.Allcoupons.some(\r\n (code) => {\r\n if (code.toLowerCase() == item.Code.toLowerCase()) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n );\r\n\r\n if (item.IsValid) {\r\n if (!isInCart) {\r\n this.userService.couponInfo.Allcoupons.push(item.Code);\r\n }\r\n if (this.userService.couponInfo.promoCode == item.Code) {\r\n this.notificationService.success(\r\n \"success\",\r\n \"coupon_added_success\",\r\n );\r\n }\r\n this.userService.couponInfo.promoCodeValid = true;\r\n this.userService.couponInfo.promoCode = \"\";\r\n } else {\r\n this.userService.couponInfo.promoCodeValid = false;\r\n this.userService.couponInfo.IsAppliedcode = false;\r\n this.userService.couponInfo.promoCode = \"\";\r\n if (isInCart && this.itemsService.selectedOrderItems.length) {\r\n this.userService.couponInfo.Allcoupons =\r\n this.userService.couponInfo.Allcoupons.filter((code) => {\r\n return code.toLowerCase() != item.Code.toLowerCase();\r\n });\r\n this.userService.couponInfo.RewardsForUse =\r\n this.userService.couponInfo.RewardsForUse.filter((e) => {\r\n return e.Code.toLowerCase() != item.Code.toLowerCase();\r\n });\r\n }\r\n }\r\n },\r\n );\r\n }\r\n });\r\n }\r\n\r\n isCouponCode(Coupon) {\r\n const NewCustomerPromo =\r\n \"NewCustomerPromo_\" + this.userService.customerData.BackOfficeId;\r\n if (\r\n Coupon &&\r\n (Coupon.Code === NewCustomerPromo ||\r\n Coupon.Code === this.userService.DynamicCouponCode.promoCode)\r\n ) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }\r\n\r\n removePromo(code) {\r\n this.userService.couponInfo.RewardsForUse = _.reject(\r\n this.userService.couponInfo.RewardsForUse,\r\n (e) => {\r\n return e.Code.toLowerCase() == code.toLowerCase();\r\n },\r\n );\r\n this.userService.couponInfo.promoCode = \"\";\r\n this.userService.couponInfo.promoCodeValid = true;\r\n this.userService.couponInfo.IsAppliedcode = false;\r\n this.userService.couponInfo.Allcoupons = _.without(\r\n this.userService.couponInfo.Allcoupons,\r\n code,\r\n );\r\n this.orderService.calculateOrder();\r\n }\r\n\r\n loginFunction(userName, pass, orderId) {\r\n this.loadingDetails = true;\r\n const loginrequest = {\r\n granttype: \"password\",\r\n scope: \"office\",\r\n username: userName,\r\n password: pass,\r\n };\r\n this.apiService.Login(loginrequest).subscribe(\r\n async (result) => {\r\n if (result && result.status == 200 && result.body.Status != 1) {\r\n const res = result.body;\r\n\r\n\r\n /* ----------------------------------------------------------------\r\n 👇 Process Installment Autoships\r\n -----------------------------------------------------------------*/\r\n\r\n try {\r\n \r\n const promises = this.installmentAutoshipEligibleItems.map(item => {\r\n return this._processInstallmentAutoships([item], res.CustomerId);\r\n });\r\n \r\n const autoOrders = await Promise.all(promises);\r\n console.log(autoOrders);\r\n\r\n } catch (error) {\r\n this.notificationService.error(\"\", \"Something went wrong!\");\r\n }\r\n\r\n /* -----------------------------------------------------------\r\n PlaceOrder and CreateCustomer Event Link Tracking Starts\r\n ----------------------------------------------------------- */\r\n\r\n if (environment.linkTracking.isAllowed) {\r\n let autoshipItems = [];\r\n // let standardItems:any = [];\r\n try {\r\n autoshipItems =\r\n JSON.parse(localStorage.getItem(\"cart.autoship\")) || [];\r\n // standardItems = JSON.parse(localStorage.getItem('cart.order')) || [];\r\n if (orderId > 0) {\r\n try {\r\n const items = [];\r\n this.submitApplicationRequest.Order.Items.forEach((ele) => {\r\n this.itemsService\r\n .getProduct(ele.ItemID)\r\n .subscribe((product) => {\r\n items.push({\r\n itemId: product.ItemID,\r\n productName: product.ProductName,\r\n sku: product.SKU,\r\n quantity: ele.Quantity,\r\n qv: product.QV,\r\n cv: product.CV,\r\n bonus: product.Bonus,\r\n price: product.Price,\r\n languageCode: product.LanguageCode,\r\n currencyCode: product.CurrencyCode,\r\n });\r\n });\r\n });\r\n const orderdata = [\r\n {\r\n orderId: orderId,\r\n customerId: res.CustomerId,\r\n sponsorId: res.SponsorId,\r\n orderDetail: {\r\n items: items,\r\n subTotal:\r\n this.orderService.calculateOrderResponse.SubTotal ||\r\n 0,\r\n totalAmount:\r\n this.orderService.calculateOrderResponse.Total || 0,\r\n },\r\n },\r\n ];\r\n const tempData = JSON.stringify(orderdata);\r\n window[\"ZTM\"].setStats(\r\n environment.linkTracking.companyName,\r\n \"PlaceOrder\",\r\n tempData,\r\n );\r\n } catch (error) {\r\n //\r\n }\r\n }\r\n if (this.submitApplicationRequest.AutoShip) {\r\n this.apiService.getCustomerAutoships(res.CustomerId).subscribe(\r\n (result: any) => {\r\n try {\r\n if (Number(result.Status) === 0) {\r\n if (result.Data && result.Data.length > 0) {\r\n\r\n // Filtering Autoships without installments\r\n result.Data = this.itemsListService.getAutoships_WithoutInstallment(result.Data);\r\n\r\n const items = [];\r\n this.submitApplicationRequest.AutoShip?.Items.forEach(\r\n (ele) => {\r\n autoshipItems.forEach((product) => {\r\n if (parseInt(product.ItemID) == ele.ItemID) {\r\n items.push({\r\n itemId: product.ItemID,\r\n productName: product.ProductName,\r\n sku: product.SKU,\r\n quantity: ele.Quantity,\r\n qv: product.QV,\r\n cv: product.CV,\r\n bonus: product.Bonus,\r\n price: product.Price,\r\n languageCode: product.LanguageCode,\r\n currencyCode: product.CurrencyCode,\r\n });\r\n }\r\n });\r\n },\r\n );\r\n const Autodata = [\r\n {\r\n orderId: result.Data[0].AutoShipID,\r\n customerId: res.CustomerId,\r\n sponsorId: res.SponsorId,\r\n orderDetail: {\r\n items: items,\r\n subTotal:\r\n this.orderService.calculateAutoOrderResponse\r\n .SubTotal || 0,\r\n totalAmount:\r\n this.orderService.calculateAutoOrderResponse\r\n .Total || 0,\r\n },\r\n },\r\n ];\r\n const tempData = JSON.stringify(Autodata);\r\n window[\"ZTM\"].setStats(\r\n environment.linkTracking.companyName,\r\n \"PlaceOrder\",\r\n tempData,\r\n );\r\n }\r\n }\r\n } catch (ex) {\r\n console.error(\"ex\", ex);\r\n }\r\n },\r\n () => {},\r\n () => {},\r\n );\r\n }\r\n try {\r\n const data = [\r\n {\r\n customerId: res.CustomerId,\r\n backOfficeId: res.BackOfficeId,\r\n emailaddress: res.EmailAddress,\r\n phoneNumber: res.PrimaryPhone,\r\n firstName: res.FirstName,\r\n lastName: res.LastName,\r\n customerStatus: res.CustomerStatus,\r\n customerType: res.CustomerType,\r\n username: res.Username,\r\n webAlias: res.WebAlias,\r\n sponsorId: res.SponsorId,\r\n enrollerId: res.EnrollerId,\r\n signupDate: res.SignupDate,\r\n primaryAddress: {\r\n id: res.PrimaryAddress?.ID,\r\n line1: res.PrimaryAddress?.Line1,\r\n line2: res.PrimaryAddress?.Line2,\r\n line3: res.PrimaryAddress?.Line3,\r\n city: res.PrimaryAddress?.City,\r\n state: res.PrimaryAddress?.State,\r\n zip: res.PrimaryAddress?.Zip,\r\n countryCode: res.PrimaryAddress?.CountryCode,\r\n },\r\n defaultShippingAddress: {\r\n id: res.DefaultShippingAddress.ID,\r\n line1: res.DefaultShippingAddress.Line1,\r\n line2: res.DefaultShippingAddress.Line2,\r\n line3: res.DefaultShippingAddress.Line3,\r\n city: res.DefaultShippingAddress.City,\r\n state: res.DefaultShippingAddress.State,\r\n zip: res.DefaultShippingAddress.Zip,\r\n countryCode: res.DefaultShippingAddress.CountryCode,\r\n },\r\n externalReferenceId: res.ExternalReferenceId,\r\n languageCode: res.LanguageCode,\r\n },\r\n ];\r\n const data1 = JSON.stringify(data);\r\n window[\"ZTM\"].setStats(\r\n environment.linkTracking.companyName,\r\n \"CreateCustomer\",\r\n data1,\r\n );\r\n } catch (error) {\r\n //\r\n }\r\n } catch (error) {\r\n //\r\n }\r\n }\r\n\r\n /*---------x--------- Link Tracking Ends ----------x---------- */\r\n\r\n try {\r\n localStorage.setItem(\"isLoggedIn\", \"true\");\r\n this.accountService\r\n .getCustomerData(res.CustomerId)\r\n .then((data: any) => {\r\n if (data && data.Data) {\r\n localStorage.setItem(\"user\", JSON.stringify(data.Data));\r\n this.userService.customerData = data.Data;\r\n\r\n this.userService.customerTypeID =\r\n this.userService.customerData.CustomerType;\r\n this.userService.customerData.shippingAddress = {};\r\n if (\r\n this.userService.customerData.DefaultShippingAddress &&\r\n !this.utilityService.isEmptyObject(\r\n this.userService.customerData.DefaultShippingAddress,\r\n )\r\n ) {\r\n this.user.setShippingAddress();\r\n } else {\r\n this.userService.shippingAddress = null;\r\n }\r\n this.userService.customerTypeID =\r\n this.userService.customerData.CustomerType;\r\n if (this.userService.customerData.WebAlias) {\r\n this.apiService\r\n .validateWebAlias(this.userService.customerData.WebAlias)\r\n .subscribe(\r\n (res: any) => {\r\n if (res.Data) {\r\n this.userService.WebAlias =\r\n this.userService.customerData.WebAlias;\r\n this.router.navigate([\"/complete\"]);\r\n this.userService.paymentMethods = [];\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data.WebAlias) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n );\r\n } else if (\r\n this.userService.customerData.SponsorId ||\r\n this.userService.customerData.EnrollerId\r\n ) {\r\n this.apiService\r\n .getSearchCustomerDetail(\r\n this.userService.customerData.SponsorId ||\r\n this.userService.customerData.EnrollerId,\r\n )\r\n .subscribe(\r\n (resp: any) => {\r\n if (resp.Data) {\r\n this.apiService\r\n .validateWebAlias(resp.Data.WebAlias)\r\n .subscribe(\r\n (res: any) => {\r\n if (res.Data) {\r\n this.userService.WebAlias =\r\n resp.Data.WebAlias;\r\n this.router.navigate([\"/complete\"]);\r\n this.userService.paymentMethods = [];\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n );\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data.WebAlias) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n );\r\n }\r\n } else {\r\n this.router.navigate([\"/complete\"]);\r\n this.userService.paymentMethods = [];\r\n }\r\n });\r\n } catch (successEx) {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n console.error(\"ex\", successEx);\r\n }\r\n\r\n } else {\r\n this.notificationService.error(\"error_\", \"Authentication Failed\");\r\n }\r\n },\r\n () => {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n },\r\n );\r\n }\r\n\r\n setFrequency() {\r\n this.commonData.FrequencyTypes.some((freq) => {\r\n if (\r\n freq.ID == this.persistentService.retailData.Autoship.FrequencyTypeID\r\n ) {\r\n this.persistentService.retailData.Autoship.FrequencyTypeID = freq.ID;\r\n this.persistentService.retailData.Autoship.FrequencyTypeID = freq.ID;\r\n this.persistentService.retailData.Autoship.FrequencyTypeDescription =\r\n freq.Description;\r\n this.persistentService.retailData.isChanged = true;\r\n return;\r\n }\r\n });\r\n }\r\n frequencyDescription(id) {\r\n let Description: string;\r\n this.commonData.FrequencyTypes.forEach((element) => {\r\n if (element.ID == id) {\r\n Description = element.Description;\r\n }\r\n });\r\n return Description;\r\n }\r\n doberror() {\r\n if (\r\n this.enrollmentForm.BirthDay &&\r\n this.enrollmentForm.BirthMonth &&\r\n this.enrollmentForm.BirthYear\r\n ) {\r\n const day = this.enrollmentForm.BirthDay;\r\n const month = this.enrollmentForm.BirthMonth;\r\n const year = this.enrollmentForm.BirthYear;\r\n const dateString =\r\n year.toString() + \"-\" + month.toString() + \"-\" + day.toString();\r\n const today = new Date();\r\n const birthDate = new Date(dateString);\r\n let age = today.getFullYear() - birthDate.getFullYear();\r\n const m = today.getMonth() - birthDate.getMonth();\r\n\r\n if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {\r\n age--;\r\n }\r\n if (age < 18) {\r\n this.ageError = true;\r\n } else {\r\n this.ageError = false;\r\n }\r\n }\r\n }\r\n ngOnDestroy() {\r\n this.utilityService.isShowSimplifiedheader = false;\r\n sessionStorage.setItem(\"IsLegacyUnifiedEnrollment\", null);\r\n }\r\n\r\n // Custom Enrollment Addtional Process\r\n\r\n _handleMembershipFee() {\r\n\r\n return;\r\n\r\n const CustomerTypeID = this.userService.customerTypeID;\r\n const MembershipItemCode = this.itemsListService.MembershipItemCode;\r\n const ismembershipExist = _.find(this.itemsService.selectedOrderItems, (item) => {\r\n return (item.ItemID == MembershipItemCode); \r\n });\r\n\r\n // Adding Fee if Type 1\r\n if (!ismembershipExist && CustomerTypeID == 1) {\r\n const feeItem = this.AllEnrollmentKitItems.find((item) => item.ItemID == MembershipItemCode);\r\n if (feeItem) {\r\n this.cart1Service.addToCart(feeItem, false, '', false, false, false, false, false);\r\n }\r\n }\r\n // Removing Fee if not Type 1\r\n else if (ismembershipExist && CustomerTypeID != 1) {\r\n this.cart1Service.removeFromCart(ismembershipExist, false, false, false);\r\n }\r\n }\r\n\r\n _handleAOScanWithBundle(){\r\n\r\n return;\r\n\r\n const CustomerTypeID = this.userService.customerTypeID;\r\n const AOScanItemCode = this.AoScanCode;\r\n const isAOScanExist_Order = _.find(this.itemsService.selectedOrderItems, (item) => item.ItemID == AOScanItemCode);\r\n const isAOScanExist_Autoship = _.find(this.itemsService.selectedAutoOrderItems, (item) => item.ItemID == AOScanItemCode);\r\n\r\n if( CustomerTypeID == 1 && this.itemsService.selectedPacks.length > 0 ) {\r\n const AOScanItem = this.AllEnrollmentKitItems.find((item) => item.ItemID == AOScanItemCode);\r\n if(!isAOScanExist_Order) { // order\r\n if (AOScanItem) {\r\n setTimeout(() => {\r\n this.cart1Service.addToCart(AOScanItem, false, '', false, false, false, false, false);\r\n this.orderService.calculateOrder(false, -1);\r\n setTimeout(() => {\r\n this.orderService.calculateOrder(false, -1);\r\n }, 1000);\r\n }, 3000);\r\n }\r\n }\r\n if(!isAOScanExist_Autoship) { // autoship\r\n if (AOScanItem) {\r\n setTimeout(() => this.cart1Service.addToCart(AOScanItem, false, '', true, false, false, false, false), 2500);\r\n }\r\n }\r\n }\r\n }\r\n\r\n _getSmartServicesItems() {\r\n // this.productsSmartServices = this.productswholesaleStore.filter(item => item.CategoryId == 37 );\r\n\r\n // // Sort Items to have AO Scan Item at first\r\n // try {\r\n // const AO = this.productswholesaleStore.find((item) => item.ItemID == this.AoScanCode);\r\n // if(AO) {\r\n // this.productsSmartServices = this.productsSmartServices.filter((item) => item.ItemID != AO.ItemID);\r\n // this.productsSmartServices.unshift(AO);\r\n // }\r\n // } catch {\r\n // //\r\n // }\r\n\r\n // for(let i = 0; i < this.productsSmartServices.length; i++){\r\n // if(this.productsSmartServices[i].CategoryId == 0 || this.productsSmartServices[i].ItemID == this.itemsListService.MembershipItemCode) {\r\n // this.productsSmartServices.splice(i, 1);\r\n // }\r\n // }\r\n\r\n // Adding custom key [isSmartItem]\r\n\r\n this.productsSmartServices = this.productswholesaleStore;\r\n this.productsSmartServices.forEach(i => i['isSmartItem'] = true);\r\n }\r\n\r\n _processInstallmentAutoships(installmentEligibleItems: Array, customerID) {\r\n\r\n return new Promise((resolve, reject) => {\r\n const items = [];\r\n installmentEligibleItems.forEach((item) => {\r\n items.push({\r\n ItemId: item.ItemID,\r\n Quantity: item.Quantity,\r\n IsReward: false,\r\n });\r\n });\r\n\r\n let field5 = \"\";\r\n \r\n try {\r\n const { mainSKU } = this.cart1Service.getAllReferenceOfInstallmentItems(installmentEligibleItems[0].SKU);\r\n const installmentsPeriod = this.cart1Service.ReplacementsItemsInCart.PeriodMapping[mainSKU];\r\n if(installmentsPeriod) {\r\n field5 = installmentsPeriod + \"_installment-sku\";\r\n }\r\n } catch (error) {\r\n //\r\n }\r\n\r\n \r\n const request = {\r\n \"customerId\": customerID,\r\n \"createOrder\": {},\r\n \"createAutoOrder\": {\r\n \"StartDate\": moment().add(1, 'months').format('MM/DD/YYYY'),\r\n \"Frequency\": this.persistentService.retailData.Autoship.FrequencyTypeID.toString(),\r\n \"ShipMethodId\": this.userService.selectedShippingMethod || 1,\r\n \"MerchantId\": this.paymentService.SelectedPaymentTypes.MerchantId,\r\n \"PaymentMethodId\": this.paymentService.SelectedPaymentTypes.PaymentMethodId || this.userService.paymentMethods[0].token || \"\",\r\n \"ShippingAddress\": {\r\n \"AddressId\": 0,\r\n \"Street1\": this.enrollmentForm.ApplicantAddress.Street1,\r\n \"Street2\": this.enrollmentForm.ApplicantAddress.Street2,\r\n \"Street3\": this.enrollmentForm.ApplicantAddress.Street3,\r\n \"City\": this.enrollmentForm.ApplicantAddress.City,\r\n \"Region\": this.enrollmentForm.ApplicantAddress.Region,\r\n \"PostalCode\": this.enrollmentForm.ApplicantAddress.PostalCode,\r\n \"CountryCode\": this.enrollmentForm.ApplicantAddress.CountryCode || \"us\",\r\n },\r\n \"Items\": items,\r\n \"Custom\": {\r\n \"AutoShipId\": 0,\r\n \"Field1\": \"\",\r\n \"Field2\": \"\",\r\n \"Field3\": \"\",\r\n \"Field4\": \"\",\r\n \"Field5\": field5\r\n },\r\n \"PaymentMerchantId\": this.paymentService.SelectedPaymentTypes.MerchantId,\r\n \"ShipAddress\": {\r\n \"AddressId\": 0,\r\n \"Street1\": this.enrollmentForm.ApplicantAddress.Street1,\r\n \"Street2\": this.enrollmentForm.ApplicantAddress.Street2,\r\n \"Street3\": this.enrollmentForm.ApplicantAddress.Street3,\r\n \"City\": this.enrollmentForm.ApplicantAddress.City,\r\n \"Region\": this.enrollmentForm.ApplicantAddress.Region,\r\n \"PostalCode\": this.enrollmentForm.ApplicantAddress.PostalCode,\r\n \"CountryCode\": this.enrollmentForm.ApplicantAddress.CountryCode || \"us\",\r\n }\r\n }\r\n };\r\n \r\n try {\r\n this.apiService.createCustomerOrderAndAutoship(request).subscribe(\r\n (result) => {\r\n if( result.AutoOrder?.AutoorderId > 0 ) {\r\n resolve(result.AutoOrder?.AutoorderId);\r\n }\r\n },\r\n (error) => {\r\n reject(error);\r\n }\r\n );\r\n } catch(error) {\r\n reject(error);\r\n }\r\n\r\n });\r\n\r\n\r\n }\r\n\r\n\r\n _hideautoshipitemcloseBtn(itemid:string, source?: string) {\r\n\r\n const customer = this.userService.customerTypeID == 1 ? \"qla\" : this.userService.customerTypeID == 2 ? \"retail\" : \"preferred\";\r\n\r\n if (customer != \"qla\" && itemid == this.AoScanCode) { // Can be Preffered, or Retail!\r\n return source == \"order\" ? true : source == \"autoship\" ? false : true;\r\n }\r\n\r\n if (customer == \"qla\" && itemid == this.AoScanCode && source == \"autoship\") {\r\n return false;\r\n }\r\n\r\n if(itemid != this.AoScanCode) {\r\n return true; // show close button\r\n }\r\n\r\n if (this.userService.customerTypeID == 1 && \r\n this.itemsService.selectedPacks.length > 0 && itemid == this.AoScanCode) {\r\n return false; // hide close button\r\n }\r\n \r\n return true; // show close button\r\n }\r\n public isAOScanInCart() {\r\n\r\n const item = this.itemsService.selectedAutoOrderItems.find(i => i.ItemID == this.AoScanCode);\r\n if(item) {\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { Router, CanActivate, CanActivateChild } from \"@angular/router\";\r\nimport { Observable } from \"rxjs\";\r\nimport { CookieService } from \"ngx-cookie-service\";\r\nimport { UserService } from \"./user.service\";\r\n@Injectable({\r\n providedIn: \"root\",\r\n})\r\nexport class AuthGuard implements CanActivate, CanActivateChild {\r\n constructor(\r\n private router: Router,\r\n private cookieService: CookieService,\r\n public user: UserService,\r\n ) {}\r\n canActivate(): boolean | Observable | Promise {\r\n if (this.cookieService.get(\"X-Auth\")) {\r\n // logged in so return true\r\n return true;\r\n }\r\n // not logged in so redirect to login page with the return url\r\n this.router.navigate([\"/login\"]).then(() => {\r\n localStorage.removeItem(\"user\");\r\n this.cookieService.deleteAll(\"/\");\r\n sessionStorage.clear();\r\n localStorage.clear();\r\n this.user.init();\r\n window.location.reload();\r\n });\r\n return false;\r\n }\r\n\r\n canActivateChild(): boolean | Observable | Promise {\r\n return this.canActivate();\r\n }\r\n}\r\n","export class ResponseBase {\r\n Status: number;\r\n ErrorDescription: string;\r\n Message: string;\r\n ErrorTransactionId?: any;\r\n constructor() {\r\n this.Status = ResponseStatus.Success;\r\n this.Message = ResponseStatus.Success.toString();\r\n this.ErrorDescription = \"\";\r\n }\r\n}\r\nenum ResponseStatus {\r\n Success = 0,\r\n Failed = 1,\r\n}\r\n","import { ResponseBase } from \"./responsebase.modal\";\r\n\r\nexport interface BillAddress {\r\n ID: number;\r\n Line1: string;\r\n Line2: string;\r\n Line3: string;\r\n City: string;\r\n State: string;\r\n Zip: string;\r\n CountryCode: string;\r\n}\r\n\r\nexport interface LineItem {\r\n Amount: number;\r\n Bonus: number;\r\n Cost: number;\r\n CurrencyCode: string;\r\n Height: number;\r\n Length: number;\r\n OrderNumber: number;\r\n PackageNumber: number;\r\n CV: number;\r\n QV: number;\r\n Qty: number;\r\n SKU: string;\r\n ItemID: number;\r\n ProductName: string;\r\n Weight: number;\r\n Width: number;\r\n FlagCancer: boolean;\r\n FlagBirthDefect: boolean;\r\n ItemId: number;\r\n Sku?: any;\r\n Name?: any;\r\n Price: number;\r\n CategoryId: number;\r\n Cv: number;\r\n Qv: number;\r\n FlagBirthDefects: boolean;\r\n HasKitGroups: boolean;\r\n Image?: any;\r\n Quantity: number;\r\n}\r\n\r\nexport interface Total {\r\n TaxableSubTotal: number;\r\n CurrencyCode: string;\r\n ExchangeRate: number;\r\n OrderNumber: number;\r\n Shipping: number;\r\n SubTotal: number;\r\n Tax: number;\r\n TaxTransactionID?: any;\r\n DiscountTotal: number;\r\n OverridenShippingTax: boolean;\r\n Total1: number;\r\n PaidAmount: number;\r\n TotalDue: number;\r\n}\r\n\r\nexport interface Payment {\r\n Amount: number;\r\n SavePaymentMethodId?: any;\r\n OnFileCard?: any;\r\n CurrencyCode: string;\r\n MerchantId: number;\r\n SavePayment: boolean;\r\n OrderRewardPoints?: any;\r\n OrderCreditCard?: any;\r\n AuthorizationNumber?: any;\r\n TransactionNumber?: any;\r\n ExchangeRate: number;\r\n Merchant: number;\r\n OrderNumber: number;\r\n PayDate: Date;\r\n PaymentResponse: string;\r\n PayType: string;\r\n Reference?: any;\r\n Status: string;\r\n}\r\n\r\nexport interface OrderCustom {\r\n AutoShipId: number;\r\n Field1?: any;\r\n Field2?: any;\r\n Field3?: any;\r\n Field4?: any;\r\n Field5?: any;\r\n}\r\n\r\nexport class OrderHistory {\r\n BillPhone: string;\r\n CommissionDate: Date;\r\n DistributorID: number;\r\n Email: string;\r\n InvoiceDate: Date;\r\n LocalInvoiceNumber: number;\r\n Name: string;\r\n OrderDate: Date;\r\n OrderType: number;\r\n OrderTypeDescription: string;\r\n OrderNumber: number;\r\n SpecialInstructions: string;\r\n Status: string;\r\n TotalBonus: number;\r\n TotalCost: number;\r\n TotalCV: number;\r\n TotalQV: number;\r\n Void: boolean;\r\n BillAddress: BillAddress;\r\n IsPaid: boolean;\r\n IsShipped: boolean;\r\n LineItems: Array;\r\n Packages: Array;\r\n Totals: Array;\r\n Payments: Array;\r\n OrderCustom: OrderCustom;\r\n}\r\n\r\nexport class OrderHistoryResult extends ResponseBase {\r\n Data: Array;\r\n}\r\n","\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n  \r\n
\r\n  \r\n  \r\n  \r\n
\r\n \r\n
\r\n \r\n

\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n

\r\n
\r\n
\r\n \r\n : {{OrderData.OrderDate | date :'MM/dd/yyyy'}}\r\n
\r\n
\r\n \r\n : {{OrderData.OrderNumber}}\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
0\">\r\n
\r\n  \r\n
\r\n
\r\n
\r\n  
\r\n   \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
0?OrderData.Packages[0].Carrier??'--':'--'\"> 0?OrderData.Packages[0].ShippedDate??'--':'--'\">0?OrderData.Packages[0].TrackingNumber??'--':'--'\">
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
","import { Component, Inject, OnInit } from \"@angular/core\";\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { CompanyService } from \"../../shared/services/company.service\";\r\nimport { ConfigService } from \"../../shared/services/config.service\";\r\nimport { NotificationService } from \"../../shared/services/notification.service\";\r\nimport { RestApiService } from \"../../shared/services/restapi.service\";\r\n\r\n@Component({\r\n selector: \"app-order-invoice\",\r\n templateUrl: \"./order-invoice.component.html\",\r\n styleUrls: [\"./order-invoice.component.scss\"],\r\n})\r\nexport class OrderInvoiceComponent implements OnInit {\r\n modelData;\r\n Warning = {};\r\n GetOrderDetails = [];\r\n IsDialogMax: boolean = false;\r\n hostHeight;\r\n hostWidth;\r\n public OrderData: any = {};\r\n constructor(\r\n private titleService: Title,\r\n private translate: TranslateService,\r\n public dialogRef: MatDialogRef,\r\n @Inject(MAT_DIALOG_DATA) public data,\r\n public matDialogRef: MatDialogRef,\r\n public config: ConfigService,\r\n public apiService: RestApiService,\r\n public notificationService: NotificationService,\r\n public companyService: CompanyService,\r\n ) {\r\n this.modelData = data;\r\n this.getOrderDetail();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_order_history\") + \" | \" + text,\r\n );\r\n });\r\n }\r\n getOrderDetail() {\r\n try {\r\n this.apiService.getOrder(this.modelData.OrderNumber).subscribe((result) => {\r\n // if (parseInt(result.Status, 10) === 0) {\r\n this.OrderData = result;\r\n // } \r\n /*else {\r\n this.notificationService.error(\"error_\", result.ErrorDescription);\r\n }*/\r\n },\r\n err => {\r\n this.notificationService.error(\"error_\", err);\r\n });\r\n } catch (ex) {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n }\r\n }\r\n}\r\n","import { DatePipe } from \"@angular/common\";\r\nimport { Pipe, PipeTransform } from \"@angular/core\";\r\n@Pipe({\r\n name: \"checkValidDate\",\r\n})\r\nexport class CheckValidDatePipe implements PipeTransform {\r\n transform(value, format) {\r\n if (value) {\r\n const datePipe = new DatePipe(\"en-US\");\r\n const date =\r\n [\"1900-01-01\", \"0001-01-01\"].indexOf(\r\n new Date(value).toISOString().substring(0, 10),\r\n ) > -1\r\n ? new Date(value).toISOString().substring(0, 10)\r\n : new Date(value).toISOString();\r\n const checkDate = datePipe.transform(date, format);\r\n const nullDate = datePipe.transform(\"0001-01-01T00:00:00\", format);\r\n const invalidDate = datePipe.transform(\"1900-01-01T00:00:00\", format);\r\n const startDateCheck = checkDate == nullDate || checkDate == invalidDate;\r\n if (!startDateCheck) {\r\n return checkDate;\r\n } else {\r\n return null;\r\n }\r\n } else {\r\n return null;\r\n }\r\n }\r\n}\r\n","\r\n
\r\n \r\n
\r\n
\r\n

\r\n
\r\n
\r\n \r\n \r\n {{'order_history_status' | translate}}\r\n {{element.Status}}\r\n \r\n \r\n {{'order_history_qv' | translate}} \r\n {{element.TotalQV}} \r\n \r\n \r\n {{'order_history_cv' | translate}} \r\n {{element.TotalCV}}\r\n \r\n \r\n {{'order_history_total' | translate}} \r\n \r\n {{element.TotalCost | currency:companyService.selectedCurrency.CurrencyCode}}\r\n \r\n \r\n {{'order_history_details' | translate}}\r\n {{'view_order' | translate}}\r\n \r\n \r\n {{'order_history_date' | translate}} \r\n {{element.OrderDate | checkValidDate:'MM/dd/yyyy'}}\r\n \r\n \r\n {{'order_history_id' | translate}} \r\n {{element.OrderNumber}} \r\n \r\n \r\n {{'Tracking Number' | translate}} \r\n {{element.Packages?.length>0?element.Packages[0].TrackingNumber:''}}\r\n \r\n \r\n {{'BV' | translate}} \r\n {{element.TotalBonus}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n\r\n
\r\n
","import {\r\n AfterViewInit,\r\n Component,\r\n OnChanges,\r\n OnInit,\r\n ViewChild,\r\n} from \"@angular/core\";\r\nimport { FormControl } from \"@angular/forms\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { MatPaginator } from \"@angular/material/paginator\";\r\nimport { MatSort } from \"@angular/material/sort\";\r\nimport { MatTableDataSource } from \"@angular/material/table\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Observable } from \"rxjs/internal/Observable\";\r\nimport { map, startWith } from \"rxjs/operators\";\r\nimport { OrderHistoryResult } from \"src/app/modals/orderhistory.modal\";\r\nimport { CompanyService } from \"../../shared/services/company.service\";\r\nimport { NotificationService } from \"../../shared/services/notification.service\";\r\nimport { RestApiService } from \"../../shared/services/restapi.service\";\r\nimport { UserService } from \"../../shared/services/user.service\";\r\nimport { OrderInvoiceComponent } from \"../order-invoice/order-invoice.component\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\n\r\n@Component({\r\n selector: \"app-order-history\",\r\n templateUrl: \"./order-history.component.html\",\r\n styleUrls: [\"./order-history.component.scss\"],\r\n})\r\nexport class OrderHistoryComponent implements OnInit, AfterViewInit, OnChanges {\r\n public userService: UserServiceModal;\r\n constructor(\r\n private titleService: Title,\r\n public dialog: MatDialog,\r\n public apiService: RestApiService,\r\n public translate: TranslateService,\r\n public notificationService: NotificationService,\r\n public user: UserService,\r\n public companyService: CompanyService,\r\n ) {\r\n this.userService = this.user.userServiceModal;\r\n }\r\n displayedColumns: string[] = [\r\n \"Status\",\r\n \"TotalQV\",\r\n \"TotalCV\",\r\n \"OrderTotal\",\r\n \"OrderNumberS\",\r\n \"OrderDate\",\r\n \"OrderNumber\",\r\n // \"TrackingNumber\",\r\n // \"TotalBonus\",\r\n ];\r\n dataSource = new MatTableDataSource(new OrderHistoryResult().Data);\r\n\r\n @ViewChild(MatPaginator, { static: false })\r\n set paginator(value: MatPaginator) {\r\n this.dataSource.paginator = value;\r\n }\r\n\r\n @ViewChild(MatSort, { static: false })\r\n set sort(value: MatSort) {\r\n this.dataSource.sort = value;\r\n }\r\n myControl = new FormControl();\r\n options: string[] = [];\r\n filteredOptions: Observable;\r\n itemCount: number = 0;\r\n ngOnInit() {\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_order_history\") + \" | \" + text,\r\n );\r\n });\r\n this.filteredOptions = this.myControl.valueChanges.pipe(\r\n startWith(\"\"),\r\n map((value) => this._filter(value)),\r\n );\r\n\r\n this.initOrders();\r\n }\r\n ngAfterViewInit() {\r\n this.dataSource.sort = this.sort;\r\n this.dataSource.paginator = this.paginator;\r\n }\r\n /**\r\n * @hidden\r\n */\r\n /**\r\n * Lifecycle hook that is called when any data-bound property of a datasource changes.\r\n */\r\n ngOnChanges() {\r\n try {\r\n this.apiService.getCustomerOrders(this.userService.enrollerInfo.CustomerId).subscribe(\r\n (data: OrderHistoryResult) => {\r\n this.dataSource = new MatTableDataSource(data.Data);\r\n this.dataSource.sort = this.sort;\r\n this.dataSource.paginator = this.paginator;\r\n this.itemCount = data.Data.length;\r\n },\r\n (err) => {\r\n this.notificationService.error(\"error_\", err);\r\n },\r\n () => {},\r\n );\r\n } catch (error) {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n console.log(error);\r\n }\r\n }\r\n\r\n initOrders() {\r\n try {\r\n this.apiService.getCustomerOrders(this.userService.enrollerInfo.CustomerId).subscribe(\r\n (data: OrderHistoryResult) => {\r\n this.dataSource = new MatTableDataSource(data.Data);\r\n this.dataSource.sort = this.sort;\r\n this.dataSource.paginator = this.paginator;\r\n this.itemCount = data.Data.length;\r\n },\r\n (err) => {\r\n this.notificationService.error(\"error_\", err);\r\n },\r\n () => {},\r\n );\r\n } catch (error) {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n console.log(error);\r\n }\r\n }\r\n applyFilter(filterValue: string) {\r\n this.dataSource.filter = filterValue.trim().toLowerCase();\r\n }\r\n\r\n private _filter(value: string): string[] {\r\n const filterValue = value.toLowerCase();\r\n\r\n return this.options.filter((option) =>\r\n option.toLowerCase().includes(filterValue),\r\n );\r\n }\r\n viewOrderInvoice(dialogData): void {\r\n this.dialog.open(OrderInvoiceComponent, {\r\n width: \"90vw\",\r\n maxWidth: \"90vw\",\r\n panelClass: \"invoiceDialog\",\r\n data: dialogData,\r\n autoFocus: false,\r\n });\r\n }\r\n}\r\n","\r\n
\r\n \r\n \r\n Edit Shipping Method\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n 0\">\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
","import { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\r\nimport { Component, Inject } from \"@angular/core\";\r\nimport { UserService } from \"../../services/user.service\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { CompanyService } from \"../../services/company.service\";\r\n\r\n@Component({\r\n selector: \"app-ship-methods\",\r\n templateUrl: \"./ship-methods.component.html\",\r\n styleUrls: [\"./ship-methods.component.scss\"],\r\n})\r\nexport class ShipMethodsComponent {\r\n IsDialogMax: boolean = false;\r\n hostHeight;\r\n hostWidth;\r\n cvvCode;\r\n public shipMethods;\r\n userService: UserServiceModal;\r\n public selectedShippingMethod: number;\r\n constructor(\r\n public dialogRef: MatDialogRef,\r\n public matDialogRef: MatDialogRef,\r\n @Inject(MAT_DIALOG_DATA) public dialogData,\r\n public user: UserService,\r\n public companyService: CompanyService,\r\n ) {\r\n this.shipMethods = this.dialogData;\r\n this.userService = this.user.userServiceModal;\r\n this.selectedShippingMethod = this.userService.selectedShippingMethod;\r\n }\r\n\r\n updateShipMethod() {\r\n this.dialogRef.close({ shipMethod: this.selectedShippingMethod });\r\n }\r\n}\r\n","\r\n
\r\n \r\n \r\n Edit Shipping Address\r\n \r\n \r\n
\r\n
\r\n Use default address \r\n
\r\n
\r\n
\r\n
\r\n person\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n location_on\r\n
\r\n
\r\n \r\n \r\n ,\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n {{'use_new_address' | translate}} \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {{country.CountryName}}\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {{state.StateName}}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { MatDialogRef } from \"@angular/material/dialog\";\r\nimport {\r\n ShippingAddress,\r\n UserServiceModal,\r\n} from \"src/app/modals/userservice.modal\";\r\nimport { State } from \"src/app/modals/state.modal\";\r\nimport { RestApiService } from \"../../services/restapi.service\";\r\nimport { UserService } from \"../../services/user.service\";\r\n\r\n@Component({\r\n selector: \"app-shipping-address-dialog\",\r\n templateUrl: \"./shipping-address-dialog.component.html\",\r\n styleUrls: [\"./shipping-address-dialog.component.scss\"],\r\n})\r\nexport class ShippingAddressDialogComponent implements OnInit {\r\n IsDialogMax: boolean = false;\r\n hostHeight;\r\n hostWidth;\r\n differentAddressShow: boolean = false;\r\n public newShipping: ShippingAddress = {} as ShippingAddress;\r\n newAddressSelected: boolean = false;\r\n defaultAddress: any = {};\r\n userService: UserServiceModal;\r\n public allowedCountries = [];\r\n states: Array = [];\r\n constructor(\r\n public dialogRef: MatDialogRef,\r\n public matDialogRef: MatDialogRef,\r\n public user: UserService,\r\n public apiService: RestApiService,\r\n ) {\r\n this.defaultAddress = this.user.userServiceModal.shippingAddress;\r\n this.userService = this.user.userServiceModal;\r\n }\r\n\r\n ngOnInit(): void {\r\n this.allowedCountries = JSON.parse(\r\n sessionStorage.getItem(\"allowedCountries\"),\r\n );\r\n this.getCountryState(this.newShipping.CountryCode || \"US\");\r\n }\r\n getCountryState(country?: string) {\r\n this.apiService.getStates(country || \"US\").subscribe((result) => {\r\n sessionStorage.setItem(\r\n (country || \"US\") + \"State\",\r\n JSON.stringify(result.Data),\r\n );\r\n this.states = result.Data;\r\n });\r\n }\r\n onClickDifferentAddress(checked) {\r\n this.differentAddressShow = checked;\r\n this.newAddressSelected = checked;\r\n }\r\n saveNewAddress() {\r\n this.matDialogRef.close({ address: this.newShipping, isReplacement: true });\r\n }\r\n close() {\r\n this.matDialogRef.close({\r\n address: this.newShipping,\r\n isReplacement: false,\r\n });\r\n }\r\n}\r\n","\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n

\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
sub_total:
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
{{'global_total'|translate}} :
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n access_time\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n edit\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n {{freq.Description | translate}} \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n keyboard_arrow_down \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n local_shipping\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n location_on\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n credit_card\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n 0 && !userService.isPaymentChanged\"\r\n [textContent]=\"getDisplayValue()\">\r\n \r\n \r\n \r\n \r\n \r\n 0\" [textContent]=\"getDisplayValue()\">\r\n \r\n \r\n \r\n credit_card\r\n \r\n \r\n {{'_exp'|translate}}   \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
","import { Component, EventEmitter, OnInit, Output } from \"@angular/core\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport * as _ from \"lodash\";\r\nimport { cloneDeep } from \"lodash\";\r\nimport * as moment from \"moment\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { Cart1Service } from \"../services/cart1.service\";\r\nimport { ConfigService } from \"../services/config.service\";\r\nimport { NotificationService } from \"../services/notification.service\";\r\nimport { OrderService } from \"../services/order.service\";\r\nimport { PaymentService } from \"../services/payment.service\";\r\nimport { ProductService } from \"../services/product.service\";\r\nimport { UserService } from \"../services/user.service\";\r\nimport { UtilityService } from \"../services/utility.service\";\r\nimport { PersistentService } from \"../services/persistent.service\";\r\nimport { Router } from \"@angular/router\";\r\nimport {\r\n Item,\r\n CreateAutoOrder,\r\n} from \"src/app/modals/createorderautoorder.modal\";\r\nimport { ShipAddress } from \"src/app/modals/autoship.modal\";\r\nimport { AccountService } from \"../services/account.service\";\r\nimport { AutoshipConfigurationService } from \"../services/autoshipConfiguration.service\";\r\nimport { RestApiService } from \"../services/restapi.service\";\r\nimport { ConfirmDialogComponent } from \"../model/confirm-dialog/confirm-dialog.component\";\r\nimport { ShipMethodsComponent } from \"../model/ship-methods/ship-methods.component\";\r\nimport { ShippingAddressDialogComponent } from \"../model/shipping-address-dialog/shipping-address-dialog.component\";\r\nimport { AllowCvvComponent } from \"../model/allow-cvv/allow-cvv.component\";\r\nimport { AddSymbolWithNumberPipe } from \"../pipes/add-symbol-with-number.pipe\";\r\nimport { CompanyService } from \"../services/company.service\";\r\nimport { CommonSetting } from \"src/app/modals/commonsetting.modal\";\r\n\r\n@Component({\r\n selector: \"app-autoship-edit\",\r\n templateUrl: \"./autoship-edit.component.html\",\r\n styleUrls: [\"./autoship-edit.component.scss\"],\r\n})\r\nexport class AutoshipEditComponent implements OnInit {\r\n userService: UserServiceModal;\r\n AutoOrderShippingAddress: any = {};\r\n editingAutoship: any = {};\r\n autoshipDate;\r\n autoShipId: number = 0;\r\n SelectedAutoshipPayment = {};\r\n selectedAutoship;\r\n autoshipDetail = {};\r\n IsMultipleFrequency: boolean = true;\r\n isStateRestrict: boolean = false;\r\n commonData: CommonSetting;\r\n autoshipConfiguration = {\r\n setting: {\r\n disableEdit: false,\r\n },\r\n };\r\n frequencyTypeID: number = 1;\r\n isDisabledCreateOrder: boolean = false;\r\n @Output() onAutoshipCancel = new EventEmitter();\r\n item = {};\r\n getAutoshipOrderDetail;\r\n AutoshipSetting = [];\r\n lastQuantity;\r\n address;\r\n addressChanged: boolean;\r\n selectedShipMethodName: string;\r\n updateAutoOrderRequest: CreateAutoOrder;\r\n public AutoshipMinDate: Date;\r\n public AutoshipMaxDate: Date;\r\n constructor(\r\n public dialog: MatDialog,\r\n public configService: ConfigService,\r\n public notificationService: NotificationService,\r\n public apiService: RestApiService,\r\n public translate: TranslateService,\r\n public itemsService: ProductService,\r\n public cart1Service: Cart1Service,\r\n public orderService: OrderService,\r\n public user: UserService,\r\n public paymentService: PaymentService,\r\n public utilityService: UtilityService,\r\n public persistentService: PersistentService,\r\n public router: Router,\r\n public accountService: AccountService,\r\n public autoshipConfigurationService: AutoshipConfigurationService,\r\n public companyService: CompanyService,\r\n ) {\r\n this.userService = user.userServiceModal;\r\n this.getAutoshipOrderDetail =\r\n this.persistentService.retailData.getAutoOrderDetailsByID;\r\n this.AutoshipMinDate = moment()\r\n .add(this.configService.localSettings.Autoship.AutoshipMinDate, \"days\")\r\n .toDate();\r\n this.AutoshipMaxDate = moment()\r\n .add(this.configService.localSettings.Autoship.AutoshipMaxDate, \"days\")\r\n .toDate();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.commonData = this.configService.getConfig();\r\n this.userService.isAddressChanged =\r\n this.userService.isAddressChanged || false;\r\n this.userService.isPaymentChanged =\r\n this.userService.isPaymentChanged || false;\r\n this.userService.isShipMethodChanged =\r\n this.userService.isShipMethodChanged || false;\r\n this.address = this.address || {};\r\n this.persistentService.retailData.isChanged =\r\n this.persistentService.retailData.AddMoreItemInAutoshipFlag || false;\r\n // Select Autoship Types\r\n this.persistentService.retailData.isNewAutoship =\r\n this.persistentService.retailData.isNewAutoship || false;\r\n\r\n // Show selected Autoship in dropdown\r\n this.selectedAutoship =\r\n this.persistentService.retailData.CurrentSelectedAutoOrder;\r\n // Get Saved & Allowed Payment Methods\r\n this.persistentService.retailData.IsPaid = false;\r\n this.paymentService.getPaymentType().then(() => {\r\n if (!this.persistentService.retailData.AddMoreItemInAutoshipFlag) {\r\n this.editAutoship();\r\n } else {\r\n this.getAutoshipOrderDetail =\r\n this.persistentService.retailData.AddMoreItemInAutoshipData;\r\n this.frequencyTypeID =\r\n this.persistentService.retailData.Autoship.FrequencyTypeID;\r\n this.editingAutoship.AutoOrderID =\r\n this.persistentService.retailData.AddMoreItemInAutoshipData.id;\r\n if (this.userService.paymentMethods.length > 0) {\r\n const paymentData = this.userService.paymentMethods[0];\r\n this.paymentService.selectedPaymentTypeName =\r\n (paymentData.DisplayName || paymentData.CardType) +\r\n \" \" +\r\n (paymentData.Ending\r\n ? paymentData.Ending\r\n : paymentData.Last4\r\n ? paymentData.Last4\r\n : \"\") || this.translate.instant(\"add_a_payment_method\");\r\n }\r\n this.orderService.calculateAutoOrder();\r\n }\r\n });\r\n }\r\n\r\n isEmptyObject(obj) {\r\n return obj && Object.keys(obj).length === 0;\r\n }\r\n\r\n editAutoship() {\r\n this.autoShipId = this.getAutoshipOrderDetail.id;\r\n this.itemsService.selectedAutoOrderItems = [];\r\n this.persistentService.retailData.IsPaid =\r\n this.getAutoshipOrderDetail.isPaid;\r\n this.persistentService.retailData.CurrentSelectedAutoOrder =\r\n this.getAutoshipOrderDetail.id;\r\n\r\n // Initial steps of Payment Functionality\r\n this.persistentService.retailData.SelectedAutoshipPayment = {};\r\n this.paymentService.selectedPaymentTypeName =\r\n this.translate.instant(\"Add_Payment_Method\");\r\n this.userService.paymentMethods = [];\r\n this.paymentService.SelectedPaymentTypes = {};\r\n\r\n const AutoOrderId = this.getAutoshipOrderDetail.id;\r\n\r\n this.apiService.getAutoship(AutoOrderId).subscribe(\r\n (result) => {\r\n if (!result.Data || result.Data.AutoShipID <= 0) {\r\n this.notificationService.error(\r\n \"Error\",\r\n this.translate.instant(\"some_error_occur_try_again\"),\r\n );\r\n return false;\r\n }\r\n this.persistentService.retailData.Autoship = {};\r\n this.editingAutoship = result.Data;\r\n this.autoshipDetail = result.Data;\r\n\r\n // Fill Shipping Address on only Temp basis while editing autoship\r\n this.AutoOrderShippingAddress = {};\r\n this.AutoOrderShippingAddress.FirstName =\r\n this.editingAutoship.ShipAddress.FirstName;\r\n this.AutoOrderShippingAddress.LastName =\r\n this.editingAutoship.ShipAddress.LastName;\r\n this.AutoOrderShippingAddress.Address =\r\n this.editingAutoship.ShipAddress.Street1;\r\n this.AutoOrderShippingAddress.Address2 =\r\n this.editingAutoship.ShipAddress.Street2;\r\n this.AutoOrderShippingAddress.City =\r\n this.editingAutoship.ShipAddress.City;\r\n this.AutoOrderShippingAddress.State =\r\n this.editingAutoship.ShipAddress.Region;\r\n this.AutoOrderShippingAddress.Country =\r\n this.editingAutoship.ShipAddress.CountryCode;\r\n this.AutoOrderShippingAddress.ZipCode =\r\n this.editingAutoship.ShipAddress.PostalCode;\r\n\r\n // Fill Start Date\r\n // **In case of edit an Autoship, We will show next run date as start date by default */\r\n this.autoshipConfigurationService.autoshipDate =\r\n this.editingAutoship.NextProcessDate ||\r\n this.editingAutoship.StartDate;\r\n this.persistentService.retailData.autoshipDate =\r\n this.editingAutoship.NextProcessDate ||\r\n this.editingAutoship.StartDate;\r\n\r\n this.persistentService.retailData.Autoship.Frequency =\r\n this.editingAutoship.Frequency;\r\n this.persistentService.retailData.Autoship.FrequencyTypeDescription =\r\n this.editingAutoship.FrequencyString;\r\n this.frequencyTypeID =\r\n this.persistentService.retailData.Autoship.FrequencyTypeID =\r\n this.editingAutoship.Frequency;\r\n this.autoshipConfigurationService.setting = {\r\n autoshipSettings: {\r\n frequencyTypeID: this.editingAutoship.Frequency,\r\n },\r\n };\r\n\r\n // If NextRun Date is Past Date, set it to default Autoship date\r\n if (\r\n new Date(this.autoshipConfigurationService.autoshipDate) < new Date()\r\n ) {\r\n this.autoshipConfigurationService.autoshipDate = \"\";\r\n }\r\n\r\n this.userService.selectedShippingMethod =\r\n this.editingAutoship.ShipMethodID;\r\n if (\r\n this.AutoOrderShippingAddress ||\r\n Object.keys(this.AutoOrderShippingAddress).length > 0\r\n ) {\r\n this.userService.shippingAddress.FirstName =\r\n this.editingAutoship.ShipAddress.FirstName;\r\n this.userService.shippingAddress.LastName =\r\n this.editingAutoship.ShipAddress.LastName;\r\n this.userService.shippingAddress.Street1 =\r\n this.editingAutoship.ShipAddress.Street1;\r\n this.userService.shippingAddress.Street2 =\r\n this.editingAutoship.ShipAddress.Street2;\r\n this.userService.shippingAddress.City =\r\n this.editingAutoship.ShipAddress.City;\r\n this.userService.shippingAddress.Region =\r\n this.editingAutoship.ShipAddress.Region;\r\n this.userService.shippingAddress.CountryCode =\r\n this.editingAutoship.ShipAddress.CountryCode;\r\n this.userService.shippingAddress.PostalCode =\r\n this.editingAutoship.ShipAddress.PostalCode;\r\n }\r\n let bvTotal = 0;\r\n _.each(result.Data.LineItems, (item) => {\r\n item.AutoOrderID = result.Data.AutoShipID;\r\n item.ItemID = item.ItemID.toString();\r\n item.Description = item.ItemDescription || item.Description;\r\n item.ItemName = item.ItemDescription || item.ProductName;\r\n item.Price = item.PriceEach || item.Prices[0].Price || item.Price;\r\n item.PV = item.BVEach || item.QV;\r\n item.BusinessVolumeEach = item.PV || item.CV;\r\n item.ImageUrl = item.Image;\r\n item.SmallImageUrl = item.SmallPicture || item.Image;\r\n item.LargeImageUrl = item.SmallPicture || item.Image;\r\n item.ShortDescription = item.ShortDetail || item.Specifications;\r\n item.isAutoship = true;\r\n item.OptionsMap = [];\r\n this.itemsService.selectedAutoOrderItems.push(item);\r\n bvTotal += Number(item.BV * item.Quantity);\r\n });\r\n console.log(\"bv\", bvTotal);\r\n _.each(this.itemsService.selectedAutoOrderItems, (item) => {\r\n _.each(this.itemsService.orders, (listItem) => {\r\n if (item.ItemID == listItem.ItemID) {\r\n item.AllowAutoship = listItem.AllowAutoship;\r\n } else if (listItem.HasOptions) {\r\n _.each(listItem.OptionsMap, (value) => {\r\n if (value.ItemId == item.ItemID) {\r\n item.AllowAutoship =\r\n value.AllowAutoship == undefined\r\n ? listItem.AllowAutoship\r\n : value.AllowAutoship;\r\n }\r\n });\r\n }\r\n });\r\n });\r\n localStorage.setItem(\r\n \"cart.autoship\",\r\n JSON.stringify(this.itemsService.selectedAutoOrderItems),\r\n );\r\n\r\n // payment details for autoorder\r\n this.persistentService.retailData.SelectedAutoshipPayment.PaymentTypeID =\r\n this.editingAutoship.PaymentMethodID;\r\n if (this.paymentService.PaymentTypeResponse[\"SaveMethods\"].length > 0) {\r\n if (\r\n this.persistentService.retailData.SelectedAutoshipPayment\r\n .PaymentTypeID\r\n ) {\r\n const selectedAutoOrderPay = _.filter(\r\n this.paymentService.PaymentTypeResponse[\"SaveMethods\"],\r\n (paymentMethod) => {\r\n return (\r\n paymentMethod.PaymentMethodId ==\r\n this.persistentService.retailData.SelectedAutoshipPayment\r\n .PaymentTypeID\r\n );\r\n },\r\n )[0];\r\n\r\n if (selectedAutoOrderPay) {\r\n this.persistentService.retailData.SelectedAutoshipPayment =\r\n selectedAutoOrderPay;\r\n this.paymentService.SelectedPaymentTypes = selectedAutoOrderPay;\r\n this.paymentService.selectedPaymentTypeName =\r\n (selectedAutoOrderPay.DisplayName ||\r\n selectedAutoOrderPay.CardType) +\r\n \" \" +\r\n (selectedAutoOrderPay.Ending\r\n ? selectedAutoOrderPay.Ending\r\n : \"\") || this.translate.instant(\"add_a_payment_method\");\r\n const selectpay = {\r\n CardType: this.paymentService.SelectedPaymentTypes.CardType,\r\n Last4: this.paymentService.SelectedPaymentTypes.Ending,\r\n ExpireMonth: this.paymentService.SelectedPaymentTypes.Expires\r\n ? moment(\r\n this.paymentService.SelectedPaymentTypes.Expires,\r\n ).format(\"M\")\r\n : 0,\r\n ExpireYear: this.paymentService.SelectedPaymentTypes.Expires\r\n ? moment(\r\n this.paymentService.SelectedPaymentTypes.Expires,\r\n ).format(\"YYYY\")\r\n : 0,\r\n Token: this.paymentService.SelectedPaymentTypes.PaymentMethodId\r\n ? this.paymentService.SelectedPaymentTypes.PaymentMethodId\r\n : \"\",\r\n MerchantId: this.paymentService.SelectedPaymentTypes.MerchantId,\r\n };\r\n this.userService.paymentMethods.push(selectpay);\r\n\r\n localStorage.setItem(\r\n \"userService\",\r\n JSON.stringify(this.userService),\r\n );\r\n } else {\r\n this.setDefaultAutoshipPayment();\r\n }\r\n } else {\r\n this.setDefaultAutoshipPayment();\r\n }\r\n } else {\r\n this.persistentService.retailData.SelectedAutoshipPayment = [];\r\n this.paymentService.selectedPaymentTypeName =\r\n this.translate.instant(\"Add_Payment_Method\");\r\n\r\n localStorage.setItem(\"userService\", JSON.stringify(this.userService));\r\n }\r\n this.cart1Service.setQuantiy();\r\n\r\n this.orderService.calculateAutoOrder().then(() => {\r\n this.orderService.calculateAutoOrderResponse[\"BusinessVolumeTotal\"] =\r\n this.editingAutoship.TotalCV;\r\n });\r\n\r\n this.persistentService.retailData.editAutoshipItems = cloneDeep(\r\n this.itemsService.selectedAutoOrderItems,\r\n );\r\n this.utilityService.setAutoshipEditFlag(true);\r\n this.autoshipConfigurationService.init();\r\n },\r\n (error) => {\r\n console.warn(\"error\", error);\r\n },\r\n () => {},\r\n );\r\n }\r\n\r\n getLastQuantity(type, item) {\r\n this.lastQuantity = this.getQuantityModel(type, item)[item.ItemID];\r\n }\r\n\r\n setFrequency(frequencyTypeID) {\r\n this.commonData.FrequencyTypes.some((freq) => {\r\n if (freq.ID == frequencyTypeID) {\r\n this.persistentService.retailData.Autoship.FrequencyTypeDescription =\r\n freq.Description;\r\n this.persistentService.retailData.Autoship.FrequencyTypeID = freq.ID;\r\n this.persistentService.retailData.Autoship.FrequencyTypeDescription =\r\n freq.Description;\r\n this.persistentService.retailData.Autoship.FrequencyTypeID = freq.ID;\r\n this.persistentService.retailData.isChanged = true;\r\n return;\r\n }\r\n });\r\n }\r\n\r\n setDefaultAutoshipPayment() {\r\n this.persistentService.retailData.SelectedAutoshipPayment =\r\n this.paymentService.PaymentTypeResponse[\"SaveMethods\"][0];\r\n this.paymentService.SelectedPaymentTypes =\r\n this.persistentService.retailData.SelectedAutoshipPayment;\r\n this.paymentService.selectedPaymentTypeName =\r\n this.persistentService.retailData.SelectedAutoshipPayment.CardType +\r\n \" \" +\r\n this.persistentService.retailData.SelectedAutoshipPayment.Ending;\r\n const selectpay = {\r\n CardType: this.paymentService.SelectedPaymentTypes.CardType,\r\n Last4: this.paymentService.SelectedPaymentTypes.Ending,\r\n ExpireMonth: this.paymentService.SelectedPaymentTypes.Expires\r\n ? moment(this.paymentService.SelectedPaymentTypes.Expires).format(\"M\")\r\n : 0,\r\n ExpireYear: this.paymentService.SelectedPaymentTypes.Expires\r\n ? moment(this.paymentService.SelectedPaymentTypes.Expires).format(\r\n \"YYYY\",\r\n )\r\n : 0,\r\n Token: this.paymentService.SelectedPaymentTypes.PaymentMethodId\r\n ? this.paymentService.SelectedPaymentTypes.PaymentMethodId\r\n : \"\",\r\n PaymentMethodId: this.paymentService.SelectedPaymentTypes.PaymentMethodId\r\n ? this.paymentService.SelectedPaymentTypes.PaymentMethodId\r\n : \"\",\r\n MerchantId: this.paymentService.SelectedPaymentTypes.MerchantId,\r\n };\r\n this.userService.paymentMethods.push(selectpay);\r\n\r\n localStorage.setItem(\"userService\", JSON.stringify(this.userService));\r\n }\r\n\r\n editAutoshipFrequency(event) {\r\n const m: moment.Moment = event.value;\r\n this.persistentService.retailData.isChanged = true;\r\n this.autoshipConfigurationService.autoshipDate =\r\n this.editingAutoship.NextProcessDate = m;\r\n }\r\n\r\n getAddress(response) {\r\n this.persistentService.retailData.isChanged = true;\r\n if (\r\n this.userService.shippingAddress.CountryCode.toLowerCase() !==\r\n response.address.Country.toLowerCase()\r\n ) {\r\n this.addressChanged = true;\r\n }\r\n this.persistentService.retailData.isNewAddress = response.address;\r\n this.userService.shippingAddress.FirstName = response.address.FirstName;\r\n this.userService.shippingAddress.LastName = response.address.LastName;\r\n this.userService.shippingAddress.Street1 = response.address.Address1;\r\n this.userService.shippingAddress.Street2 = response.address.Address2;\r\n this.userService.shippingAddress.City = response.address.City;\r\n this.userService.shippingAddress.Region = response.address.State;\r\n this.userService.shippingAddress.CountryCode = response.address.Country;\r\n this.userService.shippingAddress.PostalCode = response.address.Zip;\r\n\r\n if (response.isReplacement) {\r\n this.address.replaceDefault = true;\r\n this.persistentService.retailData.isAddresschanged = true;\r\n } else {\r\n this.persistentService.retailData.isAddresschanged = false;\r\n }\r\n // Order calculations may change based on the shipping Address\r\n this.orderService.calculateAutoOrder();\r\n }\r\n\r\n decreaseQuantiy(item) {\r\n if (\r\n this.itemsService.selectedAutoOrderItems.length == 1 &&\r\n this.itemsService.selectedAutoOrderItems[0].Quantity == 1\r\n ) {\r\n if (this.AutoshipSetting[\"IsShowDeleteAutoship\"]) {\r\n this.deleteAutoship();\r\n } else {\r\n const dialog = this.dialog.open(ConfirmDialogComponent, {\r\n maxWidth: \"400px\",\r\n data: {\r\n title: this.translate.instant(\"trying_delete_autoship\"),\r\n message: this.translate.instant(\"prevent_delete_autoship_message\"),\r\n takeaction: this.translate.instant(\"got_it\"),\r\n noaction: \"\",\r\n },\r\n panelClass: \"\",\r\n disableClose: true,\r\n autoFocus: false,\r\n });\r\n dialog.afterClosed().subscribe((result) => {\r\n if (result) {\r\n this.persistentService.retailData.isChanged = true;\r\n }\r\n });\r\n }\r\n } else {\r\n this.cart1Service.decreaseQuantiy(item, true, false);\r\n }\r\n }\r\n\r\n clearCart() {\r\n this.cart1Service.autoshipQuantity = {};\r\n this.itemsService.selectedAutoOrderItems = [];\r\n this.orderService.calculateAutoOrderResponse = {};\r\n localStorage.removeItem(\"cart.autoship\");\r\n }\r\n\r\n cancelAutoship() {\r\n this.utilityService.setAutoshipEditFlag(false);\r\n this.persistentService.retailData.AddMoreItemInAutoshipFlag = false;\r\n this.persistentService.retailData.isAutoshipEdit = false;\r\n this.persistentService.retailData.AddMoreItemInAutoshipData = {};\r\n this.persistentService.retailData.CurrentSelectedAutoOrder = 0;\r\n this.clearCart();\r\n this.orderService.calculateAutoOrder();\r\n }\r\n\r\n getAutoshipFrequency() {\r\n return (\r\n this.persistentService.retailData.Autoship &&\r\n this.persistentService.retailData.Autoship.FrequencyTypeDescription\r\n );\r\n }\r\n\r\n getAutoshipStartDate() {\r\n if (this.autoshipConfigurationService.autoshipDate) {\r\n return moment(this.autoshipConfigurationService.autoshipDate).toDate();\r\n } else {\r\n return moment().toDate();\r\n }\r\n }\r\n\r\n getShipMethodName() {\r\n if (this.orderService.calculateAutoOrderResponse?.ShippingMethods) {\r\n const selectedShipMethods = _.find(\r\n this.orderService.calculateAutoOrderResponse.ShippingMethods,\r\n (item) => {\r\n return item.ShipMethodId == this.userService.selectedShippingMethod;\r\n },\r\n );\r\n if (\r\n selectedShipMethods &&\r\n !this.utilityService.isEmptyObject(selectedShipMethods)\r\n ) {\r\n this.selectedShipMethodName = selectedShipMethods.Description;\r\n }\r\n return this.selectedShipMethodName;\r\n }\r\n }\r\n\r\n getQuantityModel(type, item) {\r\n return this.cart1Service[\r\n type == \"pack\"\r\n ? \"packQuantity\"\r\n : type == \"autoship\"\r\n ? \"autoshipQuantity\"\r\n : item && item.UsePoints\r\n ? \"orderRewardQuantity\"\r\n : \"orderQuantity\"\r\n ];\r\n }\r\n\r\n checkQuantity(item, isAutoship, isPack) {\r\n const quantity = this.getQuantityModel(isPack, isAutoship)[item.ItemCode];\r\n if (!Number(quantity)) {\r\n this.getQuantityModel(isPack, isAutoship)[item.ItemCode] = 1;\r\n } else {\r\n item.Quantity = quantity;\r\n if (isAutoship) {\r\n localStorage.setItem(\r\n \"cart.autoship\",\r\n JSON.stringify(this.itemsService.selectedAutoOrderItems),\r\n );\r\n this.orderService.calculateAutoOrder();\r\n } else {\r\n localStorage.setItem(\r\n isPack ? \"cart.packs\" : \"cart.order\",\r\n JSON.stringify(\r\n isPack\r\n ? this.itemsService.selectedPacks\r\n : this.itemsService.selectedOrderItems,\r\n ),\r\n );\r\n this.orderService.calculateOrder();\r\n }\r\n }\r\n }\r\n\r\n editAutoshipShippingMethod() {\r\n const dialog = this.dialog.open(ShipMethodsComponent, {\r\n width: \"600px\",\r\n maxWidth: \"600px\",\r\n data: this.orderService.calculateAutoOrderResponse.ShippingMethods,\r\n panelClass: \"shippingmethodDialog\",\r\n autoFocus: false,\r\n });\r\n dialog.afterClosed().subscribe((result) => {\r\n if (result) {\r\n this.getShipMethod(result);\r\n }\r\n });\r\n }\r\n editAutoshipShippingAddress() {\r\n const dialog = this.dialog.open(ShippingAddressDialogComponent, {\r\n width: \"600px\",\r\n maxWidth: \"600px\",\r\n panelClass: \"shippingAddressDialog\",\r\n autoFocus: false,\r\n });\r\n dialog.afterClosed().subscribe((result) => {\r\n if (result) {\r\n if (result && result.isReplacement) {\r\n this.userService.shippingAddress.FirstName = result.address.FirstName;\r\n this.userService.shippingAddress.LastName = result.address.LastName;\r\n this.userService.shippingAddress.Street1 = result.address.Street1;\r\n this.userService.shippingAddress.Street2 = result.address.Street2;\r\n this.userService.shippingAddress.City = result.address.City;\r\n this.userService.shippingAddress.Region = result.address.Region;\r\n this.userService.shippingAddress.CountryCode =\r\n result.address.CountryCode;\r\n this.userService.shippingAddress.PostalCode =\r\n result.address.PostalCode;\r\n this.persistentService.retailData.isChanged = true;\r\n this.orderService.calculateAutoOrder();\r\n }\r\n }\r\n });\r\n }\r\n\r\n getShipMethod(newShippingMethod) {\r\n this.persistentService.retailData.isChanged = true;\r\n this.userService.selectedShippingMethod = newShippingMethod.shipMethod;\r\n this.orderService.calculateAutoOrder();\r\n }\r\n\r\n deleteItem(item) {\r\n if (\r\n this.itemsService.selectedAutoOrderItems &&\r\n this.itemsService.selectedAutoOrderItems.length > 1\r\n ) {\r\n this.persistentService.retailData.isChanged = true;\r\n this.cart1Service.removeFromCart(item, true, false, true);\r\n } else if (\r\n this.itemsService.selectedAutoOrderItems &&\r\n this.itemsService.selectedAutoOrderItems.length == 1\r\n ) {\r\n if (this.AutoshipSetting[\"IsShowDeleteAutoship\"]) {\r\n this.deleteAutoship();\r\n } else {\r\n const dialog = this.dialog.open(ConfirmDialogComponent, {\r\n maxWidth: \"400px\",\r\n data: {\r\n title: this.translate.instant(\"trying_delete_autoship\"),\r\n message: this.translate.instant(\"prevent_delete_autoship_message\"),\r\n takeaction: this.translate.instant(\"got_it\"),\r\n noaction: \"\",\r\n },\r\n panelClass: \"\",\r\n disableClose: true,\r\n autoFocus: false,\r\n });\r\n dialog.afterClosed().subscribe((result) => {\r\n if (result) {\r\n //\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n deleteAutoship() {\r\n const dialog = this.dialog.open(ConfirmDialogComponent, {\r\n maxWidth: \"400px\",\r\n data: {\r\n title: this.translate.instant(\"delete_autoship_title\"),\r\n message: this.translate.instant(\"delete_autoship_text\"),\r\n takeaction: this.translate.instant(\"YES\"),\r\n noaction: this.translate.instant(\"NO\"),\r\n },\r\n panelClass: \"\",\r\n disableClose: true,\r\n autoFocus: false,\r\n });\r\n dialog.afterClosed().subscribe((result) => {\r\n if (result) {\r\n this.apiService\r\n .deleteAutoship(\r\n this.persistentService.retailData.CurrentSelectedAutoOrder,\r\n )\r\n .subscribe(\r\n (result) => {\r\n try {\r\n if (result && Number(result.Status) === 1) {\r\n this.utilityService.setAutoshipEditFlag(false);\r\n this.persistentService.retailData.AddMoreItemInAutoshipFlag =\r\n false;\r\n this.persistentService.retailData.AddMoreItemInAutoshipData =\r\n {};\r\n this.persistentService.retailData.editAutoshipItems = [];\r\n this.persistentService.retailData.CurrentSelectedAutoOrder = 0;\r\n this.router.navigate([\"/manageautoship\"]);\r\n this.notificationService.success(\r\n \"Success\",\r\n this.translate.instant(\"successfully_deleted\"),\r\n );\r\n this.persistentService.retailData.isAutoshipEdit = false;\r\n this.cart1Service.clearCart();\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"some_error_occur_try_again\"),\r\n );\r\n }\r\n } catch (ex) {\r\n console.error(\"ex\", ex);\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"Delete Autoship Error\"),\r\n );\r\n }\r\n },\r\n () => {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"Delete Autoship Error\"),\r\n );\r\n },\r\n () => {},\r\n );\r\n }\r\n });\r\n }\r\n\r\n // Save Payment Method\r\n addSavePayment(paymentData) {\r\n this.persistentService.retailData.isChanged = true;\r\n if (\r\n this.paymentService.SelectedPaymentTypes &&\r\n this.paymentService.SelectedPaymentTypes.MerchantId !==\r\n paymentData.MerchantId\r\n ) {\r\n this.userService.paymentMethods = [];\r\n }\r\n this.paymentService.SelectedPaymentTypes = paymentData;\r\n this.paymentService.selectedPaymentTypeName =\r\n (paymentData.DisplayName || paymentData.CardType) +\r\n \" \" +\r\n (paymentData.Ending ? paymentData.Ending : \"\") ||\r\n this.translate.instant(\"add_a_payment_method\");\r\n\r\n if (this.paymentService.SelectedPaymentTypes.CanSavePayments) {\r\n this.paymentService.OldSelectedPaymentType =\r\n this.paymentService.SelectedPaymentTypes;\r\n this.paymentService.getPaymentData();\r\n } else {\r\n this.paymentService.oldSelectedPaymentTypeName =\r\n this.paymentService.selectedPaymentTypeName;\r\n this.userService.paymentMethods = [];\r\n const selectpay = {\r\n CardType:\r\n this.paymentService.SelectedPaymentTypes.CardType ||\r\n this.paymentService.SelectedPaymentTypes.Name,\r\n Last4: this.paymentService.SelectedPaymentTypes.Ending,\r\n ExpireMonth: this.paymentService.SelectedPaymentTypes.Expires\r\n ? moment(this.paymentService.SelectedPaymentTypes.Expires).format(\"M\")\r\n : 0,\r\n ExpireYear: this.paymentService.SelectedPaymentTypes.Expires\r\n ? moment(this.paymentService.SelectedPaymentTypes.Expires).format(\r\n \"YYYY\",\r\n )\r\n : 0,\r\n Token: this.paymentService.SelectedPaymentTypes.PaymentMethodId\r\n ? this.paymentService.SelectedPaymentTypes.PaymentMethodId\r\n : \"\",\r\n MerchantId: this.paymentService.SelectedPaymentTypes.MerchantId,\r\n };\r\n this.userService.paymentMethods.push(selectpay);\r\n this.userService.isPaymentChanged = true;\r\n }\r\n localStorage.setItem(\"userService\", JSON.stringify(this.userService));\r\n }\r\n\r\n // delete Payment Method\r\n removeCardDetail(payment) {\r\n const messageText =\r\n this.translate.instant(\"confirm_delete_payment_info\") +\r\n \" \" +\r\n this.getPaymentDescription(payment) +\r\n \"?\";\r\n const dialog = this.dialog.open(ConfirmDialogComponent, {\r\n maxWidth: \"400px\",\r\n data: {\r\n title: \"\",\r\n message: messageText,\r\n takeaction: this.translate.instant(\"Delete\"),\r\n noaction: this.translate.instant(\"cancel\"),\r\n },\r\n panelClass: \"\",\r\n disableClose: true,\r\n autoFocus: false,\r\n });\r\n dialog.afterClosed().subscribe(() => {\r\n this.deleteCreditCard(payment);\r\n this.persistentService.retailData.isChanged = true;\r\n });\r\n }\r\n\r\n getPaymentDescription(payment) {\r\n if (!payment) {\r\n return \"\";\r\n }\r\n if (payment.CreditCardTypeDescription === \"Unknown\") {\r\n return payment.CreditCardTypeDescription;\r\n }\r\n const type =\r\n payment.CreditCardTypeDescription || payment.Name || payment.CardType;\r\n const numb =\r\n payment.CreditCardNumberDisplay ||\r\n new AddSymbolWithNumberPipe().transform(payment.Ending, \"*\", 4, 11) ||\r\n new AddSymbolWithNumberPipe().transform(payment.Last4, \"*\", 4, 11);\r\n return type + \" \" + numb;\r\n }\r\n\r\n deleteCreditCard(payment) {\r\n const DeleteCreditCardRequest = {\r\n customerId: 0,\r\n merchantid: payment.MerchantId,\r\n paymentmethodid: payment.PaymentMethodId,\r\n };\r\n this.apiService.deletePaymentMethod(DeleteCreditCardRequest).subscribe(\r\n (result) => {\r\n try {\r\n if (parseInt(result.Status, 10) === 0) {\r\n if (\r\n this.paymentService.selectedPaymentTypeName ==\r\n payment.Name + \" \" + payment.Ending\r\n ) {\r\n this.paymentService.SelectedPaymentTypes = {};\r\n this.userService.paymentMethods = [];\r\n this.paymentService.selectedPaymentTypeName = \"\";\r\n this.paymentService.selectedPaymentTypeName =\r\n this.translate.instant(\"Add_Payment_Method\");\r\n }\r\n this.notificationService.success(\r\n \"Success\",\r\n this.translate.instant(\"successfully_deleted\"),\r\n );\r\n this.paymentService.getPaymentType();\r\n } else {\r\n this.notificationService.error(\r\n \"Error\",\r\n result.Message\r\n ? result.Message\r\n : this.translate.instant(\"not_remove\"),\r\n );\r\n }\r\n } catch (ex) {\r\n console.error(\"ex\", ex);\r\n }\r\n },\r\n () => {\r\n this.notificationService.error(\r\n \"Error\",\r\n this.translate.instant(\"not_remove\"),\r\n );\r\n },\r\n () => {},\r\n );\r\n }\r\n\r\n getDisplayValue() {\r\n if (\r\n parseInt(this.paymentService.selectedPaymentTypeName.split(\" \")[1], 10)\r\n ) {\r\n const displayValue =\r\n this.paymentService.selectedPaymentTypeName.split(\" \")[0] +\r\n \" \" +\r\n this.translate.instant(\"ending_in\") +\r\n \" \" +\r\n this.paymentService.selectedPaymentTypeName.split(\" \")[1];\r\n return displayValue;\r\n } else {\r\n return this.paymentService.selectedPaymentTypeName;\r\n }\r\n }\r\n\r\n addAutoshipItem() {\r\n const autoshipText =\r\n this.translate.instant(\"add_to_autoship_and_checkout\") +\r\n \" \" +\r\n \"#\" +\r\n this.editingAutoship.AutoShipID +\r\n \" \" +\r\n \"?\";\r\n const dialog = this.dialog.open(ConfirmDialogComponent, {\r\n maxWidth: \"400px\",\r\n data: {\r\n title: autoshipText,\r\n message: \"\",\r\n takeaction: this.translate.instant(\"okay_to_shopping\"),\r\n noaction: this.translate.instant(\"cancel\"),\r\n },\r\n panelClass: \"\",\r\n disableClose: true,\r\n autoFocus: false,\r\n });\r\n dialog.afterClosed().subscribe((data) => {\r\n if (data) {\r\n this.persistentService.retailData.isChanged = true;\r\n this.persistentService.retailData.AddMoreItemInAutoshipFlag = true;\r\n this.persistentService.retailData.AddMoreItemInAutoshipData =\r\n this.getAutoshipOrderDetail;\r\n this.router.navigate([\"/products/all\"]);\r\n }\r\n });\r\n }\r\n\r\n autoshipChanged() {\r\n return this.persistentService.retailData.isChanged;\r\n }\r\n\r\n getCvv(data) {\r\n if (data) {\r\n this.placeAutoOrder();\r\n } else {\r\n this.isDisabledCreateOrder = false;\r\n }\r\n }\r\n\r\n updateAutoOrder() {\r\n this.isDisabledCreateOrder = true;\r\n if (this.user.checkIfUserAuthenticatedOrNot()) {\r\n if (\r\n this.paymentService.SelectedPaymentTypes &&\r\n Object.keys(this.paymentService.SelectedPaymentTypes).length &&\r\n this.userService.paymentMethods.length &&\r\n this.configService.localSettings.Global.AllowCVVModel\r\n ) {\r\n const dialog = this.dialog.open(AllowCvvComponent, {\r\n disableClose: true,\r\n panelClass: \"allowCvvModel-dialog\",\r\n autoFocus: false,\r\n });\r\n dialog.afterClosed().subscribe((data) => {\r\n this.getCvv(data);\r\n });\r\n } else {\r\n this.placeAutoOrder();\r\n }\r\n } else {\r\n this.accountService.logout();\r\n this.router.navigate([\"/Login\"]);\r\n }\r\n }\r\n\r\n placeAutoOrder() {\r\n const placeOrderPromise = new Promise((resolve, reject) => {\r\n if (\r\n this.itemsService.selectedAutoOrderItems.length > 0 &&\r\n this.persistentService.retailData.Autoship.FrequencyTypeID == undefined\r\n ) {\r\n this.notificationService.error(\"error_\", \"choose_frequency_sidecart\");\r\n return;\r\n }\r\n\r\n if (this.itemsService.selectedAutoOrderItems.length == 0) {\r\n this.notificationService.error(\"error_\", \"autoship_required_msg\");\r\n return;\r\n }\r\n if (this.userService.paymentMethods.length > 0) {\r\n if (\r\n this.userService.paymentMethods[0].Last4 ||\r\n this.userService.paymentMethods[0].Last4 === undefined\r\n ) {\r\n this.paymentService.IsFrameReload = false;\r\n } else {\r\n this.notificationService.error(\"error_\", \"shop_please_add_payment\");\r\n this.isDisabledCreateOrder = false;\r\n return;\r\n }\r\n } else {\r\n this.notificationService.error(\"error_\", \"shop_please_add_payment\");\r\n this.isDisabledCreateOrder = false;\r\n return;\r\n }\r\n\r\n if (\r\n this.isStateRestrict ||\r\n (!Object.keys(this.userService.shippingAddress).length &&\r\n !this.userService.shippingAddress.Street1)\r\n ) {\r\n this.notificationService.error(\"error_\", \"please_add_address\");\r\n this.isDisabledCreateOrder = false;\r\n return;\r\n }\r\n\r\n const autoshipproductdetails: Array = [];\r\n _.each(this.itemsService.selectedAutoOrderItems, (item) => {\r\n if (parseInt(item.Quantity, 10) > 0) {\r\n autoshipproductdetails.push({\r\n ItemId: item.ItemID,\r\n IsReward: false,\r\n Quantity: item.Quantity,\r\n });\r\n }\r\n });\r\n\r\n this.updateAutoOrderRequest = {\r\n ShipMethodId: this.userService.selectedShippingMethod || 1,\r\n Frequency:\r\n this.persistentService.retailData.Autoship.FrequencyTypeID.toString() ||\r\n 1,\r\n Items: autoshipproductdetails,\r\n MerchantId: this.userService.paymentMethods[0].MerchantId || \"\",\r\n PaymentMethodId:\r\n this.userService.paymentMethods[0].Token ||\r\n this.paymentService.SelectedPaymentTypes.PaymentMethodId ||\r\n \"\",\r\n ShippingAddress: {\r\n Street1: this.userService.shippingAddress.Street1 || \"\",\r\n Street2: this.userService.shippingAddress.Street2 || \"\",\r\n Street3: this.userService.shippingAddress.Street3 || \"\",\r\n Region: this.userService.shippingAddress.Region || \"\",\r\n City: this.userService.shippingAddress.City || \"\",\r\n PostalCode: this.userService.shippingAddress.PostalCode || \"\",\r\n CountryCode: this.userService.shippingAddress.CountryCode || \"US\",\r\n } as ShipAddress,\r\n StartDate: this.autoshipConfigurationService.autoshipDate,\r\n } as CreateAutoOrder;\r\n\r\n this.apiService\r\n .updateAutoship(\r\n this.getAutoshipOrderDetail.id,\r\n this.updateAutoOrderRequest,\r\n )\r\n .subscribe(\r\n (result) => {\r\n this.isDisabledCreateOrder = false;\r\n if (result.Status === 0) {\r\n this.userService.newUser = false;\r\n result.AutoOrderId = this.getAutoshipOrderDetail.id;\r\n localStorage.setItem(\"SubmitApplication\", JSON.stringify(result));\r\n this.utilityService.setAutoshipEditFlag(false);\r\n this.persistentService.retailData.AddMoreItemInAutoshipFlag =\r\n false;\r\n this.persistentService.retailData.AddMoreItemInAutoshipData = {};\r\n this.persistentService.retailData.isChanged = false;\r\n this.userService.isAddressChanged = false;\r\n this.userService.isPaymentChanged = false;\r\n this.userService.isShipMethodChanged = false;\r\n this.persistentService.retailData.isNewAutoship = false;\r\n this.persistentService.retailData.editAutoshipItems = [];\r\n this.persistentService.retailData.AddMoreItemInAutoshipData = {};\r\n this.persistentService.retailData.CurrentSelectedAutoOrder = 0;\r\n this.userService.isAddressChanged = false;\r\n if (result.RedirectUrl && result.RedirectUrl.length > 0) {\r\n window.location = result.RedirectUrl;\r\n }\r\n this.router.navigate([\"/complete\"]);\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(result.Message),\r\n );\r\n }\r\n resolve(result);\r\n },\r\n () => {\r\n reject(this.translate.instant(\"some_error_occur_try_again\"));\r\n this.isDisabledCreateOrder = false;\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\"some_error_occur_try_again\"),\r\n );\r\n },\r\n () => {},\r\n );\r\n });\r\n return placeOrderPromise;\r\n }\r\n}\r\n","
\r\n
\r\n
0 \">\r\n
\r\n

your_autoship_

\r\n
\r\n
\r\n \r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n autoshiip\r\n \r\n
\r\n
\r\n
\r\n \r\n nxt_run_date\r\n
\r\n \r\n
\r\n
\r\n \r\n shop_payment_new\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
global_skuglobal_description\r\n global_quantityunit_price\r\n invoice_line_total
\r\n \r\n
totals_\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n

\r\n {{'edit_' | translate}}\r\n

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n
manage_autoship_placeholder
\r\n
\r\n\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { GetAutoship, GetAutoshipResult } from \"src/app/modals/autoship.modal\";\r\nimport { ConfigService } from \"../../shared/services/config.service\";\r\nimport { ProductService } from \"../../shared/services/product.service\";\r\nimport { RestApiService } from \"../../shared/services/restapi.service\";\r\nimport { UtilityService } from \"../../shared/services/utility.service\";\r\nimport { PersistentService } from \"../../shared/services/persistent.service\";\r\nimport { UserService } from \"../../shared/services/user.service\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport * as _ from \"lodash\";\r\nimport { CookieService } from \"ngx-cookie-service\";\r\nimport $ from \"jquery\";\r\nimport { CompanyService } from \"../../shared/services/company.service\";\r\nimport { ItemsListService } from \"../../shared/services/itemsList.service\";\r\n\r\n@Component({\r\n selector: \"app-manage-autoship\",\r\n templateUrl: \"./manage-autoship.component.html\",\r\n styleUrls: [\"./manage-autoship.component.scss\"],\r\n})\r\nexport class ManageAutoshipComponent implements OnInit {\r\n public AutoOrdersData: Array = [];\r\n public LineItems: Array = [];\r\n private total;\r\n public autoshipConfiguration = {\r\n setting: {},\r\n };\r\n public autoShipId: number;\r\n userService: UserServiceModal;\r\n AutoshipSetting: [];\r\n constructor(\r\n public configService: ConfigService,\r\n private titleService: Title,\r\n public translate: TranslateService,\r\n private router: Router,\r\n public apiService: RestApiService,\r\n public itemsService: ProductService,\r\n public utilityService: UtilityService,\r\n public persistentService: PersistentService,\r\n public user: UserService,\r\n public cookieService: CookieService,\r\n public companyService: CompanyService,\r\n private itemsListService: ItemsListService\r\n ) {\r\n this.userService = this.user.userServiceModal;\r\n }\r\n\r\n ngOnInit() {\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_manage_autoship\") + \" | \" + text,\r\n );\r\n });\r\n window.scrollTo(0, 0);\r\n this.init();\r\n }\r\n\r\n setAutoshipId(id) {\r\n let submitapp =\r\n localStorage.getItem(\"SubmitApplication\") &&\r\n JSON.parse(localStorage.getItem(\"SubmitApplication\"));\r\n if (submitapp) {\r\n submitapp.AutoOrderId = id;\r\n localStorage.setItem(\"SubmitApplication\", JSON.stringify(submitapp));\r\n } else {\r\n submitapp = { AutoOrderId: id };\r\n localStorage.setItem(\"SubmitApplication\", JSON.stringify(submitapp));\r\n }\r\n }\r\n\r\n getAutoOrders() {\r\n const promise = new Promise((resolve, reject) => {\r\n this.apiService\r\n .getCustomerAutoships(this.userService.customerData.CustomerId)\r\n .subscribe(\r\n (result: GetAutoshipResult) => {\r\n try {\r\n if (result.Status === 0) {\r\n\r\n \r\n // Filtering Autoships without installments\r\n result.Data = this.itemsListService.getAutoships_WithoutInstallment(result.Data);\r\n\r\n this.AutoOrdersData = result.Data;\r\n for (let i = 0; i < this.AutoOrdersData.length; i++) {\r\n this.total = 0;\r\n for (\r\n let j = 0;\r\n j < this.AutoOrdersData[i].LineItems.length;\r\n j++\r\n ) {\r\n this.total += this.AutoOrdersData[i].LineItems[j].Quantity;\r\n this.AutoOrdersData[i].TotalQuantity = this.total;\r\n }\r\n }\r\n resolve(result.Data);\r\n }\r\n } catch (ex) {\r\n console.error(\"ex\", ex);\r\n reject({});\r\n }\r\n },\r\n () => {\r\n this.AutoOrdersData = [];\r\n reject({});\r\n },\r\n () => {},\r\n );\r\n });\r\n return promise;\r\n }\r\n\r\n init() {\r\n localStorage.setItem(\r\n \"cart.autoship\",\r\n JSON.stringify(this.itemsService.selectedAutoOrderItems),\r\n );\r\n this.getAutoOrders().then(() => {\r\n if (!this.persistentService.retailData.AddMoreItemInAutoshipFlag) {\r\n this.persistentService.retailData.CurrentSelectedAutoOrder = 0;\r\n }\r\n this.persistentService.retailData.IsPaid = false;\r\n this.persistentService.retailData.isAutoshipEdit = false;\r\n this.persistentService.retailData.SelectedAutoshipPayment = {};\r\n this.persistentService.retailData.isChanged = false;\r\n\r\n this.userService.isAddressChanged = false;\r\n this.userService.isPaymentChanged = false;\r\n if (this.utilityService.getAutoshipEditFlag()) {\r\n this.persistentService.retailData.AddMoreItemInAutoshipFlag = true;\r\n _.each(this.AutoOrdersData, (order: any) => {\r\n if (\r\n order.AutoShipID ==\r\n this.persistentService.retailData.editAutoshipItems[0].AutoOrderID\r\n ) {\r\n this.persistentService.retailData.AddMoreItemInAutoshipData = {\r\n id: order.AutoShipID,\r\n isPaid: order.isPaid,\r\n };\r\n }\r\n });\r\n this.persistentService.retailData.CurrentSelectedAutoOrder =\r\n this.persistentService.retailData.editAutoshipItems[0].AutoOrderID;\r\n this.autoShipId =\r\n this.persistentService.retailData.editAutoshipItems[0].AutoOrderID;\r\n }\r\n\r\n if (this.persistentService.retailData.AddMoreItemInAutoshipFlag) {\r\n this.showAutoship(\r\n this.persistentService.retailData.AddMoreItemInAutoshipData.id,\r\n this.persistentService.retailData.AddMoreItemInAutoshipData.isPaid,\r\n );\r\n this.persistentService.retailData.getAutoOrderDetailsByID =\r\n this.persistentService.retailData.AddMoreItemInAutoshipData;\r\n setTimeout(() => {\r\n $([document.documentElement, document.body]).animate(\r\n {\r\n scrollTop: $(\"#autoshipEditor\").offset().top - 100,\r\n },\r\n 2000,\r\n );\r\n }, 2000);\r\n }\r\n });\r\n }\r\n\r\n canAddAutoship() {\r\n return (\r\n (this.AutoOrdersData && this.AutoOrdersData.length == 0) ||\r\n this.configService.localSettings.Autoship.AllowMultipleAutoship\r\n );\r\n }\r\n\r\n showAutoship(id, IsPaid = false) {\r\n this.persistentService.retailData.isAutoshipEdit = false;\r\n if (\r\n this.persistentService.retailData.AddMoreItemInAutoshipData &&\r\n this.persistentService.retailData.AddMoreItemInAutoshipData.id > 0 &&\r\n id !== this.persistentService.retailData.AddMoreItemInAutoshipData.id\r\n ) {\r\n this.persistentService.retailData.AddMoreItemInAutoshipData = {};\r\n this.persistentService.retailData.AddMoreItemInAutoshipFlag = false;\r\n this.persistentService.retailData.CurrentSelectedAutoOrder = 0;\r\n this.userService.isEditAutoshipAddressChanged = false;\r\n this.persistentService.retailData.editAutoshipItems = [];\r\n this.itemsService.selectedAutoOrderItems = [];\r\n this.persistentService.retailData.isAutoshipEdit = false;\r\n }\r\n\r\n if (this.persistentService.retailData.isAutoshipEdit) {\r\n this.persistentService.retailData.isAutoshipEdit = false;\r\n } else {\r\n this.persistentService.retailData.isAutoshipEdit = true;\r\n }\r\n this.persistentService.retailData.getAutoOrderDetailsByID = {\r\n id: id,\r\n isPaid: IsPaid,\r\n };\r\n this.autoShipId = id;\r\n this.utilityService.setAutoshipEditFlag(true);\r\n }\r\n\r\n createAutoship() {\r\n this.utilityService.setAutoshipEditFlag(false);\r\n this.persistentService.retailData.AddMoreItemInAutoshipFlag = false;\r\n this.persistentService.retailData.AddMoreItemInAutoshipData = {};\r\n this.persistentService.retailData.editAutoshipItems = [];\r\n this.persistentService.retailData.CurrentSelectedAutoOrder = 0;\r\n this.router.navigate([\"products/all\"], { skipLocationChange: false });\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n

\r\n

\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n

\r\n
\r\n
\r\n {{ \"back_to_login\" | translate}}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
","import { Component, OnInit } from \"@angular/core\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { NotificationService } from \"../../shared/services/notification.service\";\r\nimport { RestApiService } from \"../../shared/services/restapi.service\";\r\nimport { UserService } from \"../../shared/services/user.service\";\r\n\r\n@Component({\r\n selector: \"app-forgot-password\",\r\n templateUrl: \"./forgot-password.component.html\",\r\n styleUrls: [\"./forgot-password.component.scss\"],\r\n})\r\nexport class ForgotPasswordComponent implements OnInit {\r\n public forgotPasswordData = {\r\n userName: \"\",\r\n };\r\n public loadingDetails: boolean = true;\r\n public forgotpasswordtype: number = 1;\r\n public forgotPasswordOptions = [\r\n { option: 1, description: \"resetpassword_option_username\" },\r\n { option: 2, description: \"resetpassword_option_email\" },\r\n { option: 3, description: \"resetpassword_option_customerid\" },\r\n ];\r\n public selectedForgotPasswordOption = {\r\n option: 1,\r\n };\r\n public sentEmail: boolean = false;\r\n constructor(\r\n private titleService: Title,\r\n public translate: TranslateService,\r\n public notificationService: NotificationService,\r\n public apiServie: RestApiService,\r\n public userService: UserService,\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_forgotpassword\") + \" | \" + text,\r\n );\r\n });\r\n }\r\n\r\n // /**\r\n // * @ngdoc method\r\n // * @name emailSentForgotPassword\r\n // * @description method to send forget password link\r\n // */\r\n emailSentForgotPassword() {\r\n this.loadingDetails = true;\r\n this.forgotpasswordtype = this.selectedForgotPasswordOption.option;\r\n if (\r\n this.forgotPasswordData.userName &&\r\n this.selectedForgotPasswordOption.option\r\n ) {\r\n if (this.selectedForgotPasswordOption.option == 1) {\r\n this.forgotpasswordtype = 1; // 'username';\r\n } else if (this.selectedForgotPasswordOption.option == 2) {\r\n this.forgotpasswordtype = 2; // 'email';\r\n } else if (this.selectedForgotPasswordOption.option == 3) {\r\n this.forgotpasswordtype = 3; // 'customerid';\r\n }\r\n const forgotPasswordRequest = {\r\n value: this.forgotPasswordData.userName,\r\n valType: this.forgotpasswordtype,\r\n };\r\n this.apiServie\r\n .triggerForgotPasswordProcess(forgotPasswordRequest)\r\n .subscribe(\r\n () => {\r\n this.loadingDetails = false;\r\n this.forgotPasswordData.userName = \"\";\r\n this.sentEmail = true;\r\n },\r\n () => {\r\n this.loadingDetails = false;\r\n },\r\n () => {},\r\n );\r\n } else {\r\n this.loadingDetails = false;\r\n this.notificationService.error(\"Error\", \"choose_one_option\");\r\n return;\r\n }\r\n }\r\n}\r\n","\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n , \r\n
\r\n , \r\n , \r\n
\r\n
\r\n
\r\n
\r\n mail\r\n
\r\n
\r\n \r\n
\r\n
\r\n {{'add_shipping_address' | translate}}\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {{country.CountryName}}\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n {{state.StateName}}\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n","import { UtilityService } from \"src/app/components/shared/services/utility.service\";\r\nimport { Component, OnInit } from \"@angular/core\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { Router } from \"@angular/router\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { cloneDeep } from \"lodash\";\r\nimport { State } from \"src/app/modals/state.modal\";\r\nimport {\r\n ShippingAddress,\r\n UserServiceModal,\r\n} from \"src/app/modals/userservice.modal\";\r\nimport { OrderService } from \"../../shared/services/order.service\";\r\nimport { RestApiService } from \"../../shared/services/restapi.service\";\r\nimport { UserService } from \"../../shared/services/user.service\";\r\nimport { Cart1Service } from \"../../shared/services/cart1.service\";\r\nimport * as _ from \"lodash\";\r\nimport { PersistentService } from \"../../shared/services/persistent.service\";\r\n@Component({\r\n selector: \"app-shipping-address\",\r\n templateUrl: \"./shippingaddress.component.html\",\r\n styleUrls: [\"./shippingaddress.component.scss\"],\r\n})\r\nexport class ShippingAddressComponent implements OnInit {\r\n public userService: UserServiceModal;\r\n public newShipping: ShippingAddress = {} as ShippingAddress;\r\n public isStateRestrict: boolean;\r\n constructor(\r\n private router: Router,\r\n public apiService: RestApiService,\r\n public user: UserService,\r\n public orderService: OrderService,\r\n public translate: TranslateService,\r\n public titleService: Title,\r\n public cart1Service: Cart1Service,\r\n public utilityService: UtilityService,\r\n public persistentService: PersistentService,\r\n ) {\r\n this.userService = user.userServiceModal;\r\n this.userService.newshippingAddress = {} as ShippingAddress;\r\n // if (\r\n // !this.utilityService.isEmptyObject(\r\n // this.userService.customerData.DefaultShippingAddress,\r\n // )\r\n // ) {\r\n // this.user.setShippingAddress();\r\n // this.userService.newshippingAddress.Country =\r\n // this.userService.shippingAddress?.CountryCode?.toUpperCase() ||\r\n // this.userService.customerData?.DefaultShippingAddress.MainCountry?.toUpperCase();\r\n // this.userService.newshippingAddress.Country =\r\n // this.userService.newshippingAddress?.Country?.toUpperCase();\r\n // } else {\r\n // this.userService.newshippingAddress.Country =\r\n // sessionStorage.getItem(\"selectedCountry\").toUpperCase() ||\r\n // this.userService.shippingAddress?.CountryCode?.toUpperCase();\r\n // }\r\n\r\n // check restricated states\r\n if (this.userService.restrictedStates.length) {\r\n _.each(this.userService.restrictedStates, (state) => {\r\n if (\r\n this.userService.shippingAddress.Region &&\r\n state.toLowerCase() ===\r\n this.userService.shippingAddress.Region.toLowerCase()\r\n ) {\r\n this.isStateRestrict = true;\r\n }\r\n });\r\n }\r\n }\r\n public allowedCountries = [];\r\n states: Array = [];\r\n ngOnInit() {\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_shipping\") + \" | \" + text,\r\n );\r\n });\r\n this.allowedCountries = JSON.parse(\r\n sessionStorage.getItem(\"allowedCountries\"),\r\n );\r\n\r\n // this.getCountryState();\r\n }\r\n\r\n getCountryState(country?: string) {\r\n this.apiService.getStates(country || \"US\").subscribe((result) => {\r\n sessionStorage.setItem(\r\n (country || \"US\") + \"State\",\r\n JSON.stringify(result.Data),\r\n );\r\n this.states = result.Data;\r\n this.userService.newshippingAddress.Region = this.states[0].StateCode;\r\n });\r\n }\r\n\r\n nextStep(isChanged?: boolean) {\r\n if (\r\n this.userService.newshippingAddress &&\r\n this.userService.newshippingAddress.Country &&\r\n this.userService.newshippingAddress.Country.toUpperCase() !==\r\n sessionStorage.getItem(\"selectedCountry\").toUpperCase()\r\n ) {\r\n sessionStorage.setItem(\r\n \"selectedCountry\",\r\n this.userService.newshippingAddress.Country,\r\n );\r\n const allowedCountries = JSON.parse(\r\n sessionStorage.getItem(\"allowedCountries\"),\r\n );\r\n _.each(allowedCountries.Data, (item) => {\r\n if (\r\n item.CountryCode.toLowerCase() ==\r\n this.userService.newshippingAddress.Country.toLowerCase()\r\n ) {\r\n sessionStorage.setItem(\r\n \"selectedLanguageCode\",\r\n item.CountryLanguages[0].LanguageCode,\r\n );\r\n }\r\n });\r\n }\r\n if (isChanged) {\r\n if (\r\n this.userService.newshippingAddress &&\r\n this.userService.newshippingAddress.Street1 &&\r\n this.userService.newshippingAddress.PostalCode\r\n ) {\r\n this.userService.selectedShippingMethod = 0;\r\n this.userService.newshippingAddress.FullName =\r\n this.userService.newshippingAddress.FirstName +\r\n \" \" +\r\n this.userService.newshippingAddress.LastName;\r\n this.userService.shippingAddress = cloneDeep(\r\n this.userService.newshippingAddress,\r\n );\r\n this.userService.isAddressChanged = true;\r\n this.userService.isEditAutoshipAddressChanged =\r\n this.utilityService.getAutoshipEditFlag() ? true : false;\r\n }\r\n } else {\r\n this.userService.newshippingAddress = {};\r\n }\r\n this.orderService\r\n .calculateOrder()\r\n .then(() => {\r\n this.router.navigate([\"/checkout\"]);\r\n })\r\n .catch(() => {\r\n this.router.navigate([\"/checkout\"]);\r\n });\r\n }\r\n}\r\n","\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n Order Number :\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n\r\n\r\n\r\n
\r\n
\r\n \r\n :\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n :\r\n
\r\n
\r\n \r\n *\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n :\r\n
\r\n
\r\n \r\n
\r\n
\r\n
0\">\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
0 || selectedAutoshipID\">\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n","import { Component, OnInit, OnDestroy } from \"@angular/core\";\r\nimport { MatDialog } from \"@angular/material/dialog\";\r\nimport { Router } from \"@angular/router\";\r\nimport { UserServiceModal } from \"src/app/modals/userservice.modal\";\r\nimport { PaymentService } from \"../../shared/services/payment.service\";\r\nimport { RestApiService } from \"../../shared/services/restapi.service\";\r\nimport { UserService } from \"../../shared/services/user.service\";\r\nimport { OrderInvoiceComponent } from \"../order-invoice/order-invoice.component\";\r\nimport { UtilityService } from \"../../shared/services/utility.service\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { Title } from \"@angular/platform-browser\";\r\nimport { OrderService } from \"../../shared/services/order.service\";\r\nimport { Cart1Service } from \"../../shared/services/cart1.service\";\r\nimport { AutoshipConfigurationService } from \"../../shared/services/autoshipConfiguration.service\";\r\nimport { AccountService } from \"../../shared/services/account.service\";\r\nimport { OrderPipe } from \"ngx-order-pipe\";\r\nimport { PersistentService } from \"../../shared/services/persistent.service\";\r\nimport { ItemsListService } from \"../../shared/services/itemsList.service\";\r\n\r\n@Component({\r\n selector: \"app-complete\",\r\n templateUrl: \"./complete.component.html\",\r\n styleUrls: [\"./complete.component.scss\"],\r\n})\r\nexport class CompleteComponent implements OnInit, OnDestroy {\r\n public userService: UserServiceModal;\r\n isShowPassword: boolean = false;\r\n IsApplication: boolean = false;\r\n userEnrollmentDetail: any = {};\r\n userDetails: any = {};\r\n SubmitApplicationResponse: any = {};\r\n isEnrollGuest: boolean = false;\r\n passwordLength = [];\r\n guest;\r\n selectedAutoship;\r\n selectedAutoshipID;\r\n public AutoOrdersData = [];\r\n customerData: any;\r\n constructor(\r\n private translate: TranslateService,\r\n private titleService: Title,\r\n private router: Router,\r\n private matDailog: MatDialog,\r\n public user: UserService,\r\n public paymentService: PaymentService,\r\n public apiService: RestApiService,\r\n public utilityService: UtilityService,\r\n public orderService: OrderService,\r\n public cart1Service: Cart1Service,\r\n public autoshipConfigurationService: AutoshipConfigurationService,\r\n public accountService: AccountService,\r\n private orderPipe: OrderPipe,\r\n public persistentService: PersistentService,\r\n private itemsListService: ItemsListService\r\n ) {\r\n this.userService = this.user.userServiceModal;\r\n // this.getAutoOrders();\r\n }\r\n ngOnInit(): void {\r\n this.customerData = JSON.parse(localStorage.getItem(\"customerLoginDetails\"))\r\n this.guest = JSON.parse(localStorage.getItem(\"guestLogin\"));\r\n this.userEnrollmentDetail = JSON.parse(localStorage.getItem(\"SubmitApplication\"));\r\n this.userDetails = JSON.parse(localStorage.getItem(\"user\"));\r\n this.IsApplication = sessionStorage.getItem(\"IsEnrollment\") == \"true\" ? true : false;\r\n // clear cart and order details\r\n this.orderService.calculateOrderResponse = {};\r\n // clear last requests\r\n this.orderService.resetLastRequests();\r\n this.cart1Service.clearCart();\r\n if (\r\n localStorage.getItem(\"SubmitApplication\") &&\r\n JSON.parse(localStorage.getItem(\"SubmitApplication\"))\r\n ) {\r\n if (this.IsApplication) {\r\n let Response: any = {};\r\n Response = JSON.parse(localStorage.getItem(\"SubmitApplication\"));\r\n this.SubmitApplicationResponse = {\r\n OrderID: Response?.OrderStatus?.OrderNumber,\r\n AutoOrderId: Response?.AutoOrderStatus?.OrderNumber,\r\n };\r\n } else {\r\n this.SubmitApplicationResponse = JSON.parse(\r\n localStorage.getItem(\"SubmitApplication\"),\r\n );\r\n }\r\n } else {\r\n this.SubmitApplicationResponse = {};\r\n }\r\n\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\r\n this.translate.instant(\"pagetitle_complete\") + \" | \" + text,\r\n );\r\n });\r\n this.passwordLength.length =\r\n (this.userService.webOffice &&\r\n this.userService.webOffice.Password &&\r\n this.userService.webOffice.Password.length) ||\r\n 8;\r\n }\r\n ngOnDestroy(): void {\r\n if (this.guest != \"false\" && this.guest) {\r\n localStorage.setItem(\"IsMarketCountrySelected\", \"false\");\r\n localStorage.removeItem(\"LiveState\");\r\n localStorage.removeItem(\"SubmitApplication\");\r\n localStorage.removeItem(\"guestLogin\");\r\n localStorage.removeItem(\"selectedCountry\");\r\n localStorage.removeItem(\"commonSetting\");\r\n this.paymentService.PaymentTypeResponse = [];\r\n this.paymentService.PaymentDataResponse = {};\r\n this.paymentService.selectedPaymentTypeName = \"\";\r\n this.paymentService.SelectedPaymentTypes = {};\r\n this.paymentService.OldSelectedPaymentType = {};\r\n this.paymentService.AllowedMethods = [];\r\n this.paymentService.SaveMethods = [];\r\n this.resetUserService_updateEnrollerInfo();\r\n }\r\n this.autoshipConfigurationService.autoshipDate = \"\";\r\n if (this.IsApplication) {\r\n this.resetUserService_updateEnrollerInfo();\r\n this.paymentService.clearPayment();\r\n sessionStorage.removeItem(\"IsEnrollment\");\r\n }\r\n }\r\n\r\n goToProduct() {\r\n if (this.IsApplication) {\r\n this.resetUserService_updateEnrollerInfo();\r\n this.paymentService.clearPayment();\r\n sessionStorage.removeItem(\"IsEnrollment\");\r\n sessionStorage.getItem(\"IsLegacyUnifiedEnrollment\");\r\n }\r\n localStorage.setItem(\"IsMarketCountrySelected\", \"false\");\r\n this.userService.couponInfo.RewardsForUse = [];\r\n this.userService.couponInfo.promoCode = \"\";\r\n this.userService.couponInfo.promoCodeValid = false;\r\n this.userService.couponInfo.IsAppliedcode = false;\r\n this.userService.couponInfo.Allcoupons = [];\r\n this.autoshipConfigurationService.autoshipDate = \"\";\r\n if (!this.IsApplication) {\r\n this.userService.newshippingAddress = {};\r\n this.userService.restrictedStates = [];\r\n this.accountService\r\n .getCustomerData(this.userService.customerData.CustomerId)\r\n .then(() => {\r\n try {\r\n if (\r\n !this.utilityService.isEmptyObject(\r\n this.userService.customerData.DefaultShippingAddress,\r\n )\r\n ) {\r\n this.user.setShippingAddress();\r\n } else {\r\n this.userService.shippingAddress = null;\r\n }\r\n this.router.navigate([\"/products/all\"]);\r\n } catch (ex) {\r\n this.router.navigate([\"/products/all\"]);\r\n }\r\n })\r\n .catch((error) => {\r\n console.log(\"error\", error);\r\n });\r\n } else {\r\n this.router.navigate([\"/products/all\"]);\r\n }\r\n }\r\n\r\n resetUserService_updateEnrollerInfo() {\r\n const enrollerInfo = this.userService.enrollerInfo;\r\n if (!this.userService.customerData.CustomerId) {\r\n this.user.setDefault();\r\n }\r\n this.userService.enrollerInfo = enrollerInfo;\r\n localStorage.setItem(\"userService\", JSON.stringify(this.userService));\r\n }\r\n\r\n showOrderInvoice(dialogData?) {\r\n this.matDailog.open(OrderInvoiceComponent, {\r\n panelClass: \"invoiceDialog\",\r\n data: { OrderNumber: dialogData },\r\n autoFocus: false,\r\n });\r\n }\r\n\r\n showAutoOrderInvoice() {\r\n this.router.navigate([\"/manageautoship\"]);\r\n }\r\n getAutoOrders() {\r\n this.apiService\r\n .getCustomerAutoships(this.userService.customerData.CustomerId)\r\n .subscribe(\r\n (result: any) => {\r\n try {\r\n if (Number(result.Status) === 0) {\r\n if (result.Data && result.Data.length > 0) {\r\n\r\n\r\n // Filtering Autoships without installments\r\n result.Data = this.itemsListService.getAutoships_WithoutInstallment(result.Data);\r\n\r\n this.AutoOrdersData = this.orderPipe.transform(\r\n result.Data,\r\n \"AutoShipID\",\r\n true,\r\n );\r\n this.selectedAutoshipID = result.Data[0].AutoShipID;\r\n // Show selected Autoship in dropdown\r\n this.selectedAutoship =\r\n this.persistentService.retailData.CurrentSelectedAutoOrder ||\r\n this.AutoOrdersData[0].AutoShipID;\r\n }\r\n }\r\n } catch (ex) {\r\n console.error(\"ex\", ex);\r\n }\r\n },\r\n () => {\r\n this.AutoOrdersData = [];\r\n },\r\n () => { },\r\n );\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { CanActivate, Router } from \"@angular/router\";\r\nimport { CookieService } from \"ngx-cookie-service\";\r\n\r\n@Injectable()\r\nexport class LoggedInAuthGuard implements CanActivate {\r\n constructor(\r\n private cookieService: CookieService,\r\n private router: Router,\r\n ) {}\r\n\r\n canActivate(): boolean {\r\n if (this.cookieService.get(\"X-Auth\")) {\r\n this.router.navigate([\"/home\"]);\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { DomSanitizer, Title } from \"@angular/platform-browser\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { NotificationService } from \"../../shared/services/notification.service\";\r\nimport { RestApiService } from \"../../shared/services/restapi.service\";\r\nimport { UserService } from \"../../shared/services/user.service\";\r\nimport $ from \"jquery\";\r\n@Component({\r\n selector: \"app-contacts\",\r\n templateUrl: \"./contacts.component.html\",\r\n styleUrls: [\"./contacts.component.scss\"],\r\n})\r\nexport class ContactComponent implements OnInit {\r\n captchaError = true;\r\n contact: any = {};\r\n public a: number;\r\n captchaRequired: boolean = false;\r\n public userService = {};\r\n public b: number;\r\n constructor(\r\n private domSanitizer: DomSanitizer,\r\n public apiService: RestApiService,\r\n public notificationService: NotificationService,\r\n private titleService: Title,\r\n public translate: TranslateService,\r\n public user: UserService,\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\"ContactUS\" + \" | \" + text);\r\n });\r\n this.getCustomerSite();\r\n }\r\n\r\n getRandom(reloadCaptcha) {\r\n if (reloadCaptcha) {\r\n $(\"#answer\").val(null);\r\n this.captchaRequired = true;\r\n this.captchaError = true;\r\n }\r\n const numbers = [];\r\n for (let i = 1; i < 100; i++) {\r\n numbers.push(i);\r\n }\r\n this.a = numbers[Math.floor(Math.random() * numbers.length)];\r\n this.b = numbers[Math.floor(Math.random() * numbers.length)];\r\n setTimeout(() => {\r\n if (document.getElementById(\"captchaQuestion\")) {\r\n document.getElementById(\"captchaQuestion\").innerHTML =\r\n this.a + \"+\" + this.b;\r\n }\r\n }, 1000);\r\n }\r\n checkCaptch() {\r\n if (Number(this.contact.result) == Number(this.a) + Number(this.b)) {\r\n this.captchaError = true;\r\n } else {\r\n if (this.contact.result == \"\") {\r\n this.captchaError = true;\r\n } else {\r\n this.captchaError = false;\r\n }\r\n }\r\n }\r\n getCustomerSite() {\r\n const req =\r\n this.user.userServiceModal.WebAlias ||\r\n this.user.userServiceModal.enrollerInfo.WebAlias;\r\n this.apiService.getWebsiteInformation(req).subscribe((result) => {\r\n try {\r\n if (Number(result.Status) === 0 && result.Data) {\r\n this.userService = result.Data;\r\n this.getRandom(false);\r\n }\r\n } catch (ex) {\r\n //\r\n }\r\n });\r\n }\r\n contactUser() {\r\n if (this.captchaError) {\r\n const request = {\r\n NewProspect: {\r\n ID: 0,\r\n AssociateID: 0,\r\n Rating: 0,\r\n StageID: 0,\r\n BackOfficeID: \"\",\r\n FirstName: this.contact.FirstName,\r\n LastName: this.contact.LastName,\r\n Email: this.contact.Email,\r\n MobilePhone: this.contact.MobilePhone,\r\n HomePhone: \"\",\r\n WorkPhone: \"\",\r\n Address: \"\",\r\n City: \"\",\r\n State: \"\",\r\n Country: \"\",\r\n Zip: \"\",\r\n Notes: this.contact.Message,\r\n ImgUrl: \"\",\r\n CreatedDate: \"\",\r\n LastUpdatedDate: \"\",\r\n },\r\n CommandKey: \"\",\r\n };\r\n this.apiService.createProspect(request).subscribe((result) => {\r\n if (result) {\r\n this.contact = {};\r\n this.notificationService.success(\r\n \"Success\",\r\n this.translate.instant(\"contact_info_added\"),\r\n );\r\n } else {\r\n this.notificationService.error(\r\n \"Error\",\r\n this.translate.instant(\"some_error_occur_try_again\"),\r\n );\r\n }\r\n });\r\n } else {\r\n this.notificationService.error(\r\n \"Error\",\r\n this.translate.instant(\"Please enter valid captcha\"),\r\n );\r\n }\r\n }\r\n trustHtml(html) {\r\n return this.domSanitizer.bypassSecurityTrustHtml(html);\r\n }\r\n}\r\n","
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n captcha_ = \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n reload_captcha\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
","import { Component, OnInit } from '@angular/core';\r\nimport { Title } from '@angular/platform-browser';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n@Component({\r\n selector: 'app-aboutnew',\r\n templateUrl: './aboutnew.component.html',\r\n styleUrls: ['./aboutnew.component.scss']\r\n})\r\nexport class AboutnewComponent implements OnInit {\r\n\r\n constructor(\r\n public translate: TranslateService,\r\n private titleService: Title,\r\n ) {}\r\n\r\n ngOnInit() {\r\n this.translate.get(\"global_Company_Title\").subscribe((text: string) => {\r\n this.titleService.setTitle(\"AboutUs\" + \"|\" + text);\r\n });\r\n }\r\n\r\n}\r\n","\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Empowering You
to Live Your Best Life

\r\n
\r\n
\r\n \r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n Forty years ago, Loran Swensen\r\n embarked on a journey to help his son with\r\n cerebral palsy. He traveled the world learning about different therapies and talking to experts in various\r\n fields of study in hopes of finding ways to improve his son's quality of life. Years later, having the \r\n \r\n \r\n Forty years ago, Loran Swensen\r\n embarked on a journey to help his son with\r\n cerebral palsy. He traveled the world learning about different therapies and talking to experts in various\r\n fields of study in hopes of finding ways to improve his son's quality of life. \r\n \r\n
\r\n
\r\n \"\"\r\n
\r\n
\r\n \"\"\r\n
\r\n
\r\n
\r\n
\r\n opportunity to compile all the information he learned, he brought to market a frequency software now known as AO Scan Technology. This software has been developed and improved for decades, being the most advanced frequency software of its kind that can help you learn how your body is performing.\r\n Years later, having the opportunity to compile all the information he learned, he brought to market a frequency software now known as AO Scan Technology. This software has been developed and improved for decades, being the most advanced frequency software of its kind that can help you learn how your body is performing.\r\n
\r\n \"\"\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n
\r\n
\r\n

AO Scan has\r\n helped millions of people discover the best version of themselves, inside\r\n and out, changing the way people approach their health. This has opened the doors for 5 Star to challenge the\r\n status quo by providing more products, including supplements, with the latest technology and the finest\r\n ingredients, at an affordable price.\r\n

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

We are committed to help you live your best life by taking a new approach to wellness and putting your health back into your own hands.\r\n

\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
How It All Started
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
The Future of
Wellness Is Here
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \"\"\r\n
AO SCAN
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \"\"\r\n
BUNDLES
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n \"\"\r\n
SHOP ALL
\r\n
\r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
","\r\n
\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UserService } from '../../shared/services/user.service';\r\n\r\n@Component({\r\n selector: 'app-become-a-distributor',\r\n templateUrl: './become-a-distributor.component.html',\r\n styleUrls: ['./become-a-distributor.component.sass']\r\n})\r\nexport class BecomeADistributorComponent implements OnInit {\r\n\r\n // Builder.io\r\n\r\n noBuilderPageForUrl: boolean = false;\r\n\r\n data = {\r\n serviceName: this.userService.dummyName\r\n };\r\n \r\n context = {\r\n servicecontextName: this.userService.dummyName,\r\n changeName: () => {\r\n this.userService.dummyName = Math.random().toFixed(4).toString();\r\n },\r\n };\r\n\r\n options: any = {\r\n cacheSeconds: 0.1,\r\n data: {\r\n locale: \"en-US\",\r\n },\r\n };\r\n\r\n constructor(private userService: UserService) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","
\r\n
\r\n\r\n

Starter's Pack Checkout

\r\n

Builder's Pack Checkout

\r\n\r\n
\r\n
\r\n\r\n
\r\n

\r\n Returning customer? Click here to login\r\n \r\n

\r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n \r\n If you have shopped with us before, please enter your details below. If you are a new\r\n customer, please proceed to the Billing section.\r\n \r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n UserName or Email\r\n \r\n \r\n UserName or Email is required\r\n \r\n \r\n
\r\n
\r\n \r\n Password\r\n \r\n \r\n \r\n Password is required\r\n \r\n \r\n\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n Remember\r\n Me\r\n
\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n \r\n Customer Type\r\n \r\n
\r\n Member\r\n Retail Customer\r\n
\r\n
\r\n
\r\n \r\n \r\n Billing Details\r\n \r\n \r\n
\r\n
\r\n \r\n First Name\r\n \r\n \r\n First Name is required\r\n \r\n \r\n
\r\n
\r\n \r\n Last Name\r\n \r\n \r\n Last Name is required\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n Email Address\r\n \r\n \r\n Invalid Email Address\r\n \r\n \r\n Email Address is required\r\n \r\n \r\n
\r\n
\r\n \r\n Country/Region\r\n \r\n \r\n {{region.Name}}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n Address is required\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n\r\n\r\n\r\n \r\n Town/City\r\n \r\n \r\n Town/City is required\r\n \r\n \r\n\r\n \r\n State/County\r\n \r\n \r\n {{state.StateName}}\r\n \r\n \r\n \r\n\r\n \r\n Postcode/ZIP\r\n \r\n \r\n Postcode/ZIP is required\r\n \r\n \r\n\r\n \r\n Phone\r\n \r\n \r\n Invalid Phone Number\r\n \r\n \r\n Phone Number is required\r\n \r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n Account Username\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n Create Password\r\n \r\n \r\n \r\n Password must be at least 6 characters\r\n \r\n \r\n Password is required\r\n \r\n \r\n
\r\n
\r\n \r\n Confirm Password\r\n \r\n \r\n \r\n Confirm Password is required\r\n \r\n \r\n Password does not match.\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n Enter Webalias\r\n \r\n \r\n Webalias is required\r\n \r\n \r\n
\r\n
\r\n\r\n \r\n \r\n
\r\n Ship to a Different Address? \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n Country/Region\r\n \r\n \r\n {{region.Name}}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n Address is required\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n
\r\n\r\n\r\n\r\n \r\n Town/City\r\n \r\n \r\n Town/City is required\r\n \r\n \r\n\r\n \r\n State/County\r\n \r\n \r\n {{state.StateName}}\r\n \r\n \r\n \r\n\r\n \r\n Postcode/ZIP\r\n \r\n \r\n Postcode/ZIP is required\r\n \r\n \r\n
\r\n \r\n \r\n Order Notes (optional)\r\n \r\n \r\n \r\n
\r\n \r\n \r\n Payment Method\r\n \r\n\r\n \r\n \r\n \r\n \r\n Please Select Payment Method\r\n \r\n \r\n {{merchant.DisplayName}}\r\n \r\n \r\n \r\n
\r\n
\r\n {{paymentDetails.type}}\r\n \r\n {{paymentDetails.lastFour}}\r\n
\r\n \r\n 0\">{{ \"expires\" | translate\r\n }} \r\n {{paymentDetails.expireMonth}}\r\n 0\">/\r\n {{paymentDetails.expireYear}}\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n Your Order\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
Product
\r\n {{this.productname}} × 1\r\n ${{this.productSubTotal||0}}
Subtotal${{this.productSubTotal||0}}
Shipping${{this.productShippingTotal}}
Tax${{this.productTaxTotal}}
Total${{this.productTotal}}
\r\n
\r\n
\r\n \r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n
\r\n
","import { Component, OnInit } from '@angular/core';\r\nimport { AbstractControl, FormBuilder, FormControl, FormGroup, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { Title } from '@angular/platform-browser';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { AccountService } from '../../shared/services/account.service';\r\nimport { AutoshipConfigurationService } from '../../shared/services/autoshipConfiguration.service';\r\nimport { Cart1Service } from '../../shared/services/cart1.service';\r\nimport { CompanyService } from '../../shared/services/company.service';\r\nimport { ConfigService } from '../../shared/services/config.service';\r\nimport { ItemsListService } from '../../shared/services/itemsList.service';\r\nimport { NotificationService } from '../../shared/services/notification.service';\r\nimport { OrderService } from '../../shared/services/order.service';\r\nimport { PaymentService } from '../../shared/services/payment.service';\r\nimport { PersistentService } from '../../shared/services/persistent.service';\r\nimport { ProductService } from '../../shared/services/product.service';\r\nimport { RegexService } from '../../shared/services/regex.service';\r\nimport { RestApiService } from '../../shared/services/restapi.service';\r\nimport { ShoppingCartService } from '../../shared/services/shopping-cart.service';\r\nimport { UserService } from '../../shared/services/user.service';\r\nimport { UtilityService } from '../../shared/services/utility.service';\r\nimport { ValidateKeywordService } from '../../shared/services/validatekeyword.service';\r\nimport { UserServiceModal } from 'src/app/modals/userservice.modal';\r\nimport { HostedpaymentDialogComponent } from '../../shared/model/hostedpayment-dialog/hostedpayment-dialog.component';\r\nimport { getSubdomain } from 'tldts';\r\nimport { cloneDeep } from 'lodash';\r\nimport * as moment from 'moment';\r\n\r\nconst trimValidator: ValidatorFn = (control: FormControl) => {\r\n if (control.value && control.value.startsWith(' ')) {\r\n return {\r\n 'trimError': { value: 'This field is required' }\r\n };\r\n }\r\n};\r\n\r\n@Component({\r\n selector: 'app-starter-pack-checkout',\r\n templateUrl: './starter-pack-checkout.component.html',\r\n styleUrls: ['./starter-pack-checkout.component.scss']\r\n})\r\nexport class StarterPackCheckoutComponent implements OnInit {\r\n checkoutForm: FormGroup;\r\n loginForm: FormGroup;\r\n userService: UserServiceModal;\r\n allowedCountries = [];\r\n states = [];\r\n region = [];\r\n storeId: any;\r\n category: any;\r\n itemData: any;\r\n ItemId: any;\r\n MerchantData: any = [];\r\n customerTotalOrder: any;\r\n merchantId: any;\r\n productname: any;\r\n showPassword = false;\r\n showloginPassword = false;\r\n showConfirmPassword = false;\r\n loginDiv = false;\r\n CommonData: any;\r\n previousType: any;\r\n productSubTotal: any\r\n productShippingTotal: any;\r\n productTaxTotal: any;\r\n productTotal: any;\r\n passwordMismatch = false;\r\n paymentDetails:any = {};\r\n customerId: any;\r\n selectionPaymentSave: boolean = false;\r\n openDiffBillAddress:boolean = false;\r\n selectedLanguageCode: any;\r\n\r\n constructor(\r\n public utilityService: UtilityService,\r\n private titleService: Title,\r\n public configService: ConfigService,\r\n public route: ActivatedRoute,\r\n public dialog: MatDialog,\r\n public itemsService: ProductService,\r\n public apiService: RestApiService,\r\n public user: UserService,\r\n public notificationService: NotificationService,\r\n public paymentService: PaymentService,\r\n public translate: TranslateService,\r\n public cart1Service: Cart1Service,\r\n public orderService: OrderService,\r\n public validateKeyword: ValidateKeywordService,\r\n public itemsListService: ItemsListService,\r\n public regexService: RegexService,\r\n public router: Router,\r\n public autoshipConfigurationService: AutoshipConfigurationService,\r\n public companyService: CompanyService,\r\n public accountService: AccountService,\r\n public shoppingCartService: ShoppingCartService,\r\n public persistentService: PersistentService,\r\n private fb: FormBuilder) {\r\n this.userService = this.user.userServiceModal\r\n\r\n this.CommonData = JSON.parse(localStorage.getItem(\"CommonSettings\"));\r\n this.allowedCountries = JSON.parse(\r\n sessionStorage.getItem(\"allowedCountries\"),\r\n );\r\n this.paymentDetails = localStorage.getItem(\"paymentDetails\") ? JSON.parse(localStorage.getItem(\"paymentDetails\")) : {};\r\n }\r\n\r\n ngOnInit(): void {\r\n this.formInitialization();\r\n this.previousType = this.userService.customerTypeID;\r\n\r\n this.route.queryParams.subscribe((params: any) => {\r\n this.ItemId = params.itemid\r\n });\r\n this.getStates();\r\n this.getregion();\r\n this.getstoreId();\r\n this.checkoutForm.get('password')?.valueChanges.subscribe(() => this.checkpassword());\r\n this.checkoutForm.get('confirmPassword')?.valueChanges.subscribe(() => this.checkpassword());\r\n \r\n this.paymentService.getPaymentType(this.region[0].ID).then(() => {\r\n this.userService.paymentMethods = this.userService.paymentMethods || [];\r\n this.userService.couponInfo.promoCodeValid = undefined;\r\n this.paymentService.PaymentDataResponse = this.paymentService.PaymentDataResponse || {};\r\n // If they've already set up a split payment and try to add autoship items, only allow one payment method\r\n if (this.countPaymentMethods() > 1) {\r\n this.userService.paymentMethods = [this.userService.paymentMethods[0]];\r\n }\r\n });\r\n }\r\n formInitialization() {\r\n this.checkoutForm = this.fb.group({\r\n customerType: ['1', Validators.required],\r\n firstName: ['', [Validators.required]],\r\n lastName: ['', [Validators.required]],\r\n email: ['', [Validators.required, Validators.pattern(\"^([\\\\w-\\\\.+]+)@((\\\\[[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.)|(([\\\\w-]+\\\\.)+))([a-zA-Z]{2,10}|[0-9]{1,3})(\\\\]?)$\")]],\r\n country: ['47125C2CDE', Validators.required],\r\n streetAddress1: ['', Validators.required],\r\n streetAddress2: [''],\r\n city: ['', Validators.required],\r\n state: ['UT', Validators.required],\r\n postcode: ['', Validators.required],\r\n phone: ['', [Validators.required, Validators.pattern(/^\\d+$/), Validators.maxLength(10)]],\r\n username: [''],\r\n password: ['', [Validators.required, Validators.minLength(6)]],\r\n confirmPassword: ['', [Validators.required, Validators.minLength(6)]],\r\n differentAddress: [false],\r\n userWebalias: ['', Validators.required],\r\n orderNotes: [' '],\r\n MerchantId: ['0'],\r\n // diffFirstName: ['', [Validators.required]],\r\n // diffLastName: ['', [Validators.required]],\r\n diffCountry: ['47125C2CDE'],\r\n diffStreetAddress1: [''],\r\n diffStreetAddress2: [''],\r\n diffCity: [''],\r\n diffState: ['UT'],\r\n diffPostcode: [''],\r\n },\r\n { validators: this.passwordMatchValidator() }\r\n );\r\n\r\n this.loginForm = this.fb.group({\r\n UserNameEmail: ['', [Validators.required]],\r\n loginPassword: ['', [Validators.required, Validators.minLength(6)]],\r\n rememberPass: [0]\r\n })\r\n }\r\n passwordMatchValidator(): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n const password = control.get('password')?.value;\r\n const confirmPassword = control.get('confirmPassword')?.value;\r\n \r\n if (!control.get('password') || !control.get('confirmPassword')) {\r\n return null;\r\n }\r\n\r\n if (password !== confirmPassword) {\r\n control.get('confirmPassword')?.setErrors({ passwordMismatch: true });\r\n return { passwordMismatch: true };\r\n } else {\r\n control.get('confirmPassword')?.setErrors(null);\r\n return null;\r\n }\r\n };\r\n }\r\n\r\n loginUser() {\r\n if(this.loginForm.invalid) {\r\n return;\r\n }else {\r\n localStorage.setItem(\"guestLogin\", \"false\");\r\n this.user.clearCustomerData();\r\n localStorage.removeItem(\"guestLogin\");\r\n const loginrequest = {\r\n granttype: \"password\",\r\n scope: \"office\",\r\n username: this.loginForm.value.UserNameEmail,\r\n password: this.loginForm.value.loginPassword,\r\n };\r\n this.apiService.Login(loginrequest).subscribe((result) => {\r\n if (result && result.status == 200 && result.body.Status != 1) {\r\n try {\r\n localStorage.setItem(\"isLoggedIn\", \"true\");\r\n this.accountService\r\n .getCustomerData(result.body.CustomerId)\r\n .then((data: any) => {\r\n if (data && data.Data) {\r\n // Clear cart\r\n // this.cartsService.clearCart();\r\n // getting userdata\r\n localStorage.setItem(\"user\", JSON.stringify(data.Data));\r\n this.userService.customerData = data.Data;\r\n localStorage.setItem(\r\n \"userService\",\r\n JSON.stringify(this.userService),\r\n );\r\n this.userService.customerTypeID =\r\n this.userService.customerData.CustomerType;\r\n if (this.previousType !== this.userService.customerTypeID) {\r\n this.userService.couponInfo.Allcoupons = [];\r\n // this.autoshipConfigurationService.autoshipDate = \"\";\r\n this.userService.shippingMethods = [];\r\n this.userService.selectedShippingMethod = 0;\r\n // this.autoshipConfigurationService.init();\r\n }\r\n // if (\r\n // !this.utilityService.isEmptyObject(\r\n // this.userService.customerData.DefaultShippingAddress,\r\n // )\r\n // ) {\r\n // this.user.setShippingAddress();\r\n // } else {\r\n // this.userService.shippingAddress =\r\n // new UserServiceModal().newshippingAddress;\r\n // }\r\n // if (this.userService.customerData.DefaultShippingAddress == null) {\r\n // this.userService.shippingAddress =\r\n // new UserServiceModal().newshippingAddress;\r\n // this.userService.shippingAddress = cloneDeep(this.userService.customerData.PrimaryAddress);\r\n // this.userService.shippingAddress.FullName = this.userService.customerData.FirstName+' '+this.userService.customerData.LastName;\r\n // this.userService.shippingAddress.FirstName = this.userService.customerData.FirstName;\r\n // this.userService.shippingAddress.LastName = this.userService.customerData.LastName;\r\n // }\r\n\r\n if (this.userService.customerData.WebAlias) {\r\n this.apiService\r\n .validateWebAlias(this.userService.customerData.WebAlias)\r\n .subscribe(\r\n (res: any) => {\r\n if (!res.Data) {\r\n // calling redirect function\r\n this.userService.WebAlias =\r\n this.userService.customerData.WebAlias;\r\n this.loginredirect(this.userService.WebAlias);\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data.WebAlias) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n () => { },\r\n );\r\n } else if (this.userService.customerData.SponsorId) {\r\n this.apiService\r\n .getSearchCustomerDetail(\r\n this.userService.customerData.SponsorId,\r\n )\r\n .subscribe(\r\n (resp: any) => {\r\n if (resp.Data) {\r\n this.apiService\r\n .validateWebAlias(resp.Data.WebAlias)\r\n .subscribe(\r\n (res: any) => {\r\n if (res.Data) {\r\n // calling redirect function\r\n this.userService.WebAlias =\r\n resp.Data.WebAlias;\r\n this.loginredirect(\r\n this.userService.WebAlias,\r\n );\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n () => { },\r\n );\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data.WebAlias) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n () => { },\r\n );\r\n }\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"error_occured_try_again\",\r\n );\r\n }\r\n })\r\n .catch((error) => {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"error_occured_try_again\",\r\n );\r\n console.error(\"ex\", error);\r\n });\r\n } catch (successEx) {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n console.error(\"ex\", successEx);\r\n }\r\n } else {\r\n this.notificationService.error(\"error_\", \"Authentication Failed\");\r\n }\r\n })\r\n }\r\n }\r\n checkitem() {\r\n return (\r\n this.itemsService.selectedOrderItems.length > 0 ||\r\n this.itemsService.selectedAutoOrderItems.length > 0\r\n );\r\n }\r\n private loginredirect(alias) {\r\n // let newUrl: string;\r\n // if (this.checkoutpage) {\r\n // newUrl = `${location.origin}/${alias}/checkout`;\r\n // } else {\r\n // newUrl = `${location.origin}/${alias}`;\r\n // }\r\n let newUrl: any;\r\n const subdomain = getSubdomain(window.location.host);\r\n newUrl = `${location.origin}/${alias}`;\r\n if (this.checkitem()) {\r\n this.userService.checkItems = true;\r\n window.location.assign(newUrl.replace(\"login\", \"/checkout\"));\r\n }\r\n // else if (this.itemsService.selectedAutoOrderItems.length) {\r\n // this.userService.checkItems = true;\r\n // window.location.assign(newUrl.replace(\"login\", \"products/all\"));\r\n // } \r\n else {\r\n window.location.assign(newUrl + '/products/all');\r\n }\r\n }\r\n togglePasswordVisibility(): void {\r\n this.showPassword = !this.showPassword;\r\n }\r\n toggleConfirmPasswordVisibility(): void {\r\n this.showConfirmPassword = !this.showConfirmPassword;\r\n }\r\n toggleloginPasswordVisibility(): void {\r\n this.showloginPassword = !this.showloginPassword;\r\n }\r\n showlogint(): void {\r\n this.loginDiv = !this.loginDiv;\r\n }\r\n verifyUserNameAndEmail(email: string) {\r\n if (email) {\r\n this.checkoutForm.value.email = email.replace(/\\s/g, \"\");\r\n const filter = new RegExp(\r\n \"^([\\\\w-\\\\.+]+)@((\\\\[[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.)|(([\\\\w-]+\\\\.)+))([a-zA-Z]{2,10}|[0-9]{1,3})(\\\\]?)$\",\r\n );\r\n if (this.checkoutForm.value.email && filter.test(this.checkoutForm.value.email)) {\r\n this.apiService\r\n .validateEmailAddress({ EmailAddress: email })\r\n .subscribe((result) => {\r\n if (!result.Data) {\r\n this.notificationService.error(\"error_\", \"error_email_exists\");\r\n this.checkoutForm.value.email = \"\";\r\n this.checkoutForm.controls['email'].reset();\r\n this.checkoutForm.value.username = \"\";\r\n this.checkoutForm.controls['username'].reset();\r\n } else {\r\n this.notificationService.success(\"success\", \"email_available_\");\r\n this.userService.personalInfo.Email = email;\r\n this.checkoutForm.controls['username'].setValue(this.checkoutForm.value.email);\r\n\r\n this.checkoutForm.value.username = this.checkoutForm.value.email\r\n }\r\n });\r\n }\r\n }else {\r\n this.checkoutForm.value.username = \"\";\r\n this.checkoutForm.controls['username'].reset();\r\n }\r\n }\r\n getstoreId() {\r\n this.apiService.getStores().subscribe((result) => {\r\n this.storeId = result.Data[2].ID;\r\n this.getcategory(this.storeId);\r\n })\r\n }\r\n getcategory(data: any) {\r\n this.apiService.GetCategories(data).subscribe((result) => {\r\n this.category = result[0].ID;\r\n this.getItembyFilter(this.checkoutForm.value.customerType)\r\n })\r\n }\r\n getItembyFilter(data: any) {\r\n\r\n const request = {\r\n CurrencyCode:\r\n this.companyService.selectedCurrency?.CurrencyCode ||\r\n \"USD\",\r\n LanguageCode:\r\n this.configService.commonData.selectedLanguage ||\r\n \"en\",\r\n RegionID: this.region[0].ID,\r\n PriceGroup: data,\r\n StoreID: this.storeId,\r\n CategoryId: this.category,\r\n };\r\n this.apiService.getItemsbyFilter(request).subscribe(data => {\r\n this.itemData = data.Data\r\n localStorage.setItem(\"ItemData\", data.Data)\r\n this.calculateCustomerTotalOrder()\r\n // if(this.checkoutForm.value.customerType){\r\n // this.calculateCustomerTotalOrder(this.checkoutForm.value.customerType)\r\n // }\r\n })\r\n }\r\n verifyUserName(username: any) {\r\n if (username) {\r\n this.apiService.validateUsername(username).subscribe((result) => {\r\n if (result.Data == true) {\r\n this.notificationService.success(\r\n \"success\",\r\n \"UserName available\"\r\n );\r\n } else {\r\n this.checkoutForm.controls['username'].reset()\r\n this.checkoutForm.value.username = \"\"\r\n this.notificationService.error(\r\n \"error_\",\r\n \"UserName not available\"\r\n );\r\n }\r\n });\r\n }\r\n }\r\n getStates(country = \"US\") {\r\n // if(this.CommonData.)\r\n this.apiService.getStates(country)\r\n .subscribe(({ Data }) => {\r\n this.states = Data;\r\n });\r\n }\r\n getregion() {\r\n if (this.CommonData.Regions.length > 0) {\r\n this.region = this.CommonData.Regions;\r\n } else {\r\n this.apiService.getRegions()\r\n .subscribe(({ Data }) => {\r\n this.region = Data;\r\n });\r\n }\r\n }\r\n checkZipValidate() {\r\n if (!this.checkoutForm.value.postcode && !this.checkoutForm.value.diffPostcode) {\r\n return;\r\n }\r\n else {\r\n this.calculateCustomerTotalOrder()\r\n }\r\n }\r\n\r\n calculateCustomerTotalOrder() {\r\n const productdetails = [];\r\n const kititems = [];\r\n\r\n productdetails.push({\r\n ItemId: this.ItemId,\r\n Quantity: this.itemData[0].Quantity || 1,\r\n IsReward: false, // item.UsePoints\r\n });\r\n kititems.push({\r\n ItemId: this.itemData[0].ItemID,\r\n Quantity: this.itemData[0].Quantity || 1,\r\n IsReward: false, // item.UsePoints\r\n });\r\n const CustomerRequest = {\r\n customerType: this.checkoutForm.value.customerType,\r\n customerId: \"\",\r\n OrderId: \"\",\r\n calculateOrder: {\r\n // WarehouseId: 0,\r\n ShipMethodId: this.userService.selectedShippingMethod,\r\n StoreId: this.storeId,\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode,\r\n ShippingAddress: {\r\n AddressId: 0,\r\n Street1: this.checkoutForm.value.streetAddress1 || this.userService.shippingAddress.Street1 || \"\",\r\n Street2: this.checkoutForm.value.streetAddress2 || this.userService.shippingAddress.Street2 || \"\",\r\n Street3: \"\",\r\n PostalCode: this.checkoutForm.value.postcode ||\r\n this.userService.shippingAddress.PostalCode ||\r\n \"84043\",\r\n City: this.checkoutForm.value.city || this.userService.shippingAddress.City || \"\",\r\n Region: this.checkoutForm.value.state || \"UT\",\r\n CountryCode: this.configService.commonData.selectedCountry,\r\n },\r\n PriceGroup: this.checkoutForm.value.customerType,\r\n OrderType: 1,\r\n KitItems: [],\r\n Items: productdetails,\r\n PartyId: 0,\r\n CouponCodes: [],\r\n CountryCode: this.configService.commonData.selectedCountry || \"us\",\r\n CustomShippingAddress: [{\r\n Line1: this.checkoutForm.value.streetAddress1 || this.userService.shippingAddress.Street1 || \"\",\r\n Line2: this.checkoutForm.value.streetAddress2 || this.userService.shippingAddress.Street2 || \"\",\r\n Zip:\r\n this.checkoutForm.value.postcode ||\r\n \"\",\r\n City: this.checkoutForm.value.city || \"\",\r\n StateCode: this.checkoutForm.value.state ||\r\n \"UT\",\r\n CountryCode: this.configService.commonData.selectedCountry || \"Us\",\r\n }]\r\n },\r\n };\r\n this.apiService.calculateCustomerOrderTotal(CustomerRequest).subscribe(data => {\r\n this.customerTotalOrder = data.Data\r\n this.itemData.forEach((element: any) => {\r\n if (this.customerTotalOrder.Items[0].ItemId === element.ItemID) {\r\n this.productname = element.ProductName;\r\n this.productSubTotal = this.customerTotalOrder.SubTotal\r\n this.productShippingTotal = this.customerTotalOrder.ShippingTotal\r\n this.productTaxTotal = this.customerTotalOrder.TaxTotal\r\n this.productTotal = this.customerTotalOrder.Total\r\n }\r\n });\r\n this.getMerchantId();\r\n })\r\n }\r\n getMerchantId() {\r\n const request = {\r\n countrycode: this.configService.commonData.selectedCountry || \"us\",\r\n };\r\n this.apiService.getPaymentMerchants(request).subscribe({\r\n next: (data) => {\r\n setTimeout(() => {\r\n if (data && data.Data) {\r\n this.MerchantData = data.Data;\r\n }\r\n });\r\n }\r\n });\r\n }\r\n addMerchantPayment(data: any) {\r\n this.merchantId = data.MerchantId;\r\n this.selectionPaymentSave = data.CanSavePayments;\r\n localStorage.removeItem(\"paymentDetails\");\r\n if(data.CanSavePayments){\r\n this.getPaymentMethodIFrameAPI(data.MerchantId);\r\n }\r\n }\r\n onsubmitCreateCustomer() {\r\n this.paymentDetails = localStorage.getItem(\"paymentDetails\") ? JSON.parse(localStorage.getItem(\"paymentDetails\")) : {};\r\n const productdetails = [];\r\n productdetails.push({\r\n ItemId: this.customerTotalOrder.Items[0].ItemId,\r\n Quantity: this.customerTotalOrder.Items[0].Quantity || 1,\r\n CurrencyCode: this.companyService.selectedCurrency?.CurrencyCode,\r\n IsReward: false,\r\n });\r\n const defaultAddress = {\r\n \"AddressId\": 0,\r\n \"Street1\": this.checkoutForm.value.streetAddress1,\r\n \"Street2\": this.checkoutForm.value.streetAddress2,\r\n \"Street3\": \"\",\r\n \"PostalCode\": this.checkoutForm.value.postcode,\r\n \"City\": this.checkoutForm.value.city,\r\n \"Region\": this.checkoutForm.value.state,\r\n \"CountryCode\": \"us\",\r\n \"Phone\": '',\r\n \"FirstName\": this.checkoutForm.value.firstName,\r\n \"LastName\": this.checkoutForm.value.lastName,\r\n \"FullName\": this.checkoutForm.value.firstName+' '+this.checkoutForm.value.lastName\r\n };\r\n const diffShipAddress = {\r\n \"AddressId\": 0,\r\n \"Street1\": this.checkoutForm.value.diffStreetAddress1,\r\n \"Street2\": this.checkoutForm.value.diffStreetAddress2,\r\n \"Street3\": \"\",\r\n \"PostalCode\": this.checkoutForm.value.diffPostcode,\r\n \"City\": this.checkoutForm.value.diffCity,\r\n \"Region\": this.checkoutForm.value.diffState,\r\n \"CountryCode\": \"us\",\r\n \"Phone\": '',\r\n \"FirstName\": this.checkoutForm.value.firstName,\r\n \"LastName\": this.checkoutForm.value.lastName,\r\n \"FullName\": this.checkoutForm.value.firstName+' '+this.checkoutForm.value.lastName\r\n };\r\n const request = {\r\n \"Order\": {\r\n \"ShipMethodID\": this.customerTotalOrder.ShippingMethods[0].ShipMethodId,\r\n \"StoreID\": this.storeId,\r\n \"CurrencyCode\": this.companyService.selectedCurrency?.CurrencyCode,\r\n \"Items\": productdetails,\r\n \"Payments\": [\r\n {\r\n \"Amount\": this.customerTotalOrder.Total,\r\n \"SavePaymentMethodId\": this.paymentDetails ? this.paymentDetails.token : \"\",\r\n \"CurrencyCode\": this.companyService.selectedCurrency?.CurrencyCode,\r\n \"MerchantId\": this.merchantId\r\n }\r\n ],\r\n \"CouponCodes\": [\r\n ]\r\n },\r\n \"AutoShip\": null,\r\n \"AssociateID\": this.customerId ? this.customerId : \"\",\r\n \"AcceptTerms\": true,\r\n \"FirstName\": this.checkoutForm.value.firstName,\r\n \"LastName\": this.checkoutForm.value.lastName,\r\n \"TaxID\": \"\",\r\n \"BirthDate\":\r\n new Date(\r\n (this.userService.personalInfo?.birthYear || 2000),\r\n (this.userService.personalInfo?.birthMonth || 1),\r\n (this.userService.personalInfo?.birthDay || 1),\r\n ).toDateString(),\r\n \"PrimaryPhone\": this.checkoutForm.value.phone,\r\n \"SecondaryPhone\": this.checkoutForm.value.phone,\r\n \"Email\": this.checkoutForm.value.email,\r\n \"Username\": this.checkoutForm.value.email,\r\n \"Password\": this.checkoutForm.value.password,\r\n \"LanguageCode\": \"en\",\r\n \"ApplicantAddress\": {\r\n \"AddressId\": 0,\r\n \"Street1\": this.checkoutForm.value.streetAddress1,\r\n \"Street2\": this.checkoutForm.value.streetAddress2,\r\n \"Street3\": \"\",\r\n \"PostalCode\": this.checkoutForm.value.postcode,\r\n \"City\": this.checkoutForm.value.city,\r\n \"Region\": this.checkoutForm.value.state,\r\n \"CountryCode\": \"us\"\r\n },\r\n \"ShippingAddress\": this.openDiffBillAddress ? diffShipAddress : defaultAddress,\r\n // \"DifferentShippingAddress\": this.openDiffBillAddress ? diffShipAddress : false,\r\n \"AssociateTypeID\":this.checkoutForm.value.customerType,\r\n \"SponsorID\": this.userService.enrollerInfo?.CustomerId,\r\n \"WebPageURL\": this.checkoutForm.value.userWebalias\r\n }\r\n if(this.checkoutForm.value.MerchantId<=0){\r\n this.notificationService.error('error_', \"Select payment mode\")\r\n return;\r\n }\r\n if (!this.checkoutForm.valid) {\r\n this.notificationService.error('error_', \"Please fill all the required fields\")\r\n return;\r\n }\r\n this.apiService.submitEnrollmentForm(request).subscribe(res => {\r\n if(res.Message === \"Success\" && res.ErrorDescription == \"\"){\r\n sessionStorage.setItem(\"SubmitApplication\", JSON.stringify(res));\r\n localStorage.setItem(\"SubmitApplication\", JSON.stringify(res));\r\n this.userService.shippingAddress = cloneDeep(request.ShippingAddress);\r\n localStorage.setItem(\"userService\",JSON.stringify(this.userService));\r\n const authTokens = {\r\n userName: this.checkoutForm.value.email,\r\n password: this.checkoutForm.value.password\r\n }\r\n sessionStorage.setItem('SubmitApplication',JSON.stringify(authTokens));\r\n if(this.selectionPaymentSave){\r\n localStorage.removeItem(\"paymentDetails\");\r\n this.router.navigate([\"/complete\"]);\r\n // this.login();\r\n }\r\n else{\r\n const iframeData = res.Data.Order.Payment.PaymentUrl\r\n this.getpaymentMethodIframe(iframeData)\r\n }\r\n }\r\n else{\r\n this.notificationService.error(\"error_\", res.Message);\r\n sessionStorage.removeItem(\"FormData\");\r\n localStorage.removeItem(\"SubmitApplication\");\r\n localStorage.setItem(\r\n \"SubmitApplication\",\r\n JSON.stringify(res.Data),\r\n );\r\n }\r\n }, (err) => {\r\n console.error(err);\r\n\r\n this.notificationService.error(\r\n \"error_\",\r\n this.translate.instant(\r\n \"unifiedapplication_error_occured_try_again\",\r\n ),\r\n );\r\n }\r\n )\r\n }\r\n checkpassword() {\r\n const password = this.checkoutForm.get('password')?.value;\r\n const confirmPassword = this.checkoutForm.get('confirmPassword')?.value;\r\n // Update the passwordMismatch flag\r\n this.passwordMismatch = password !== confirmPassword && !!confirmPassword;\r\n }\r\n validatewebalias(request: any) {\r\n if (!request) {\r\n return;\r\n }\r\n this.apiService.validateWebAlias(request).subscribe((res: any) => {\r\n if (res.Data) {\r\n this.notificationService.success(\"success\", \"Webalias Available\")\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias Not Available\"\r\n );\r\n this.checkoutForm.value.userWebalias = \"\";\r\n this.checkoutForm.controls['userWebalias'].reset();\r\n\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data.WebAlias) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n () => { },)\r\n }\r\n getpaymentMethodIframe(datas: any) {\r\n const dialogRef = this.dialog.open(HostedpaymentDialogComponent, {\r\n panelClass: \"hosted_payment-Dialog\",\r\n data: {\r\n IFrameUrl: datas,\r\n Width: datas.Width,\r\n Height: datas.Height,\r\n isCheckout: false\r\n }\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n if(this.selectionPaymentSave){\r\n const newPayment: any = result;\r\n newPayment.MerchantId = datas.MerchantId;\r\n localStorage.setItem(\"paymentDetails\", JSON.stringify(newPayment));\r\n this.paymentDetails = localStorage.getItem(\"paymentDetails\") ? JSON.parse(localStorage.getItem(\"paymentDetails\")) : {};\r\n console.log('this.paymentDetails',this.paymentDetails);\r\n if ((!localStorage.getItem('guestLogin') || localStorage.getItem('guestLogin') == 'false')) {\r\n // this.savePaymentMethod(newPayment, data);\r\n }\r\n else {\r\n this.paymentService.getPaymentType();\r\n }\r\n const paymentMethods = [];\r\n const editingPaymentMethod = datas;\r\n if (editingPaymentMethod) {\r\n paymentMethods.splice(paymentMethods.indexOf(editingPaymentMethod), 1, newPayment);\r\n this.userService.paymentMethods = paymentMethods;\r\n } else if (paymentMethods.length >= 2) {\r\n paymentMethods.splice(paymentMethods.indexOf(editingPaymentMethod), paymentMethods.length - 1, newPayment);\r\n } else {\r\n newPayment.CardType = newPayment.type;\r\n newPayment.Last4 = newPayment.lastFour;\r\n newPayment.ExpireMonth = newPayment.expireMonth;\r\n newPayment.ExpireYear = newPayment.expireYear;\r\n paymentMethods.push(newPayment);\r\n this.paymentService.selectedPaymentTypeName = newPayment.CardType + ' ' + newPayment.Last4;\r\n this.userService.paymentMethods = paymentMethods;\r\n }\r\n this.userService.isPaymentChanged = true;\r\n localStorage.setItem('userService', JSON.stringify(this.userService));\r\n return; \r\n }\r\n else{\r\n // this.login();\r\n localStorage.removeItem(\"paymentDetails\");\r\n this.router.navigate([\"/complete\"]);\r\n }\r\n }\r\n }); \r\n }\r\n\r\n login() {\r\n localStorage.setItem(\"guestLogin\", \"false\");\r\n this.user.clearCustomerData();\r\n localStorage.removeItem(\"guestLogin\");\r\n let credantials = JSON.parse(sessionStorage.getItem('SubmitApplication'));\r\n const loginrequest = {\r\n granttype: \"password\",\r\n scope: \"office\",\r\n username: credantials.userName, \r\n password: credantials.password,\r\n };\r\n this.apiService.Login(loginrequest).subscribe(\r\n (result) => {\r\n if (result && result.status == 200 && result.body.Status != 1) {\r\n try {\r\n localStorage.setItem(\"isLoggedIn\", \"true\");\r\n this.accountService\r\n .getCustomerData(result.body.CustomerId)\r\n .then((data: any) => {\r\n if (data && data.Data) {\r\n \r\n \r\n // Clear cart\r\n this.cart1Service.clearCart();\r\n \r\n // getting userdata\r\n localStorage.setItem(\"user\", JSON.stringify(data.Data));\r\n this.userService.customerData = data.Data;\r\n localStorage.setItem(\r\n \"userService\",\r\n JSON.stringify(this.userService),\r\n );\r\n this.userService.customerTypeID =\r\n this.userService.customerData.CustomerType;\r\n if (this.previousType !== this.userService.customerTypeID) {\r\n this.userService.couponInfo.Allcoupons = [];\r\n // this.autoshipConfigurationService.autoshipDate = \"\";\r\n this.userService.shippingMethods = [];\r\n this.userService.selectedShippingMethod = 0;\r\n // this.autoshipConfigurationService.init();\r\n }\r\n // if (\r\n // !this.utilityService.isEmptyObject(\r\n // this.userService.customerData.DefaultShippingAddress,\r\n // )\r\n // ) {\r\n // this.user.setShippingAddress();\r\n // } else {\r\n // this.userService.shippingAddress =\r\n // new UserServiceModal().newshippingAddress;\r\n // }\r\n /*if (this.userService.customerData.DefaultShippingAddress == null) {\r\n this.userService.shippingAddress = cloneDeep(this.userService.customerData.PrimaryAddress);\r\n this.userService.shippingAddress.FullName = this.userService.customerData.FirstName+' '+this.userService.customerData.LastName;\r\n this.userService.shippingAddress.FirstName = this.userService.customerData.FirstName;\r\n this.userService.shippingAddress.LastName = this.userService.customerData.LastName;\r\n }*/\r\n \r\n if (this.userService.customerData.WebAlias) {\r\n this.apiService\r\n .validateWebAlias(this.userService.customerData.WebAlias)\r\n .subscribe(\r\n (res: any) => {\r\n if (!res.Data) {\r\n // calling redirect function\r\n this.userService.WebAlias =\r\n this.userService.customerData.WebAlias;\r\n this.router.navigate([\"/complete\"]);\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data.WebAlias) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n () => {},\r\n );\r\n } else if (this.userService.customerData.SponsorId) {\r\n this.apiService\r\n .getSearchCustomerDetail(\r\n this.userService.customerData.SponsorId,\r\n )\r\n .subscribe(\r\n (resp: any) => {\r\n if (resp.Data) {\r\n this.apiService\r\n .validateWebAlias(resp.Data.WebAlias)\r\n .subscribe(\r\n (res: any) => {\r\n if (res.Data) {\r\n // calling redirect function\r\n this.userService.WebAlias =\r\n resp.Data.WebAlias;\r\n this.router.navigate([\"/complete\"]);\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n () => {},\r\n );\r\n }\r\n },\r\n (error) => {\r\n if (error.Data && !error.Data.WebAlias) {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"webalias_not_exists\",\r\n );\r\n return false;\r\n }\r\n },\r\n () => {},\r\n );\r\n }\r\n } else {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"error_occured_try_again\",\r\n );\r\n }\r\n })\r\n .catch((error) => {\r\n this.notificationService.error(\r\n \"error_\",\r\n \"error_occured_try_again\",\r\n );\r\n console.error(\"ex\", error);\r\n });\r\n } catch (successEx) {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n console.error(\"ex\", successEx);\r\n }\r\n } else {\r\n this.notificationService.error(\"error_\", \"Authentication Failed\");\r\n }\r\n },\r\n () => {\r\n this.notificationService.error(\"error_\", \"error_occured_try_again\");\r\n },\r\n () => {},\r\n );\r\n }\r\n \r\n\r\n public savePaymentMethod(payment, data) {\r\n const promise = new Promise((resolve, reject) => {\r\n const request = {\r\n customerId: data.customerId,\r\n createPaymentMethod: {\r\n MerchantId: payment.MerchantId || 99,\r\n PaymentToken: payment.token,\r\n CardType: payment.type,\r\n NameOnAccount: payment.billingInfo.fullName || '',\r\n Ending: payment.lastFour,\r\n Expires: moment({ year: payment.expireYear, month: (parseInt(payment.expireMonth, 10) - 1), day: parseInt(moment().format('D'), 10) }).format(),\r\n CurrencyCode: this.companyService.selectedCurrency.CurrencyCode\r\n }\r\n };\r\n this.apiService.createPaymentMethod(request).subscribe((response) => {\r\n const result = response.Data;\r\n if (response.Status.toString() !== '0') {\r\n reject(response.ErrorDescription);\r\n return;\r\n }\r\n this.paymentService.getPaymentType();\r\n resolve(result);\r\n });\r\n });\r\n return promise;\r\n}\r\n\r\n getCustomerSavedPaymentMethods(customerId) {\r\n const request = {\r\n customerId: customerId\r\n }\r\n this.apiService\r\n .getCustomerSavedPaymentMethods(request)\r\n .subscribe(\r\n (result: any) => {\r\n try {\r\n if (Number(result.Status) === 0) {\r\n if (result.Data && result.Data.length > 0) {\r\n console.log(\"result\", result);\r\n }\r\n }\r\n } catch (ex) {\r\n console.error(\"ex\", ex);\r\n }\r\n },\r\n () => {\r\n \r\n },\r\n () => {},\r\n );\r\n }\r\n\r\n getPaymentMethodIFrameAPI(merchantid) {\r\n const request = {\r\n countrycode: 'us',\r\n merchantid: merchantid,\r\n // customerid: ''\r\n }\r\n this.apiService\r\n .getPaymentMethodIFrame(request)\r\n .subscribe(\r\n (result: any) => {\r\n try {\r\n if (Number(result.Status) === 0) {\r\n if (result.Data) {\r\n this.customerId = result.Data.customerId;\r\n this.getpaymentMethodIframe(result.Data);\r\n }\r\n }\r\n } catch (ex) {\r\n console.error(\"ex\", ex);\r\n }\r\n },\r\n () => {\r\n \r\n },\r\n () => {},\r\n );\r\n }\r\n\r\n toggleDiffBillAddress() {\r\n const controls = ['diffStreetAddress1','diffCity','diffPostcode'];\r\n this.openDiffBillAddress = !this.openDiffBillAddress;\r\n if(this.openDiffBillAddress) {\r\n for(let i = 0;i < controls.length;i++) {\r\n this.addValidators(this.checkoutForm,controls[i]);\r\n }\r\n /*this.checkoutForm.get('diffFirstName').setValidators([Validators.required, trimValidator]); \r\n this.checkoutForm.get('diffLastName').setValidators([Validators.required, trimValidator]); \r\n this.checkoutForm.get('diffStreetAddress1').setValidators([Validators.required, trimValidator]); \r\n this.checkoutForm.get('diffCity').setValidators([Validators.required, trimValidator]); \r\n this.checkoutForm.get('diffPostcode').setValidators([Validators.required, trimValidator]);*/ \r\n }else {\r\n for(let i = 0;i < controls.length;i++) {\r\n this.removeValidators(this.checkoutForm,controls[i]);\r\n }\r\n }\r\n }\r\n\r\n addValidators(form:FormGroup,control:any) {\r\n form.get(control).setValidators([Validators.required, trimValidator]);\r\n form.get(control).updateValueAndValidity();\r\n }\r\n\r\n removeValidators(form: FormGroup, control: any) {\r\n form.get(control).clearValidators();\r\n form.get(control).updateValueAndValidity();\r\n form.get(control).reset();\r\n }\r\n\r\n countPaymentMethods() {\r\n const paymentMethods = this.userService.paymentMethods;\r\n return paymentMethods ? paymentMethods.length : 0;\r\n }\r\n}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { Routes, RouterModule } from \"@angular/router\";\r\nimport { CheckoutComponent } from \"./checkout/checkout.component\";\r\nimport { LoginComponent } from \"./login/login.component\";\r\nimport { FaqComponent } from \"./faq/faq.component\";\r\nimport { ErrorPageComponent } from \"./error-page/error-page.component\";\r\nimport { SignupComponent } from \"src/app/components/pages/signup/signup.component\";\r\nimport { ApplicationComponent } from \"./application/application.component\";\r\nimport { AuthGuard } from \"../shared/services/auth.guard.service\";\r\nimport { OrderHistoryComponent } from \"./order-history/order-history.component\";\r\nimport { ManageAutoshipComponent } from \"./manage-autoship/manage-autoship.component\";\r\nimport { OrderInvoiceComponent } from \"./order-invoice/order-invoice.component\";\r\nimport { ForgotPasswordComponent } from \"./forgot-password/forgot-password.component\";\r\nimport { ShippingAddressComponent } from \"./shippingaddress/shippingaddress.component\";\r\nimport { HomeComponent } from \"./home/home.component\";\r\nimport { CompleteComponent } from \"./complete/complete.component\";\r\nimport { LoggedInAuthGuard } from \"../shared/services/loggedin.guard.service\";\r\nimport { ContactComponent } from \"./contacts/contacts.component\";\r\nimport { FlickityComponent } from \"./flickity/flickity.component\";\r\nimport { AboutnewComponent } from \"./aboutnew/aboutnew.component\";\r\nimport { BecomeADistributorComponent } from \"./become-a-distributor/become-a-distributor.component\";\r\nimport { StarterPackCheckoutComponent } from \"./starter-pack-checkout/starter-pack-checkout.component\";\r\n\r\nconst routes: Routes = [\r\n { path: \"home\", component: HomeComponent },\r\n { path: \"about\", component: AboutnewComponent },\r\n { path: \"checkout\", component: CheckoutComponent},\r\n { path: \"faq\", component: FaqComponent },\r\n { path: \"contact\", component: ContactComponent },\r\n { path: \"starter_pack_checkout\", component: StarterPackCheckoutComponent },\r\n {\r\n path: \"login\",\r\n component: LoginComponent,\r\n // canActivate: [LoggedInAuthGuard],\r\n },\r\n {\r\n path: \"orderhistory\",\r\n component: OrderHistoryComponent,\r\n canActivate: [AuthGuard],\r\n },\r\n {\r\n path: \"manageautoship\",\r\n component: ManageAutoshipComponent,\r\n canActivate: [AuthGuard],\r\n },\r\n {\r\n path: \"become-a-distributor\",\r\n component: BecomeADistributorComponent,\r\n },\r\n { path: \"starter_pack_checkout/:itemId\", component: StarterPackCheckoutComponent },\r\n\r\n // {\r\n // path: \"become-a-distributor/:ItemId\",\r\n // component: BecomeADistributorComponent,\r\n // },\r\n {\r\n path: \"autoorderhistory\",\r\n component: LoginComponent,\r\n canActivate: [AuthGuard],\r\n },\r\n { path: \"complete\", component: CompleteComponent },\r\n { path: \"404\", component: ErrorPageComponent },\r\n {\r\n path: \"signup\",\r\n component: SignupComponent,\r\n canActivate: [LoggedInAuthGuard],\r\n },\r\n {\r\n path: \"join\",\r\n component: ApplicationComponent,\r\n canActivate: [LoggedInAuthGuard],\r\n },\r\n {\r\n path: \"orderinvoice\",\r\n component: OrderInvoiceComponent,\r\n canActivate: [AuthGuard],\r\n },\r\n { path: \"forgotpassword\", component: ForgotPasswordComponent },\r\n {\r\n path: \"shipping\",\r\n component: ShippingAddressComponent,\r\n \r\n },\r\n { path: \"item/:id\", component: FlickityComponent },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule],\r\n})\r\nexport class PagesRoutingModule {}\r\n","import { NgModule } from \"@angular/core\";\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { CheckoutComponent } from \"./checkout/checkout.component\";\r\nimport { PagesRoutingModule } from \"./pages-routing.module\";\r\nimport { SharedModule } from \"../shared/shared.module\";\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { LoginComponent } from \"./login/login.component\";\r\nimport { FaqComponent } from \"./faq/faq.component\";\r\nimport { AboutUsComponent } from \"./about-us/about-us.component\";\r\nimport { ErrorPageComponent } from \"./error-page/error-page.component\";\r\nimport { NgxSkeletonLoaderModule } from \"ngx-skeleton-loader\";\r\nimport { TranslateModule } from \"@ngx-translate/core\";\r\nimport { SignupComponent } from \"src/app/components/pages/signup/signup.component\";\r\nimport { ApplicationComponent } from \"./application/application.component\";\r\nimport { OrderHistoryComponent } from \"./order-history/order-history.component\";\r\nimport { ManageAutoshipComponent } from \"./manage-autoship/manage-autoship.component\";\r\nimport { OrderInvoiceComponent } from \"./order-invoice/order-invoice.component\";\r\nimport { ForgotPasswordComponent } from \"./forgot-password/forgot-password.component\";\r\nimport { HomeComponent } from \"./home/home.component\";\r\nimport { MainCarouselComponent } from \"../shop/main-carousel/main-carousel.component\";\r\nimport { SwiperModule } from \"ngx-swiper-wrapper\";\r\nimport { ProductVerticalComponent } from \"../shop/products/product-vertical/product-vertical.component\";\r\nimport { PackCarouselComponent } from \"../shared/pack-carousel/pack-carousel.component\";\r\nimport { MatToolbarModule } from \"@angular/material/toolbar\";\r\nimport { MatButtonModule } from \"@angular/material/button\";\r\nimport { MatMenuModule } from \"@angular/material/menu\";\r\nimport { MatSidenavModule } from \"@angular/material/sidenav\";\r\nimport { MatSelectModule } from \"@angular/material/select\";\r\nimport { MatTabsModule } from \"@angular/material/tabs\";\r\nimport { MatChipsModule } from \"@angular/material/chips\";\r\nimport { MatIconModule } from \"@angular/material/icon\";\r\nimport { MatTooltipModule } from \"@angular/material/tooltip\";\r\nimport { MatCardModule } from \"@angular/material/card\";\r\nimport { MatExpansionModule } from \"@angular/material/expansion\";\r\nimport { MatSnackBarModule } from \"@angular/material/snack-bar\";\r\nimport { MatDividerModule } from \"@angular/material/divider\";\r\nimport { MatRadioModule } from \"@angular/material/radio\";\r\nimport { MatListModule } from \"@angular/material/list\";\r\nimport { MatSliderModule } from \"@angular/material/slider\";\r\nimport { MatInputModule } from \"@angular/material/input\";\r\nimport { MatDialogModule } from \"@angular/material/dialog\";\r\nimport { MatTableModule } from \"@angular/material/table\";\r\nimport { MatAutocompleteModule } from \"@angular/material/autocomplete\";\r\nimport { MatPaginatorModule } from \"@angular/material/paginator\";\r\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\r\nimport { MatDatepickerModule } from \"@angular/material/datepicker\";\r\nimport { MatBadgeModule } from \"@angular/material/badge\";\r\nimport { CustomerTypeCarouselComponent } from \"../shared/customer-type-carousel/customer-type-carousel.component\";\r\nimport { CompleteComponent } from \"./complete/complete.component\";\r\nimport { MatSortModule } from \"@angular/material/sort\";\r\nimport { NgxPrintModule } from \"ngx-print\";\r\nimport { ContactComponent } from \"./contacts/contacts.component\";\r\nimport { FlickityComponent } from \"./flickity/flickity.component\";\r\nimport { FlickityModule } from \"ngx-flickity\";\r\nimport \"flickity-as-nav-for\";\r\nimport { NgxImageZoomModule } from \"ngx-image-zoom\";\r\nimport { AboutnewComponent } from './aboutnew/aboutnew.component';\r\nimport { BuilderModule } from \"@builder.io/angular\";\r\nimport { BecomeADistributorComponent } from './become-a-distributor/become-a-distributor.component';\r\nimport { StarterPackCheckoutComponent } from './starter-pack-checkout/starter-pack-checkout.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n SwiperModule,\r\n ReactiveFormsModule,\r\n PagesRoutingModule,\r\n SharedModule,\r\n NgxSkeletonLoaderModule,\r\n TranslateModule,\r\n MatButtonModule,\r\n MatSnackBarModule,\r\n MatToolbarModule,\r\n MatListModule,\r\n MatChipsModule,\r\n MatExpansionModule,\r\n MatMenuModule,\r\n MatTableModule,\r\n MatSliderModule,\r\n MatRadioModule,\r\n MatDialogModule,\r\n MatChipsModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n MatAutocompleteModule,\r\n MatPaginatorModule,\r\n MatSortModule,\r\n MatCheckboxModule,\r\n MatSidenavModule,\r\n MatSelectModule,\r\n MatTabsModule,\r\n MatDividerModule,\r\n MatCardModule,\r\n MatDatepickerModule,\r\n MatBadgeModule,\r\n NgxPrintModule,\r\n FlickityModule,\r\n NgxImageZoomModule,\r\n BuilderModule.forRoot(\"9421ee9b607e4eafa79be36c59cc5ce0\"),\r\n ],\r\n declarations: [\r\n MainCarouselComponent,\r\n ProductVerticalComponent,\r\n HomeComponent,\r\n CheckoutComponent,\r\n LoginComponent,\r\n FaqComponent,\r\n AboutUsComponent,\r\n ErrorPageComponent,\r\n SignupComponent,\r\n ApplicationComponent,\r\n OrderHistoryComponent,\r\n ManageAutoshipComponent,\r\n OrderInvoiceComponent,\r\n ForgotPasswordComponent,\r\n PackCarouselComponent,\r\n CustomerTypeCarouselComponent,\r\n CompleteComponent,\r\n ContactComponent,\r\n FlickityComponent,\r\n AboutnewComponent,\r\n BecomeADistributorComponent,\r\n StarterPackCheckoutComponent,\r\n ],\r\n exports: [\r\n MatButtonModule,\r\n MatSnackBarModule,\r\n MatToolbarModule,\r\n MatListModule,\r\n MatChipsModule,\r\n MatExpansionModule,\r\n MatMenuModule,\r\n MatTableModule,\r\n MatSortModule,\r\n MatSliderModule,\r\n MatRadioModule,\r\n MatDialogModule,\r\n MatChipsModule,\r\n MatInputModule,\r\n MatIconModule,\r\n MatTooltipModule,\r\n MatAutocompleteModule,\r\n MatPaginatorModule,\r\n NgxPrintModule,\r\n MatCheckboxModule,\r\n MatSidenavModule,\r\n MatSelectModule,\r\n MatTabsModule,\r\n MatDividerModule,\r\n MatCardModule,\r\n MatDatepickerModule,\r\n MatBadgeModule,\r\n ],\r\n})\r\nexport class PagesModule {}\r\n","// loader-interceptor.service.ts\r\nimport { Injectable } from \"@angular/core\";\r\nimport {\r\n HttpHandler,\r\n HttpEvent,\r\n HttpInterceptor,\r\n HttpErrorResponse,\r\n} from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\nimport { Router } from \"@angular/router\";\r\nimport { CookieService } from \"ngx-cookie-service\";\r\nimport { tap } from \"rxjs/operators\";\r\n\r\n@Injectable()\r\nexport class ApiInterceptor implements HttpInterceptor {\r\n private requests = [];\r\n constructor(\r\n public router: Router,\r\n public cookieService: CookieService,\r\n ) {}\r\n\r\n intercept(\r\n req,\r\n next: HttpHandler,\r\n ): Observable> {\r\n return next.handle(req).pipe(\r\n tap(\r\n () => {},\r\n (err) => {\r\n if (err instanceof HttpErrorResponse) {\r\n if (Number(err.status) === 401) {\r\n this.router.navigate([\"/login\"]).then(() => {\r\n localStorage.removeItem(\"user\");\r\n this.cookieService.deleteAll(\"/\");\r\n sessionStorage.clear();\r\n localStorage.clear();\r\n window.location.reload();\r\n });\r\n } else {\r\n return;\r\n }\r\n }\r\n },\r\n ),\r\n );\r\n }\r\n}\r\n","import { BrowserModule, Title } from \"@angular/platform-browser\";\r\nimport { APP_INITIALIZER, Injectable, NgModule } from \"@angular/core\";\r\nimport {\r\n MissingTranslationHandler,\r\n MissingTranslationHandlerParams,\r\n TranslateLoader,\r\n TranslateModule,\r\n} from \"@ngx-translate/core\";\r\nimport { TranslateHttpLoader } from \"@ngx-translate/http-loader\";\r\nimport {\r\n HttpClient,\r\n HttpClientModule,\r\n HttpHeaders,\r\n HTTP_INTERCEPTORS,\r\n} from \"@angular/common/http\";\r\nimport { AppComponent } from \"./app.component\";\r\nimport {\r\n BrowserAnimationsModule,\r\n NoopAnimationsModule,\r\n} from \"@angular/platform-browser/animations\";\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { NgxSpinnerModule } from \"ngx-spinner\";\r\nimport { NgxSkeletonLoaderModule } from \"ngx-skeleton-loader\";\r\nimport {\r\n DefaultUrlSerializer,\r\n Router,\r\n UrlSerializer,\r\n UrlTree,\r\n} from \"@angular/router\";\r\nimport { MainComponent } from \"./components/main/main.component\";\r\nimport { NgxImageZoomModule } from \"ngx-image-zoom\";\r\nimport { AppRoutingModule } from \"./app-routing.module\";\r\nimport { ShopModule } from \"./components/shop/shop.module\";\r\nimport { SharedModule } from \"./components/shared/shared.module\";\r\nimport { MatDialog, MatDialogModule } from \"@angular/material/dialog\";\r\nimport { MyLoaderComponent } from \"./components/my-loader/my-loader.component\";\r\nimport { LoaderService } from \"./components/shared/services/loader.service\";\r\nimport { LoaderInterceptor } from \"./components/shared/services/interceptors/loader-interceptor.service\";\r\nimport { ConfigService } from \"./components/shared/services/config.service\";\r\nimport { environment } from \"src/environments/environment\";\r\nimport { PagesModule } from \"./components/pages/pages.module\";\r\nimport { PersistentService } from \"./components/shared/services/persistent.service\";\r\nimport { ApiInterceptor } from \"./components/shared/services/interceptors/http-interceptor.service\";\r\nimport { CookieService } from \"ngx-cookie-service\";\r\nimport { AuthGuard } from \"./components/shared/services/auth.guard.service\";\r\nimport { LoggedInAuthGuard } from \"./components/shared/services/loggedin.guard.service\";\r\nimport { APP_BASE_HREF } from \"@angular/common\";\r\nimport { getBaseLocation } from \"./baseUrl\";\r\nimport { CommonSetting } from \"./modals/commonsetting.modal\";\r\nimport { NotificationService } from \"./components/shared/services/notification.service\";\r\nimport { BuilderModule } from \"@builder.io/angular\";\r\n\r\nconst initializeConfig = (\r\n configService: ConfigService,\r\n http: HttpClient,\r\n notification: NotificationService,\r\n) => {\r\n // promise 2\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const promise2 = new Promise((resolve, reject) => {\r\n let subdomain = getBaseLocation();\r\n if (!subdomain) {\r\n console.log(\"error\", \"subdomain not found try again\");\r\n } else {\r\n subdomain = subdomain.replace(\"/\", \"\");\r\n }\r\n // get web info api call\r\n http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetWebsiteInformation_V1?webAlias=${subdomain}`,\r\n {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n // withCredentials: false,\r\n },\r\n )\r\n .subscribe(\r\n (result: any) => {\r\n if (result.Data) {\r\n configService.setWebsiteInfo(result.Data);\r\n\r\n resolve(result.Data);\r\n } else {\r\n http\r\n .get(\r\n `${environment.apiUrl}api/Customers/GetWebsiteInformation_V1?webAlias=www`,\r\n {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n // withCredentials: false,\r\n },\r\n )\r\n .subscribe((result: any) => {\r\n if (result.Data) {\r\n configService.setWebsiteInfo(result.Data);\r\n resolve(result.Data);\r\n } else {\r\n reject(\"WebAlias information not found !!\");\r\n }\r\n });\r\n }\r\n },\r\n (error) => {\r\n console.log(error);\r\n notification.error(\"error_\", \"Webalias not Found, Try again!!\");\r\n reject(\"WebAlias information not found !!\");\r\n },\r\n );\r\n });\r\n\r\n // promise 1\r\n const promise1 = new Promise((resolve, reject) => {\r\n http\r\n .get(\"assets/data/clientsetting.json\", {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n withCredentials: true,\r\n })\r\n .toPromise()\r\n .then(async (result: CommonSetting) => {\r\n localStorage.setItem(\"CommonSettings\", JSON.stringify(result));\r\n \r\n // This { setInitRegionsIDs() } is set the Regions ID in common setting\r\n // Before Products get fetched\r\n // Tip: Inspect this method Code!\r\n configService.setInitRegionsIDs(result);\r\n\r\n await configService.init(result);\r\n http\r\n .get(\"assets/data/localconfig.json\", {\r\n headers: new HttpHeaders({\r\n \"Content-Type\": \"application/json; charset=utf-8\",\r\n }),\r\n })\r\n .subscribe(\r\n (data) => {\r\n configService.localSettings = data;\r\n resolve(result);\r\n },\r\n (error) => {\r\n reject(error);\r\n },\r\n );\r\n });\r\n });\r\n\r\n return async () => {\r\n const res = await Promise.all([promise1]);\r\n return res;\r\n };\r\n};\r\n\r\n@Injectable()\r\nexport class MyMissingTranslationHandler implements MissingTranslationHandler {\r\n handle(params: MissingTranslationHandlerParams) {\r\n if (params.interpolateParams) {\r\n return params.interpolateParams[\"Default\"] || params.key;\r\n }\r\n return params.key;\r\n }\r\n\r\n constructor() {}\r\n}\r\n\r\n@Injectable()\r\nexport class LowerCaseUrlSerializer extends DefaultUrlSerializer {\r\n parse(url: string): UrlTree {\r\n return super.parse(url.toLowerCase());\r\n }\r\n}\r\n@NgModule({\r\n declarations: [\r\n AppComponent,\r\n MainComponent,\r\n // ColorOptionsComponent,\r\n MyLoaderComponent,\r\n ],\r\n imports: [\r\n NgxSpinnerModule,\r\n BrowserModule,\r\n SharedModule,\r\n ShopModule,\r\n PagesModule,\r\n NgxSkeletonLoaderModule,\r\n HttpClientModule,\r\n BrowserAnimationsModule,\r\n NoopAnimationsModule,\r\n FormsModule,\r\n MatDialogModule,\r\n ReactiveFormsModule,\r\n AppRoutingModule,\r\n NgxImageZoomModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient],\r\n },\r\n missingTranslationHandler: {\r\n provide: MissingTranslationHandler,\r\n useClass: MyMissingTranslationHandler,\r\n // deps: [NotTranslatedService]\r\n },\r\n }),\r\n BuilderModule.forRoot(\"9421ee9b607e4eafa79be36c59cc5ce0\"),\r\n ],\r\n providers: [\r\n {\r\n provide: APP_BASE_HREF,\r\n useFactory: getBaseLocation,\r\n },\r\n ConfigService,\r\n {\r\n provide: APP_INITIALIZER,\r\n useFactory: initializeConfig,\r\n deps: [ConfigService, HttpClient, MatDialog],\r\n multi: true,\r\n },\r\n {\r\n provide: UrlSerializer,\r\n useClass: LowerCaseUrlSerializer,\r\n },\r\n LoaderService,\r\n { provide: HTTP_INTERCEPTORS, useClass: LoaderInterceptor, multi: true },\r\n Title,\r\n PersistentService,\r\n {\r\n provide: HTTP_INTERCEPTORS,\r\n useFactory: function (router: Router, cookieService: CookieService) {\r\n return new ApiInterceptor(router, cookieService);\r\n },\r\n multi: true,\r\n deps: [Router, CookieService],\r\n },\r\n AuthGuard,\r\n LoggedInAuthGuard,\r\n ],\r\n exports: [MatDialogModule],\r\n bootstrap: [AppComponent],\r\n})\r\nexport class AppModule {}\r\n\r\nexport function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {\r\n return new TranslateHttpLoader(http);\r\n}\r\n","import { enableProdMode } from \"@angular/core\";\r\nimport { platformBrowserDynamic } from \"@angular/platform-browser-dynamic\";\r\n\r\nimport { AppModule } from \"./app/app.module\";\r\nimport { environment } from \"./environments/environment\";\r\n\r\nif (environment.production) {\r\n enableProdMode();\r\n}\r\n\r\nplatformBrowserDynamic()\r\n .bootstrapModule(AppModule)\r\n .catch((err) => console.error(err));\r\n","var map = {\n\t\"./af\": 1975,\n\t\"./af.js\": 1975,\n\t\"./ar\": 4145,\n\t\"./ar-dz\": 5982,\n\t\"./ar-dz.js\": 5982,\n\t\"./ar-kw\": 6242,\n\t\"./ar-kw.js\": 6242,\n\t\"./ar-ly\": 6864,\n\t\"./ar-ly.js\": 6864,\n\t\"./ar-ma\": 2239,\n\t\"./ar-ma.js\": 2239,\n\t\"./ar-sa\": 834,\n\t\"./ar-sa.js\": 834,\n\t\"./ar-tn\": 2387,\n\t\"./ar-tn.js\": 2387,\n\t\"./ar.js\": 4145,\n\t\"./az\": 2351,\n\t\"./az.js\": 2351,\n\t\"./be\": 5392,\n\t\"./be.js\": 5392,\n\t\"./bg\": 8946,\n\t\"./bg.js\": 8946,\n\t\"./bm\": 1284,\n\t\"./bm.js\": 1284,\n\t\"./bn\": 4885,\n\t\"./bn-bd\": 4936,\n\t\"./bn-bd.js\": 4936,\n\t\"./bn.js\": 4885,\n\t\"./bo\": 2342,\n\t\"./bo.js\": 2342,\n\t\"./br\": 1319,\n\t\"./br.js\": 1319,\n\t\"./bs\": 605,\n\t\"./bs.js\": 605,\n\t\"./ca\": 7135,\n\t\"./ca.js\": 7135,\n\t\"./cs\": 7783,\n\t\"./cs.js\": 7783,\n\t\"./cv\": 8060,\n\t\"./cv.js\": 8060,\n\t\"./cy\": 5052,\n\t\"./cy.js\": 5052,\n\t\"./da\": 6997,\n\t\"./da.js\": 6997,\n\t\"./de\": 4846,\n\t\"./de-at\": 5074,\n\t\"./de-at.js\": 5074,\n\t\"./de-ch\": 7973,\n\t\"./de-ch.js\": 7973,\n\t\"./de.js\": 4846,\n\t\"./dv\": 8879,\n\t\"./dv.js\": 8879,\n\t\"./el\": 8233,\n\t\"./el.js\": 8233,\n\t\"./en-au\": 2333,\n\t\"./en-au.js\": 2333,\n\t\"./en-ca\": 8371,\n\t\"./en-ca.js\": 8371,\n\t\"./en-gb\": 5980,\n\t\"./en-gb.js\": 5980,\n\t\"./en-ie\": 5263,\n\t\"./en-ie.js\": 5263,\n\t\"./en-il\": 6225,\n\t\"./en-il.js\": 6225,\n\t\"./en-in\": 9198,\n\t\"./en-in.js\": 9198,\n\t\"./en-nz\": 6014,\n\t\"./en-nz.js\": 6014,\n\t\"./en-sg\": 8604,\n\t\"./en-sg.js\": 8604,\n\t\"./eo\": 8351,\n\t\"./eo.js\": 8351,\n\t\"./es\": 7446,\n\t\"./es-do\": 5381,\n\t\"./es-do.js\": 5381,\n\t\"./es-mx\": 1268,\n\t\"./es-mx.js\": 1268,\n\t\"./es-us\": 3922,\n\t\"./es-us.js\": 3922,\n\t\"./es.js\": 7446,\n\t\"./et\": 3874,\n\t\"./et.js\": 3874,\n\t\"./eu\": 9501,\n\t\"./eu.js\": 9501,\n\t\"./fa\": 2986,\n\t\"./fa.js\": 2986,\n\t\"./fi\": 3517,\n\t\"./fi.js\": 3517,\n\t\"./fil\": 471,\n\t\"./fil.js\": 471,\n\t\"./fo\": 9848,\n\t\"./fo.js\": 9848,\n\t\"./fr\": 2104,\n\t\"./fr-ca\": 4079,\n\t\"./fr-ca.js\": 4079,\n\t\"./fr-ch\": 5960,\n\t\"./fr-ch.js\": 5960,\n\t\"./fr.js\": 2104,\n\t\"./fy\": 9942,\n\t\"./fy.js\": 9942,\n\t\"./ga\": 6259,\n\t\"./ga.js\": 6259,\n\t\"./gd\": 196,\n\t\"./gd.js\": 196,\n\t\"./gl\": 9667,\n\t\"./gl.js\": 9667,\n\t\"./gom-deva\": 8901,\n\t\"./gom-deva.js\": 8901,\n\t\"./gom-latn\": 8001,\n\t\"./gom-latn.js\": 8001,\n\t\"./gu\": 9430,\n\t\"./gu.js\": 9430,\n\t\"./he\": 8008,\n\t\"./he.js\": 8008,\n\t\"./hi\": 3449,\n\t\"./hi.js\": 3449,\n\t\"./hr\": 9271,\n\t\"./hr.js\": 9271,\n\t\"./hu\": 1036,\n\t\"./hu.js\": 1036,\n\t\"./hy-am\": 3043,\n\t\"./hy-am.js\": 3043,\n\t\"./id\": 7102,\n\t\"./id.js\": 7102,\n\t\"./is\": 7297,\n\t\"./is.js\": 7297,\n\t\"./it\": 1248,\n\t\"./it-ch\": 3529,\n\t\"./it-ch.js\": 3529,\n\t\"./it.js\": 1248,\n\t\"./ja\": 645,\n\t\"./ja.js\": 645,\n\t\"./jv\": 4317,\n\t\"./jv.js\": 4317,\n\t\"./ka\": 5359,\n\t\"./ka.js\": 5359,\n\t\"./kk\": 9027,\n\t\"./kk.js\": 9027,\n\t\"./km\": 4941,\n\t\"./km.js\": 4941,\n\t\"./kn\": 7478,\n\t\"./kn.js\": 7478,\n\t\"./ko\": 4356,\n\t\"./ko.js\": 4356,\n\t\"./ku\": 1077,\n\t\"./ku.js\": 1077,\n\t\"./ky\": 145,\n\t\"./ky.js\": 145,\n\t\"./lb\": 2339,\n\t\"./lb.js\": 2339,\n\t\"./lo\": 3814,\n\t\"./lo.js\": 3814,\n\t\"./lt\": 281,\n\t\"./lt.js\": 281,\n\t\"./lv\": 177,\n\t\"./lv.js\": 177,\n\t\"./me\": 9609,\n\t\"./me.js\": 9609,\n\t\"./mi\": 8772,\n\t\"./mi.js\": 8772,\n\t\"./mk\": 6112,\n\t\"./mk.js\": 6112,\n\t\"./ml\": 2854,\n\t\"./ml.js\": 2854,\n\t\"./mn\": 538,\n\t\"./mn.js\": 538,\n\t\"./mr\": 450,\n\t\"./mr.js\": 450,\n\t\"./ms\": 1508,\n\t\"./ms-my\": 6169,\n\t\"./ms-my.js\": 6169,\n\t\"./ms.js\": 1508,\n\t\"./mt\": 7009,\n\t\"./mt.js\": 7009,\n\t\"./my\": 5350,\n\t\"./my.js\": 5350,\n\t\"./nb\": 5909,\n\t\"./nb.js\": 5909,\n\t\"./ne\": 7502,\n\t\"./ne.js\": 7502,\n\t\"./nl\": 5321,\n\t\"./nl-be\": 4405,\n\t\"./nl-be.js\": 4405,\n\t\"./nl.js\": 5321,\n\t\"./nn\": 5704,\n\t\"./nn.js\": 5704,\n\t\"./oc-lnc\": 3788,\n\t\"./oc-lnc.js\": 3788,\n\t\"./pa-in\": 6290,\n\t\"./pa-in.js\": 6290,\n\t\"./pl\": 8265,\n\t\"./pl.js\": 8265,\n\t\"./pt\": 8802,\n\t\"./pt-br\": 3430,\n\t\"./pt-br.js\": 3430,\n\t\"./pt.js\": 8802,\n\t\"./ro\": 7732,\n\t\"./ro.js\": 7732,\n\t\"./ru\": 4548,\n\t\"./ru.js\": 4548,\n\t\"./sd\": 3268,\n\t\"./sd.js\": 3268,\n\t\"./se\": 1832,\n\t\"./se.js\": 1832,\n\t\"./si\": 1601,\n\t\"./si.js\": 1601,\n\t\"./sk\": 6759,\n\t\"./sk.js\": 6759,\n\t\"./sl\": 1930,\n\t\"./sl.js\": 1930,\n\t\"./sq\": 4476,\n\t\"./sq.js\": 4476,\n\t\"./sr\": 3648,\n\t\"./sr-cyrl\": 1249,\n\t\"./sr-cyrl.js\": 1249,\n\t\"./sr.js\": 3648,\n\t\"./ss\": 9724,\n\t\"./ss.js\": 9724,\n\t\"./sv\": 2280,\n\t\"./sv.js\": 2280,\n\t\"./sw\": 7639,\n\t\"./sw.js\": 7639,\n\t\"./ta\": 5843,\n\t\"./ta.js\": 5843,\n\t\"./te\": 9211,\n\t\"./te.js\": 9211,\n\t\"./tet\": 5822,\n\t\"./tet.js\": 5822,\n\t\"./tg\": 9191,\n\t\"./tg.js\": 9191,\n\t\"./th\": 4716,\n\t\"./th.js\": 4716,\n\t\"./tk\": 9684,\n\t\"./tk.js\": 9684,\n\t\"./tl-ph\": 4428,\n\t\"./tl-ph.js\": 4428,\n\t\"./tlh\": 5189,\n\t\"./tlh.js\": 5189,\n\t\"./tr\": 3807,\n\t\"./tr.js\": 3807,\n\t\"./tzl\": 6539,\n\t\"./tzl.js\": 6539,\n\t\"./tzm\": 6714,\n\t\"./tzm-latn\": 8827,\n\t\"./tzm-latn.js\": 8827,\n\t\"./tzm.js\": 6714,\n\t\"./ug-cn\": 7366,\n\t\"./ug-cn.js\": 7366,\n\t\"./uk\": 2757,\n\t\"./uk.js\": 2757,\n\t\"./ur\": 7362,\n\t\"./ur.js\": 7362,\n\t\"./uz\": 5534,\n\t\"./uz-latn\": 321,\n\t\"./uz-latn.js\": 321,\n\t\"./uz.js\": 5534,\n\t\"./vi\": 4049,\n\t\"./vi.js\": 4049,\n\t\"./x-pseudo\": 3134,\n\t\"./x-pseudo.js\": 3134,\n\t\"./yo\": 2668,\n\t\"./yo.js\": 2668,\n\t\"./zh-cn\": 1282,\n\t\"./zh-cn.js\": 1282,\n\t\"./zh-hk\": 3423,\n\t\"./zh-hk.js\": 3423,\n\t\"./zh-mo\": 6739,\n\t\"./zh-mo.js\": 6739,\n\t\"./zh-tw\": 1037,\n\t\"./zh-tw.js\": 1037\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 6700;"],"x_google_ignoreList":[132]}