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AcI,EAAeJ,aAAe,GAC3DI,EAAeJ,YAAYK,KAAKH,IAEzBxT,EAAAA,EAAAA,SAAS0L,EAAQ8H,EAAaC,EACvC,C","sources":["webpack://webstaurantstore/./common/AddToCart/AutoReorder.js","webpack://webstaurantstore/./common/AddToCart/CarouselSuffix.ts","webpack://webstaurantstore/./common/AddToCart/CustomQuantity.js","webpack://webstaurantstore/./common/AddToCart/ItemNumber.js","webpack://webstaurantstore/./common/AddToCart/NotificationAddToCart.js","webpack://webstaurantstore/./common/AddToCart/PlatinumPlusExclusiveSuffix.ts","webpack://webstaurantstore/./common/AddToCart/Pricing.js","webpack://webstaurantstore/./common/AddToCart/Product.js","webpack://webstaurantstore/./common/AddToCart/RibbonList.js","webpack://webstaurantstore/./common/AddToCart/SpecialQuantity.js","webpack://webstaurantstore/./common/AddToCart/Suffix.ts","webpack://webstaurantstore/./common/AddToCart/Unavailable/index.js","webpack://webstaurantstore/./common/AddToCart/ViewCartAddToCart.js","webpack://webstaurantstore/./common/AddToCart/addToCartSuccessMessage.html.js","webpack://webstaurantstore/./common/AddToCart/addToCartSummary.html.js","webpack://webstaurantstore/./common/AddToCart/alreadyAddedToYourCart.html.js","webpack://webstaurantstore/./common/AddToCart/existingAutoReorders.html.js","webpack://webstaurantstore/./common/AddToCart/index.js","webpack://webstaurantstore/./common/AddToCart/nextAutoReorderBanner.html.js","webpack://webstaurantstore/./common/Cart.ts","webpack://webstaurantstore/./common/FixedWidthCarousel.js","webpack://webstaurantstore/./common/LazyLoad/index.ts","webpack://webstaurantstore/./common/lazyValidate.js"],"sourcesContent":["/* global alert */\n\nimport autobind from \"autobind-decorator\";\nimport delegate from \"delegate\";\nimport { Modal } from \"bootstrap.native\";\nimport { lazyValidate, ValidationError } from \"../lazyValidate\";\nimport existingAutoReordersHtml from \"./existingAutoReorders.html\";\nimport nextAutoReorderBannerHtml from \"./nextAutoReorderBanner.html\";\nimport Notification from \"../Notification\";\n\nexport default class AutoReorder {\n static get nextAutoReorderBanner() {\n return document.querySelector(\"[data-component=nextAutoReorderBanner]\");\n }\n\n get eligable() {\n return this.product.itemNumber.autoReorderEligible;\n }\n\n get autoReorderContainer() {\n return this.container.querySelector(\"[data-component=AutoReorder]\");\n }\n\n get onOffSwitch() {\n return this.autoReorderContainer.querySelector(\n \"[data-component=onOffSwitch]\"\n );\n }\n\n get onOffSwitchInput() {\n return this.onOffSwitch.querySelector(\"input\");\n }\n\n get intervalDropdown() {\n return this.autoReorderContainer.querySelector(\n \"[data-component=intervalDropdown]\"\n );\n }\n\n get autoReorderOptionsContainer() {\n return this.autoReorderContainer.querySelector(\n \"[data-component=autoReorderOptionsContainer]\"\n );\n }\n\n get newAutoReorderRadio() {\n return this.autoReorderContainer.querySelector(\n \"[data-component=newAutoReorderRadio]\"\n );\n }\n\n get buyButton() {\n return this.container.querySelector(\"[data-action=addToCart]\");\n }\n\n get new() {\n return this.newAutoReorderRadio.checked;\n }\n\n get existing() {\n return (\n this.existingAutoReorderRadio && this.existingAutoReorderRadio.checked\n );\n }\n\n constructor(container, product) {\n this.product = product;\n this.container = container;\n if (!container || !this.autoReorderContainer) return;\n\n this.intervalDropdown.value = \"0\";\n\n this.container.addEventListener(\"suffixChange\", this.suffixChange);\n this.onOffSwitch.addEventListener(\"click\", this.toggle);\n this.newAutoReorderRadio.addEventListener(\"click\", this.newAutoReorder);\n delegate(\n this.container,\n \"[data-component=existingAutoReorderRadio]\",\n \"click\",\n this.existingAutoReorderRadioAction,\n false\n );\n\n this.populateIntervalDropdown();\n this.populateAutoReordersDropdown();\n\n if (!this.product.unselectedSuffixItem) {\n this.populateNextAutoReorderBanner();\n }\n\n const ccModalElement = document.getElementById(\n \"commonCarrierShippingOptions\"\n );\n ccModalElement.addEventListener(\"hidden.bs.modal\", () => {\n ccModalElement.style = \"display: none;\";\n });\n this.commonCarrierShippingOptions = new Modal(ccModalElement);\n this.addEventListenerToCommonCarrierSettingsModalSaveButton();\n }\n\n static renderNextAutoReorderBanner(autoReorders) {\n if (!autoReorders.length) {\n AutoReorder.nextAutoReorderBanner.innerHTML = \"\";\n return;\n }\n\n AutoReorder.nextAutoReorderBanner.innerHTML = nextAutoReorderBannerHtml(\n autoReorders[0]\n );\n }\n\n @lazyValidate\n interval() {\n if (!this.enabled) return;\n if (this.new && this.intervalDropdown.value === \"0\") {\n this.intervalDropdown.focus();\n throw new ValidationError(\"Please select Auto Reorder interval\");\n }\n if (this.existing && this.existingDropdown.value === \"0\") {\n this.existingDropdown.focus();\n throw new ValidationError(\"Please select an existing Auto Reorder\");\n }\n }\n\n @autobind\n toggle() {\n this.enabled = !this.enabled;\n this.autoReorderOptionsContainer.hidden = !this.autoReorderOptionsContainer\n .hidden;\n this.autoReorderContainer.classList.toggle(\"toggle--active\");\n this.onOffSwitchInput.checked = !this.onOffSwitchInput.checked;\n\n this.newAutoReorder();\n }\n\n @autobind\n newAutoReorder() {\n if (this.existingDropdown) this.existingDropdown.disabled = true;\n\n this.newAutoReorderRadio.checked = true;\n this.intervalDropdown.disabled = false;\n this.buyButton.value = \"Add to Cart\";\n\n this.dispatchAutoReorderChange();\n }\n\n dispatchAutoReorderChange() {\n this.container.dispatchEvent(\n new Event(\"autoReorderChange\", { bubbles: true })\n );\n }\n\n @autobind\n existingAutoReorderRadioAction() {\n this.intervalDropdown.disabled = true;\n this.existingDropdown.disabled = false;\n this.buyButton.value = \"Add to Auto Reorder\";\n\n this.dispatchAutoReorderChange();\n }\n\n @autobind\n suffixChange() {\n this.populateNextAutoReorderBanner();\n\n if (this.eligable) {\n this.autoReorderContainer.hidden = false;\n\n if (this.existing) this.existingAutoReorderRadioAction();\n } else {\n this.autoReorderContainer.hidden = true;\n }\n }\n\n renderExistingAutoReordersDropdown(results) {\n if (!results[0].userHasAutoReorders) return;\n\n const containerDiv = this.autoReorderOptionsContainer.appendChild(\n document.createElement(\"div\")\n );\n\n containerDiv.innerHTML = existingAutoReordersHtml(results);\n this.existingDropdown = this.autoReorderContainer.querySelector(\n \"[data-component=existingDropdown]\"\n );\n this.existingAutoReorderRadio = this.autoReorderContainer.querySelector(\n \"[data-component=existingAutoReorderRadio]\"\n );\n }\n\n async populateAutoReordersDropdown() {\n const response = await fetch(\n \"/myaccount:autoreorder/getautoreorderidsandnames/\",\n {\n credentials: \"include\",\n headers: {\n accept: \"application/json\",\n },\n }\n );\n const json = await response.json();\n this.renderExistingAutoReordersDropdown(json);\n }\n\n async populateIntervalDropdown() {\n const intervalRequest = await fetch(\n \"/myaccount:autoreorder/getintervallist/\",\n {\n credentials: \"include\",\n headers: {\n accept: \"application/json\",\n },\n }\n );\n const intervalList = await intervalRequest.json();\n\n Object.values(intervalList)\n .sort((a, b) => a.order_by > b.order_by)\n .forEach((interval) => {\n const option = document.createElement(\"option\");\n\n option.value = interval.id;\n option.textContent = `Ship every ${interval.interval_description}`;\n\n this.intervalDropdown.options.add(option);\n });\n }\n\n existingFormData() {\n const existingFormData = new FormData();\n\n existingFormData.append(\"autoReorderId\", this.existingDropdown.value);\n existingFormData.append(\"itemNumber\", this.product.itemNumber);\n existingFormData.append(\"qty\", this.product.quantity);\n\n return existingFormData;\n }\n\n makeNotification() {\n const list = this.existingDropdown.querySelector(\":checked\").textContent;\n\n new Notification({\n heading: `${this.product.quantity} item${\n this.product.quantity > 1 ? \"s\" : \"\"\n } added to your ${list}`,\n buttonText: \"View Auto Reorder\",\n href: `/myaccount:autoreorder/detail/?r=${this.existingDropdown.value}`,\n imageUrl: this.product.primaryImageSrc,\n });\n }\n\n async populateNextAutoReorderBanner() {\n const encodedItemNumber = encodeURIComponent(this.product.itemNumber);\n\n const response = await fetch(\n `/myaccount:autoreorder/getactiveautoreorderswithitemnumber/?itemNumber=${encodedItemNumber}`,\n {\n credentials: \"include\",\n headers: {\n accept: \"application/json\",\n },\n }\n );\n\n const autoReorders = await response.json();\n AutoReorder.renderNextAutoReorderBanner(autoReorders);\n }\n\n async addItemToExistingAutoReorder() {\n this.makeNotification();\n\n const response = await fetch(\n \"/myaccount:autoreorder/additemtoexistingautoreorder/\",\n {\n body: this.existingFormData(),\n method: \"POST\",\n credentials: \"include\",\n headers: {\n accept: \"application/json\",\n },\n }\n );\n\n const populateModal = await response.json();\n\n if (populateModal.isChangedToCommonCarrier) {\n document.getElementById(\n \"autoReorderIdModal\"\n ).innerHTML = this.existingDropdown.value;\n\n const lgYesNoSwitchModal = document.getElementById(\"lgYesNoSwitchModal\");\n const cbdYesNoSwitchModal = document.getElementById(\n \"cbdYesNoSwitchModal\"\n );\n\n lgYesNoSwitchModal.disabled = false;\n lgYesNoSwitchModal.value = \"\";\n\n if (populateModal.hasResidential) {\n cbdYesNoSwitchModal.disabled = true;\n cbdYesNoSwitchModal.value = 1;\n } else {\n cbdYesNoSwitchModal.disabled = false;\n cbdYesNoSwitchModal.value = \"\";\n }\n\n if (populateModal.customerLiftgateFee === 0) {\n document.getElementById(\"customerLiftgateFee\").innerHTML = \"\";\n } else {\n document.getElementById(\n \"customerLiftgateFee\"\n ).innerHTML = `($${populateModal.customerLiftgateFee} fee)`;\n }\n\n this.commonCarrierShippingOptions.show();\n }\n\n this.populateNextAutoReorderBanner();\n }\n\n addEventListenerToCommonCarrierSettingsModalSaveButton() {\n const ccSettingsSaveButton = document.getElementById(\n \"commonCarrierModalSave\"\n );\n const externalSubmitButton = document.getElementById(\"buyButton\");\n\n ccSettingsSaveButton.addEventListener(\"click\", async () => {\n const lgYesNoSwitchModal = document.getElementById(\"lgYesNoSwitchModal\");\n const cbdYesNoSwitchModal = document.getElementById(\n \"cbdYesNoSwitchModal\"\n );\n\n if (!lgYesNoSwitchModal.value || !cbdYesNoSwitchModal.value) {\n alert(\"You must pick selections.\"); // eslint-disable-line no-alert\n } else {\n const body = new FormData();\n body.append(\n \"autoReorderId\",\n document.getElementById(\"autoReorderIdModal\").innerHTML\n );\n body.append(\"liftGate\", lgYesNoSwitchModal.value);\n body.append(\"callBeforeDelivery\", cbdYesNoSwitchModal.value);\n\n externalSubmitButton.disabled = true;\n ccSettingsSaveButton.disabled = true;\n\n const response = await fetch(\n \"/myaccount:autoreorder/savecommoncarriersettings/\",\n {\n body,\n method: \"POST\",\n credentials: \"include\",\n headers: {\n accept: \"application/json\",\n },\n }\n );\n\n if (response.ok) {\n alert(\"Saved common carrier settings\"); // eslint-disable-line no-alert\n } else {\n alert(\"Error saving common carrier settings\"); // eslint-disable-line no-alert\n }\n\n externalSubmitButton.disabled = false;\n ccSettingsSaveButton.disabled = false;\n\n this.commonCarrierShippingOptions.hide();\n\n lgYesNoSwitchModal.value = \"\";\n cbdYesNoSwitchModal.value = \"\";\n }\n });\n }\n}\n","export default function CarouselSuffix(container: Element) {\n if (!container) return;\n\n const handleItemNumberChange = (ev: Event) => {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const event = ev as CustomEvent;\n const itemNumber = event.detail;\n\n container.querySelectorAll(\".quantity\").forEach((e) => {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const element = e as HTMLInputElement;\n element.value = \"1\";\n });\n\n container\n .querySelectorAll(\"[data-target=carouselSuffixTarget]\")\n .forEach((e) => {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const element = e as HTMLElement;\n element.hidden = element.dataset.item !== itemNumber.toString();\n });\n\n container\n .querySelectorAll(\"[data-target=carouselSuffixOOSTarget]\")\n .forEach((e) => {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const element = e as HTMLElement;\n element.hidden = element.dataset.item !== itemNumber.toString();\n });\n\n const itemOOS = container.querySelector(\n `[data-target=carouselSuffixOOSTarget][data-item=\"${itemNumber}\"]`\n );\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const itemATC = container.querySelector(\n \"[data-target=carouselSuffixATCTarget]\"\n ) as HTMLElement;\n\n if (itemATC) {\n itemATC.hidden = !!itemOOS;\n }\n };\n\n if (container.parentElement) {\n container.parentElement.addEventListener(\n \"ItemNumber.change\",\n handleItemNumberChange\n );\n }\n}\n","import autobind from \"autobind-decorator\";\n\nexport default class CustomQuantity {\n get input() {\n return this.container.querySelector(\"[data-component=qtyCustom]\") || {};\n }\n\n constructor(container) {\n if (!container) return;\n this.container = container;\n\n const form = this.container.closest(\"form\");\n\n form.addEventListener(\"Product.itemNumber.change\", this.productChange);\n form.addEventListener(\"Product.quantity.change\", this.productChange);\n }\n\n @autobind\n productChange(event) {\n const product = event.detail;\n\n if (\n (!product.specialQuantity || product.otherQuantitySelected) &&\n product.available\n ) {\n return this.render();\n }\n\n return this.hide();\n }\n\n hide() {\n this.container.hidden = true;\n this.input.name = \"\";\n }\n\n render() {\n this.container.hidden = false;\n this.input.name = \"qty\";\n }\n}\n","import autobind from \"autobind-decorator\";\nimport delegate from \"es6-delegate\";\nimport Notification from \"../Notification\";\nimport { lazyValidate, ValidationError } from \"../lazyValidate\";\n\nexport default class ItemNumber {\n get input() {\n return this.form.querySelector(\"[name=item_number]\");\n }\n\n get suffixDropdown() {\n return this.form.querySelector('[name=\"item_number\"]') || {};\n }\n\n get withoutSpaces() {\n return `${this.toString().replace(/ /g, \"\")}`;\n }\n\n get unselectedSuffixMessage() {\n return this.input.firstElementChild.textContent.toLowerCase();\n }\n\n get unselectedSuffixItem() {\n return this.toString() === \"0\";\n }\n\n get selectedSuffixOption() {\n return (\n (this.suffixDropdown.options &&\n this.suffixDropdown.options[this.suffixDropdown.selectedIndex]) || {\n dataset: {},\n }\n );\n }\n\n get autoReorderEligible() {\n return this.selectedSuffixOption.dataset.isAutoReorderEligible;\n }\n\n constructor(form) {\n this.form = form;\n delegate(this.form, \"change\", '[name=\"item_number\"]', this.change);\n }\n\n createSelectSuffixNotification() {\n const message = this.input.firstElementChild.textContent.toLowerCase();\n\n new Notification({ heading: `Please ${message}` });\n this.input.focus();\n }\n\n showCustomizationUrl() {\n const customizationButton = document.querySelector(\".btn-custom\");\n\n if (!customizationButton) return;\n\n const { selectedSuffixOption } = this;\n const {\n customizationUrl,\n customizationRequired,\n unavailable,\n } = selectedSuffixOption.dataset;\n\n if (customizationUrl !== \"\" && unavailable !== \"Y\") {\n customizationButton.href = customizationUrl;\n customizationButton.hidden = false;\n } else if (customizationRequired === \"1\" && unavailable !== \"Y\") {\n customizationButton.href = customizationButton.dataset.requiredHref;\n customizationButton.hidden = false;\n } else {\n customizationButton.href = \"#\";\n customizationButton.hidden = true;\n }\n }\n\n toString() {\n return this.input.value;\n }\n\n @lazyValidate\n suffix() {\n if (this.unselectedSuffixItem) {\n this.input.classList.add(\"input_error\");\n this.input.focus();\n throw new ValidationError(\n `Please ${this.unselectedSuffixMessage} for this product.`\n );\n }\n\n this.input.classList.remove(\"input_error\");\n }\n\n @autobind\n change() {\n const itemNumberChange = new Event(\"ItemNumber.change\", { bubbles: true });\n itemNumberChange.detail = this;\n this.showCustomizationUrl();\n\n this.form.dispatchEvent(itemNumberChange);\n }\n}\n","import AddToCart from \"./index\";\nimport Notification from \"../Notification\";\nimport addToCartSuccessMessageHtml from \"./addToCartSuccessMessage.html\";\n\n/**\n * Use notifications for success messages.\n */\nexport default class NotificationAddToCart extends AddToCart {\n constructor(container) {\n super(container);\n\n this.error = this.error.bind(this);\n }\n\n get title() {\n return this.container.querySelector(\"[data-target=title]\").textContent;\n }\n\n get primaryImageSrc() {\n return (\n this.container.querySelector(\"img\").src || this.product.primaryImageSrc\n );\n }\n\n successMessage() {\n new Notification({\n imageUrl: this.primaryImageSrc,\n heading: addToCartSuccessMessageHtml(this.product.quantity),\n href: \"/viewcart.cfm\",\n body: this.title,\n buttonText: \"View Cart\",\n secondButtonText: \"Checkout\",\n secondHref: \"/viewinfo.cfm\",\n });\n }\n\n error(error) {\n Notification.closeAll();\n super.error(error);\n }\n}\n","import Suffix from \"./Suffix\";\n\nexport default function PlatinumPlusExclusiveSuffix(container: Element) {\n if (!container) return;\n const ppePurchase = container.querySelector(\n \".member-exclusive__banner\"\n );\n if (!ppePurchase) return;\n const ATCButtonContainer = container\n .querySelector(\".btn-cart\")\n ?.closest(\"div\");\n if (!ATCButtonContainer) return;\n\n const handleItemNumberChange = (ev: Event) => {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const event = ev as CustomEvent;\n const itemNumber = event.detail.toString();\n const suffix = Suffix.priceLookup(itemNumber);\n const priceBox = document.querySelector(\"#priceBox\");\n\n ATCButtonContainer.hidden =\n (suffix.isPlatinumPlusExclusive && !suffix.customerIsPlatinumOrPlus) ||\n suffix.unavailable === \"1\";\n ppePurchase.hidden = !suffix.isPlatinumPlusExclusive;\n if (priceBox) {\n if (suffix.isPlatinumPlusExclusive) {\n priceBox.classList.add(\"member-exclusive\");\n } else {\n priceBox.classList.remove(\"member-exclusive\");\n }\n }\n };\n\n container.addEventListener(\"ItemNumber.change\", handleItemNumberChange);\n}\n","import autobind from \"autobind-decorator\";\n\nexport default class Pricing {\n constructor(container) {\n if (!container) return;\n\n this.container = container;\n\n this.container.parentElement.addEventListener(\n \"ItemNumber.change\",\n this.itemNumberChange\n );\n }\n\n @autobind\n itemNumberChange(event) {\n const itemNumber = event.detail;\n (this.container.querySelector(\"#baseFrom\") || {}).hidden = true;\n (this.container.querySelector(\"#firstUOM\") || {}).hidden = false;\n\n this.container\n .querySelectorAll(\"[data-target=priceInnerTarget]\")\n .forEach((e) => {\n const element = e;\n\n element.hidden = element.dataset.item !== itemNumber.toString();\n });\n }\n}\n","import autobind from \"autobind-decorator\";\nimport delegate from \"es6-delegate\";\nimport { lazyValidate, ValidationError } from \"../lazyValidate\";\nimport ItemNumber from \"./ItemNumber\";\nimport Suffix from \"./Suffix\";\n\nexport default class Product {\n placeHolderImageSrc = \"/images/products/imagecomingsoon.png\";\n\n get primaryImageSrc() {\n return this.primaryImageSrcPrivate || this.placeHolderImageSrc;\n }\n\n set primaryImageSrc(imageSrc) {\n this.primaryImageSrcPrivate = imageSrc;\n }\n\n get mnbuy() {\n return this.form.querySelector(\"[name=mnbuy]\") || { value: 1 };\n }\n\n get price() {\n return Number(this.form.querySelector(\"[name=price]\").value);\n }\n\n get unavailable() {\n return this.itemNumber.selectedSuffixOption.dataset.unavailable === \"Y\";\n }\n\n get available() {\n return !this.unavailable;\n }\n\n get outletItem() {\n return this.form.dataset.outletItem;\n }\n\n get minimumQuantity() {\n const minBuy = Math.max(this.mnbuy.value, 1);\n return minBuy > this.divisor ? minBuy : this.divisor;\n }\n\n get mxbuy() {\n return this.form.querySelector(\"[name=mxbuy]\") || {};\n }\n\n get divisor() {\n return Number(this.mxbuy.value || 1);\n }\n\n get warning() {\n return this.form.classList.contains(\"has-product-warning\");\n }\n\n get quantity() {\n return Number(this.quantityInput.value || 1);\n }\n\n get quantityInput() {\n return this.form.querySelector(\"[name=qty]\") || {};\n }\n\n get quantitySelect() {\n return this.form.querySelector(\"[data-component=specialQuantity] select\");\n }\n\n get quantitySelectLastOption() {\n return this.quantitySelect.lastElementChild || {};\n }\n\n get otherQuantitySelected() {\n if (!this.quantitySelect) return false;\n return this.quantitySelect.value === this.quantitySelectLastOption.value;\n }\n\n get specialQuantity() {\n return this.minimumQuantity > 1 || this.divisor > 1;\n }\n\n /**\n * @param {HTMLFormElement} form\n */\n constructor(form) {\n this.form = form;\n if (!this.form) return;\n\n this.itemNumber = new ItemNumber(this.form);\n\n delegate(this.form, \"change\", \"[name=qty]\", this.quantityChange);\n this.form.addEventListener(\"ItemNumber.change\", this.itemNumberChange);\n }\n\n @autobind\n itemNumberChange() {\n this.updateFromSuffixObject();\n this.dispatch(\"Product.itemNumber.change\");\n }\n\n dispatch(eventName) {\n const event = new Event(eventName, { bubbles: true });\n event.detail = this;\n\n this.form.dispatchEvent(event);\n }\n\n updateFromSuffixObject() {\n const item = Suffix.priceLookup(this.itemNumber);\n\n if (!item) return;\n\n this.mnbuy.value = item.min_buy;\n this.mxbuy.value = item.must_buy;\n }\n\n @autobind\n quantityChange() {\n this.dispatch(\"Product.quantity.change\");\n }\n\n @lazyValidate\n minQuantity() {\n if (this.quantity < this.minimumQuantity) {\n throw new ValidationError(\n `Please enter a quantity of more than ${this.minimumQuantity - 1}.`\n );\n }\n }\n\n @lazyValidate\n increment() {\n if (this.quantity % this.divisor)\n throw new ValidationError(\n `Please enter a quantity as a multiple of ${this.divisor}`\n );\n }\n\n @lazyValidate\n itemNumberValid() {\n return this.itemNumber.valid();\n }\n}\n","import Suffix from \"./Suffix\";\n\nexport default class RibbonList {\n constructor(container) {\n if (!container) return;\n\n this.container = container;\n\n this.container.parentElement.addEventListener(\n \"ItemNumber.change\",\n this.itemNumberChange\n );\n }\n\n get quantityRibbon() {\n return this.container.querySelector(\".ribbon--quantity\") || {};\n }\n\n get shippingRibbon() {\n return this.container.querySelector(\".ribbon--shipping\") || {};\n }\n\n get mixAndMatchRibbon() {\n return (\n this.container.querySelector(\".suffixMixAndMatch\") || { dataset: {} }\n );\n }\n\n itemNumberChange = (event) => {\n const itemNumber = event.detail;\n const item = Suffix.priceLookup(itemNumber);\n\n this.mixAndMatchRibbon.hidden = !(\n this.mixAndMatchRibbon.dataset.itemNumber === itemNumber.toString()\n );\n\n const shipping = Suffix.shippingLookup(itemNumber);\n\n this.shippingRibbon.hidden = !(\n shipping.freeShipping || window.freeShippingCheck\n );\n\n this.quantityRibbon.hidden = !item.showQtyDiscountRibbon;\n };\n}\n","import autobind from \"autobind-decorator\";\nimport Suffix from \"./Suffix\";\n\nexport default class SpecialQuantity {\n constructor(container) {\n if (!container) return;\n this.container = container;\n\n this.container\n .closest(\"form\")\n .addEventListener(\n \"Product.itemNumber.change\",\n this.productItemNumberChange\n );\n this.container\n .closest(\"form\")\n .addEventListener(\"Product.quantity.change\", this.productQuantityChange);\n }\n\n get minMustContainer() {\n let minMustBuyContainer = this.container.querySelector(\".min-must-text\");\n\n if (!minMustBuyContainer) {\n minMustBuyContainer = document.createElement(\"p\");\n minMustBuyContainer.classList.add(\"min-must-text\");\n this.container.insertBefore(minMustBuyContainer, this.addToCartInput);\n }\n\n return minMustBuyContainer;\n }\n\n get minMustText() {\n const ending = \"due to manufacturer packaging.\";\n if (\n this.product.minimumQuantity > 1 &&\n this.product.divisor > 1 &&\n this.product.minimumQuantity > this.product.divisor\n ) {\n return `You must buy a minimum of ${this.product.minimumQuantity}\n and in additional increments of ${this.product.divisor} ${ending}`;\n }\n\n if (this.product.divisor > 1) {\n return `You must buy in increments of ${this.product.divisor} ${ending}`;\n }\n\n if (this.product.minimumQuantity > 1) {\n return `You must buy a minimum of ${this.product.minimumQuantity} at a time ${ending}`;\n }\n\n return \"\";\n }\n\n get addToCartInput() {\n return this.container.querySelector(\"[data-action=addToCart]\");\n }\n\n get formGroup() {\n return this.container.querySelector(\".form__group\");\n }\n\n get select() {\n return (\n this.container.querySelector(\"select\") ||\n this.container.insertBefore(\n document.createElement(\"select\"),\n this.minMustContainer\n )\n );\n }\n\n @autobind\n productQuantityChange(event) {\n const noSelection = this.container.querySelector(\".no-selection\");\n const spclQtyNoSelection = this.formGroup?.querySelector(\".no-selection\");\n this.product = event.detail;\n\n if (noSelection) noSelection.classList.remove(\"no-selection\");\n if (spclQtyNoSelection) spclQtyNoSelection.classList.remove(\"no-selection\");\n\n if (this.product.specialQuantity && this.product.otherQuantitySelected) {\n this.hideSelect();\n }\n }\n\n hideSelect() {\n this.select.hidden = true;\n if (this.formGroup) this.formGroup.hidden = true;\n this.container.hidden = false;\n this.addToCartInput.hidden = true;\n this.select.name = \"\";\n }\n\n @autobind\n productItemNumberChange(event) {\n const noSelection = this.container.querySelector(\".no-selection\");\n this.product = event.detail;\n this.select.value = \"0\";\n\n if (\n this.product.specialQuantity &&\n !this.product.otherQuantitySelected &&\n this.product.available\n ) {\n if (noSelection) noSelection.classList.remove(\"no-selection\");\n this.hide();\n return this.render();\n }\n\n return this.hide();\n }\n\n hide() {\n const formActive = this.container.querySelector(\".form--active\");\n this.container.hidden = true;\n this.select.name = \"\";\n\n if (formActive) formActive.remove();\n }\n\n render() {\n this.container.hidden = false;\n this.select.hidden = false;\n this.addToCartInput.hidden = false;\n\n const item = Suffix.priceLookup(this.product.itemNumber);\n\n if (!item) return;\n\n const selectForm = document.createElement(\"div\");\n const selectGroup = document.createElement(\"div\");\n const selectContainer = document.createElement(\"div\");\n const selectLabel = document.createElement(\"label\");\n const selectLabelText = document.createElement(\"span\");\n const selectIcon = document.createElement(\"i\");\n\n this.container.prepend(selectForm);\n selectForm.prepend(selectGroup);\n selectGroup.prepend(selectContainer);\n selectContainer.append(selectLabel);\n selectContainer.append(selectIcon);\n selectLabel.append(selectLabelText);\n\n selectForm.className += \"form form--active\";\n selectGroup.classList.add(\"form__group\");\n selectContainer.className += \"form__control-container no-selection\";\n selectLabel.classList.add(\"form__label\");\n selectLabelText.classList.add(\"form__label-text\");\n selectIcon.className +=\n \"icon-down-micro form__control-icon form__control-icon--lg\";\n\n this.minMustContainer.textContent = this.minMustText;\n\n this.select.name = \"qty\";\n\n const selectClasses = [\"configure\", \"qty-preset-select\", \"form__control\"];\n selectClasses.forEach((className) => {\n this.select.classList.add(className);\n });\n\n let tempItemQuantityText = \"Quantity\";\n if (window.itemQuantityText) {\n tempItemQuantityText = window.itemQuantityText;\n }\n\n this.select.innerHTML = ` ${item.drop_down_select}`;\n\n selectLabelText.innerHTML = `${tempItemQuantityText}`;\n selectContainer.prepend(this.select);\n }\n}\n","/* eslint-disable camelcase */\ninterface SuffixShipping {\n freeShipping: boolean;\n}\n\ninterface SuffixPrice {\n displayprice: string;\n mapprice: string;\n maptype: string;\n onsale: string;\n p1price: string;\n qtydiscountlots: string;\n qtydiscountprices: string;\n qtydiscountqtys: string;\n stockflag: string;\n min_buy: string;\n must_buy: string;\n returnable: string;\n unavailable: string;\n hasRequiredAccessory: boolean;\n uom: string;\n p5: string;\n isInstallServiceEligible: boolean;\n showQtyDiscountRibbon: boolean;\n drop_down_select: string;\n isPlatinumPlusExclusive: boolean;\n customerIsPlatinumOrPlus: boolean;\n}\n\ninterface SuffixPriceObject {\n [key: string]: SuffixPrice;\n}\n\ninterface SuffixShippingObject {\n [key: string]: SuffixShipping;\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface Window {\n suffixShippingObj: SuffixShippingObject;\n suffixPriceObj: SuffixPriceObject;\n }\n}\n\ninterface ItemNumber {\n toString: () => string;\n}\n\nexport default class Suffix {\n static lookup(\n itemNumber: ItemNumber,\n suffixObject?: SuffixShippingObject | SuffixPriceObject\n ): SuffixShipping | SuffixPrice | Record {\n if (!suffixObject) return {};\n\n const item = suffixObject[itemNumber.toString()];\n const noSelection = document.querySelector(\".form--suffix .no-selection\");\n\n if (!item) return {};\n\n if (!noSelection) return item;\n\n noSelection.classList.remove(\"no-selection\");\n\n return item;\n }\n\n static priceLookup(itemNumber: string) {\n const { suffixPriceObj } = window;\n\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n return Suffix.lookup(itemNumber, suffixPriceObj) as SuffixPrice;\n }\n\n static shippingLookup(itemNumber: ItemNumber) {\n const { suffixShippingObj } = window;\n\n return Suffix.lookup(itemNumber, suffixShippingObj);\n }\n}\n","import Suffix from \"../Suffix\";\n\nexport default class Unavailable {\n constructor(container) {\n this.container = container;\n\n container.addEventListener(\n \"Product.itemNumber.change\",\n this.productItemNumberChange\n );\n\n this.notifyMeForm = this.container.querySelector(\"[data-target=notifyMe]\");\n\n if (this.notifyMeForm) {\n this.notifyMeForm.addEventListener(\"submit\", this.handleOutOfStockSubmit);\n }\n }\n\n get html() {\n return this.cachedHTML || this.requestHTML();\n }\n\n get element() {\n return this.container.querySelector(\"[data-component=Unavailable]\");\n }\n\n get errorMessageContainer() {\n return this.container.querySelector(\n \"[data-component=errorMessageContainer]\"\n );\n }\n\n get notifySuccessMessageContainer() {\n return this.container.querySelector(\"[data-target=notifySuccessMessage]\");\n }\n\n handleOutOfStockSubmit = (event) => {\n event.preventDefault();\n\n const body = new FormData(this.notifyMeForm);\n\n body.append(\"isAjax\", true);\n\n fetch(\"/template/site2012/pages/product_notify_form.cfm\", {\n body,\n method: \"POST\",\n }).catch(this.outOfStockEmailError);\n\n this.container.querySelector(\"[data-target=notifyMeHeading]\").hidden = true;\n this.notifyMeForm.hidden = true;\n this.notifySuccessMessageContainer.hidden = false;\n };\n\n outOfStockEmailError = () => {\n this.notifySuccessMessageContainer.hidden = true;\n this.errorMessageContainer.innerHTML =\n 'Error sending email address. Please try again or email help@webstaurantstore.com.';\n this.errorMessageContainer.classList.remove(\"hide\");\n };\n\n productItemNumberChange = (event) => {\n if (!this.element) return false;\n\n this.product = event.detail;\n this.suffix = Suffix.priceLookup(this.product.itemNumber);\n this.blockedByPlatinumPlusExclusive =\n this.suffix.isPlatinumPlusExclusive &&\n !this.suffix.customerIsPlatinumOrPlus;\n\n if (this.product.unavailable && !this.blockedByPlatinumPlusExclusive) {\n this.element.hidden = false;\n return this.render(this.product.itemNumber);\n }\n\n this.element.innerHTML = \"\";\n this.element.hidden = true;\n return Promise.resolve();\n };\n\n async requestHTML() {\n const body = new FormData();\n body.append(\"Client_Key\", window.Token);\n body.append(\"item_number\", this.product.itemNumber);\n body.append(\"description\", this.element.dataset.description);\n body.append(\"ajax_request\", true);\n body.append(\"_cf_nodebug\", true);\n\n const result = await fetch(\"/ajax/renderUnavailableForm\", {\n body,\n method: \"POST\",\n credentials: \"include\",\n });\n\n this.cachedHTML = await result.text();\n return this.cachedHTML;\n }\n\n async render() {\n this.element.innerHTML = await this.html;\n }\n}\n","import AddToCart from \"./index\";\n\nexport default class ViewCartAddToCart extends AddToCart {\n async addToCart() {\n this.cart.add = async () => {\n const addToCartInput = this.form.querySelector(\"[data-action=addToCart]\");\n window.wss.shoppingCart.cartService.addRecommendedProductToCartHandler.apply(\n addToCartInput,\n [new Event(\"click\")]\n );\n };\n\n super.addToCart();\n }\n}\n","export default (quantity) => /* html */ `\n${quantity} item${\n quantity > 1 ? \"s\" : \"\"\n} added to your cart`;\n","import addToCartSuccessMessageHtml from \"./addToCartSuccessMessage.html\";\n\nexport default (quantity) => /* html */ `\n
\n
\n ${addToCartSuccessMessageHtml(quantity)}\n
\n \n \n \n \n \n \n
`;\n","export default /* html */ `\nAlready in your cart\n`;\n","export default (data) => /* html */ `\n
\n \n
\n \n
\n
`;\n","import delegate from \"es6-delegate\";\nimport autobind from \"autobind-decorator\";\nimport to from \"await-to-js\";\nimport Cart from \"../Cart\";\nimport { ValidationError } from \"../lazyValidate\";\nimport AutoReorder from \"./AutoReorder\";\nimport addToCartSummaryHtml from \"./addToCartSummary.html\";\nimport SpecialQuantity from \"./SpecialQuantity\";\nimport CustomQuantity from \"./CustomQuantity\";\nimport Product from \"./Product\";\nimport Pricing from \"./Pricing\";\nimport RibbonList from \"./RibbonList\";\nimport alreadyAddedToYourCartHtml from \"./alreadyAddedToYourCart.html\";\nimport Unavailable from \"./Unavailable\";\nimport CarouselSuffix from \"./CarouselSuffix\";\nimport PlatinumPlusExclusiveSuffix from \"./PlatinumPlusExclusiveSuffix\";\n\nexport default class AddToCart {\n totalAddedToCart = 0;\n\n lastAddToCart = 0;\n\n autoReorder = {};\n\n get successContainer() {\n return this.container.querySelector(\".success-container\") || {};\n }\n\n get errorMessageContainer() {\n return this.form.querySelector(\"[data-component=errorMessageContainer]\");\n }\n\n set errorMessage(message) {\n if (message) {\n this.errorMessageContainer.hidden = false;\n this.errorMessageContainer.textContent = message;\n } else {\n this.currentErrorSource = null;\n this.errorMessageContainer.hidden = true;\n }\n }\n\n /**\n * @param {HTMLElement} container\n */\n constructor(container) {\n if (!container) return;\n this.container = container;\n new Unavailable(this.container);\n\n this.form = this.container.querySelector(\n \".add-to-cart form:not([data-target=notifyMe])\"\n );\n if (!this.form) return;\n\n delegate(\n this.form,\n \"click\",\n \"[data-action=addToCart]\",\n this.addToCartHandler\n );\n container.addEventListener(\"autoReorderChange\", this.autoReorderChange);\n container.addEventListener(\n \"Product.quantity.change\",\n this.validateWithoutErrorMessage\n );\n container.addEventListener(\n \"ItemNumber.change\",\n this.validateWithoutErrorMessage\n );\n\n this.product = new Product(this.form);\n\n if (this.container.querySelector(\"[data-component=AutoReorder]\")) {\n this.autoReorder = new AutoReorder(this.container, this.product);\n }\n\n this.cart = new Cart();\n this.specialQuantity = new SpecialQuantity(\n this.container.querySelector(\"[data-component=specialQuantity]\")\n );\n new CustomQuantity(\n this.container.querySelector(\"[data-component=customQuantity]\")\n );\n new Pricing(this.container.querySelector(\"[data-component=Pricing]\"));\n new RibbonList(this.container.querySelector(\"[data-component=RibbonList]\"));\n new CarouselSuffix(\n this.container.querySelector(\"[data-component=Suffixes]\")\n );\n new PlatinumPlusExclusiveSuffix(container);\n\n this.dynamicModules();\n }\n\n async dynamicModules() {\n const getPriceByEmail = this.container.querySelector(\n \"[data-component=getPriceByEmail]\"\n );\n\n if (getPriceByEmail) {\n const { default: GetPriceByEmail } = await import(\"./GetPriceByEmail\");\n new GetPriceByEmail(getPriceByEmail);\n }\n\n const getPriceByTextForms = this.container.querySelectorAll(\n \"[data-component=getPriceByText]\"\n );\n\n if (getPriceByTextForms && getPriceByTextForms.length) {\n const { default: GetPriceByText } = await import(\"./GetPriceByText\");\n getPriceByTextForms.forEach((getPriceByTextForm) => {\n new GetPriceByText(getPriceByTextForm);\n });\n }\n }\n\n @autobind\n async validateWithoutErrorMessage() {\n await this.product.valid({ skip: \"accessoriesValid\" }).catch(this.error);\n this.errorMessage = \"\";\n }\n\n @autobind\n async autoReorderChange() {\n let error;\n\n if (this.autoReorder.enabled) [error] = await to(this.autoReorder.valid());\n\n if (!error && this.currentErrorSource === AutoReorder)\n this.errorMessage = \"\";\n }\n\n successMessage() {\n this.successContainer.innerHTML = addToCartSummaryHtml(\n this.totalAddedToCart\n );\n }\n\n @autobind\n addToCartHandler(event) {\n if (event.target.dataset.outOfStock) return Promise.reject();\n event.preventDefault();\n return this.addToCart().catch(this.error);\n }\n\n async addToCart() {\n await this.product.valid();\n if (this.product.outletItem) this.renderAlreadyAddedToYourCartHtml();\n\n if (this.autoReorder.enabled) await this.autoReorder.valid();\n\n if (this.autoReorder.existing) {\n this.errorMessage = \"\";\n await this.autoReorder.addItemToExistingAutoReorder();\n return;\n }\n\n const body = new FormData(this.product.form);\n body.set(\"auto_reorder_interval_id\", \"0\");\n if (this.product.accessories)\n body.set(\"accessories\", this.product.accessories);\n\n if (this.autoReorder.new) {\n body.set(\n \"auto_reorder_interval_id\",\n this.autoReorder.intervalDropdown.value\n );\n }\n\n const addToCartBtn = this.container.querySelector(\n \"[data-action=addToCart]\"\n );\n if (addToCartBtn && addToCartBtn.dataset.interrupt === \"true\") {\n return;\n }\n this.success();\n const cartResponse = await this.cart.add(body);\n if (\n cartResponse?.redirected &&\n String(cartResponse?.url).search(\"productaccessories\") !== -1\n ) {\n this.errorMessage =\n \"This item is missing required accessories, please select the required accessories.\";\n this.rollback();\n }\n }\n\n renderAlreadyAddedToYourCartHtml() {\n this.specialQuantity.container.innerHTML = alreadyAddedToYourCartHtml;\n }\n\n rollback() {\n this.cart.count -= this.lastAddToCart;\n this.totalAddedToCart -= this.lastAddToCart;\n this.lastAddToCart = 0;\n this.successContainer.innerHTML = \"\";\n }\n\n success() {\n this.errorMessage = \"\";\n this.lastAddToCart = this.product.quantity;\n this.totalAddedToCart += this.product.quantity;\n this.successMessage();\n this.container.dispatchEvent(\n new Event(\"AddToCart.success\", { bubbles: true })\n );\n }\n\n @autobind\n error(error) {\n let { message } = error;\n\n if (error.constructor !== ValidationError) {\n import(\"@sentry/react\").then((args) => {\n const { captureException } = args.default ?? args;\n captureException(error);\n });\n\n message = \"There was an error adding this item to your cart.\";\n this.rollback();\n }\n\n this.currentErrorSource = error.errorSource;\n this.errorMessage = message;\n }\n}\n","export default (data) => /* html */ `\n\n

\n This item will be auto reordered on
${data.date}\n

\n
`;\n","import { addToCartAnalytics } from \"~/analytics/AddToCart/addToCartAnalytics\";\nimport Store from \"./Store\";\nimport { incrementItemsInCart } from \"./Store/actions/user/index\";\n\nexport default class Cart {\n private static instance: Cart;\n\n public constructor() {\n if (Cart.instance) return Cart.instance;\n\n Cart.instance = this;\n }\n\n private cartCountElement =\n document.getElementById(\"cartItemCountSpan\") ||\n document.createElement(\"span\");\n\n private internalCount = Number(this.cartCountElement.textContent);\n\n private reactHeader = document.querySelector(\n '[data-hypernova-key=\"GlobalHeader\"]'\n );\n\n public get count() {\n return this.internalCount;\n }\n\n public set count(quantity) {\n if (this.reactHeader) return;\n\n this.internalCount = Number(quantity);\n this.cartCountElement.textContent = String(quantity);\n }\n\n public async add(body: FormData) {\n body.set(\"dynamicadd\", \"1\");\n\n if (this.reactHeader) {\n Store.dispatch(incrementItemsInCart(Number(body.get(\"qty\"))));\n } else {\n this.count += Number(body.get(\"qty\"));\n }\n\n const addToCartRequest = await fetch(\"/viewcart.cfm\", {\n body,\n method: \"POST\",\n credentials: \"include\",\n });\n if (!this.reactHeader) {\n const responseBody = await addToCartRequest.text();\n const doc = new DOMParser().parseFromString(responseBody, \"text/html\");\n\n const countElement = doc.querySelector(\".count\");\n\n if (countElement) this.count = Number(countElement.textContent);\n }\n\n addToCartAnalytics(\n { source: \"Cart\" },\n {\n itemNumber: body.get(\"item_number\")?.toString() ?? \"\",\n quantity: Number(body.get(\"qty\")),\n }\n );\n\n return addToCartRequest;\n }\n}\n","import Siema from \"siema\";\n\nimport LazyLoad from \"./LazyLoad\";\nimport NotificationAddToCart from \"./AddToCart/NotificationAddToCart\";\nimport ViewCartAddToCart from \"./AddToCart/ViewCartAddToCart\";\n\nexport default class FixedWidthCarousel extends Siema {\n get lastSlide() {\n return Math.max(0, this.totalSlides - this.perPage);\n }\n\n get perPage() {\n return Math.floor(this.selector.offsetWidth / this.slideWidth);\n }\n\n // Siema tries to set this property.\n /* eslint class-methods-use-this: 0 */\n // eslint-disable-next-line @typescript-eslint/no-empty-function, no-empty-function\n set perPage(v) {}\n\n get selectorWidth() {\n return this.slideWidth * this.perPage;\n }\n\n // Siema tries to set this property.\n // eslint-disable-next-line @typescript-eslint/no-empty-function, no-empty-function\n set selectorWidth(v) {}\n\n get maxOffset() {\n return (\n this.totalSlides * this.slideWidth -\n this.selector.offsetWidth -\n (this.config.borderWidth || 2)\n );\n }\n\n get shouldNotSlide() {\n return this.totalSlides <= this.perPage;\n }\n\n static bounds(val, min, max) {\n return Math.min(Math.max(min, val), max);\n }\n\n init() {\n if (this.selector.classList.contains(\"init\")) return;\n if (!this.selector.querySelector(\".ag-item\")) return;\n\n this.slideWidth =\n this.config.slideWidth ||\n this.selector.querySelector(\".ag-item\").getBoundingClientRect().width;\n this.sigmoidMax = this.config.sigmoidMax || 120;\n this.sigmoidFactor = 300;\n this.totalSlides = this.innerElements.length;\n this.selectorContainer = this.selector.closest(\n \"[data-component=carousel], .basic-carousel\"\n );\n this.prevButton = this.selectorContainer.querySelector(\n \"[data-control=prev]\"\n );\n this.nextButton = this.selectorContainer.querySelector(\n \"[data-control=next]\"\n );\n\n super.init();\n\n // stopPropagation on mouseup events as Siema causes\n // the carousel to move back 1 page on Windows only\n this.selector.querySelectorAll(\"select\").forEach((select) => {\n select.addEventListener(\"mouseup\", (e) => {\n e.stopPropagation();\n });\n });\n\n this.setContainerWidth();\n this.showHideNavControls();\n\n const isStorefrontRendered =\n document.querySelector(\"[data-component=storefront-expanded-brand]\") ||\n document.querySelector(\"[data-component=storefront-product-detail]\");\n if (!isStorefrontRendered) {\n const viewCartExists = document.querySelector(\"body.cart\");\n if (viewCartExists) {\n this.innerElements.forEach((element) => new ViewCartAddToCart(element));\n } else {\n this.innerElements.forEach(\n (element) => new NotificationAddToCart(element)\n );\n }\n }\n\n this.selector.classList.add(\"init\");\n this.selectorContainer.classList.add(\"init\");\n this.sliderFrame.classList.add(\"ag-carousel__frame\");\n\n document.addEventListener(\"closeSideBySide\", () => {\n this.resizeHandler();\n });\n }\n\n setContainerWidth() {\n this.selector.firstElementChild.style.width = `${\n this.totalSlides * this.slideWidth\n }px`;\n }\n\n showHideNavControls() {\n if (!this.prevButton || !this.nextButton) return;\n\n this.prevButton.hidden = false;\n this.nextButton.hidden = false;\n\n if (this.currentSlide <= 0 || this.shouldNotSlide) {\n this.prevButton.hidden = true;\n }\n if (\n this.currentSlide === this.totalSlides - this.perPage ||\n this.shouldNotSlide\n ) {\n this.nextButton.hidden = true;\n }\n\n if (this.isEventBoundToNavControls) return;\n\n this.prevButton.addEventListener(\"click\", () => {\n this.prev(this.perPage);\n });\n this.nextButton.addEventListener(\"click\", () => {\n this.next(this.perPage);\n });\n this.isEventBoundToNavControls = true;\n }\n\n resizeHandler() {\n super.resizeHandler();\n\n this.setContainerWidth();\n this.slideToCurrent();\n this.showHideNavControls();\n }\n\n sigmoid(num) {\n const value =\n this.sigmoidMax * (2 / (1 + Math.E ** -(num / this.sigmoidFactor)) - 1);\n return parseFloat(value.toFixed(3));\n }\n\n mousedownHandler(e) {\n this.drag.startX = e.pageX;\n\n super.mousedownHandler(e);\n }\n\n mousemoveHandler(e) {\n this.move(e);\n }\n\n touchmoveHandler(e) {\n this.move(e);\n }\n\n move(e) {\n const drag = {\n endX: e.pageX,\n endY: e.pageY,\n };\n\n if (e.touches && e.touches.length) {\n drag.endX = drag.endX || e.touches[0].pageX;\n drag.endY = drag.endY || e.touches[0].pageY;\n\n const dragDifferenceX = this.drag.startX - drag.endX;\n const dragDifferenceY = this.drag.startY - drag.endY;\n\n if (!this.dragDirection) {\n if (Math.abs(dragDifferenceX) > Math.abs(dragDifferenceY)) {\n this.dragDirection = \"x\";\n } else {\n this.dragDirection = \"y\";\n }\n }\n\n if (this.dragDirection === \"x\") {\n e.preventDefault();\n } else {\n return;\n }\n }\n\n this.drag.endX = drag.endX;\n this.drag.endY = drag.endY;\n\n if (\n this.shouldNotSlide ||\n !this.pointerDown ||\n this.drag.endX === this.drag.startX\n )\n return;\n // if dragged element is a link\n // mark preventClick prop as a true\n // to detemine about browser redirection later on\n const closestLink = e.target.closest(\"a\") || document.createElement(\"div\");\n if (\n closestLink.nodeName === \"A\" &&\n window?.document &&\n window.innerWidth >= 946\n ) {\n this.drag.preventClick = true;\n }\n\n this.selector.style.cursor = \"-webkit-grabbing\";\n this.sliderFrame.style.webkitTransition = `all 0ms ${this.config.easing}`;\n this.sliderFrame.style.transition = `all 0ms ${this.config.easing}`;\n const dragOffset = this.drag.endX - this.drag.startX;\n let offset = this.currentOffset - dragOffset;\n\n if (offset <= 0) {\n offset = this.sigmoid(offset);\n } else if (offset >= this.maxOffset) {\n offset = this.maxOffset + this.sigmoid(offset - this.maxOffset);\n }\n\n this.sliderFrame.style[this.transformProperty] = `translate3d(${\n -1 * offset\n }px, 0, 0)`;\n }\n\n clearDrag() {\n this.dragDirection = null;\n\n super.clearDrag();\n }\n\n slideToCurrent() {\n const signModifier = -1;\n const offsetAbsolute = FixedWidthCarousel.bounds(\n this.currentSlide * this.slideWidth,\n 0,\n this.maxOffset\n );\n let offset;\n\n if (\n this.currentSlide === this.lastSlide &&\n this.totalSlides > this.perPage\n ) {\n offset = this.maxOffset;\n } else if (this.shouldNotSlide) {\n offset = 0;\n } else {\n offset = offsetAbsolute;\n }\n\n this.currentOffset = offset;\n\n offset *= signModifier;\n\n this.sliderFrame.style[\n this.transformProperty\n ] = `translate3d(${offset}px, 0, 0)`;\n\n this.showHideNavControls();\n\n LazyLoad.getInvisible().revalidate();\n LazyLoad.getInstance().revalidate();\n }\n}\n","import Blazy from \"blazy\";\n\nexport default class LazyLoad {\n static instance: InstanceType;\n\n static invisible: InstanceType;\n\n static getInstance() {\n if (!LazyLoad.instance) {\n LazyLoad.instance = new Blazy({\n selector: \".lazyLoad, .invisibleLazyLoad\",\n offset: 200,\n loadInvisible: true,\n });\n }\n\n return LazyLoad.instance;\n }\n\n static getInvisible() {\n if (!LazyLoad.invisible) {\n LazyLoad.invisible = new Blazy({\n selector: \".bLazyVisible\",\n offset: 200,\n loadInvisible: false,\n });\n }\n\n return LazyLoad.invisible;\n }\n}\n","import autobind from \"autobind-decorator\";\n\nexport class ValidationError {\n constructor(message, errorSource) {\n Object.assign(this, { message, errorSource });\n }\n}\n\nfunction convertToPromise(validation, errorSource) {\n let result;\n\n try {\n result = validation();\n } catch (error) {\n if (error.constructor !== ValidationError) {\n console.error(error); // eslint-disable-line no-console\n return Promise.reject(error);\n }\n\n return Promise.reject(new ValidationError(error.message, errorSource));\n }\n\n if (!result) return Promise.resolve();\n if (result.then) return result;\n\n throw new ValidationError(\n \"Could not convert to promise. Please return falsy value, a string, or a promise.\"\n );\n}\n\n/**\n * @param {Array|String} [skip] An array of validations to skip\n */\nasync function valid({ skip = [] } = {}) {\n /* eslint-disable no-restricted-syntax */\n let currentPromise;\n let skipArray = skip;\n\n if (skipArray.constructor.name === \"String\") skipArray = [skipArray];\n\n for (const validation of this.validations) {\n if (skipArray.includes(validation)) continue; // eslint-disable-line no-continue\n const method = this[validation];\n // eslint-disable-next-line no-await-in-loop\n currentPromise = await convertToPromise(method, this.constructor);\n }\n\n return currentPromise;\n} /* eslint-enable no-restricted-syntax */\n\n/**\n * A lazyValidated method may return a falsy value if it's valid, throw a new Error if it's invalid,\n * or return a promise if it's an asynchronous validation. Reject the promise to fail the validation\n * or resolve the promise to pass the validation.\n * Adds a valid() instance method to your class. When this.valid() is called all methods with\n * the lazyValidate decorator are called in order (top to bottom). Validations are performed\n * lazily, meaning that each validation won't\n * run until the previous is successful. If all validations are successful, valid() returns a\n * resolved promise with no value. If a validation fails, valid() returns a rejected promise with\n * ValidationError.message being the returned string of the failed validation.\n * @returns {void}\n */\nexport function lazyValidate(target, propertyKey, descriptor) {\n const classPrototype = target;\n\n classPrototype.valid = classPrototype.valid || valid;\n classPrototype.validations = classPrototype.validations || [];\n classPrototype.validations.push(propertyKey);\n\n return autobind(target, propertyKey, descriptor);\n}\n"],"names":["AutoReorder","container","product","this","autoReorderContainer","intervalDropdown","value","addEventListener","suffixChange","onOffSwitch","toggle","newAutoReorderRadio","newAutoReorder","delegate","existingAutoReorderRadioAction","populateIntervalDropdown","populateAutoReordersDropdown","unselectedSuffixItem","populateNextAutoReorderBanner","ccModalElement","document","getElementById","style","commonCarrierShippingOptions","Modal","addEventListenerToCommonCarrierSettingsModalSaveButton","interval","enabled","new","focus","ValidationError","existing","existingDropdown","autoReorderOptionsContainer","hidden","classList","onOffSwitchInput","checked","disabled","buyButton","dispatchAutoReorderChange","dispatchEvent","Event","bubbles","eligable","renderExistingAutoReordersDropdown","results","userHasAutoReorders","appendChild","createElement","innerHTML","existingAutoReordersHtml","querySelector","existingAutoReorderRadio","json","fetch","credentials","headers","accept","intervalList","Object","values","sort","a","b","order_by","forEach","option","id","textContent","interval_description","options","add","existingFormData","FormData","append","itemNumber","quantity","makeNotification","list","Notification","heading","buttonText","href","imageUrl","primaryImageSrc","encodedItemNumber","autoReorders","encodeURIComponent","renderNextAutoReorderBanner","addItemToExistingAutoReorder","populateModal","lgYesNoSwitchModal","cbdYesNoSwitchModal","body","method","isChangedToCommonCarrier","hasResidential","customerLiftgateFee","show","ccSettingsSaveButton","externalSubmitButton","alert","ok","hide","length","nextAutoReorderBanner","nextAutoReorderBannerHtml","autoReorderEligible","lazyValidate","autobind","CarouselSuffix","parentElement","ev","detail","querySelectorAll","e","element","dataset","item","toString","itemOOS","itemATC","CustomQuantity","form","closest","productChange","event","specialQuantity","otherQuantitySelected","available","render","input","name","ItemNumber","change","createSelectSuffixNotification","message","firstElementChild","toLowerCase","showCustomizationUrl","customizationButton","selectedSuffixOption","customizationUrl","customizationRequired","unavailable","requiredHref","suffix","unselectedSuffixMessage","remove","itemNumberChange","suffixDropdown","withoutSpaces","replace","selectedIndex","isAutoReorderEligible","NotificationAddToCart","error","bind","successMessage","addToCartSuccessMessageHtml","title","secondButtonText","secondHref","closeAll","src","AddToCart","PlatinumPlusExclusiveSuffix","ppePurchase","ATCButtonContainer","Suffix","priceLookup","priceBox","isPlatinumPlusExclusive","customerIsPlatinumOrPlus","Pricing","Product","placeHolderImageSrc","quantityChange","updateFromSuffixObject","dispatch","eventName","mnbuy","min_buy","mxbuy","must_buy","minQuantity","minimumQuantity","increment","divisor","itemNumberValid","valid","primaryImageSrcPrivate","imageSrc","price","Number","outletItem","minBuy","Math","max","warning","contains","quantityInput","quantitySelect","quantitySelectLastOption","lastElementChild","RibbonList","mixAndMatchRibbon","shipping","shippingLookup","shippingRibbon","freeShipping","window","freeShippingCheck","quantityRibbon","showQtyDiscountRibbon","SpecialQuantity","productItemNumberChange","productQuantityChange","noSelection","spclQtyNoSelection","formGroup","hideSelect","select","addToCartInput","formActive","selectForm","selectGroup","selectContainer","selectLabel","selectLabelText","selectIcon","prepend","className","minMustContainer","minMustText","tempItemQuantityText","itemQuantityText","drop_down_select","minMustBuyContainer","insertBefore","ending","lookup","suffixObject","suffixPriceObj","suffixShippingObj","Unavailable","handleOutOfStockSubmit","preventDefault","notifyMeForm","catch","outOfStockEmailError","notifySuccessMessageContainer","errorMessageContainer","blockedByPlatinumPlusExclusive","Promise","resolve","requestHTML","Token","description","text","cachedHTML","html","ViewCartAddToCart","addToCart","cart","wss","shoppingCart","cartService","addRecommendedProductToCartHandler","apply","data","featureName","map","currentValue","join","totalAddedToCart","lastAddToCart","autoReorder","addToCartHandler","autoReorderChange","validateWithoutErrorMessage","Cart","dynamicModules","getPriceByEmail","getPriceByTextForms","GetPriceByText","GetPriceByEmail","default","getPriceByTextForm","skip","errorMessage","to","currentErrorSource","successContainer","addToCartSummaryHtml","target","outOfStock","reject","addToCartBtn","cartResponse","renderAlreadyAddedToYourCartHtml","set","accessories","interrupt","success","redirected","String","url","search","rollback","alreadyAddedToYourCartHtml","count","constructor","then","args","captureException","errorSource","date","cartCountElement","internalCount","reactHeader","instance","addToCartRequest","responseBody","doc","countElement","Store","incrementItemsInCart","get","DOMParser","parseFromString","addToCartAnalytics","source","FixedWidthCarousel","init","selector","slideWidth","config","getBoundingClientRect","width","sigmoidMax","sigmoidFactor","totalSlides","innerElements","selectorContainer","prevButton","nextButton","stopPropagation","setContainerWidth","showHideNavControls","sliderFrame","resizeHandler","currentSlide","shouldNotSlide","perPage","isEventBoundToNavControls","prev","next","slideToCurrent","sigmoid","num","E","parseFloat","toFixed","mousedownHandler","drag","startX","pageX","mousemoveHandler","move","touchmoveHandler","endX","endY","pageY","touches","dragDifferenceX","dragDifferenceY","startY","dragDirection","abs","pointerDown","nodeName","innerWidth","preventClick","cursor","webkitTransition","easing","transition","dragOffset","offset","currentOffset","maxOffset","transformProperty","clearDrag","offsetAbsolute","bounds","lastSlide","LazyLoad","getInvisible","revalidate","getInstance","val","min","floor","offsetWidth","v","selectorWidth","borderWidth","Siema","Blazy","loadInvisible","invisible","assign","convertToPromise","validation","result","console","currentPromise","skipArray","validations","includes","propertyKey","descriptor","classPrototype","push"],"sourceRoot":""}