{"version":3,"sources":["accesibility.ts","esignup.ts","late.ts","salesforce.ts","search.ts","utils.ts"],"names":["HAHAccessibility","_classCallCheck","this","_createClass","key","value","_ref","setFocusables","focusableElementsNL","containerHTMLElement","querySelectorAll","selectors","focusableElements","Array","from","filter","el","tabIndex","firstFocusableEl","lastFocusableEl","length","bindEventsToFocusableElements","forEach","element","addEventListener","eventHandler","unbindEventsToFocusableElements","unbindEvents","removeEventListener","container","closeElement","additionalCloseElements","tablistUpdateElements","triggerHTMLElement","firstElementToFocus","document","querySelector","closeHTMLElement","KEYCODE_TAB","e","stopPropagation","isTabPressed","keyCode","isEscapePressed","shiftKey","activeElement","focus","preventDefault","closeTrapFocus","altCloseHTMLElement","DEBUG_TRAP_FOCUS","console","log","updaterElement","_ref2","trigger","currentSlide","currentSlideIndex","Number","getAttribute","_index","title","parentNode","imageAltText","$","concat","attr","target","elementIndex","indexOf","click","getElementById","style","visibility","display","trapFocus","alert","logActiveElement","LOG_ACTIVE_ELEMENT","window","mainNavList","i","NavigationBar","navList","tablists","tabLists","TabsManual","FANCYBOX_VERSION","initADAForFancybox2","initADAForFancybox4","on","triggerElement","fancybox","afterShow","triggerElementId","includes","altDialogText","find","innerText","removeAttr","afterClose","openEffect","openSpeed","closeEffect","closeSpeed","nextEffect","nextSpeed","padding","margin","scrolling","autoSize","Fancybox","bind","once","done","children","fancyboxId","$container","setAttribute","trapFocusFancybox4","Thumbs","Toolbar","dragToClose","infinite","text","toLowerCase","replace","trim","newAltDialogText","removeAttribute","_defineProperty","navigationBar","menuItems","linkMenuItems","subMenuItems","subMenuItem","tabsManual","tabs","radioGroup","radioItems","groupNode","_this","navlistNode","currentLocation","location","href","push","firstMenuItem","lastMenuItem","j","_loop","onKeydown","call","_loop2","_j","k","_loop3","allNavLink","l","currentLink","indexMenu","_indexSubMenu","moveFocusToLink","indexSubMenu","subMenuLenght","str","match","character","linksArrToSearch","startIndex","name","startsWith","event","flag","moveFocusToPreviousLink","moveFocusToNextLink","moveFocusToPreviousSublink","moveFocusToNextSublink","moveFocusToFirstlink","moveFocusToLastlink","moveFocusTofatherlink","isPrintableCharacter","setFocusByFirstCharacter","tablistNode","firstTab","lastTab","tab","currentTab","moveFocusToTab","index","tgt","currentTarget","moveFocusToPreviousTab","moveFocusToNextTab","RadioGroup","_this2","radioOptNode","firstRadioItem","lastRadioItem","_loop4","currentRadio","indexRadio","moveFocusToRadio","moveFocusToPreviousRadio","moveFocusToNextRadio","_regeneratorRuntime","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","h","f","Error","s","method","arg","delegate","maybeInvokeDelegate","TypeError","y","tryCatch","type","resultName","next","nextLoc","sent","_sent","dispatchException","abrupt","p","GeneratorFunction","GeneratorFunctionPrototype","d","getPrototypeOf","v","values","g","defineIteratorMethods","_invoke","AsyncIterator","callInvokeWithMethodAndArg","invoke","_typeof","resolve","__await","then","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","catch","delegateYield","asyncGeneratorStep","_asyncToGenerator","arguments","apply","_next","_throw","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","_objectSpread","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","_defineProperties","_toPrimitive","toPrimitive","String","ESignUp","sfSubscriptionApi","lambdaPayload","dialogObj","lbHideParams","cookieValue","elementIDs","region","timeZone","language","btnTxt","lightBoxInput","lightBoxBtn","footerInput","footerBtn","homePageInput","homePageBtn","lightBoxBackground","lightBoxCloseBtn","sweepsBtn","sweepsEmail","sweepsName","sweepsCheck","sweepsBonvoyCheck","landingPageSweepsBtn","landingPageSweepsEmail","landingPageSweepsName","landingPageSweepsBonvoyCheck","landingPageSweepsCheck","checkoutPageEmailInput","checkoutPageSubscribeCheck","addedToSalesforceTime","updatedOnSalesforceTime","currDate","Date","Math","floor","getTimezoneOffset","toString","fadeOut","fadeIn","_callLambda","_callee","action","callback","payload","apiGatewayUrl","response","data","_context","email","source","showLightboxMessage","_ref2$showLightboxMes","_ref2$name","campaign","_ref2$campaign","undefined","_ref2$callback","showLightbox","dilogBox","scrollTo","emailId","getTimeZone","fetch","headers","Content-Type","body","JSON","stringify","json","t0","error","_x","vars","search","substring","split","paramsPresent","CommonUtils","getCookie","checkQueryVariables","show","emailSignupPopoverDiv","setCookie","emailID","checked","recaptchaPassed","alertMessage","test","validateEmail","_toggleEmailStatusInSalesforce","_callee2","emailStatus","agreeToReceiveEmails","dateInserted","dateUpdated","diffInMilliseconds","_context2","sessionStorage","setItem","SalesforceAbandonedCartUtils","setClientEmail","trackCart","callLambda","err","StatusCode","isActive","dataLayer","event_category","event_action","event_label","event_value","isUnsubscribed","Payload","parse","status","_unused","_unused2","now","abs","getTime","_unused3","_x2","_x3","_x4","checkoutPageSubscribeCheckbox","is","emailValue","val","sweepsChecked","validateSweeps","landingPageSweepsChecked","hideLandingPageSweepsForm","inputControl","closest","addClass","_ref3","_callee3","_context3","getItem","_reject","_err","result","toggleEmailStatusInSalesforce","_x5","_ref4","_callee4","_context4","_x6","template","outerWrap","pointsUnavailable","closeBtn","innerMain","innerSecondary","confirmBtn","appendTo","html","mainTxt","secondaryTxt","css","jQuery","inputWrappers","toggleClassOnFocus","parent","parentElement","classList","add","remove","clearError","errorDisplay","setTimeout","wrapper","input","trimmedEmailVal","loop","maxWidth","fitToView","width","expr","pseudos","elem","doSearch","init","salesforceOrganizationId","_etmc","debug","catalogId","clientEmail","setSubscriberKey","subscriberKey","item","quantity","salePrice","uniqueId","product","price","sale_price","unique_id","cartItem","cartOrOrderData","cart","clear_cart","encodedSearchString","searchString","searchUI_tbProductName","cleanedSearchString","searchInput","encodeURIComponent","doQuickSearch","searchPath","tSearchString","num","Intl","NumberFormat","currency","format","invalue","days","date","expires","setTime","toUTCString","cookie","createCookie","nameEQ","ca","sign","cents","points","dsName","xmlString","fieldEndIndex","returnValue","datasetStartIndex","datasetEndIndex","fieldStartIndex","parseInt","dtIndex","rowIndex","fieldName","tagName","tagValue","tagStartIndex","tagEndIndex","inNumber","tmpNumber","tmpStr","c_name","exdays","exdate","c_value","setDate","getDate","c_start","c_end","decodeURIComponent","productIndex","loader","atc","sel","nodeName","XMLHttpRequest","trymicrosoft","ActiveXObject","othermicrosoft","failed","message","eventCategory","eventAction","eventLabel","eventParams","detail","btoa","bonvoyEmail","bonvoyNumber","pointsToRedeem","errorMessage","errorType","errorMsg","errorLogAPIURL","mode","brand","page","removeClass","slideDown","siblings","slideUp","string","DOMParser","parseFromString","documentElement","textContent","invtID","alternateID","found","invtIDCategory","category","categoryID","localStorage","eraseCookie","readCookie","setError","elementId","isValid","_document$getElementB","iconElement","createElement","className","appendChild","toggle","backgroundImage","validateCardCodeFunction","cardType","patterns","address","city","phone","cvv","amxCardId","selectbox","validateField","inputElement","elementType","customFieldValidation","id","formElements","fieldValidation","errMessage","attachEventListeners","elementIds","validateZipCode","zipCode","countryCode","isValidUsZipCode","isValidCaZipCode","emailAddress","addressUI_tbBillAddressName","addressUI_tbBillAddressFirstName","addressUI_tbBillAddressLastName","addressUI_tbBillAddr1","addressUI_tbBillAddr2","addressUI_tbBillAddrCity","addressUI_tbShipAddressName","addressUI_tbShipAddressFirstName","addressUI_tbShipAddressLastName","addressUI_tbShipAddr1","addressUI_tbShipAddr2","addressUI_tbShipAddrCity","addressUI_tbBillAddrZip","shippingCountryCode","addressUI_tbShipAddrZip","addressUI_tbBillAddrPhone","addressUI_tbShipAddrPhone","addressUI_ddlBillAddrCountry","addressUI_ddlBillAddrState","hiddenInputIDs","addressUI_ddlShipAddrCountry","addressUI_ddlShipAddrState","addressUI_cSameAsShipping","FirstName","LastName","contactEmailAddress","Phone","paymentTypeUI_tbCreditCardName","paymentTypeUI_tbCreditCardCode","paymentTypeUI_tbCreditCardCode2","increaseBtns","decreaseBtns","increaseBtn","currentValue","quantityInput","_this$parentNode","decreaseBtn","_this$parentNode2","HTMLInputElement","HTMLButtonElement","min","max","disabled","_this$parentNode3","_this$parentNode4"],"mappings":"4rCAAMA,iBAAgB,WAAA,SAAAA,IAAAC,gBAAAC,KAAAF,CAAA,CAAA,CAAA,OAAAG,aAAAH,EAAA,KAAA,CAAA,CAAAI,IAAA,YAAAC,MAyDrB,SAAgBC,GA6DO,SAAhBC,IACLC,EAAsBC,EAAqBC,iBAAiBV,EAAiBW,UAAUC,iBAAiB,EACxGA,EAAoBC,MAAMC,KAAKN,CAAmB,EAAEO,OAAO,SAACC,GAAW,MAAsC,CAAC,IAAjCA,EAAmBC,QAAe,CAAA,EAC/GC,EAAmBN,EAAkB,GACrCO,EAAkBP,EAAkBA,EAAkBQ,OAAS,GAC/DC,EAA8B,CAC/B,CA2CsC,SAAhCA,IACLT,EAAkBU,QAAQ,SAACC,GAC1BA,EAAQC,iBAAiB,UAAWC,CAAY,CACjD,CAAC,CACF,CAEwC,SAAlCC,IACDC,GACHf,EAAkBU,QAAQ,SAACC,GAC1BA,EAAQK,oBAAoB,UAAWH,CAAY,CACpD,CAAC,CAEH,CAxEQ,IAIJjB,EACAI,EACAM,EACAC,EAxDJU,EAASvB,EAATuB,UACAC,EAAYxB,EAAZwB,aACAC,EAAuBzB,EAAvByB,wBACAC,EAAqB1B,EAArB0B,sBACAC,EAAkB3B,EAAlB2B,mBACAC,EAAmB5B,EAAnB4B,oBACAP,EAAYrB,EAAZqB,aA4CMlB,EAAoC0B,SAASC,cAAcP,CAAS,EACpEQ,EAAgCF,SAASC,cAAcN,CAAY,EAOnEQ,EAAc,EAUdb,EAAe,SAACc,GACrBA,EAAEC,gBAAgB,EAClB,IAAMC,EAA0B,QAAVF,EAAEnC,KAAiBmC,EAAEG,UAAYJ,EACjDK,EAA4B,WAAVJ,EAAEnC,KAErBqC,GAAiBE,KAKlBF,IAGCF,EAAEK,SAIDT,SAASU,gB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gB,GACnBG,EAAYM,SAAW,CAAA,EACvBN,EAAY/M,UAAUC,IAAI,UAAU,IAEpC8M,EAAYM,SAAW,CAAA,EACvBN,EAAY/M,UAAUE,OAAO,UAAU,GAG1C,CAAC,CACF,CAAC,EAIchc,SAASzB,iBAAiB,YAAY,EAC9CY,QAAQ,SAACkd,GACfA,EAAMhd,iBAAiB,QAAS,SAACoJ,GAChC,IAAMid,EAAejd,EAAMzG,OAG3B9D,GAAQA,EAFIwnB,EAAaxnB,OAEXyH,QAAQ,MAAO,EAAE,EACjB,gBACHqR,KAAK9Y,CAAK,IAGD,GADnBA,EAAQA,EAAMyH,QAAQ,UAAW,EAAE,GACzB1G,SACTf,EAAQA,EAAM4R,MAAM,EAAG,CAAC,GAEzB4V,EAAaxnB,MAAQA,EAEvB,CAAC,CACF,CAAC,CAEF,CAAC","file":"../common.min.js","sourcesContent":["class HAHAccessibility {\n\n\t/** \n\t * Defines if should log in the console the current element selected by tab key.\n\t * Should be `false` if on production.\n\t */\n\tstatic LOG_ACTIVE_ELEMENT: boolean = false\n\n\t/** \n\t * Defines if should warn in the console if the page doesn't all necessary landmarks. \n\t * Should be `false` if on production.\n\t */\n\tstatic WARN_MISSING_LANDMARKS: boolean = false\n\n\t/**\n\t * Defines if should log debug informations when calling `trapFocus` function.\n\t * Should be `false` if on production.\n\t */\n\tstatic DEBUG_TRAP_FOCUS: boolean = false\n\n\t/**\n\t * Defines the Fancybox version. Can be `2` or `4`.\n\t * This will change the `init` method behavior.\n\t */\n\tstatic FANCYBOX_VERSION: number = 2\n\n\tstatic selectors = {\n\t\tmainNavList: '#main-nav',\n\t\tnavList: '#side-nav',\n\t\ttabLists: '[role=tablist]',\n\t\tfocusableElements: 'input[type=\"text\"]:not([disabled]), ' // inputs of type \"text\" that are not disabled\n\t\t\t+ 'input[type=\"radio\"]:not([disabled]), ' // inputs of type \"radio\" that are not disabled\n\t\t\t+ 'input[type=\"checkbox\"]:not([disabled]), ' // inputs of type \"checkbox\" that are not disabled\n\t\t\t+ 'input[type=\"email\"]:not([disabled]), ' // inputs of type \"email\" that are not disabled\n\t\t\t+ 'input[type=\"button\"]:not([disabled]), ' // inputs of type \"button\" that are not disabled\n\t\t\t+ 'input[type=\"search\"]:not([disabled]), ' // inputs of type \"search\" that are not disabled\n\t\t\t+ 'input[type=\"number\"]:not([disabled]), ' // inputs of type \"search\" that are not disabled\n\t\t\t+ 'textarea:not([disabled]), ' // textareas that are not disabled\n\t\t\t+ 'select:not([disabled]), ' // selects that are not disabled\n\t\t\t+ 'a[href]:not([disabled]), ' // links that has \"href\" attribute and are not disabled \n\t\t\t+ 'button:not([disabled]), ' // buttons that are not disabled\n\t\t\t+ '[data-focusable=\"true\"]', // buttons that are not disabled\n\t\tnavigationBar: {\n\t\t\tmenuItems: '.dropdown',\n\t\t\tlinkMenuItems: '.dropdownLink',\n\t\t\tsubMenuItems: '.submenuContainer',\n\t\t\tsubMenuItem: '[role=\"menuitem\"]'\n\t\t},\n\t\ttabsManual: {\n\t\t\ttabs: '[role=tab]'\n\t\t},\n\t\tradioGroup: {\n\t\t\tradioItems: '[role=radio]'\n\t\t}\n\t}\n\n\t/** Trap the tab navigation focus */\n\tstatic trapFocus({\n\t\tcontainer,\n\t\tcloseElement,\n\t\tadditionalCloseElements,\n\t\ttablistUpdateElements,\n\t\ttriggerHTMLElement,\n\t\tfirstElementToFocus,\n\t\tunbindEvents\n\t}: {\n\n\t\t/**\n\t\t * The modal / container where the focus should be trapped.\n\t\t */\n\t\tcontainer: string,\n\n\t\t/**\n\t\t * The element that `closeTrapFocus` function will `click` to close the modal.\n\t\t */\n\t\tcloseElement: string,\n\n\t\t/**\n\t\t * Elements inside the container that, when `clicked` or pressed `Enter`,\n\t\t * will call the `closeTrapFocus` function.\n\t\t */\n\t\tadditionalCloseElements?: string[],\n\n\t\t/**\n\t\t * Elements inside the container that, when `clicked` or pressed `Enter`,\n\t\t * will restore the focusable elements inside the container.\n\t\t * For example, in a carousel with images, that array would have the \n\t\t * \"previous\" and \"next\" buttons.\n\t\t */\n\t\ttablistUpdateElements?: string[],\n\n\t\t/**\n\t\t * The element that opened the modal / the element where to focus should go\n\t\t * after closing the modal.\n\t\t */\n\t\ttriggerHTMLElement?: HTMLElement,\n\n\t\t/**\n\t\t * The element that should be focused after opening the modal.\n\t\t * If not defined it will be automatically defined.\n\t\t */\n\t\tfirstElementToFocus?: string,\n\t\t/**\n\t\t * Unable the events to be unbinded after closing the modal.\n\t\t * Should be true for trapFocus where tablistUpdateElements is defined.\n\t\t */\n\t\tunbindEvents?: boolean,\n\t}): void {\n\t\tconst containerHTMLElement: HTMLElement = document.querySelector(container)\n\t\tconst closeHTMLElement: HTMLElement = document.querySelector(closeElement)\n\n\t\tlet focusableElementsNL: NodeListOf\n\t\tlet focusableElements: Element[]\n\t\tlet firstFocusableEl: Element\n\t\tlet lastFocusableEl: Element\n\n\t\tconst KEYCODE_TAB = 9\n\n\t\tconst setFocusables = () => {\n\t\t\tfocusableElementsNL = containerHTMLElement.querySelectorAll(HAHAccessibility.selectors.focusableElements)\n\t\t\tfocusableElements = Array.from(focusableElementsNL).filter((el: Element) => (el as HTMLElement).tabIndex !== -1)\n\t\t\tfirstFocusableEl = focusableElements[0]\n\t\t\tlastFocusableEl = focusableElements[focusableElements.length - 1]\n\t\t\tbindEventsToFocusableElements()\n\t\t}\n\n\t\tconst eventHandler = (e: KeyboardEvent) => {\n\t\t\te.stopPropagation()\n\t\t\tconst isTabPressed = (e.key === 'Tab' || e.keyCode === KEYCODE_TAB)\n\t\t\tconst isEscapePressed = e.key === 'Escape'\n\n\t\t\tif (!isTabPressed && !isEscapePressed) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// If pressed tab\n\t\t\tif (isTabPressed) {\n\n\t\t\t\t// If pressed shift + tab\n\t\t\t\tif (e.shiftKey) {\n\n\t\t\t\t\t// If the active element is the first focusable element,\n\t\t\t\t\t// focus in the last focusable element.\n\t\t\t\t\tif (document.activeElement === firstFocusableEl) {\n\t\t\t\t\t\t(lastFocusableEl as HTMLElement).focus()\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If pressed only tab\n\t\t\t\telse {\n\n\t\t\t\t\t// If the active element is the last focusable element,\n\t\t\t\t\t// focus in the first focusable element.\n\t\t\t\t\tif (document.activeElement === lastFocusableEl) {\n\t\t\t\t\t\t(firstFocusableEl as HTMLElement).focus()\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If pressed escape\n\t\t\tif (isEscapePressed) {\n\t\t\t\tHAHAccessibility.closeTrapFocus(closeHTMLElement, triggerHTMLElement)\n\t\t\t}\n\t\t}\n\n\t\tconst bindEventsToFocusableElements = () => {\n\t\t\tfocusableElements.forEach((element) => {\n\t\t\t\telement.addEventListener('keydown', eventHandler)\n\t\t\t})\n\t\t}\n\n\t\tconst unbindEventsToFocusableElements = () => {\n\t\t\tif (unbindEvents) {\n\t\t\t\tfocusableElements.forEach((element) => {\n\t\t\t\t\telement.removeEventListener('keydown', eventHandler)\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tsetFocusables()\n\n\t\tadditionalCloseElements?.forEach((element: string) => {\n\t\t\tconst altCloseHTMLElement: HTMLElement = containerHTMLElement.querySelector(element)\n\t\t\taltCloseHTMLElement.addEventListener('keypress', (e) => {\n\t\t\t\tif (e.key === 'Enter') {\n\t\t\t\t\tHAHAccessibility.closeTrapFocus(altCloseHTMLElement, triggerHTMLElement)\n\t\t\t\t}\n\t\t\t})\n\t\t\taltCloseHTMLElement.addEventListener('click', (e) => {\n\t\t\t\tHAHAccessibility.closeTrapFocus(altCloseHTMLElement, triggerHTMLElement)\n\t\t\t})\n\t\t})\n\n\t\tif (HAHAccessibility.DEBUG_TRAP_FOCUS) {\n\t\t\tconsole.log('focusableElements', focusableElements)\n\t\t\tconsole.log('firstFocusableEl', firstFocusableEl)\n\t\t\tconsole.log('lastFocusableEl', lastFocusableEl)\n\t\t}\n\t\tcloseHTMLElement.addEventListener('keypress', (e) => {\n\t\t\tif (e.key === 'Enter') {\n\t\t\t\tunbindEventsToFocusableElements()\n\t\t\t}\n\t\t})\n\n\t\tcloseHTMLElement.addEventListener('click', () => {\n\t\t\tunbindEventsToFocusableElements()\n\t\t})\n\n\t\ttablistUpdateElements?.forEach((element) => {\n\t\t\tconst updaterElement: HTMLElement = containerHTMLElement.querySelector(element)\n\t\t\tif (updaterElement) {\n\t\t\t\tupdaterElement.addEventListener('keypress', (e) => {\n\t\t\t\t\tif (e.key === 'Enter') {\n\t\t\t\t\t\tsetFocusables()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tupdaterElement.addEventListener('click', (e) => {\n\t\t\t\t\tsetFocusables()\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\tif (firstElementToFocus) {\n\t\t\tconst firstElementToFocusHTMLElement: HTMLElement = containerHTMLElement.querySelector(firstElementToFocus)\n\t\t\tfirstElementToFocusHTMLElement.focus()\n\t\t} else {\n\t\t\t(firstFocusableEl as HTMLElement).focus()\n\t\t}\n\t}\n\n\t/** Trap the tab focus inside the Fancybox 4 modal dialog */\n\tstatic trapFocusFancybox4({\n\t\tcontainer,\n\t\tcloseElement,\n\t\tadditionalCloseElements,\n\t\ttablistUpdateElements,\n\t\ttriggerHTMLElement,\n\t\timageAltText\n\t}: {\n\t\tcontainer: string,\n\t\tcloseElement: string,\n\t\tadditionalCloseElements?: string[],\n\t\ttablistUpdateElements?: string[],\n\t\ttriggerHTMLElement?: HTMLElement,\n\t\timageAltText?: string\n\t}): void {\n\n\t\tconst containerHTMLElement: HTMLElement = document.querySelector(container)\n\t\tconst closeHTMLElement: HTMLElement = document.querySelector(closeElement)\n\n\t\tlet focusableElementsNL: NodeListOf\n\t\tlet focusableElements: Element[]\n\t\tlet firstFocusableEl: Element\n\t\tlet lastFocusableEl: Element\n\n\t\tconst setFocusables = (trigger?: string) => {\n\n\t\t\tfocusableElements && unbindEventsToFocusableElements()\n\t\t\tfocusableElements = []\n\t\t\tfocusableElementsNL = containerHTMLElement.querySelectorAll(HAHAccessibility.selectors.focusableElements)\n\t\t\tconst currentSlide = containerHTMLElement.querySelector('.fancybox__slide.is-selected')\n\t\t\tlet currentSlideIndex = Number(currentSlide.getAttribute('data-index'))\n\n\t\t\tif (trigger === 'Next') {\n\t\t\t\tcurrentSlideIndex += 1\n\t\t\t} else if (trigger === 'Previous') {\n\t\t\t\tcurrentSlideIndex -= 1\n\t\t\t}\n\n\t\t\tfocusableElements = Array.from(focusableElementsNL).filter((el: Element, _index: number) => {\n\t\t\t\tif ((el as HTMLElement).title !== 'Close') return true\n\t\t\t\tif ((el as HTMLElement).title === 'Close') {\n\t\t\t\t\tconst closeButtonIndex = Number((el.parentNode.parentNode as HTMLElement).getAttribute('data-index'))\n\t\t\t\t\tif (closeButtonIndex === currentSlideIndex) return true\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (imageAltText) {\n\t\t\t\t$(`[data-index=\"${currentSlideIndex}\"] .fancybox__image`).attr('alt', imageAltText)\n\t\t\t}\n\n\t\t\tfirstFocusableEl = focusableElements[0]\n\t\t\tlastFocusableEl = focusableElements[focusableElements.length - 1]\n\n\t\t\tbindEventsToFocusableElements()\n\t\t}\n\n\t\tconst KEYCODE_TAB = 9\n\n\t\tadditionalCloseElements?.forEach(element => {\n\t\t\tconst altCloseHTMLElement: HTMLElement = document.querySelector(element)\n\t\t\taltCloseHTMLElement.addEventListener('keypress', (e) => {\n\t\t\t\tif (altCloseHTMLElement !== e.target) return\n\t\t\t\tif (e.key === 'Enter') {\n\t\t\t\t\tHAHAccessibility.closeTrapFocus(closeHTMLElement, triggerHTMLElement)\n\t\t\t\t}\n\t\t\t})\n\t\t\taltCloseHTMLElement.addEventListener('click', (e) => {\n\t\t\t\tif (altCloseHTMLElement !== e.target) return\n\t\t\t\tHAHAccessibility.closeTrapFocus(closeHTMLElement, triggerHTMLElement)\n\t\t\t})\n\t\t})\n\n\t\tconst eventHandler = (e: KeyboardEvent) => {\n\t\t\tlet isTabPressed = (e.key === 'Tab' || e.keyCode === KEYCODE_TAB)\n\t\t\tlet isEscapePressed = e.key === 'Escape'\n\n\t\t\tif (!isTabPressed && !isEscapePressed) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (isTabPressed) {\n\t\t\t\tconst elementIndex = focusableElements.indexOf(document.activeElement)\n\t\t\t\tif (e.shiftKey) /* shift + tab */ {\n\t\t\t\t\tif (elementIndex === 0) {\n\t\t\t\t\t\t(lastFocusableEl as HTMLElement).focus()\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t} else if (elementIndex > 0) {\n\t\t\t\t\t\t(focusableElements[elementIndex - 1] as HTMLElement).focus()\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t} else {\n\t\t\t\t\t\t(lastFocusableEl as HTMLElement).focus()\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t}\n\t\t\t\t} else /* tab */ {\n\t\t\t\t\tif (elementIndex === focusableElements.length - 1) {\n\t\t\t\t\t\t(firstFocusableEl as HTMLElement).focus()\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t} else if (elementIndex >= 0) {\n\t\t\t\t\t\t(focusableElements[elementIndex + 1] as HTMLElement).focus()\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t} else {\n\t\t\t\t\t\t(firstFocusableEl as HTMLElement).focus()\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isEscapePressed) {\n\t\t\t\tHAHAccessibility.closeTrapFocus(closeHTMLElement, triggerHTMLElement)\n\t\t\t}\n\t\t}\n\n\t\tconst bindEventsToFocusableElements = () => {\n\t\t\tfocusableElements.forEach((element) => {\n\t\t\t\telement.addEventListener('keydown', eventHandler)\n\t\t\t})\n\t\t}\n\n\t\tconst unbindEventsToFocusableElements = () => {\n\t\t\tfocusableElements.forEach((element) => {\n\t\t\t\telement.removeEventListener('keydown', eventHandler)\n\t\t\t})\n\t\t}\n\n\t\tsetFocusables()\n\n\t\ttablistUpdateElements?.forEach((element) => {\n\t\t\tconst updaterElement: HTMLElement = containerHTMLElement.querySelector(element)\n\t\t\tif (updaterElement) {\n\t\t\t\tupdaterElement.addEventListener('keypress', (e) => {\n\t\t\t\t\tif (e.key === 'Enter') {\n\t\t\t\t\t\tsetFocusables(updaterElement.title)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tupdaterElement.addEventListener('click', (e) => {\n\t\t\t\t\tsetFocusables(updaterElement.title)\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\t// firstFocusableEl.focus(); \n\t}\n\n\t/** End the trap for the focus inside the modal dialog */\n\tstatic closeTrapFocus(closeHTMLElement: HTMLElement, triggerHTMLElement?: HTMLElement): void {\n\t\tcloseHTMLElement?.focus()\n\t\tcloseHTMLElement?.click()\n\t\ttriggerHTMLElement?.focus()\n\t}\n\n\t/** Trap focus terms and conditions LB */\n\tstatic showTermsofSalePopover(): void {\n\t\ttry {\n\t\t\tdocument.getElementById('generalTermPopover').style.visibility = 'visible'\n\t\t\tdocument.getElementById('generalTermPopover').style.display = ''\n\t\t\tHAHAccessibility.trapFocus({\n\t\t\t\tcontainer: '#generalTermPopover',\n\t\t\t\tcloseElement: '#closegeneralTermPopover'\n\t\t\t})\n\t\t}\n\t\tcatch (e) {\n\t\t\talert('error')\n\t\t}\n\t}\n\n\tstatic showMattressTermPopover(): void {\n\t\ttry {\n\t\t\tdocument.getElementById('mattressTermPopover').style.visibility = 'visible'\n\t\t\tdocument.getElementById('mattressTermPopover').style.display = ''\n\t\t\tHAHAccessibility.trapFocus({\n\t\t\t\tcontainer: '#mattressTermPopover',\n\t\t\t\tcloseElement: '#closeMattressTermPopover'\n\t\t\t})\n\t\t}\n\t\tcatch (e) {\n\t\t\talert('error')\n\t\t}\n\t}\n\n\t/**\n\t * 1) Calls `new NavigationBar` for each element found by `document.querySelectorAll('#main-nav')`\n\t * 2) Calls `new NavigationBar` for each element found by `document.querySelectorAll('#side-nav')`\n\t * 3) Calls `new TabsManual` for each element found by `document.querySelectorAll('[role=tablist]')`\n\t * 4) Applies accessibility tools for fancybox images\n\t * 5) Applies accessibility tools for the fancybox element\n\t * 6) Applies accessibility tools for fancybox inline subdetails\n\t */\n\tstatic init() {\n\n\t\tconst logActiveElement = this.LOG_ACTIVE_ELEMENT\n\n\t\twindow.addEventListener('load', function () {\n\n\t\t\twindow.mainNavList = document.querySelectorAll(HAHAccessibility.selectors.mainNavList)\n\t\t\tif (window.mainNavList) {\n\t\t\t\tfor (let i = 0; i < window.mainNavList.length; i++) {\n\t\t\t\t\tnew NavigationBar(window.mainNavList[i])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twindow.navList = document.querySelectorAll(HAHAccessibility.selectors.navList)\n\t\t\tif (window.navList) {\n\t\t\t\tfor (let i = 0; i < window.navList.length; i++) {\n\t\t\t\t\tnew NavigationBar(window.navList[i])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twindow.tablists = document.querySelectorAll(HAHAccessibility.selectors.tabLists)\n\t\t\tif (window.tablists) {\n\t\t\t\tfor (let i = 0; i < window.tablists.length; i++) {\n\t\t\t\t\tnew TabsManual(window.tablists[i])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch (HAHAccessibility.FANCYBOX_VERSION) {\n\t\t\tcase 2: HAHAccessibility.initADAForFancybox2(); break\n\t\t\tcase 4: HAHAccessibility.initADAForFancybox4(); break\n\t\t\t}\n\n\t\t\tif (logActiveElement) {\n\t\t\t\tdocument.addEventListener('keyup', () => console.log(document.activeElement))\n\t\t\t}\n\n\t\t})\n\t}\n\n\tprivate static initADAForFancybox2() {\n\n\t\t$('[id^=\\'fancyboxLBImage\\']').on('click', function () {\n\t\t\twindow.triggerElement = this\n\t\t})\n\n\t\t$('#addOnFancyboxLBImage').on('click', function () {\n\t\t\twindow.triggerElement = this\n\t\t});\n\n\t\t($('.fancybox') as any).fancybox({\n\t\t\tafterShow: function () {\n\t\t\t\tconst triggerElementId = window.triggerElement.getAttribute('id')\n\t\t\t\tif (triggerElementId === 'addOnFancyboxLBImage' || triggerElementId.includes('fancyboxLBImage')) {\n\t\t\t\t\tconst altDialogText = triggerElementId.includes('fancyboxLBImage')\n\t\t\t\t\t\t? $(window.triggerElement).find('img').attr('alt')\n\t\t\t\t\t\t: $(window.triggerElement)[0].innerText\n\t\t\t\t\t$('.fancybox-overlay').attr('aria-label', `${altDialogText} image`)\n\t\t\t\t\t$('.fancybox-overlay .fancybox-wrap img').attr('alt', altDialogText)\n\t\t\t\t}\n\t\t\t\t$('.fancybox-overlay').attr('aria-modal', 'true').attr('role', 'dialog')\n\t\t\t\t$('.fancybox-overlay .fancybox-wrap').removeAttr('tabindex').removeAttr('aria-modal').removeAttr('aria-label').removeAttr('role')\n\t\t\t\tHAHAccessibility.trapFocus({\n\t\t\t\t\tcontainer: '.fancybox-overlay',\n\t\t\t\t\tcloseElement: '.fancybox-item.fancybox-close',\n\t\t\t\t\tadditionalCloseElements: [],\n\t\t\t\t\ttablistUpdateElements: [\n\t\t\t\t\t\t'.fancybox-prev',\n\t\t\t\t\t\t'.fancybox-next'\n\t\t\t\t\t],\n\t\t\t\t\ttriggerHTMLElement: window.triggerElement,\n\t\t\t\t\tunbindEvents: true\n\t\t\t\t})\n\t\t\t},\n\t\t\tafterClose: function () {\n\t\t\t\twindow.triggerElement.focus()\n\t\t\t},\n\t\t\t// Animation effects for fancybox\n\t\t\topenEffect: 'elastic',\n\t\t\topenSpeed: 350,\n\t\t\tcloseEffect: 'elastic',\n\t\t\tcloseSpeed: 350,\n\t\t\tnextEffect: 'fade',\n\t\t\tnextSpeed: 200,\n\t\t\tpadding: 2,\n\t\t\tmargin: 20\n\t\t})\n\n\t\t// Fancybox inline sub details\n\t\t$('.sub-details').on('click', function () {\n\t\t\twindow.triggerElement = this\n\t\t});\n\n\t\t($('.sub-details') as any).fancybox({\n\t\t\tafterShow: function () {\n\t\t\t\t$('.fancybox-overlay').attr('aria-label', 'Subscription details').attr('aria-modal', 'true').attr('role', 'dialog').attr('aria-describedby', 'inline-sub-box ADA-sub-disclosure')\n\t\t\t\t$('.fancybox-overlay .fancybox-wrap').removeAttr('tabindex').removeAttr('aria-label').removeAttr('role')\n\t\t\t\tHAHAccessibility.trapFocus({\n\t\t\t\t\tcontainer: '.fancybox-overlay',\n\t\t\t\t\tcloseElement: '.fancybox-item.fancybox-close',\n\t\t\t\t\tadditionalCloseElements: [],\n\t\t\t\t\ttablistUpdateElements: [],\n\t\t\t\t\ttriggerHTMLElement: window.triggerElement\n\t\t\t\t})\n\t\t\t},\n\t\t\tafterClose: function () {\n\t\t\t\twindow.triggerElement.focus()\n\t\t\t},\n\t\t\topenEffect: 'elastic',\n\t\t\topenSpeed: 350,\n\t\t\tcloseEffect: 'elastic',\n\t\t\tcloseSpeed: 350,\n\t\t\tnextEffect: 'fade',\n\t\t\tnextSpeed: 200,\n\t\t\tscrolling: 'no',\n\t\t\tautoSize: true\n\t\t})\n\n\t\t$('.BMSM-Chart').on('click', function () {\n\t\t\twindow.triggerElement = this\n\t\t});\n\n\t\t($('.BMSM-Chart') as any).fancybox({\n\t\t\tafterShow: function () {\n\t\t\t\t$('.fancybox-overlay').attr('aria-modal', 'true').attr('role', 'dialog').attr('aria-label', 'Buy More Save More')\n\t\t\t\t$('.fancybox-overlay .fancybox-wrap').removeAttr('aria-modal').removeAttr('aria-label').removeAttr('role')\n\t\t\t\tHAHAccessibility.trapFocus({\n\t\t\t\t\tcontainer: '.fancybox-overlay',\n\t\t\t\t\tcloseElement: '.fancybox-item.fancybox-close',\n\t\t\t\t\tfirstElementToFocus: '#bmsm-title'\n\t\t\t\t})\n\t\t\t},\n\t\t\tafterClose: function () {\n\t\t\t\twindow.triggerElement.focus()\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate static initADAForFancybox4() {\n\n\t\t$('[data-fancybox=\"product-image-gallery\"]').on('click', function () {\n\t\t\twindow.triggerElement = this\n\t\t})\n\n\t\t$('[data-fancybox=\"product-addon\"]').on('click', function () {\n\t\t\twindow.triggerElement = this\n\t\t})\n\n\t\t$('[data-fancybox-type=\"inline\"]').on('click', function () {\n\t\t\twindow.triggerElement = this\n\t\t})\n\n\t\tFancybox.bind('[data-fancybox=\"product-image-gallery\"]', {\n\t\t\tonce: {\n\t\t\t\tdone: (fancybox: any) => {\n\t\t\t\t\tconst altDialogText = $(window.triggerElement).children()[0].getAttribute('alt')\n\t\t\t\t\tconst fancyboxId = fancybox.$container.getAttribute('id')\n\t\t\t\t\tfancybox.$container.setAttribute('aria-label', `${altDialogText} image`)\n\t\t\t\t\t$('.is-selected').attr('aria-label', 'Current image')\n\t\t\t\t\tHAHAccessibility.trapFocusFancybox4({\n\t\t\t\t\t\tcontainer: `#${fancyboxId}`,\n\t\t\t\t\t\tcloseElement: '.is-selected .carousel__button.is-close',\n\t\t\t\t\t\tadditionalCloseElements: ['.fancybox__slide'],\n\t\t\t\t\t\ttablistUpdateElements: ['.carousel__button.is-next', '.carousel__button.is-prev'],\n\t\t\t\t\t\ttriggerHTMLElement: window.triggerElement,\n\t\t\t\t\t\timageAltText: altDialogText\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t},\n\t\t\tThumbs: false,\n\t\t\tToolbar: false,\n\t\t\tdragToClose: false,\n\t\t\tinfinite: false,\n\t\t})\n\n\t\tFancybox.bind('[data-fancybox=\"product-addon\"]', {\n\t\t\tonce: {\n\t\t\t\tdone: (fancybox: any) => {\n\t\t\t\t\tconst altDialogText = $(window.triggerElement).text().toLowerCase().replace('add', '').trim()\n\t\t\t\t\tconst newAltDialogText = `${altDialogText} image`\n\t\t\t\t\tconst fancyboxId = fancybox.$container.getAttribute('id')\n\t\t\t\t\tfancybox.$container.setAttribute('aria-label', newAltDialogText)\n\t\t\t\t\tHAHAccessibility.trapFocusFancybox4({\n\t\t\t\t\t\tcontainer: `#${fancyboxId}`,\n\t\t\t\t\t\tcloseElement: '.is-selected .carousel__button.is-close',\n\t\t\t\t\t\tadditionalCloseElements: ['.fancybox__slide'],\n\t\t\t\t\t\ttablistUpdateElements: [],\n\t\t\t\t\t\ttriggerHTMLElement: window.triggerElement,\n\t\t\t\t\t\timageAltText: altDialogText\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t},\n\t\t\tThumbs: false,\n\t\t\tToolbar: false,\n\t\t\tdragToClose: false,\n\t\t\tinfinite: false,\n\t\t})\n\n\t\tFancybox.bind('[data-fancybox-type=\"inline\"]', {\n\t\t\tonce: {\n\t\t\t\tdone: (fancybox: any) => {\n\t\t\t\t\tfancybox.$container.removeAttribute('aria-label')\n\t\t\t\t\tconst fancyboxId = fancybox.$container.getAttribute('id')\n\t\t\t\t\tHAHAccessibility.trapFocusFancybox4({\n\t\t\t\t\t\tcontainer: `#${fancyboxId}`,\n\t\t\t\t\t\tcloseElement: '.is-selected .carousel__button.is-close',\n\t\t\t\t\t\tadditionalCloseElements: ['.fancybox__slide'],\n\t\t\t\t\t\ttablistUpdateElements: [],\n\t\t\t\t\t\ttriggerHTMLElement: window.triggerElement\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t},\n\t\t\tThumbs: false,\n\t\t\tToolbar: false,\n\t\t\tdragToClose: false,\n\t\t\tinfinite: false,\n\t\t})\n\t}\n}\n\n/**\n* 1) Receives an element representing the navigation list\n* 2) Defines the `menuItems`, `linkMenuItems` and `subMenuItems`\n* 3) Defines the first and last menu item\n* 4) Adds an event listener for the `keydown` event for each element of `linkMenuItems`\n* 5) Adds an event listener for the `keydown` event for each element of `subMenuItems`\n* 6) Defines the `allNavLink`\n* 7) Defines the `aria-current=\"page\"` for one element of `allNavLink`\n*/\nclass NavigationBar {\n\n\tnavlistNode: Element\n\tmenuItems: Element[]\n\tlinkMenuItems: Element[]\n\tsubMenuItems: Element[][]\n\tcurrentLocation: any\n\tfirstMenuItem: Element\n\tlastMenuItem: Element\n\tallNavLink: HTMLLinkElement[]\n\n\tconstructor(groupNode: Element) {\n\t\tthis.navlistNode = groupNode\n\t\tthis.menuItems = Array.from(this.navlistNode.querySelectorAll(HAHAccessibility.selectors.navigationBar.menuItems))\n\t\tthis.linkMenuItems = []\n\t\tthis.subMenuItems = []\n\t\tthis.currentLocation = window.location.href\n\n\t\tfor (let i = 0; i < this.menuItems.length; i++) {\n\t\t\tthis.linkMenuItems.push(this.menuItems[i].querySelector(HAHAccessibility.selectors.navigationBar.linkMenuItems))\n\t\t\tif (this.menuItems[i].querySelector(HAHAccessibility.selectors.navigationBar.subMenuItems)) {\n\t\t\t\tthis.subMenuItems.push(\n\t\t\t\t\tArray.from(\n\t\t\t\t\t\tthis.menuItems[i]\n\t\t\t\t\t\t\t.querySelector(HAHAccessibility.selectors.navigationBar.subMenuItems)\n\t\t\t\t\t\t\t.querySelectorAll(HAHAccessibility.selectors.navigationBar.subMenuItem)\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\tthis.subMenuItems.push([])\n\t\t\t}\n\t\t}\n\n\t\tthis.firstMenuItem = this.linkMenuItems[0]\n\t\tthis.lastMenuItem = this.linkMenuItems[this.linkMenuItems.length - 1]\n\n\t\tfor (let j = 0; j < this.linkMenuItems.length; j++) {\n\t\t\tthis.linkMenuItems[j].addEventListener('keydown', (e) => this.onKeydown.call(this, e, j, null))\n\t\t}\n\n\t\tfor (let j = 0; j < this.linkMenuItems.length; j++) {\n\t\t\tfor (let k = 0; k < this.subMenuItems[j].length; k++) {\n\t\t\t\tthis.subMenuItems[j][k].addEventListener('keydown', (e) => this.onKeydown.call(this, e, j, k))\n\t\t\t}\n\t\t}\n\n\t\tthis.allNavLink = Array.from(this.navlistNode.querySelectorAll(HAHAccessibility.selectors.navigationBar.subMenuItem))\n\n\t\tfor (let l = 0; l < this.allNavLink.length; l++) {\n\t\t\tif (this.allNavLink[l].href === this.currentLocation) {\n\t\t\t\tthis.allNavLink[l].setAttribute('aria-current', 'page')\n\t\t\t}\n\t\t}\n\t}\n\n\tmoveFocusToLink(currentLink: Element) {\n\t\t(currentLink as HTMLElement)?.focus()\n\t}\n\n\tmoveFocusToPreviousLink(indexMenu: any, _indexSubMenu: any) {\n\t\tif (indexMenu === 0) {\n\t\t\tthis.moveFocusToLink(this.lastMenuItem)\n\t\t} else {\n\t\t\tthis.moveFocusToLink(this.linkMenuItems[indexMenu - 1])\n\t\t}\n\t}\n\n\tmoveFocusToNextLink(indexMenu: any, _indexSubMenu: any) {\n\t\tif (indexMenu === this.linkMenuItems.length - 1) {\n\t\t\tthis.moveFocusToLink(this.firstMenuItem)\n\t\t} else {\n\t\t\tthis.moveFocusToLink(this.linkMenuItems[indexMenu + 1])\n\t\t}\n\t}\n\n\tmoveFocusToPreviousSublink(indexMenu: any, indexSubMenu: any) {\n\t\tconst subMenuLenght = this.subMenuItems[indexMenu].length - 1\n\t\tif (indexSubMenu === null) {\n\t\t\tthis.moveFocusToLink(this.subMenuItems[indexMenu][subMenuLenght])\n\t\t} else {\n\t\t\tif (indexSubMenu === 0) {\n\t\t\t\tthis.moveFocusToLink(this.subMenuItems[indexMenu][subMenuLenght])\n\t\t\t} else {\n\t\t\t\tthis.moveFocusToLink(this.subMenuItems[indexMenu][indexSubMenu - 1])\n\t\t\t}\n\t\t}\n\t}\n\n\tmoveFocusToNextSublink(indexMenu: any, indexSubMenu: any) {\n\t\tconst subMenuLenght = this.subMenuItems[indexMenu].length - 1\n\t\tif (indexSubMenu === null) {\n\t\t\tthis.moveFocusToLink(this.subMenuItems[indexMenu][0])\n\t\t} else {\n\t\t\tif (indexSubMenu === subMenuLenght) {\n\t\t\t\tthis.moveFocusToLink(this.subMenuItems[indexMenu][0])\n\t\t\t} else {\n\t\t\t\tthis.moveFocusToLink(this.subMenuItems[indexMenu][indexSubMenu + 1])\n\t\t\t}\n\t\t}\n\t}\n\n\tmoveFocusToFirstlink(indexMenu: any, indexSubMenu: any) {\n\t\tif (indexSubMenu === null) {\n\t\t\tthis.moveFocusToLink(this.firstMenuItem)\n\t\t} else {\n\t\t\tthis.moveFocusToLink(this.subMenuItems[indexMenu][0])\n\t\t}\n\t}\n\n\tmoveFocusToLastlink(indexMenu: any, indexSubMenu: any) {\n\t\tconst subMenuLenght = this.subMenuItems[indexMenu].length - 1\n\t\tif (indexSubMenu === null) {\n\t\t\tthis.moveFocusToLink(this.lastMenuItem)\n\t\t} else {\n\t\t\tthis.moveFocusToLink(this.subMenuItems[indexMenu][subMenuLenght])\n\t\t}\n\t}\n\n\tmoveFocusTofatherlink(indexMenu: any, indexSubMenu: any) {\n\t\tif (indexSubMenu !== null) {\n\t\t\tthis.moveFocusToLink(this.linkMenuItems[indexMenu])\n\t\t}\n\t}\n\n\tisPrintableCharacter(str: string) {\n\t\treturn str.length === 1 && str.match(/\\S/)\n\t}\n\n\tsetFocusByFirstCharacter(character: any, indexMenu: any, indexSubMenu: any) {\n\n\t\tlet linksArrToSearch: any\n\t\tlet startIndex: any\n\n\t\tif (indexSubMenu === null) {\n\t\t\tlinksArrToSearch = this.linkMenuItems\n\t\t\tstartIndex = indexMenu\n\t\t} else {\n\t\t\tlinksArrToSearch = this.subMenuItems[indexMenu]\n\t\t\tstartIndex = indexSubMenu\n\t\t}\n\n\t\tfor (let i = 0; i < linksArrToSearch.length - 1; i++) {\n\t\t\tif (startIndex === linksArrToSearch.length - 1) {\n\t\t\t\tstartIndex = 0\n\t\t\t} else {\n\t\t\t\tstartIndex += 1\n\t\t\t}\n\t\t\tif (linksArrToSearch[startIndex].name.toLowerCase().startsWith(character.toLowerCase())) {\n\t\t\t\tthis.moveFocusToLink(linksArrToSearch[startIndex])\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\t/* EVENT HANDLERS */\n\tonKeydown(event: KeyboardEvent, indexMenu: number, indexSubMenu: number) {\n\n\t\tlet flag = false\n\n\t\tswitch (event.key) {\n\t\tcase 'ArrowLeft':\n\t\t\tthis.moveFocusToPreviousLink(indexMenu, indexSubMenu)\n\t\t\tflag = true\n\t\t\tbreak\n\t\tcase 'ArrowRight':\n\t\t\tthis.moveFocusToNextLink(indexMenu, indexSubMenu)\n\t\t\tflag = true\n\t\t\tbreak\n\t\tcase 'ArrowUp':\n\t\t\tthis.moveFocusToPreviousSublink(indexMenu, indexSubMenu)\n\t\t\tflag = true\n\t\t\tbreak\n\n\t\tcase 'ArrowDown':\n\t\t\tthis.moveFocusToNextSublink(indexMenu, indexSubMenu)\n\t\t\tflag = true\n\t\t\tbreak\n\t\tcase 'Home':\n\t\t\tthis.moveFocusToFirstlink(indexMenu, indexSubMenu)\n\t\t\tflag = true\n\t\t\tbreak\n\t\tcase 'End':\n\t\t\tthis.moveFocusToLastlink(indexMenu, indexSubMenu)\n\t\t\tflag = true\n\t\t\tbreak\n\n\t\tcase 'Escape':\n\t\t\tthis.moveFocusTofatherlink(indexMenu, indexSubMenu)\n\t\t\tflag = true\n\t\t\tbreak\n\t\tdefault:\n\t\t\tif (this.isPrintableCharacter(event.key)) {\n\t\t\t\tthis.setFocusByFirstCharacter(event.key, indexMenu, indexSubMenu)\n\t\t\t\tflag = true\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\n\t\tif (flag) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.preventDefault()\n\t\t}\n\t}\n}\n\n/**\n* 1) Receives an element representing the tablist\n* 2) Searches for subelements with `role=\"tab\"`\n* 3) Defines the first and last tab\n* 4) Adds an event listener for the `keydown` event for each tab\n*/\nclass TabsManual {\n\n\ttablistNode: any\n\ttabs: Element[]\n\tfirstTab: Element\n\tlastTab: Element\n\n\tconstructor(groupNode: Element) {\n\t\tthis.tablistNode = groupNode\n\t\tthis.tabs = []\n\t\tthis.firstTab = null\n\t\tthis.lastTab = null\n\t\tthis.tabs = Array.from(this.tablistNode.querySelectorAll(HAHAccessibility.selectors.tabsManual.tabs))\n\t\tfor (let i = 0; i < this.tabs.length; i += 1) {\n\t\t\tlet tab = this.tabs[i]\n\n\t\t\ttab.addEventListener('keydown', this.onKeydown.bind(this))\n\t\t\tif (!this.firstTab) {\n\t\t\t\tthis.firstTab = tab\n\t\t\t}\n\t\t\tthis.lastTab = tab\n\t\t}\n\t}\n\n\tmoveFocusToTab(currentTab: Element) {\n\t\t(currentTab as HTMLElement).focus()\n\t}\n\n\tmoveFocusToPreviousTab(currentTab: Element) {\n\t\tlet index: number\n\t\tif (currentTab === this.firstTab) {\n\t\t\tthis.moveFocusToTab(this.lastTab)\n\t\t} else {\n\t\t\tindex = this.tabs.indexOf(currentTab)\n\t\t\tthis.moveFocusToTab(this.tabs[index - 1])\n\t\t}\n\t}\n\n\tmoveFocusToNextTab(currentTab: Element) {\n\t\tlet index: number\n\t\tif (currentTab === this.lastTab) {\n\t\t\tthis.moveFocusToTab(this.firstTab)\n\t\t} else {\n\t\t\tindex = this.tabs.indexOf(currentTab)\n\t\t\tthis.moveFocusToTab(this.tabs[index + 1])\n\t\t}\n\t}\n\n\t/* EVENT HANDLERS */\n\tonKeydown(event: KeyboardEvent) {\n\t\tconst tgt: HTMLElement = event.currentTarget as HTMLElement\n\t\tlet flag = false\n\t\tswitch (event.key) {\n\t\tcase 'ArrowLeft':\n\t\t\tthis.moveFocusToPreviousTab(tgt as HTMLElement)\n\t\t\tflag = true\n\t\t\tbreak\n\t\tcase 'ArrowRight':\n\t\t\tthis.moveFocusToNextTab(tgt as HTMLElement)\n\t\t\tflag = true\n\t\t\tbreak\n\t\tcase 'Home':\n\t\t\tthis.moveFocusToTab(this.firstTab)\n\t\t\tflag = true\n\t\t\tbreak\n\t\tcase 'End':\n\t\t\tthis.moveFocusToTab(this.lastTab)\n\t\t\tflag = true\n\t\t\tbreak\n\t\tdefault:\n\t\t\tbreak\n\t\t}\n\t\tif (flag) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.preventDefault()\n\t\t}\n\t}\n}\n\n/**\n* 1) Receives a list of elements\n* 2) Searches for subelements with `role=\"radio\"`\n* 3) Defines the first and last radio option\n* 4) Adds an event listener for the `keydown` event for each radio item\n*/\nclass RadioGroup {\n\n\tradioOptNode: Element\n\tradioItems: Element[]\n\tfirstRadioItem: Element\n\tlastRadioItem: Element\n\n\tconstructor(groupNode: NodeListOf) {\n\t\tthis.radioOptNode = groupNode[0]\n\t\tthis.radioItems = Array.from(this.radioOptNode.querySelectorAll(HAHAccessibility.selectors.radioGroup.radioItems))\n\t\tthis.firstRadioItem = this.radioItems[0]\n\t\tthis.lastRadioItem = this.radioItems[this.radioItems.length - 1]\n\t\tfor (let j = 0; j < this.radioItems.length; j++) {\n\t\t\tthis.radioItems[j].addEventListener('keydown', (e) => this.onKeydown.call(this, e, j))\n\t\t}\n\t}\n\n\tmoveFocusToRadio(currentRadio: Element) {\n\t\t(currentRadio as HTMLElement).focus();\n\t\t(currentRadio as HTMLElement).click()\n\t}\n\n\tmoveFocusToPreviousRadio(indexRadio: number) {\n\t\tif (indexRadio === 0) {\n\t\t\tthis.moveFocusToRadio(this.lastRadioItem)\n\t\t} else {\n\t\t\tthis.moveFocusToRadio(this.radioItems[indexRadio - 1])\n\t\t}\n\t}\n\n\tmoveFocusToNextRadio(indexRadio: number) {\n\t\tif (indexRadio === this.radioItems.length - 1) {\n\t\t\tthis.moveFocusToRadio(this.firstRadioItem)\n\t\t} else {\n\t\t\tthis.moveFocusToRadio(this.radioItems[indexRadio + 1])\n\t\t}\n\t}\n\n\t/* EVENT HANDLERS */\n\tonKeydown(event: KeyboardEvent, indexMenu: number) {\n\n\t\tlet flag = false\n\n\t\tswitch (event.key) {\n\t\tcase 'ArrowLeft':\n\t\t\tthis.moveFocusToPreviousRadio(indexMenu)\n\t\t\tflag = true\n\t\t\tbreak\n\t\tcase 'ArrowRight':\n\t\t\tthis.moveFocusToNextRadio(indexMenu)\n\t\t\tflag = true\n\t\t\tbreak\n\t\tcase 'ArrowUp':\n\t\t\tthis.moveFocusToPreviousRadio(indexMenu)\n\t\t\tflag = true\n\t\t\tbreak\n\n\t\tcase 'ArrowDown':\n\t\t\tthis.moveFocusToNextRadio(indexMenu)\n\t\t\tflag = true\n\t\t\tbreak\n\t\tdefault:\n\t\t\tbreak\n\t\t}\n\n\t\tif (flag) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.preventDefault()\n\t\t}\n\t}\n}\n","class ESignUp {\n\tsfSubscriptionApi: any\n\tlambdaPayload: any\n\tdialogObj: DialogObj\n\tlbHideParams: Array\n\tcookieValue: string\n\telementIDs: ElementIDs\n\tlambdaClient: any\n\taddedToSalesforceTime: any\n\tupdatedOnSalesforceTime: any\n\n\tconstructor({\n\t\tsfSubscriptionApi,\n\t\tlambdaPayload,\n\t\tdialogObj,\n\t\tlbHideParams,\n\t\tcookieValue,\n\t\telementIDs,\n\t}: ESignUpOptions) {\n\n\t\tif (!sfSubscriptionApi)\n\t\t\tthrow new Error('\"sfSubscriptionApi\" config value is required.')\n\n\t\tif (!lambdaPayload)\n\t\t\tthrow new Error('\"lambdaPayload\" config value is required.')\n\n\t\tif (!dialogObj)\n\t\t\tthrow new Error('\"dialogObj\" config value is required.')\n\n\t\tconst defaultLambdaPayload = {\n\t\t\tregion: 'US',\n\t\t\ttimeZone: '-5',\n\t\t\tlanguage: 'EN',\n\t\t\tmethod: 'API',\n\t\t}\n\n\t\tconst defaultElementIds = {\n\t\t\tlightBoxInput: '#emailAddress1',\n\t\t\tlightBoxBtn: '#emailAddress1btn',\n\t\t\tfooterInput: '#emailAddress2',\n\t\t\tfooterBtn: '#emailAddress2btn',\n\t\t\thomePageInput: '#emailAddress3',\n\t\t\thomePageBtn: '#emailAddress3btn',\n\t\t\tlightBoxBackground: '#emailSignupPopover',\n\t\t\tlightBoxCloseBtn: '#ligtboxClosebtn',\n\t\t\tsweepsBtn: '#sweepsBtn',\n\t\t\tsweepsEmail: '#sweepsEmail',\n\t\t\tsweepsName: '#sweepsName',\n\t\t\tsweepsCheck: '#sweepsCheck',\n\t\t\tsweepsBonvoyCheck: '#sweepsBonvoyCheck',\n\t\t\tlandingPageSweepsBtn: '#landingPageSweepsBtn',\n\t\t\tlandingPageSweepsEmail: '#landingPageSweepsEmail',\n\t\t\tlandingPageSweepsName: '#landingPageSweepsName',\n\t\t\tlandingPageSweepsBonvoyCheck: '#landingPageSweepsBonvoyCheck',\n\t\t\tlandingPageSweepsCheck: '#landingPageSweepsCheck',\n\t\t\tcheckoutPageEmailInput: '#emailAddress',\n\t\t\tcheckoutPageSubscribeCheck: '#emailSubscribe'\n\t\t}\n\n\t\tconst defaultDialogObj = {\n\t\t\tbtnTxt: 'SHOP NOW',\n\t\t}\n\n\t\tthis.sfSubscriptionApi = sfSubscriptionApi\n\n\t\tthis.lambdaPayload = {\n\t\t\t...defaultLambdaPayload,\n\t\t\t...lambdaPayload,\n\t\t}\n\n\t\tthis.dialogObj = {\n\t\t\t...defaultDialogObj,\n\t\t\t...dialogObj,\n\t\t}\n\n\t\tthis.lbHideParams = lbHideParams || ['utm_source=hah']\n\n\t\tthis.cookieValue = cookieValue || 'emailSignup'\n\n\t\tthis.elementIDs = {\n\t\t\t...defaultElementIds,\n\t\t\t...elementIDs,\n\t\t}\n\n\t\tthis.addedToSalesforceTime = {}\n\t\tthis.updatedOnSalesforceTime = {}\n\n\t}\n\n\tgetTimeZone() {\n\t\tlet currDate = new Date()\n\t\treturn Math.floor((currDate.getTimezoneOffset() / 60) * -1).toString()\n\t}\n\n\thideLandingPageSweepsForm() {\n\t\t$('#sweepstakesFormWrap').fadeOut('slow', function () {\n\t\t\t$('#sweepstakesConfirmation').fadeIn('slow')\n\t\t})\n\t}\n\n\t/**\n\t * Calls AWS Lambda to subscribe/unsubscribe a client email.\n\t */\n\tasync callLambda({\n\t\temail,\n\t\tsource,\n\t\taction,\n\t\tshowLightboxMessage = false,\n\t\tname = '',\n\t\tcampaign = undefined,\n\t\tcallback = undefined\n\t}: LambdaOptions) {\n\n\t\t// Hides the lightbox\n\t\tthis.showLightbox(false)\n\n\t\t// Show the \"thank you for subscribing\" lightbox \n\t\tif (showLightboxMessage) {\n\t\t\tdilogBox(this.dialogObj)\n\t\t\twindow.scrollTo(0, 0)\n\t\t}\n\n\t\tconst payload = {\n\t\t\temailId: email,\n\t\t\tsource: source,\n\t\t\ttimeZone: this.getTimeZone(),\n\t\t\tname: name,\n\t\t\tcampaign: campaign,\n\t\t}\n\n\t\tconst lambdaPayload = {\n\t\t\taction: action,\n\t\t\tdata: {\n\t\t\t\t...this.lambdaPayload,\n\t\t\t\t...payload,\n\t\t\t},\n\t\t}\n\n\t\tconst apiGatewayUrl = this.sfSubscriptionApi\n\n\t\ttry {\n\t\t\tconst response = await fetch(apiGatewayUrl, {\n\t\t\t\tmethod: 'POST', \n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify(lambdaPayload),\n\t\t\t});\n\t\n\t\t\tconst data = await response.json();\n\t\n\t\t\tif (callback) callback(null, data);\n\t\t} catch (error) {\n\t\t\tconsole.error('Error calling API Gateway:', error);\n\t\t\tif (callback) callback(error, null);\n\t\t}\n\t}\n\n\tcheckQueryVariables() {\n\t\tlet vars = window.location.search.substring(1).toLowerCase().split('&')\n\t\tlet paramsPresent = false\n\t\tfor (let i = 0; i < this.lbHideParams.length; i++) {\n\t\t\tif (vars.indexOf(this.lbHideParams[i]) > -1) {\n\t\t\t\tparamsPresent = true\n\t\t\t}\n\t\t}\n\t\treturn paramsPresent\n\t}\n\n\tcheckDisplayLightbox() {\n\t\tlet emailCookie = CommonUtils.getCookie(this.cookieValue)\n\t\tif (emailCookie === null) {\n\t\t\tlet paramsPresent = false\n\t\t\tparamsPresent = this.checkQueryVariables()\n\t\t\tif (paramsPresent) {\n\t\t\t\tthis.showLightbox(false)\n\t\t\t} else {\n\t\t\t\tthis.showLightbox(true)\n\t\t\t}\n\t\t}\n\t}\n\n\tshowLightbox(show = false) {\n\t\tlet emailSignupPopoverDiv = document.getElementById('emailSignupPopover')\n\t\tif (show) {\n\t\t\tif (emailSignupPopoverDiv) {\n\t\t\t\temailSignupPopoverDiv.style.display = ''\n\t\t\t\tHAHAccessibility.trapFocus({\n\t\t\t\t\tcontainer: '.emailFocusTrap',\n\t\t\t\t\tcloseElement: '#emailSignupPopover'\n\t\t\t\t})\n\t\t\t}\n\t\t} else {\n\t\t\tif (emailSignupPopoverDiv) {\n\t\t\t\temailSignupPopoverDiv.style.display = 'none'\n\t\t\t}\n\t\t\tCommonUtils.setCookie(this.cookieValue, 'emailClosed', 180)\n\t\t}\n\t}\n\n\tvalidateSweeps(name, emailID, checked, recaptchaPassed) {\n\t\tlet alertMessage = ''\n\t\tlet nameRegex = /^[a-z ,.'-]+$/i\n\n\t\tif (!nameRegex.test(name)) alertMessage += 'Please enter a valid name. \\n'\n\t\tif (!CommonUtils.validateEmail(emailID))\n\t\t\talertMessage += 'Please enter a valid email address.\\n'\n\t\tif (!checked) alertMessage += 'Please check the sweeps rules checkbox.\\n'\n\t\t/*\n\t\tif (!recaptchaPassed) {\n\t\t\talertMessage += 'Please complete re-captcha.'\n\t\t}\n\t\t*/\n\t\tif (alertMessage !== '') {\n\t\t\talert(alertMessage)\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t}\n\n\tasync toggleEmailStatusInSalesforce(\n\t\temail: string,\n\t\temailStatus: 'Active' | 'Unsubscribed' | 'EmailID does not exist.',\n\t\tagreeToReceiveEmails: boolean\n\t) {\n\n\t\tif (email) {\n\n\t\t\t// saves the email in the session storage so it can track the cart again in the payment page\n\t\t\tsessionStorage.setItem('emailAddress', email)\n\n\t\t\tSalesforceAbandonedCartUtils.setClientEmail(email)\n\t\t\tSalesforceAbandonedCartUtils.trackCart()\n\n\t\t\t// if email is not in Salesforce\n\t\t\tif (emailStatus.includes('does not exist')) {\n\n\t\t\t\t// add to Salesforce and set as \"Active\"\n\t\t\t\tconst isActive: boolean = await new Promise((resolve) => {\n\t\t\t\t\tthis.callLambda({\n\t\t\t\t\t\temail: email,\n\t\t\t\t\t\tsource: 'checkout',\n\t\t\t\t\t\tshowLightboxMessage: false,\n\t\t\t\t\t\taction: 'add',\n\t\t\t\t\t\tcallback: (err: any, data: any) => {\n\n\t\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (data) {\n\n\t\t\t\t\t\t\t\t// uncomment if troubleshooting and comment again before commit\n\t\t\t\t\t\t\t\t// console.log({...data, Payload: JSON.parse(data.Payload)})\n\n\t\t\t\t\t\t\t\tif (data.StatusCode == 200) {\n\t\t\t\t\t\t\t\t\tresolve(true)\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresolve(false)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t})\n\n\t\t\t\t// save the date it was added to Salesforce\n\t\t\t\tthis.addedToSalesforceTime[email] = new Date()\n\n\t\t\t\t// if agree to receive emails (checkbox checked)\n\t\t\t\tif (agreeToReceiveEmails) {\n\n\t\t\t\t\t// if successfully set as \"Active\", send \"Subscribe\" event to Google Analytics\n\t\t\t\t\tif (isActive) {\n\t\t\t\t\t\tdataLayer.push({\n\t\t\t\t\t\t\tevent: 'eNews Subscription',\n\t\t\t\t\t\t\tevent_category: 'eNews Subscription',\n\t\t\t\t\t\t\tevent_action: 'Subscribe',\n\t\t\t\t\t\t\tevent_label: 'checkout',\n\t\t\t\t\t\t\tevent_value: 1,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if doesn't agree to receive emails (checkbox unchecked)\n\t\t\t\telse {\n\n\t\t\t\t\t// update status in Salesforce to \"Unsubscribed\"\n\t\t\t\t\tconst isUnsubscribed: boolean = await new Promise((resolve) => {\n\t\t\t\t\t\tthis.callLambda({\n\t\t\t\t\t\t\temail: email,\n\t\t\t\t\t\t\tsource: 'checkout',\n\t\t\t\t\t\t\tshowLightboxMessage: false,\n\t\t\t\t\t\t\taction: 'remove',\n\t\t\t\t\t\t\tcallback: (err: any, data: any) => {\n\n\t\t\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (data) {\n\n\t\t\t\t\t\t\t\t\t// uncomment if troubleshooting and comment again before commit\n\t\t\t\t\t\t\t\t\t// console.log({...data, Payload: JSON.parse(data.Payload)})\n\n\t\t\t\t\t\t\t\t\tif (data.StatusCode == 200) {\n\n\t\t\t\t\t\t\t\t\t\tlet isUnsubscribed: boolean = false\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tif (data.Payload) {\n\t\t\t\t\t\t\t\t\t\t\t\tisUnsubscribed = JSON.parse(data.Payload).values.status.toLowerCase() === 'unsubscribed'\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t\t\t\t\tif (data.Payload) {\n\t\t\t\t\t\t\t\t\t\t\t\tisUnsubscribed = data.Payload.toLowerCase().includes('unsubscribed')\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tresolve(isUnsubscribed)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\n\t\t\t\t\t// if successfully set as \"Unsubscribed\", send \"Unsubscribe\" event to Google Analytics\n\t\t\t\t\tif (isUnsubscribed) {\n\t\t\t\t\t\tdataLayer.push({\n\t\t\t\t\t\t\tevent: 'eNews Subscription',\n\t\t\t\t\t\t\tevent_category: 'eNews Subscription',\n\t\t\t\t\t\t\tevent_action: 'Unsubscribe',\n\t\t\t\t\t\t\tevent_label: 'checkout',\n\t\t\t\t\t\t\tevent_value: 1,\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if email is already in Salesforce\n\t\t\telse {\n\n\t\t\t\t// if does not agree to receive emails (is \"Unsubscribed\" in Salesforce)\n\t\t\t\tif (emailStatus.includes('Unsubscribed')) {\n\n\t\t\t\t\t// if agree to receive emails (checkbox checked)\n\t\t\t\t\tif (agreeToReceiveEmails) {\n\n\t\t\t\t\t\t// save the date it was updated in salesforce\n\t\t\t\t\t\tif (!this.updatedOnSalesforceTime[email]) {\n\t\t\t\t\t\t\tthis.updatedOnSalesforceTime[email] = new Date()\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// updates status in Salesforce to \"Active\" \n\t\t\t\t\t\tconst isActive = await new Promise((resolve) => {\n\t\t\t\t\t\t\tthis.callLambda({\n\t\t\t\t\t\t\t\temail: email,\n\t\t\t\t\t\t\t\tsource: 'checkout',\n\t\t\t\t\t\t\t\tshowLightboxMessage: false,\n\t\t\t\t\t\t\t\taction: 'add',\n\t\t\t\t\t\t\t\tcallback: (err: any, data: any) => {\n\n\t\t\t\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (data) {\n\n\t\t\t\t\t\t\t\t\t\t// uncomment if troubleshooting and comment again before commit\n\t\t\t\t\t\t\t\t\t\t// console.log({...data, Payload: JSON.parse(data.Payload)})\n\n\t\t\t\t\t\t\t\t\t\tif (data.StatusCode == 200) {\n\n\t\t\t\t\t\t\t\t\t\t\tlet isActive: boolean\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tisActive = JSON.parse(data.Payload).values.status.toLowerCase() === 'active'\n\t\t\t\t\t\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t\t\t\t\t\tisActive = data.Payload.toLowerCase().includes('active')\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tresolve(isActive)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t})\n\n\t\t\t\t\t\t// if successfully set as \"Active\", send \"Subscribe\" event to Google Analytics\n\t\t\t\t\t\tif (isActive) {\n\t\t\t\t\t\t\tdataLayer.push({\n\t\t\t\t\t\t\t\tevent: 'eNews Subscription',\n\t\t\t\t\t\t\t\tevent_category: 'eNews Subscription',\n\t\t\t\t\t\t\t\tevent_action: 'Subscribe',\n\t\t\t\t\t\t\t\tevent_label: 'checkout',\n\t\t\t\t\t\t\t\tevent_value: 1,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if agrees to receive emails (is \"Active\" in Salesforce)\n\t\t\t\telse {\n\n\t\t\t\t\t// if doesn't agree to receive emails (checkbox unchecked)\n\t\t\t\t\tif (!agreeToReceiveEmails) {\n\n\t\t\t\t\t\tconst dateInserted: Date = this.addedToSalesforceTime[email]\n\t\t\t\t\t\tconst dateUpdated: Date = this.updatedOnSalesforceTime[email]\n\n\t\t\t\t\t\t// if was just inserted or updated in Salesforce\n\t\t\t\t\t\tif (dateInserted || dateUpdated) {\n\n\t\t\t\t\t\t\tconst now = new Date()\n\t\t\t\t\t\t\tconst diffInMilliseconds = Math.abs(now.getTime() - (dateInserted ?? dateUpdated).getTime())\n\t\t\t\t\t\t\tconst diffInMinutes = diffInMilliseconds / (1000 * 60)\n\n\t\t\t\t\t\t\t// if was added or updated less than 5 minutes ago\n\t\t\t\t\t\t\tif (diffInMinutes < 5) {\n\n\t\t\t\t\t\t\t\t// update status in Salesforce to \"Unsubscribed\"\n\t\t\t\t\t\t\t\tconst isUnsubscribed: boolean = await new Promise((resolve) => {\n\t\t\t\t\t\t\t\t\tthis.callLambda({\n\t\t\t\t\t\t\t\t\t\temail: email,\n\t\t\t\t\t\t\t\t\t\tsource: 'checkout',\n\t\t\t\t\t\t\t\t\t\tshowLightboxMessage: false,\n\t\t\t\t\t\t\t\t\t\taction: 'remove',\n\t\t\t\t\t\t\t\t\t\tcallback: (err: any, data: any) => {\n\n\t\t\t\t\t\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(err)\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif (data) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// uncomment if troubleshooting and comment again before commit\n\t\t\t\t\t\t\t\t\t\t\t\t// console.log({...data, Payload: JSON.parse(data.Payload)})\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (data.StatusCode == 200) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tlet isUnsubscribed: boolean = false\n\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (data.Payload) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisUnsubscribed = JSON.parse(data.Payload).values.status.toLowerCase() === 'unsubscribed'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (data.Payload) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisUnsubscribed = data.Payload.toLowerCase().includes('unsubscribed')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tresolve(isUnsubscribed)\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t\t\t// if successfully set as \"Unsubscribed\", send \"Unsubscribe\" event to Google Analytics\n\t\t\t\t\t\t\t\tif (isUnsubscribed) {\n\t\t\t\t\t\t\t\t\tdataLayer.push({\n\t\t\t\t\t\t\t\t\t\tevent: 'eNews Subscription',\n\t\t\t\t\t\t\t\t\t\tevent_category: 'eNews Subscription',\n\t\t\t\t\t\t\t\t\t\tevent_action: 'Unsubscribe',\n\t\t\t\t\t\t\t\t\t\tevent_label: 'checkout',\n\t\t\t\t\t\t\t\t\t\tevent_value: 1,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tbindElementHandlers() {\n\n\t\tconst footerBtn = $(this.elementIDs.footerBtn)\n\t\tconst lightBoxBtn = $(this.elementIDs.lightBoxBtn)\n\t\tconst homePageBtn = $(this.elementIDs.homePageBtn)\n\t\tconst lightBoxCloseBtn = $(this.elementIDs.lightBoxCloseBtn)\n\t\tconst lightBoxBackground = $(this.elementIDs.lightBoxBackground)\n\t\tconst sweepsBtn = $(this.elementIDs.sweepsBtn)\n\t\tconst landingPageSweepsBtn = $(this.elementIDs.landingPageSweepsBtn)\n\t\tconst checkoutPageEmailInput = $(this.elementIDs.checkoutPageEmailInput)\n\t\tconst checkoutPageSubscribeCheckbox = $(this.elementIDs.checkoutPageSubscribeCheck)\n\n\t\tif (lightBoxCloseBtn.length) {\n\t\t\tlightBoxCloseBtn.on('click', () => {\n\t\t\t\tthis.showLightbox(false)\n\t\t\t})\n\t\t}\n\n\t\tif (lightBoxBackground.length) {\n\t\t\t$(document).on('click', (e) => {\n\t\t\t\tif ($(e.target).is(lightBoxBackground)) {\n\t\t\t\t\tthis.showLightbox(false)\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif (lightBoxBtn.length) {\n\t\t\tlightBoxBtn.on('click', () => {\n\t\t\t\tlet emailValue = ($(this.elementIDs.lightBoxInput).val()).trim()\n\t\t\t\tif (!CommonUtils.validateEmail(emailValue)) {\n\t\t\t\t\talert('Please enter a valid email address.')\n\t\t\t\t} else {\n\t\t\t\t\tthis.callLambda({\n\t\t\t\t\t\temail: emailValue,\n\t\t\t\t\t\tsource: 'lightbox',\n\t\t\t\t\t\tshowLightboxMessage: true,\n\t\t\t\t\t\taction: 'add'\n\t\t\t\t\t})\n\t\t\t\t\tCommonUtils.setCookie('HAHemailID', emailValue, 180)\n\t\t\t\t\tdataLayer.push({\n\t\t\t\t\t\tevent: 'eNews Subscription',\n\t\t\t\t\t\tevent_category: 'eNews Subscription',\n\t\t\t\t\t\tevent_action: 'Subscribe',\n\t\t\t\t\t\tevent_label: 'lightbox',\n\t\t\t\t\t\tevent_value: 1,\n\t\t\t\t\t})\n\t\t\t\t\tSalesforceAbandonedCartUtils.setClientEmail(emailValue)\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif (homePageBtn.length) {\n\t\t\thomePageBtn.on('click', () => {\n\t\t\t\tlet emailValue = ($(this.elementIDs.homePageInput).val()).trim()\n\t\t\t\tif (!CommonUtils.validateEmail(emailValue)) {\n\t\t\t\t\talert('Please enter a valid email address.')\n\t\t\t\t} else {\n\t\t\t\t\tthis.callLambda({\n\t\t\t\t\t\temail: emailValue,\n\t\t\t\t\t\tsource: 'home',\n\t\t\t\t\t\tshowLightboxMessage: false,\n\t\t\t\t\t\taction: 'add'\n\t\t\t\t\t})\n\t\t\t\t\tCommonUtils.setCookie('HAHemailID', emailValue, 180)\n\t\t\t\t\t$('#ftr-email-signup').fadeOut('slow', function () {\n\t\t\t\t\t\t$('#ftr-email-conf').fadeIn('slow')\n\t\t\t\t\t})\n\t\t\t\t\tdataLayer.push({\n\t\t\t\t\t\tevent: 'eNews Subscription',\n\t\t\t\t\t\tevent_category: 'eNews Subscription',\n\t\t\t\t\t\tevent_action: 'Subscribe',\n\t\t\t\t\t\tevent_label: 'home',\n\t\t\t\t\t\tevent_value: 1,\n\t\t\t\t\t})\n\t\t\t\t\tSalesforceAbandonedCartUtils.setClientEmail(emailValue)\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif (sweepsBtn.length) {\n\t\t\tsweepsBtn.on('click', () => {\n\t\t\t\tlet sweepsEmail = ($(this.elementIDs.sweepsEmail).val()).trim()\n\t\t\t\tlet sweepsName = ($(this.elementIDs.sweepsName).val()).trim()\n\t\t\t\tlet sweepsChecked = $(this.elementIDs.sweepsCheck).is(':checked')\n\t\t\t\tlet sweepsBonvoyChecked = $(this.elementIDs.sweepsBonvoyCheck).is(\n\t\t\t\t\t':checked'\n\t\t\t\t)\n\t\t\t\tlet campaign =\n\t\t\t\t\tsweepsBonvoyChecked === true ? '202405' : '202405'\n\t\t\t\tif (this.validateSweeps(sweepsName, sweepsEmail, sweepsChecked, 1)) {\n\t\t\t\t\tthis.callLambda({\n\t\t\t\t\t\temail: sweepsEmail,\n\t\t\t\t\t\tsource: 'lightbox',\n\t\t\t\t\t\tshowLightboxMessage: true,\n\t\t\t\t\t\taction: 'sweepsadd',\n\t\t\t\t\t\tname: sweepsName,\n\t\t\t\t\t\tcampaign: campaign\n\t\t\t\t\t})\n\t\t\t\t\tCommonUtils.setCookie('HAHemailID', sweepsEmail, 180)\n\t\t\t\t\tdataLayer.push({\n\t\t\t\t\t\tevent: 'eNews Subscription',\n\t\t\t\t\t\tevent_category: 'eNews Subscription',\n\t\t\t\t\t\tevent_action: 'Subscribe',\n\t\t\t\t\t\tevent_label: 'sweeps',\n\t\t\t\t\t\tevent_value: 1,\n\t\t\t\t\t})\n\t\t\t\t\tSalesforceAbandonedCartUtils.setClientEmail(sweepsEmail)\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif (landingPageSweepsBtn.length) {\n\t\t\tlandingPageSweepsBtn.on('click', () => {\n\t\t\t\tlet landingPageSweepsEmail = ($(this.elementIDs.landingPageSweepsEmail)\n\t\t\t\t\t.val())\n\t\t\t\t\t.trim()\n\t\t\t\tlet landingPageSweepsName = ($(this.elementIDs.landingPageSweepsName)\n\t\t\t\t\t.val())\n\t\t\t\t\t.trim()\n\t\t\t\tlet landingPageSweepsChecked = $(\n\t\t\t\t\tthis.elementIDs.landingPageSweepsCheck\n\t\t\t\t).is(':checked')\n\t\t\t\tlet landingPageSweepsBonvoyChecked = $(\n\t\t\t\t\tthis.elementIDs.landingPageSweepsBonvoyCheck\n\t\t\t\t).is(':checked')\n\t\t\t\tlet v = ''; //grecaptcha.getResponse();\n\t\t\t\tlet campaign =\n\t\t\t\t\tlandingPageSweepsBonvoyChecked === true\n\t\t\t\t\t\t? '202405'\n\t\t\t\t\t\t: '202405'\n\t\t\t\tif (\n\t\t\t\t\tthis.validateSweeps(\n\t\t\t\t\t\tlandingPageSweepsName,\n\t\t\t\t\t\tlandingPageSweepsEmail,\n\t\t\t\t\t\tlandingPageSweepsChecked,\n\t\t\t\t\t\tv.length\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tthis.callLambda({\n\t\t\t\t\t\temail: landingPageSweepsEmail,\n\t\t\t\t\t\tsource: 'sweeps',\n\t\t\t\t\t\tshowLightboxMessage: true,\n\t\t\t\t\t\taction: 'sweepsadd',\n\t\t\t\t\t\tname: landingPageSweepsName,\n\t\t\t\t\t\tcampaign: campaign,\n\t\t\t\t\t\tcallback: this.hideLandingPageSweepsForm,\n\t\t\t\t\t})\n\t\t\t\t\tCommonUtils.setCookie('HAHemailID', landingPageSweepsEmail, 180)\n\t\t\t\t\tdataLayer.push({\n\t\t\t\t\t\tevent: 'eNews Subscription',\n\t\t\t\t\t\tevent_category: 'eNews Subscription',\n\t\t\t\t\t\tevent_action: 'Subscribe',\n\t\t\t\t\t\tevent_label: 'sweeps landing page',\n\t\t\t\t\t\tevent_value: 1,\n\t\t\t\t\t})\n\t\t\t\t\tSalesforceAbandonedCartUtils.setClientEmail(landingPageSweepsEmail)\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif (footerBtn.length) {\n\t\t\tfooterBtn.on('click', () => {\n\t\t\t\tlet emailValue = ($(this.elementIDs.footerInput).val()).trim()\n\t\t\t\tif (!CommonUtils.validateEmail(emailValue)) {\n\t\t\t\t\tconst inputControl = footerBtn.closest('.label-wrapper')\n\t\t\t\t\tconst errorDisplay = inputControl.find('.error')\n\t\t\t\t\t\n\t\t\t\t\terrorDisplay.text('Please enter a valid email address.')\n\t\t\t\t\tinputControl.addClass('error')\n\t\t\t\t} else {\n\t\t\t\t\tthis.callLambda({\n\t\t\t\t\t\temail: emailValue,\n\t\t\t\t\t\tsource: 'footer',\n\t\t\t\t\t\tshowLightboxMessage: false,\n\t\t\t\t\t\taction: 'add'\n\t\t\t\t\t})\n\t\t\t\t\tCommonUtils.setCookie('HAHemailID', emailValue, 180)\n\t\t\t\t\t$('#ftr-email-signup2').fadeOut('slow', function () {\n\t\t\t\t\t\t$('#ftr-email-conf2').fadeIn('slow')\n\t\t\t\t\t})\n\t\t\t\t\tdataLayer.push({\n\t\t\t\t\t\tevent: 'eNews Subscription',\n\t\t\t\t\t\tevent_category: 'eNews Subscription',\n\t\t\t\t\t\tevent_action: 'Subscribe',\n\t\t\t\t\t\tevent_label: 'footer',\n\t\t\t\t\t\tevent_value: 1,\n\t\t\t\t\t})\n\t\t\t\t\tSalesforceAbandonedCartUtils.setClientEmail(emailValue)\n\t\t\t\t\tSalesforceAbandonedCartUtils.trackCart()\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tif (checkoutPageEmailInput.length && checkoutPageSubscribeCheckbox.length) {\n\t\t\tcheckoutPageEmailInput.on('change', async (event) => {\n\n\t\t\t\tconst email = (event.target as HTMLInputElement).value ||\n\t\t\t\t\tsessionStorage.getItem('emailAddress') ||\n\t\t\t\t\tCommonUtils.getCookie('HAHemailID')\n\n\t\t\t\tconst { result }: any = await new Promise((resolve, _reject) => {\n\t\t\t\t\tthis.callLambda({\n\t\t\t\t\t\temail: email,\n\t\t\t\t\t\tsource: 'checkout',\n\t\t\t\t\t\tshowLightboxMessage: false,\n\t\t\t\t\t\taction: 'status',\n\t\t\t\t\t\tcallback: (_err: any, data: any) => resolve(data)\n\t\t\t\t\t})\n\t\t\t\t})\n\n\t\t\t\tconst emailStatus = result\n\t\t\t\tconst agreeToReceiveEmails = (document.querySelector(this.elementIDs.checkoutPageSubscribeCheck) as HTMLInputElement).checked\n\n\t\t\t\tthis.toggleEmailStatusInSalesforce(email, emailStatus, agreeToReceiveEmails)\n\t\t\t})\n\t\t}\n\n\t\tif (checkoutPageSubscribeCheckbox.length) {\n\t\t\tcheckoutPageSubscribeCheckbox.on('change', async (event) => {\n\n\t\t\t\tconst email = (document.querySelector(this.elementIDs.checkoutPageEmailInput) as HTMLInputElement).value ||\n\t\t\t\t\tsessionStorage.getItem('emailAddress') ||\n\t\t\t\t\tCommonUtils.getCookie('HAHemailID')\n\n\t\t\t\tconst { result }: any = await new Promise((resolve, _reject) => {\n\t\t\t\t\tthis.callLambda({\n\t\t\t\t\t\temail: email,\n\t\t\t\t\t\tsource: 'checkout',\n\t\t\t\t\t\tshowLightboxMessage: false,\n\t\t\t\t\t\taction: 'status',\n\t\t\t\t\t\tcallback: (_err: any, data: any) => resolve(data)\n\t\t\t\t\t})\n\t\t\t\t})\n\n\t\t\t\tconst emailStatus = result\n\t\t\t\tconst agreeToReceiveEmails = (event.target as HTMLInputElement).checked\n\n\t\t\t\tthis.toggleEmailStatusInSalesforce(email, emailStatus, agreeToReceiveEmails)\n\t\t\t})\n\t\t}\n\t}\n}\n\ninterface ESignUpOptions {\n\n\t/**\n\t * SF subscription API url.\n\t */\n\tsfSubscriptionApi: string,\n\n\t/**\n\t * A piece of the payload that is sent to AWS Lambda to communicate with Salesforce.\n\t */\n\tlambdaPayload: {\n\t\twebsite: string,\n\t\tcampaign: string,\n\t\trefURL: string,\n\t\tcurrURL: string\n\t},\n\n\t/**\n\t * Options for the lightbox that is shown in some situations.\n\t */\n\tdialogObj: {\n\t\tmainTxt: string,\n\t\tsecondaryTxt: string,\n\t\tbtnTxt: string\n\t},\n\n\t/**\n\t * Query parameters to be considered.\n\t */\n\tlbHideParams: Array,\n\n\t/**\n\t * The name of the cookie to be used to store the client email status.\n\t */\n\tcookieValue: string,\n\n\t/**\n\t * HTML elements that are used in the process of subscribing a client email.\n\t */\n\telementIDs: ElementIDs\n}\n\ninterface LambdaOptions {\n\n\t/**\n\t * The email of the client.\n\t */\n\temail: string\n\n\t/**\n\t * The page/component where the client sets the email.\n\t */\n\tsource: string\n\n\t/**\n\t * The action to be done in the lambda function.\n\t */\n\taction: 'status' | 'add' | 'sweepsadd' | 'remove'\n\n\t/**\n\t * If true, the \"thank you for subscribing\" lightbox will be shown.\n\t */\n\tshowLightboxMessage?: boolean\n\n\t/**\n\t * A name that identifies the promotion.\n\t * Normally it's the sweeps promotion name and it's defined by an HTML element content.\n\t */\n\tname?: string\n\n\t/**\n\t * Identifies the campaign if the subscription belongs to one.\n\t * It's normally used with sweeps promotions.\n\t */\n\tcampaign?: string\n\n\t/**\n\t * A callback function to be called after the Lambda function request is done.\n\t */\n\tcallback?: (err: any, data: any) => any\n}\n\ninterface ElementIDs {\n\tlightBoxInput: string;\n\tlightBoxBtn: string;\n\tfooterInput: string;\n\tfooterBtn: string;\n\thomePageInput: string;\n\thomePageBtn: string;\n\tlightBoxBackground: string;\n\tlightBoxCloseBtn: string;\n\tsweepsBtn: string;\n\tsweepsEmail: string;\n\tsweepsName: string;\n\tsweepsCheck: string;\n\tsweepsBonvoyCheck: string;\n\tlandingPageSweepsBtn: string;\n\tlandingPageSweepsEmail: string;\n\tlandingPageSweepsName: string;\n\tlandingPageSweepsBonvoyCheck: string;\n\tlandingPageSweepsCheck: string;\n\tcheckoutPageEmailInput: string;\n\tcheckoutPageSubscribeCheck: string;\n}","jQuery(function () {\n\t// Forms animations and in line validation\n\tconst inputWrappers = document.querySelectorAll('.label-wrapper')\n\n\tfunction toggleClassOnFocus(e) {\n\t\tconst parent = e.target.parentElement\n\t\tif (e.type === 'focus' || (e.type === 'input' && e.target.value === '')) {\n\t\t\tparent.classList.add('focused')\n\t\t} else if (e.type === 'blur' && e.target.value === '') {\n\t\t\tparent.classList.remove('focused')\n\t\t}\n\t}\n\n\tfunction clearError(e) {\n\t\tlet inputControl = e.target.parentElement\n\t\tlet errorDisplay = inputControl.querySelector('.error') || inputControl.parentElement.querySelector('.span-err')\n\t\tif (e.target.type === 'email') {\n\t\t\tif (CommonUtils.validateEmail(e.target.value)) {\n\t\t\t\terrorDisplay.innerText = ''\n\t\t\t\tinputControl.classList.remove('error')\n\t\t\t}\n\t\t} else {\n\t\t\terrorDisplay.innerText = ''\n\t\t\tinputControl.classList.remove('error')\n\t\t}\n\t}\n\tsetTimeout(() => {\n\t\tinputWrappers.forEach(wrapper => {\n\t\t\tconst inputs = wrapper.querySelectorAll('input[type=\"text\"], input[type=\"email\"], input[type=\"tel\"], input[type=\"search\"], input[type=\"number\"], select, textarea')\n\n\t\t\tinputs.forEach((input: HTMLInputElement) => {\n\t\t\t\tinput.addEventListener('focus', toggleClassOnFocus)\n\t\t\t\tinput.addEventListener('blur', toggleClassOnFocus)\n\t\t\t\tinput.addEventListener('input', clearError)\n\t\t\t\tif (input.value !== '') {\n\t\t\t\t\tconst parent = input.parentElement\n\t\t\t\t\tparent.classList.add('focused')\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t}, 500)\n\t// Replace email input values with trimmed values\n\t$('input[type=\\'email\\']').on('blur', function () {\n\t\tif ((this).value) {\n\t\t\tvar trimmedEmailVal = (this).value.trim();\n\t\t\t(this).value = trimmedEmailVal\n\t\t}\n\t});\n\t($('.fancybox')).fancybox({\n\t\topenEffect: 'elastic',\n\t\topenSpeed: 350,\n\t\tcloseEffect: 'elastic',\n\t\tcloseSpeed: 350,\n\t\tnextEffect: 'fade',\n\t\tnextSpeed: 200,\n\t\tloop: false\n\t});\n\t($('.iframe')).fancybox({\n\t\ttype: 'iframe',\n\t\tmaxWidth: 500,\n\t\tfitToView: false,\n\t\twidth: '90%',\n\t\tautoSize: false,\n\t\topenEffect: 'elastic',\n\t\topenSpeed: 350,\n\t\tcloseEffect: 'elastic',\n\t\tcloseSpeed: 350\n\t});\n\t($('.inline')).fancybox({\n\t\topenEffect: 'elastic',\n\t\topenSpeed: 350,\n\t\tcloseEffect: 'elastic',\n\t\tcloseSpeed: 350,\n\t\tnextEffect: 'fade',\n\t\tnextSpeed: 200,\n\t\tscrolling: 'no',\n\t\tautoSize: true\n\t});\n\t($('#a_lightbox')).fancybox({ autoSize: true, scrolling: 'no' })\n})\n\n//Fancybox Lightbox End\n//dilogBox\n//@Author: Adarsh Kurudi\nfunction dilogBox(dialogObj: DialogObj): void {\n\tvar template = {\n\t\touterWrap: (dialogObj.pointsUnavailable) ? '
' : '
',\n\t\tcloseBtn: '

Close

',\n\t\tinnerMain: (dialogObj.pointsUnavailable) ? '

' : '

',\n\t\tinnerSecondary: '

',\n\t\tconfirmBtn: '
'\n\t}\n\tif (!document.getElementById('dialogbox')) {\n\t\t$(template.outerWrap).appendTo('body')\n\t} else {\n\t\tdocument.getElementById('dialogbox').style.display = ''\n\t\tdocument.getElementById('dialogbox').style.visibility = 'visible'\n\t}\n\t$('.confirmation').html(template.closeBtn + template.innerMain + template.innerSecondary + template.confirmBtn)\n\t$('#dialogMain').text(dialogObj.mainTxt)\n\t$('#dialogSecondary').text(dialogObj.secondaryTxt)\n\t$('#dialogBtn').val(dialogObj.btnTxt)\n\tHAHAccessibility.trapFocus({\n\t\tcontainer: '.signupConfirmationFocusTrap',\n\t\tcloseElement: '#dialogBtn',\n\t\tfirstElementToFocus: '#dialogBtn'\n\t})\n\t$('#dialogbox').on('click', function () {\n\t\t$(this).css({\n\t\t\t'visibility': 'hidden',\n\t\t\t'display': 'none\t'\n\t\t})\n\t})\n}\n//End dilogBox\n\n$(function () {\n\t//Include for JQuery version 1.5 and below\n\tjQuery.expr.pseudos.focus = function (elem: any) {\n\t\treturn elem === document.activeElement && (elem.type || elem.href)\n\t}\n\t$('form').on('keypress', function (e) {\n\t\tif (e.key === 'Enter') {\n\t\t\t//alert($(\"#tSearchString\").is(\":focus\"));\n\t\t\tif ($('#tSearchString').is(':focus')) {\n\t\t\t\t$('#searchSubmit').trigger('click')\n\t\t\t\treturn false\n\t\t\t} else if ($('#sweepsName, #sweepsEmail, #sweepsCheck, #sweepsBonvoyCheck').is(':focus')) {\n\t\t\t\t$('#sweepsBtn').trigger('click')\n\t\t\t\treturn false\n\t\t\t} else if ($('#landingPageSweepsName, #landingPageSweepsEmail, #landingPageSweepsCheck, #landingPageSweepsBonvoyCheck, #recaptcha-anchor').is(':focus')) {\n\t\t\t\t$('#landingPageSweepsBtn').trigger('click')\n\t\t\t\treturn false\n\t\t\t} else if ($('#emailAddress1').is(':focus')) {\n\t\t\t\t$('#emailAddress1').trigger('blur')\n\t\t\t\t$('#emailAddress1btn').trigger('click')\n\t\t\t\treturn false\n\t\t\t} else if ($('#emailAddress2').is(':focus')) {\n\t\t\t\t$('#emailAddress2').trigger('blur')\n\t\t\t\t$('#emailAddress2btn').trigger('click')\n\t\t\t\treturn false\n\t\t\t} else if ($('#searchUI_tbProductName').is(':focus')) {\n\t\t\t\tdoSearch()\n\t\t\t\treturn false\n\t\t\t} else if ($('#validationNbr').is(':focus')) {\n\t\t\t\t$('#validationNbr').trigger('blur')\n\t\t\t\t$('#btn_apply').trigger('click')\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t})\n})\n\n// $(function () {\n// \t$(\"img[id^='lbImage']\").on(\"error\", function (e) {\n// \t\tCommonUtils.logError('Missing image', `Missing image - ${e.target.alt} - ${e.target.src}`);\n// \t});\t\n// });\n\n// On \"DOMContentLoaded\" (before the \"load\" event), calls \"HAHAccessibility.init()\" \n$(() => HAHAccessibility.init())\n","class SalesforceAbandonedCartUtils {\n\tstatic clientEmail = ''\n\tstatic catalogId = ''\n\tstatic subscriberKey = ''\n\tstatic cartOrOrderData = []\n\t/**\n\t * Defines if should log messages in the console.\n\t */\n\tstatic debug = false\n\t/**\n\t * Should be called as soon as possible.\n\t */\n\tstatic setOrganizationId(salesforceOrganizationId: string) {\n\t\t_etmc.push(['setOrgId', salesforceOrganizationId])\n\t\tif (this.debug) {\n\t\t\tconsole.log(`Successfully set the organization id: ${salesforceOrganizationId}`)\n\t\t}\n\t}\n\n\t/**\n\t * Should be called as soon as possible.\n\t */\n\tstatic setCatalogId(catalogId: string) {\n\t\tthis.catalogId = catalogId\n\t\tif (this.debug) {\n\t\t\tif (this.catalogId) {\n\t\t\t\tconsole.log(`Successfully set the catalog id: ${this.catalogId}`)\n\t\t\t} else {\n\t\t\t\tconsole.log('Couldn\\'t set catalog id because it is not valid.')\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Should be called after the client enters his email in:\n\t * - The email subscription lightbox\n\t * - The email subscription in the footer\n\t * - The email subscription in the checkout page\n\t */\n\tstatic setClientEmail(email: string) {\n\t\tthis.clientEmail = email?.trim()\n\t\tif (this.clientEmail) {\n\t\t\tconsole.log(`Successfully set the client email: ${this.clientEmail}`)\n\t\t\tSalesforceAbandonedCartUtils.setSubscriberKey()\n\t\t} else if (this.debug) {\n\t\t\tconsole.log('Couldn\\'t set client email because it is not valid.')\n\t\t}\n\n\t}\n\n\t/**\n\t * Should be called after `setCatalogId` and `setClientEmail`.\n\t */\n\tprivate static setSubscriberKey() {\n\n\t\tif (this.clientEmail && this.catalogId) {\n\t\t\tthis.subscriberKey = `${this.catalogId.toLowerCase()}_${this.clientEmail}`\n\t\t\tif (this.debug) {\n\t\t\t\tconsole.log(`Successfully set subscriber key: ${this.subscriberKey}`)\n\t\t\t}\n\t\t} else if (this.debug) {\n\t\t\tconsole.log('Couldn\\'t set subscriber key because client email or catalog id is not valid.')\n\t\t}\n\t}\n\n\t/**\n\t * Should be called for each new product added to the cart (after clicking \"Add to cart\").\n\t */\n\tstatic addCartOrOrderData({ item, quantity, price, salePrice: salePrice, uniqueId: uniqueId }: {\n\t\titem: any\n\t\tquantity: any\n\t\tprice: any\n\t\tsalePrice?: any\n\t\tuniqueId: any\n\t}) {\n\t\tconst product = {\n\t\t\titem: item,\n\t\t\tquantity: quantity,\n\t\t\tprice: price,\n\t\t\tsale_price: salePrice ?? undefined,\n\t\t\tunique_id: uniqueId\n\t\t}\n\n\t\tconst cartItem = this.cartOrOrderData.find((el) => el.unique_id === uniqueId)\n\n\t\tif(cartItem) {\n\t\t\tcartItem.quantity = (Number(cartItem.quantity) + Number(quantity)).toString()\n\t\t} else {\n\t\t\tthis.cartOrOrderData.push(product)\n\t\t}\n\n\t\tif (this.debug) {\n\t\t\tconsole.log('Sucessfully added to the cart:\\n', product)\n\t\t}\n\t}\n\n\t/**\n\t * Sends the cart data to Salesforce.\n\t */\n\tstatic trackCart() {\n\t\tif (this.subscriberKey) {\n\t\t\t_etmc.push(['setUserInfo', { email: this.subscriberKey }])\n\t\t\tif (this.cartOrOrderData.length > 0 && this.cartOrOrderData.length < 11) {\n\t\t\t\t_etmc.push(['trackCart', { cart: this.cartOrOrderData }])\n\t\t\t} else {\n\t\t\t\t_etmc.push(['trackCart', { clear_cart: true }])\n\t\t\t}\n\n\t\t\tif (this.debug) {\n\t\t\t\tconsole.log(`Successfully tracked the cart for ${this.subscriberKey} with:\\n`, this.cartOrOrderData)\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.debug) {\n\t\t\t\tconsole.log(`Couldn't track cart because subscriber key is not valid: ${this.subscriberKey}.`)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Should be called if the order is completed by the client.\n\t */\n\tstatic trackConversion() {\n\t\tif (this.subscriberKey) {\n\t\t\t_etmc.push(['setUserInfo', { email: this.subscriberKey }])\n\t\t\t_etmc.push(['trackPageView'])\n\t\t\t_etmc.push(['trackConversion', { cart: this.cartOrOrderData }])\n\t\t\t_etmc.push(['trackCart', { 'clear_cart': true }])\n\n\t\t\tif (this.debug) {\n\t\t\t\tconsole.log(`Successfully tracked the conversion for ${this.subscriberKey} with:\\n`, this.cartOrOrderData)\n\t\t\t}\n\t\t} else {\n\t\t\tif (this.debug) {\n\t\t\t\tconsole.log(`Couldn't track conversion because subscriber key is not valid: ${this.subscriberKey}.`)\n\t\t\t}\n\t\t}\n\t}\n}","function doSearch(): void {\n\ttry {\n\t\tconst searchString: string = (document.getElementById('OCForm1')).searchUI_tbProductName.value\n\t\tconst cleanedSearchString: string = searchString.replace('(', '').replace(')', '')\n\t\tconst searchInput = document.getElementById('searchUI_tbProductName')\n\t\tif (searchString !== '' && searchString !== 'I\\'m looking for...') {\n\t\t\tconst searchButton = $(\"#btn_Search-Search\")\n\t\t\tsearchButton.text(\"\").addClass(\"loader-light\")\n\t\t\tconst encodedSearchString: string = encodeURIComponent(cleanedSearchString)\n\t\t\twindow.location.href = `search.aspx?&posting=TRUE&actionType=CUSTOMSEARCH&customSearchParams=KEYWORDS|${encodedSearchString}&customSearchParamsSearchString=${encodedSearchString}&from=QUICKSEARCH`\n\t\t} else {\n\t\t\tconst inputControl = searchInput.parentElement\n\t\t\tconst errorDisplay = inputControl.querySelector('.error') as HTMLElement\n\t\t\terrorDisplay.innerText = 'Please enter a product name'\n\t\t\tinputControl.classList.add('error')\n\t\t}\n\t} catch (e) { }\n}\n\nfunction doQuickSearch(searchPath: string): void {\n\ttry {\n\t\tconst pageSize: number = 27\n\t\tconst searchString: string = (document.getElementById('OCForm1')).tSearchString.value\n\t\tconst cleanedSearchString: string = searchString.replace(/[\\(\\)']/g, '') // Use a regular expression to replace all '(', ')', and \"'\" characters.\n\t\tconst searchInput = document.getElementById('tSearchString')\n\t\tif (searchString !== '') {\n\t\t\tconst searchButton = $(\"#searchSubmit\")\n\t\t\tsearchButton.text(\"\").addClass(\"loader-light\")\n\t\t\tconst encodedSearchString: string = encodeURIComponent(cleanedSearchString)\n\t\t\twindow.location.href = `${searchPath}search.aspx?&posting=TRUE&actionType=CUSTOMSEARCH&customSearchParams=KEYWORDS|${encodedSearchString}&customSearchParamsSearchString=${encodedSearchString}&from=QUICKSEARCH&pageSize=${pageSize}`\n\t\t} else {\n\t\t\tconst inputControl = searchInput.parentElement\n\t\t\tconst errorDisplay = inputControl.querySelector('.error') as HTMLElement\n\t\t\terrorDisplay.innerText = 'Please enter a product name'\n\t\t\tinputControl.classList.add('error')\n\t\t}\n\t} catch (e) { }\n}\n","/**\n * @description This is class has static methods to deal with different situation in the site.\n */\nclass CommonUtils {\n\n\t/**\n\t * @description Transfoms a number into a USD currency string.\n\t * @example $1,000.00\n\t */\n\tstatic toUSD(num: number): string {\n\t\tif (isNaN(num)) return ''\n\t\treturn new Intl.NumberFormat('en-US', {\n\t\t\tstyle: 'currency',\n\t\t\tcurrency: 'USD'\n\t\t}).format(num)\n\t}\n\n\t/**\n\t * @description Validates the email syntax by using regex.\n\t */\n\tstatic validateEmail(invalue: string): boolean {\n\t\tvar regex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(\\.[a-zA-Z]{2,})+$/\n\t\tvar valid = regex.test(invalue)\n\t\treturn valid\n\t}\n\n\t/**\n\t * @description Validates Canada's zip code syntax by using regex.\n\t */\n\tstatic isValidCaZipCode(value: string): boolean {\n\t\tvar re = /^[ABCEGHJKLMNPRSTVXYabceghjklmnprstvxy]{1}\\d{1}[A-Za-z]{1} *\\d{1}[A-Za-z]{1}\\d{1}$/\n\t\treturn (re.test(value))\n\t}\n\n\t/**\n\t * @description Validates United States's zip code syntax by using regex.\n\t */\n\tstatic isValidUsZipCode(value: string): boolean {\n\t\tvar re = /^\\d{5}([\\-]\\d{4})?$/\n\t\treturn re.test(value)\n\t}\n\n\t/**\n\t * @description Creates a cookie in the browser. If `days` are not set, it won't expire.\n\t */\n\tstatic createCookie(name: string, value: string, days?: number): void {\n\t\tvar expires = ''\n\t\tif (days) {\n\t\t\tvar date = new Date()\n\t\t\tdate.setTime(date.getTime() + days * 24 * 60 * 60 * 1000)\n\t\t\texpires = `; expires=${date.toUTCString()}`\n\t\t} else expires = ''\n\t\tdocument.cookie = `${name}=${value}${expires}; path=/`\n\t}\n\n\t/**\n\t * @description Erases a cookie in the browser.\n\t */\n\tstatic eraseCookie(name: string): void {\n\t\tCommonUtils.createCookie(name, '', -1)\n\t}\n\n\t/**\n\t * @description Reads a cookie from the browser.\n\t */\n\tstatic readCookie(name: string): string {\n\t\tvar nameEQ = `${name}=`\n\t\tvar ca = document.cookie.split(';')\n\t\tfor (let i = 0; i < ca.length; i++) {\n\t\t\tvar c = ca[i]\n\t\t\twhile (c.charAt(0) === ' ') {\n\t\t\t\tc = c.substring(1, c.length)\n\t\t\t\tif (c.indexOf(nameEQ) === 0) {\n\t\t\t\t\treturn c.substring(nameEQ.length, c.length)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ''\n\t}\n\n\t/**\n\t * @description Transforms a number / string into a currency string with (or without) a minus sign.\n\t * @examples \n\t * - -$1,000.00 \n\t * - $1,000.00\n\t */\n\tstatic formatCurrency(price: number | string): string {\n\t\tprice = price.toString().replace(/\\$|\\,/g, '')\n\t\tif (isNaN(Number(price))) price = '0'\n\t\tvar sign = Number(price) == (price = Math.abs(Number(price)))\n\t\tprice = Math.floor(price * 100 + 0.50000000001)\n\t\tvar cents: number | string = price % 100\n\t\tprice = Math.floor(price / 100).toString()\n\t\tif (cents < 10) cents = `0${cents}`\n\t\tfor (var i = 0; i < Math.floor((price.length - (1 + i)) / 3); i++)\n\t\t\tprice = `${price.substring(0, price.length - (4 * i + 3))},${price.substring(price.length - (4 * i + 3))}`\n\t\treturn `${(sign ? '' : '-')}$${price}.${cents}`\n\t}\n\n\t/**\n\t * @description Transforms a number / string into a string representing a number.\n\t */\n\tstatic formatPoints(points: number | string): string {\n\t\tpoints = points.toString().replace(/\\$|\\,/g, '')\n\t\tfor (var i = 0; i < Math.floor((points.length - (1 + i)) / 3); i++)\n\t\t\tpoints = `${points.substring(0, points.length - (4 * i + 3))},${points.substring(points.length - (4 * i + 3))}`\n\t\treturn points\n\t}\n\n\t/**\n\t * @description Used to read XML response from the back-end.\n\t */\n\tstatic getXMLDataSetTableCount(dsName: string, xmlString: string): number {\n\t\tvar returnValue = -1\n\t\tvar datasetStartIndex = xmlString.toLowerCase().indexOf(`<${dsName.toLowerCase()}>`)\n\t\tvar datasetEndIndex = xmlString.toLowerCase().indexOf(``)\n\t\tvar fieldStartIndex = -1\n\t\tvar fieldEndIndex = -1\n\t\tif (datasetStartIndex > -1 && datasetEndIndex > -1) {\n\t\t\tfieldStartIndex = xmlString.toLowerCase().indexOf(''.toLowerCase(), datasetStartIndex)\n\t\t\tif (fieldStartIndex > -1 && fieldStartIndex < datasetEndIndex) {\n\t\t\t\tfieldStartIndex = `${fieldStartIndex}`.toLowerCase().length\n\t\t\t\tfieldEndIndex = xmlString.toLowerCase().indexOf(''.toLowerCase(), fieldStartIndex)\n\t\t\t\tif (fieldEndIndex > -1 && fieldEndIndex < datasetEndIndex) {\n\t\t\t\t\treturnValue = parseInt(\n\t\t\t\t\t\txmlString.substring(fieldStartIndex, fieldEndIndex)\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn returnValue\n\t}\n\n\t/**\n\t * @description Used to read XML response from the back-end.\n\t */\n\tstatic getXMLDataTableRowCount(dsName: string, dtIndex: number, xmlString: string): number {\n\t\tvar returnValue = -1\n\t\tvar datasetStartIndex = xmlString.toLowerCase().indexOf(`<${dsName.toLowerCase()}>`)\n\t\tvar datasetEndIndex = xmlString.toLowerCase().indexOf(``)\n\t\tvar fieldStartIndex = -1\n\t\tvar fieldEndIndex = -1\n\t\tif (datasetStartIndex > -1 && datasetEndIndex > -1) {\n\t\t\t//1\n\t\t\tfieldStartIndex = xmlString.toLowerCase().indexOf((``).toLowerCase(), datasetStartIndex)\n\t\t\tif (fieldStartIndex > -1 && fieldStartIndex < datasetEndIndex) {\n\t\t\t\tfieldStartIndex = fieldStartIndex + (``).toLowerCase().length\n\t\t\t\tfieldEndIndex = xmlString.toLowerCase().indexOf((``).toLowerCase(), fieldStartIndex)\n\t\t\t\tif (fieldEndIndex > -1 && fieldEndIndex < datasetEndIndex) {\n\t\t\t\t\treturnValue = parseInt(\n\t\t\t\t\t\txmlString.substring(fieldStartIndex, fieldEndIndex)\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn returnValue\n\t}\n\n\t/**\n\t * @description Used to read XML response from the back-end.\n\t */\n\tstatic getXMLDataFieldValue(dsName: string, dtIndex: number, rowIndex: number, fieldName: string, xmlString: string): string {\n\t\tvar returnValue = ''\n\t\tvar datasetStartIndex = xmlString.toLowerCase().indexOf(`<${dsName.toLowerCase()}>`)\n\t\tvar datasetEndIndex = xmlString.toLowerCase().indexOf(``)\n\t\tvar fieldStartIndex = -1\n\t\tvar fieldEndIndex = -1\n\t\tif (datasetStartIndex > -1 && datasetEndIndex > -1) {\n\t\t\tfieldStartIndex = xmlString\n\t\t\t\t.toLowerCase().indexOf((``).toLowerCase(), datasetStartIndex)\n\t\t\tif (fieldStartIndex > -1 && fieldStartIndex < datasetEndIndex) {\n\t\t\t\tfieldStartIndex = fieldStartIndex + (``).toLowerCase().length\n\t\t\t\tfieldEndIndex = xmlString.toLowerCase().indexOf((``).toLowerCase(), fieldStartIndex)\n\t\t\t\tif (fieldEndIndex > -1 && fieldEndIndex < datasetEndIndex) {\n\t\t\t\t\treturnValue = xmlString.substring(fieldStartIndex, fieldEndIndex)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn returnValue\n\t}\n\n\t/**\n\t * @description Used to read XML response from the back-end.\n\t */\n\tstatic getXMLTagValue(tagName: string, xmlString: string): string {\n\t\tlet tagValue = ''\n\t\tconst tagStartIndex = xmlString.toLowerCase().indexOf(`<${tagName.toLowerCase()}>`)\n\t\tconst tagEndIndex = xmlString.toLowerCase().indexOf(``)\n\t\tif (tagStartIndex > -1 && tagStartIndex < tagEndIndex) {\n\t\t\ttagValue = xmlString.substring(tagStartIndex + tagName.length + 2, tagEndIndex)\n\t\t}\n\t\treturn tagValue\n\t}\n\n\t/**\n\t * @description Removes bad numbers from a string. \n\t */\n\tstatic removeBadNumbers(inNumber: string): string {\n\t\tvar tmpNumber = ''\n\t\tfor (var i = 0; i < inNumber.length; i++) {\n\t\t\tvar tmpStr = inNumber.substring(i, i + 1)\n\t\t\tif (tmpStr === '-' || tmpStr === ' ' || isNaN(Number(tmpStr))) {\n\t\t\t} else {\n\t\t\t\ttmpNumber = tmpNumber + inNumber.substring(i, i + 1)\n\t\t\t}\n\t\t}\n\t\treturn tmpNumber\n\t}\n\n\t/**\n\t * @description Sets a cookie in the browser.\n\t */\n\tstatic setCookie(c_name: string, value: string, exdays?: number): void {\n\t\tvar exdate = new Date()\n\t\texdate.setDate(exdate.getDate() + exdays)\n\t\tvar c_value = `${encodeURIComponent(value)} ${(exdays === null ? '' : `; expires=${exdate.toUTCString()}`)};path = /`\n\t\tdocument.cookie = `${c_name}=${c_value}`\n\t}\n\n\t/**\n\t * @description Gets a cookie from the browser.\n\t */\n\tstatic getCookie(c_name: string): string | null {\n\t\tvar c_value = document.cookie\n\t\tvar c_start = c_value.indexOf(` ${c_name}=`)\n\t\tif (c_start === -1) {\n\t\t\tc_start = c_value.indexOf(`${c_name}=`)\n\t\t}\n\t\tif (c_start === -1) {\n\t\t\tc_value = null\n\t\t} else {\n\t\t\tc_start = c_value.indexOf('=', c_start) + 1\n\t\t\tvar c_end = c_value.indexOf(';', c_start)\n\t\t\tif (c_end === -1) {\n\t\t\t\tc_end = c_value.length\n\t\t\t}\n\t\t\tc_value = decodeURIComponent(c_value.substring(c_start, c_end))\n\t\t}\n\t\treturn c_value\n\t}\n\n\t/**\n\t * @description Toggles the loader visibility.\n\t */\n\tstatic showHideLoader(action: string, productIndex: number): void {\n\t\tvar loader = document.getElementById(`loader${productIndex}`)\n\t\tvar atc = document.getElementById(`ATC${productIndex}`)\n\t\tif (action === 'show') {\n\t\t\ttry {\n\t\t\t\tloader.style.display = ''\n\t\t\t\tloader.style.visibility = 'visible'\n\t\t\t\tatc.style.display = 'none'\n\t\t\t\tatc.style.visibility = 'hidden'\n\t\t\t} catch (e) { }\n\t\t} else if (action === 'hide') {\n\t\t\ttry {\n\t\t\t\tloader.style.display = 'none'\n\t\t\t\tloader.style.visibility = 'hidden'\n\t\t\t\tatc.style.display = ''\n\t\t\t\tatc.style.visibility = 'visible'\n\t\t\t} catch (e) { }\n\t\t}\n\t}\n\n\t/**\n\t * @description Shows an HTML element based on a given HTML selector with specified display style.\n\t * @param sel - The HTML selector of the element to show.\n\t * @param elementIndex - Optional index if the selector matches multiple elements (default is 0).\n\t * @param display - Optional display style ('block' or 'flex') to apply to the element (default is 'block').\n\t */\n\tstatic showElement(sel: string, elementIndex: number = 0, display: 'block' | 'flex' = 'block'): void {\n\t\tsel = sel.replace('#', '');\n\t\tlet element: any = document.getElementById(sel);\n\t\tif (element) {\n\t\t\tif (element.length === undefined || element.nodeName === 'SELECT') {\n\t\t\t\telement.style.display = display;\n\t\t\t\telement.style.visibility = 'visible';\n\t\t\t} else {\n\t\t\t\tif (element[elementIndex]) {\n\t\t\t\t\telement[elementIndex].style.display = display;\n\t\t\t\t\telement[elementIndex].style.visibility = 'visible';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @description Hides an HTML element based on a given HTML selector.\n\t */\n\tstatic hideElement(sel: string, elementIndex: number = 0): void {\n\t\tsel = sel.replace('#', '')\n\t\tlet element: any = document.getElementById(sel)\n\t\tif (element) {\n\t\t\tif (element.length === undefined || element.nodeName === 'SELECT') {\n\t\t\t\telement.style.display = 'none'\n\t\t\t\telement.style.visibility = 'hidden'\n\t\t\t} else {\n\t\t\t\telement[elementIndex].style.display = 'none'\n\t\t\t\telement[elementIndex].style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @description Gets the response of a XMLHttpRequest.\n\t */\n\tstatic getAjaxObject(): boolean {\n\t\tvar returnValue: any = false\n\t\ttry {\n\t\t\treturnValue = new XMLHttpRequest()\n\t\t} catch (trymicrosoft) {\n\t\t\ttry {\n\t\t\t\treturnValue = new ActiveXObject('Msxml2.XMLHTTP')\n\t\t\t} catch (othermicrosoft) {\n\t\t\t\ttry {\n\t\t\t\t\treturnValue = new ActiveXObject('Microsoft.XMLHTTP')\n\t\t\t\t} catch (failed) {\n\t\t\t\t\talert(failed.message)\n\t\t\t\t\treturnValue = false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn returnValue\n\t}\n\n\t/**\n\t * @description Sends error to Google Analytics.\n\t */\n\tstatic trackError(eventCategory: string, eventAction: string, eventLabel: string, eventParams?: any): void {\n\t\tdataLayer.push({\n\t\t\tevent: 'trackErrorEvent',\n\t\t\tevent_category: eventCategory,\n\t\t\tevent_action: eventAction,\n\t\t\tevent_label: eventLabel,\n\t\t\tevent_value: 1\n\t\t})\n\t\tif (typeof eventParams === 'object') {\n\t\t\tif (eventParams.event === 'placePointsOrderError') {\n\t\t\t\tdataLayer.push({\n\t\t\t\t\tevent: eventParams.event,\n\t\t\t\t\tdetail: {\n\t\t\t\t\t\temail: window.btoa(encodeURIComponent(eventParams.email)),\n\t\t\t\t\t\tbonvoyEmail: window.btoa(encodeURIComponent(eventParams.bonvoyEmail)),\n\t\t\t\t\t\tbonvoyNumber: window.btoa(encodeURIComponent(eventParams.bonvoyNumber)),\n\t\t\t\t\t\tpointsToRedeem: eventParams.pointsToRedeem,\n\t\t\t\t\t\terrorMessage: eventParams.errorMessage\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @description Sends error to API.\n\t */\n\tstatic logError(errorType: string, errorMsg: string): void {\n\t\ttry {\n\t\t\tfetch(errorLogAPIURL, {\n\t\t\t\tmethod: 'POST',\n\t\t\t\tmode: 'no-cors',\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-Type': 'text/plain',\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\t'brand': 'HB',\n\t\t\t\t\t'page': window.location.href,\n\t\t\t\t\t'errorType': errorType,\n\t\t\t\t\t'errorMsg': errorMsg\n\t\t\t\t})\n\t\t\t})\n\t\t} catch (error) {\n\t\t\tconsole.log(error)\n\t\t}\n\t}\n\n\t/**\n\t * @description Toggles the purchase type (can be \"points\" or \"cash\").\n\t */\n\tstatic swapPurchaseType(event: any): void {\n\t\tevent.preventDefault()\n\t\t$(this)\n\t\t\t.addClass('opened')\n\t\t\t.attr('tabindex', '-1')\n\t\t\t.trigger('focus')\n\t\t\t.attr('aria-expanded', 'true')\n\t\t\t.removeClass('closed')\n\t\t\t.next('div:hidden')\n\t\t\t.slideDown('fast')\n\t\t\t.siblings('div:visible')\n\t\t\t.slideUp('fast')\n\t\t\t.prev()\n\t\t\t.removeClass('opened')\n\t\t\t.addClass('closed')\n\t\t\t.attr('tabindex', '0')\n\t\t\t.attr('aria-expanded', 'false')\n\t}\n\n\t\t/**\n\t * Parses a string of XML data and returns its text content.\n\t *\n\t * @param {string} string - The XML string to parse.\n\t * @returns {string | null} The text content of the XML string, or null if the XML string has no text content.\n\t */\n\tstatic parseXMLData(string: string): string | null {\n\t\tvar parser = new DOMParser()\n\t\tvar xmlDoc = parser.parseFromString('' + string + '', 'text/xml')\n\t\tvar decodedContent = xmlDoc.documentElement.textContent\n\t\treturn decodedContent\n\t}\n\n\t/**\n\t * @description Get category values from localStorage for a kit/add-on item that does not belong to a catagory in the DB.\n\t */\n\tstatic getInvtIDCategory(invtID:string,alternateID:string): {invtID:string,alternateID:string,category:string,categoryID:string} {\n\t\tlet invtIDCategory={invtID:'',alternateID:'',category:'',categoryID:''}\n\t\tif (localStorage['invtid_category']!==''&&localStorage['invtid_category']!==undefined) {\n\t\t\tconst invtIDCategoryArray=JSON.parse(localStorage['invtid_category'])\n\t\t\tconst found=invtIDCategoryArray.find((elem:{invtID:string,alternateID:string})=>elem.invtID===invtID&&elem.alternateID===alternateID)\n\t\t\tif (found!==undefined) {invtIDCategory=found}\n\t\t}\n\t\treturn invtIDCategory\n\t}\n}\n\n/** Sometimes the back-end sends code to be executed in the front-end.\n * These functions needs to be defined at the window level to avoid breaking the site.\n */\nfunction createCookie(name: string, value: string, days?: number): void {\n\tCommonUtils.createCookie(name, value, days)\n}\nfunction eraseCookie(name: string): void {\n\tCommonUtils.createCookie(name, '', -1)\n}\nfunction readCookie(name: string): string {\n\treturn CommonUtils.readCookie(name)\n}\n\n// The line below is needed to make it available on jest tests environment without using \"export\".\nif (!(window as any).CommonUtils) (window as any).CommonUtils = CommonUtils\n\n// Function to set error message, toggle error class, and manage error icon\nfunction setError(elementId, message, isValid) {\n const inputControl = document.getElementById(elementId)?.parentElement as HTMLElement | null;\n const errorDisplay = inputControl?.querySelector('.error') as HTMLElement | null;\n let iconElement = inputControl?.querySelector('.icon') as HTMLElement | null;\n\n if (!inputControl || !errorDisplay) return;\n\n if (!iconElement) {\n iconElement = document.createElement('div');\n iconElement.className = 'icon';\n inputControl.appendChild(iconElement);\n }\n\n errorDisplay.textContent = isValid ? '' : message;\n inputControl.classList.toggle('error', !isValid);\n iconElement.style.backgroundImage = isValid ? \"url('images/misc/check-icon.svg')\" : \"url('images/misc/error-icon.svg')\";\n}\n\nconst validateCardCodeFunction = (index: number) => {\n\treturn (value: string) => {\n\t\tconst cardType = (document.getElementById(`paymentTypeUI_ddlOrderCardType${index}`)).value\n\t\treturn patterns[(cardType != 'A' && cardType != 'G') ? 'cvv' : 'amxCardId'].test(value)\n\t}\n} \n\n// Define regular expressions\nconst patterns: { [key: string]: RegExp } = {\n 'email': /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/,\n 'name': /^[a-zA-Z]+(-[a-zA-Z]+)?(?: [a-zA-Z]+(-[a-zA-Z]+)?)*$/,\n 'address': /^(?=.*\\d)[a-zA-Z0-9\\s.,#\\-ºâêîôûÂÊÎÔÛàèìòùÀÈÌÒÙáéíóúÁÉÍÓÚüÜçÇñÑ]*$/,\n 'city': /^[a-zA-Z\\sâêîôûÂÊÎÔÛàèìòùÀÈÌÒÙáéíóúÁÉÍÓÚüÜçÇñÑ]*$/,\n 'phone': /^\\+?[0-9-]{5,15}$/,\n\t\t'cvv':/^\\d{3}$/,\n\t\t'amxCardId':/^\\d{4}$/,\n\t\t'selectbox': /^(?!.*--).*$/\n};\n\n// Function to validate form field\nfunction validateField(inputElement: HTMLInputElement) {\n const elementId = inputElement.id;\n const value = inputElement.value.trim();\n let isValid = true;\n let errorMessage = '';\n\n if (formElements.hasOwnProperty(elementId)) {\n const elementType = formElements[elementId].type;\n\t\tconst customFieldValidation = formElements[elementId].fieldValidation\n\n\t\tif(customFieldValidation) {\n\t\t\tisValid = customFieldValidation(value)\n\t\t} else {\n\t\t\tif (patterns.hasOwnProperty(elementType)) {\n\t\t\t\tisValid = patterns[elementType].test(value);\n\t\t\t}\n\t\t}\n\n\t\terrorMessage = formElements[elementId].errMessage;\n }\n if (isValid && !value) {\n isValid = false;\n }\n\n setError(elementId, errorMessage, isValid);\n}\n\n// Function to attach event listeners to form elements\nfunction attachEventListeners(elementIds: string[]) {\n elementIds.forEach(elementId => {\n const inputElement = document.getElementById(elementId) as HTMLInputElement | null;\n if (inputElement) {\n inputElement.addEventListener('blur', () => {\n validateField(inputElement);\n });\n }\n });\n}\n\nfunction validateZipCode(zipCode: string, countryCode: string) {\n\tif (countryCode === 'US') {\n\t\treturn CommonUtils.isValidUsZipCode(zipCode)\n\t} else if (countryCode === 'CA') {\n\t\treturn CommonUtils.isValidCaZipCode(zipCode)\n\t}\n\treturn true\n}\n\n// Define form elements\nconst formElements = {\n\temailAddress: { type: 'email', errMessage: 'You must enter a valid email address.' },\n\taddressUI_tbBillAddressName: { type: 'name', errMessage: 'You must enter a valid Billing Name.' },\n\taddressUI_tbBillAddressFirstName: { type: 'name', errMessage: 'You must enter a valid Billing First Name.' },\n\taddressUI_tbBillAddressLastName: { type: 'name', errMessage: 'You must enter a valid Billing Last Name.' },\n\taddressUI_tbBillAddr1: { type: 'address', errMessage: 'Include your street number to proceed.' },\n\taddressUI_tbBillAddr2: { type: 'text' },\n\taddressUI_tbBillAddrCity: { type: 'city', errMessage: 'You must enter a valid Billing City.' },\n\taddressUI_tbShipAddressName: { type: 'name', errMessage: 'You must enter a valid Shipping Name.' },\n\taddressUI_tbShipAddressFirstName: { type: 'name', errMessage: 'You must enter a valid Shipping First Name.' },\n\taddressUI_tbShipAddressLastName: { type: 'name', errMessage: 'You must enter a valid Shipping Last Name.' },\n\taddressUI_tbShipAddr1: { type: 'address', errMessage: 'Include your street number to proceed.' },\n\taddressUI_tbShipAddr2: { type: 'text' },\n\taddressUI_tbShipAddrCity: { type: 'city', errMessage: 'You must enter a valid Shipping City.' },\n\taddressUI_tbBillAddrZip: { \n\t\ttype: 'zip', \n\t\terrMessage: 'You must enter a valid Billing Postal Code.' ,\n\t\tfieldValidation: () => {\n\t\t\tconst shippingCountryCode = (document.getElementById('addressUI_ddlShipAddrCountry')).value\n\t\t\tconst zipCode = (document.getElementById('addressUI_tbShipAddrZip')).value\n\t\t\treturn validateZipCode(zipCode, shippingCountryCode)\n\t\t} \n\t},\n\taddressUI_tbShipAddrZip: { \n\t\ttype: 'zip', \n\t\terrMessage: 'You must enter a valid Shipping Postal Code.', \n\t\tfieldValidation: () => {\n\t\t\tconst shippingCountryCode = (document.getElementById('addressUI_ddlShipAddrCountry')).value\n\t\t\tconst zipCode = (document.getElementById('addressUI_tbShipAddrZip')).value\n\t\t\treturn validateZipCode(zipCode, shippingCountryCode)\n\t\t} \n\t},\n\taddressUI_tbBillAddrPhone: { type: 'phone', errMessage: 'You must enter a valid Billing Phone Number.' },\n\taddressUI_tbShipAddrPhone: { type: 'phone', errMessage: 'You must enter a valid Shipping Phone Number.' },\n\taddressUI_ddlBillAddrCountry: { type: 'selectbox', errMessage: '' },\n\taddressUI_ddlBillAddrState: { type: 'selectbox', errMessage: 'You must enter a valid Billing State/Province.', hiddenInputIDs: ['addressUI_hBillAddrState', 'hBillState'] },\n\taddressUI_ddlShipAddrCountry: { type: 'selectbox', errMessage: '' },\n\taddressUI_ddlShipAddrState: { type: 'selectbox', errMessage: 'You must enter a valid Shipping State/Province.', hiddenInputIDs: ['addressUI_hShipAddrState', 'hShipState'] },\n\taddressUI_cSameAsShipping: { type: 'checkbox', errMessage: '' },\n\tFirstName: { type: 'name', errMessage: 'You must enter a valid First Name.' },\n\tLastName: { type: 'name', errMessage: 'You must enter a valid Last Name.' },\n\tcontactEmailAddress: { type: 'email', errMessage: 'You must enter a valid email address.' },\n\tPhone: { type: 'phone', errMessage: 'You must enter a valid Phone Number.' },\n\tpaymentTypeUI_tbCreditCardName: { type: 'name', errMessage: 'You must a valid Name on card.' },\n\tpaymentTypeUI_tbCreditCardCode: { \n\t\ttype: 'cvv', \n\t\terrMessage: 'You must enter a valid CVV.', \n\t\tfieldValidation: validateCardCodeFunction(1) \n\t},\n\tpaymentTypeUI_tbCreditCardCode2: { \n\t\ttype: 'cvv', \n\t\terrMessage: 'You must enter a valid CVV.', \n\t\tfieldValidation: validateCardCodeFunction(2) \n\t}\n};\n\n// Attach event listeners after DOM content is loaded\ndocument.addEventListener('DOMContentLoaded', () => {\n // Assuming you have an array of element IDs to attach the event listener to\n const elementIds: string[] = [\n\t\t\t'addressUI_tbBillAddressFirstName', \n\t\t\t'addressUI_tbBillAddressLastName', \n\t\t\t'addressUI_tbBillAddressName', \n\t\t\t'addressUI_tbBillAddressName', \n\t\t\t'addressUI_tbBillAddrPhone', \n\t\t\t'addressUI_tbBillAddr1', \n\t\t\t'addressUI_tbBillAddrCity', \n\t\t\t'addressUI_ddlBillAddrState', \n\t\t\t'addressUI_tbBillAddrState', \n\t\t\t'addressUI_tbBillAddrZip', \n\t\t\t'addressUI_tbShipAddressFirstName', \n\t\t\t'addressUI_tbShipAddressLastName', \n\t\t\t'addressUI_tbShipAddressName', \n\t\t\t'addressUI_tbShipAddrPhone', \n\t\t\t'addressUI_tbShipAddr1', \n\t\t\t'addressUI_ddlShipAddrCountry', \n\t\t\t'addressUI_tbShipAddrCity', \n\t\t\t'addressUI_ddlShipAddrState', \n\t\t\t'addressUI_tbShipAddrState', \n\t\t\t'addressUI_tbShipAddrZip', \n\t\t\t'emailAddress',\n\t\t\t'FirstName',\n\t\t\t'LastName',\n\t\t\t'Phone',\n\t\t\t'paymentTypeUI_tbCreditCardName',\n\t\t\t'paymentTypeUI_tbCreditCardCode',\n\t\t\t'paymentTypeUI_tbCreditCardCode2',\n\t\t\t'contactEmailAddress',\t\t\t\n\t\t];\n\n // Attach the event listener to each element\n attachEventListeners(elementIds);\n});\n\n\n\ndocument.addEventListener('DOMContentLoaded', function() {\n const increaseBtns: NodeListOf = document.querySelectorAll('.increase-btn');\n const decreaseBtns: NodeListOf = document.querySelectorAll('.decrease-btn');\n\n\tincreaseBtns.forEach(function(increaseBtn) {\n\t\tincreaseBtn.addEventListener('click', function() {\n\t\t\tconst quantityInput = this.parentNode?.querySelector('input[name=\"quantity\"]');\n\t\t\tconst decreaseBtn = this.parentNode?.querySelector('.decrease-btn');\n\t\n\t\t\tif (quantityInput instanceof HTMLInputElement && decreaseBtn instanceof HTMLButtonElement) {\n\t\t\t\tlet currentValue = parseInt(quantityInput.value);\n\t\t\t\tcurrentValue = isNaN(currentValue) ? 1 : currentValue;\n\t\t\t\tcurrentValue = Math.min(currentValue + 1, parseInt(quantityInput.max));\n\t\t\t\tquantityInput.value = currentValue.toString();\n\t\n\t\t\t\tif (currentValue > parseInt(quantityInput.min)) {\n\t\t\t\t\tdecreaseBtn.removeAttribute('disabled');\n\t\t\t\t\tdecreaseBtn.classList.remove('disabled');\n\t\t\t\t}\n\t\n\t\t\t\tif (currentValue >= 99) {\n\t\t\t\t\tincreaseBtn.disabled = true;\n\t\t\t\t\tincreaseBtn.classList.add('disabled');\n\t\t\t\t} else {\n\t\t\t\t\tincreaseBtn.disabled = false;\n\t\t\t\t\tincreaseBtn.classList.remove('disabled');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n\t\n\tdecreaseBtns.forEach(function(decreaseBtn) {\n\t\tdecreaseBtn.addEventListener('click', function() {\n\t\t\tconst quantityInput = this.parentNode?.querySelector('input[name=\"quantity\"]');\n\t\t\tconst increaseBtn = this.parentNode?.querySelector('.increase-btn');\n\t\n\t\t\tif (quantityInput instanceof HTMLInputElement && increaseBtn instanceof HTMLButtonElement) {\n\t\t\t\tlet currentValue = parseInt(quantityInput.value);\n\t\t\t\tcurrentValue = isNaN(currentValue) ? 1 : currentValue;\n\t\t\t\tcurrentValue = Math.max(currentValue - 1, parseInt(quantityInput.min));\n\t\t\t\tquantityInput.value = currentValue.toString();\n\t\n\t\t\t\tif (currentValue < parseInt(quantityInput.max)) {\n\t\t\t\t\tincreaseBtn.removeAttribute('disabled');\n\t\t\t\t\tincreaseBtn.classList.remove('disabled');\n\t\t\t\t}\n\t\n\t\t\t\tif (currentValue <= 1) {\n\t\t\t\t\tdecreaseBtn.disabled = true;\n\t\t\t\t\tdecreaseBtn.classList.add('disabled');\n\t\t\t\t} else {\n\t\t\t\t\tdecreaseBtn.disabled = false;\n\t\t\t\t\tdecreaseBtn.classList.remove('disabled');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n\t\n\n\t\n\tconst inputs = document.querySelectorAll('.qty-input');\n\tinputs.forEach((input) => {\n\t\tinput.addEventListener('input', (event) => {\n\t\t\tconst inputElement = event.target as HTMLInputElement;\n\t\t\tlet value = inputElement.value;\n\t\t\t// Remove leading zeros and ensure the input is a number from 1 to 99\n\t\t\tvalue = value.replace(/^0+/, ''); // Remove leading zeros\n\t\t\tconst regex = /^[1-9][0-9]?$/; // Match numbers from 1 to 99\n\t\t\tif (!regex.test(value)) {\n\t\t\t\t// If not, adjust the value to the last valid input\n\t\t\t\tvalue = value.replace(/[^0-9]/g, ''); // Remove non-numeric characters\n\t\t\t\tif (value.length > 2) {\n\t\t\t\t\tvalue = value.slice(0, 2); // Keep only the first two digits\n\t\t\t\t}\n\t\t\t\tinputElement.value = value;\n\t\t\t}\n\t\t});\n\t});\n\n});\n\n\n\n\n"]}