{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./cartridges/app_urbanelectric/cartridge/client/default/js/components/carousel.js","webpack:///./cartridges/app_blueacorn/cartridge/client/default/js/config/carousel.js","webpack:///./cartridges/app_urbanelectric/cartridge/client/default/js/components/utils.js","webpack:///./cartridges/app_urbanelectric/cartridge/client/default/js/config/carousel.js","webpack:///./cartridges/app_storefront_base/cartridge/client/default/js/util.js","webpack:///./cartridges/app_urbanelectric/cartridge/client/default/js/productDetail.js","webpack:///./cartridges/app_urbanelectric/cartridge/client/default/js/product/detail.js","webpack:///./cartridges/app_urbanelectric/cartridge/client/default/js/product/wishlist.js","webpack:///./cartridges/app_storefront_base/cartridge/client/default/js/components/formValidation.js","webpack:///./cartridges/app_urbanelectric/cartridge/client/default/js/product/base.js","webpack:///./cartridges/app_storefront_base/cartridge/client/default/js/components/focus.js","webpack:///./cartridges/app_blueacorn/cartridge/client/default/js/components/carousel.js","webpack:///./cartridges/app_blueacorn/cartridge/client/default/js/product/giftRegistry.js","webpack:///./cartridges/app_blueacorn/cartridge/client/default/js/product/base.js"],"names":["installedModules","__webpack_require__","moduleId","module","i","l","exports","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","carouselConfig","require","type","selector","this","$element","config","settings","moduleName","initialized","setConfig","newConfig","$","extend","defaultSettings","init","activate","data","length","slick","dots","infinite","mobileFirst","arrows","adaptiveHeight","pdpImageCarousel","slidesToShow","fade","slidesToScroll","responsive","breakpoint","globalConfig","bp","large","asNavFor","touchMove","swipeToSlide","swipe","pdpProductSetImageCarousel","pdpImageThumbnailsCarousel","variableWidth","focusOnSelect","bundleImageCarousel","bundlepdpImageThumbnailsCarousel","editModalImageCarousel","bonusImageCarousel","quickViewImageCarousel","productTileCarousel","small","headerBannerCarousel","imageZoomCarousel","getParameter","paramName","val","params","window","location","search","substring","split","removeParam","sourceURL","rtn","paramsArr","queryString","indexOf","splice","join","updateQueryStringParameter","uri","re","RegExp","separator","match","replace","arraymove","arr","fromIndex","toIndex","element","featureCarousel","customPaging","slider","$slides","heroBannerCarouselAutoplay","speed","cssEase","touchThreshold","autoplay","autoplaySpeed","heroBannerCarousel","pauseOnHover","topBannerPlpCarousel","portfolioCarousel","medium","xlarge","portfolioModalCarousel","pdpLifestyleGalleryCarousel","pdpLifestyleGalleryModalCarousel","productConfiguratorSwatches","gridComponentCarousel","_typeof","iterator","constructor","include","keys","forEach","processInclude","document","ready","SitePreferences","WISHLIST_ENABLED","GIFTREGISTRY_ENABLED","base","Carousel","handleUnslickAndRemoveModal","el","hasClass","modal","initImageZoomCarousel","carousel","$imageZoomCarousel","enquire","register","unmatch","initBase","selectAttribute","colorAttribute","variantAttribute","removeBonusProduct","selectBonusProduct","enableBonusProductSelection","showMoreBonusProducts","addBonusProductsToCart","focusChooseBonusProductModal","trapChooseBonusProductModalFocus","onClosingChooseBonusProductModal","availability","addToCart","initCarousel","initBundleCarousel","updateAttributesAndDetails","on","e","$productContainer","id","find","empty","html","attributesHtml","shortDescription","removeClass","addClass","longDescription","showSpinner","spinner","start","autoShowPDP","trigger","updateAttribute","response","container","product","text","eq","updateAddToCart","attr","readyToOrder","available","enable","toArray","every","item","CS_ENABLED","applePayButton","append","remove","updateAvailability","allAvailable","allReady","message","resources","info_selectforstock","sizeChart","preventDefault","url","ajax","dataType","success","htmlString","content","zoomModal","copyProductLink","event","$temp","select","execCommand","setTimeout","toastTimeout","openShareModal","is","hide","xxsmall","show","closeShareModal","target","has","scrollToSection","scrollIt","position","offset","top","height","animate","scrollTop","openLifestyleModal","pdpLifeStyleGalleryIndex","$lifestyleImageModalCarousel","initialSlide","off","focus","openDetailsView","variantUrl","baseUrl","pid","first","closest","buttonUrl","pidStartIdx","pidSubstr","map","attributeSelect","closeDetailsView","keydown","keyCode","pauseVideo","next","nextSrc","slickActive","siblings","prev","children","prevSrc","removeAttr","activeSrc","active","handlePDPZoom","enableZoom","toggleClass","stopPropagation","not","loginModal","handleSampleModal","breadcrumbsEvents","initEinsteinMutationObserver","querySelector","MutationObserver","observe","childList","subtree","waitForImagesInit","loadSpec","loadSpecifications","updateAddToCartBtn","formValidation","utils","getModalHtmlElement","button","isFavorite","msg","wishlistUrl","wishlistText","$htmlElement","wishlistSubmit","$this","optionId","optionVal","rurl","href","redirectUrl","error","err","responseJSON","loggedin","encodeURIComponent","$redirectElement","each","link","addToWishlist","qs","keyOld","decodeURIComponent","history","pushState","title","login","submit","form","stopImmediatePropagation","serialize","stop","showSuccessModal","showModal","$addToWishlist","wishlistMsg","replaceState","pathname","closeWishlistOnClick","formElement","payload","fields","feedbackElement","parent","Array","isArray","prop","parents","prepend","focusHelper","initEditModalCarousel","initQuickViewCarousel","$thumbnailCarousel","$imageCarousel","$lifestyleImageCarousel","getPidValue","$el","getQuantitySelector","getQuantitySelected","processSwatchValues","msgs","values","attrValue","$attrValue","$swatchButton","selected","assistiveSelectedText","selectable","updateAttrs","attrs","attrsWithSwatches","attrsWithButtons","$attr","isVariationAttr","classList","contains","resetUrl","handleVariantResponse","imagesHtml","$newImageWrapper","availabilityValue","oldData","isChoiceOfBonusProducts","variationAttributes","isVaraint","productType","$imageWrapper","outerHeight","replaceWith","css","waitForImages","promotions","promotion","details","calloutMsg","availabilityMessages","messages","backInStockNotification","backInStockUrl","backInStockMessage","newData","productName","price","list","sales","startingFromPrice","min","JSON","stringify","additionalLinks","selectedValueUrl","method","quantities","images","options","option","$optionEl","optionsHtml","quantity","img","newImg","alt","parseHtml","$html","parseHTML","body","footer","chooseBonusProducts","bonusUrl","bonusChoiceRuleBased","showProductsUrlRuleBased","showProductsUrlListBased","maxBonusItems","uuid","pliUUID","addToCartUrl","pageSize","labels","selectprods","parsedHtml","renderedTemplate","enterDialogMessage","closeButtonText","getOptions","$elOption","urlValue","selectedValueId","String","loadSchematicDrawings","variationItemUrl","displayStatusModal","methods","editBonusProducts","setTabNextFocus","containerSelector","firstElementSelector","lastElementSelector","currentTarget","setPids","push","qty","pidsObj","childProducts","$sampleRalColor","$sampleColorBrand","$sampleColorName","$sampleColorCode","$additionalNotes","parseInt","notes","messageType","errorMessage","ADD_TO_CART_ACTION","outerWidth","newBonusDiscountLineItem","fadeOut","$choiceOfBonusProduct","maxPids","submittedQty","totalQty","optionID","valueId","selectedBonusProductHtml","$selected","count","$readyToOrderBonusProducts","pidsObject","bonusProducts","qtyOption","productId","msgSuccess","reload","fn","callback","waitImgLoad","totalImg","$img","complete","done","updateProductUrl","selectedQuantity","focusParams","firstFocusableEl","linkElements","lastFocusableEl","nextToLastElementSelector","shiftKey","updateAddToRegistry","updateGiftRegistryURLQuantity","giftRegistryLink","addToGiftRegistry","args","prodSetPid","encodedArgs","status","attributes","attributeGroup","ID","attribute","label"],"mappings":"KACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,IAIIC,EAJJ,OAAGH,EAAiBE,KAIhBC,EAASH,EAAiBE,GAAY,CACzCE,EAAGF,EACHG,EAAG,GACHC,QAAS,EACV,EAGAC,EAAQL,GAAUM,KAAKL,EAAOG,QAASH,EAAQA,EAAOG,QAASL,CAAmB,EAGlFE,EAAOE,EAAI,GAGJF,IAhB4BG,OAiBpC,CAIAL,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASL,EAASM,EAAMC,GAC3CZ,EAAoBa,EAAER,EAASM,CAAI,GACtCG,OAAOC,eAAeV,EAASM,EAAM,CAAEK,WAAY,GAAMC,IAAKL,CAAO,CAAC,CAExE,EAGAZ,EAAoBkB,EAAI,SAASb,GACX,aAAlB,OAAOc,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeV,EAASc,OAAOC,YAAa,CAAEC,MAAO,QAAS,CAAC,EAEvEP,OAAOC,eAAeV,EAAS,aAAc,CAAEgB,MAAO,EAAK,CAAC,CAC7D,EAOArB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAA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uI,MAAM,EAAE4B,OAAO9J,EAAKwY,gBAAgB,EAC1D7Y,EAAE,qCAAqC,EAAEwI,KAAKnI,CAAI,EAClDL,EAAE,uBAAuB,EAAE2I,YAAY,gBAAgB,EACvD3I,EAAE,0BAA0B,EAAE0G,MAAM,MAAM,EAEA,IAAtC1G,EAAE,uBAAuB,EAAEM,QAC3BN,EAAE,MAAM,EAAEmK,OACN,0CACJ,EAEJnK,EAAE,oBAAoB,EAAEwI,KAAKnI,EAAK+a,QAAQ,EAC1Cpb,EAAE,uBAAuB,EAAEmK,OACvB,iFAEE9J,EAAK0b,WAAa,QACxB,EACAtQ,WAAW,WACPzL,EAAE,sBAAsB,EAAEoK,OAAO,EAC7BpK,EAAE,YAAY,EAAEM,QAChBsC,SAASoZ,OAAO,CAExB,EAAG,GAAI,EAEf,EACApL,MAAO,WACH5Q,EAAE+I,QAAQ,EAAEiJ,KAAK,CACrB,CACJ,CAAC,CACL,CAAC,CACL,EAEAwB,YAAaA,EACbG,oBAAqBA,EACrBnE,kBAAmB,WACfxP,EAAEic,GAAGtG,cAAgB,SAAUuG,GAIT,SAAdC,IACAC,KAEIF,EAAS,EAEblc,EAAER,IAAI,EAAE0I,GAAG,QAASgU,CAAQ,CAChC,CATA,IAAIG,EAAOrc,EAAE,MAAOR,IAAI,EACpB4c,EAAWC,EAAK/b,OAUpB+b,EAAKnL,KAAK,WACF1R,KAAK8c,UACLH,EAAY,CAEpB,CAAC,EAEDE,EAAKnU,GAAG,OAAQiU,CAAW,CAC/B,CACJ,CACJ,C","file":"cartridges/app_urbanelectric/cartridge/static/default/js/productDetail.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 205);\n","'use strict';\n\nvar carouselConfig = require('../config/carousel');\n\n/**\n * @package Blueacorn/Carousel\n * @version 1.0\n * @author Jamie Smith \n * @copyright Copyright © 2019 Blue Acorn.\n * @param {string} type - type of carousel to load, pulled from carousel.js config\n * @param {string} selector - selector class used to overwrite the carousel config selector value\n * @return {Object} Carousel\n */\nmodule.exports = function (type, selector) {\n this.type = type;\n this.selector = selector || null;\n this.$element = null;\n this.config = {};\n\n this.settings = {\n moduleName: 'Carousel',\n initialized: false\n };\n\n this.setConfig = function (config) {\n var newConfig = {};\n if (typeof this.type === 'string') {\n newConfig = $.extend(config, carouselConfig.defaultSettings, carouselConfig[this.type].settings);\n } else {\n newConfig = $.extend(config, carouselConfig.defaultSettings);\n }\n\n this.config = newConfig;\n };\n\n this.init = function () {\n this.initialized = true;\n\n if (typeof this.type === 'string' && carouselConfig.hasOwnProperty(this.type) && !this.selector) {\n this.$element = $(carouselConfig[type].selector);\n } else if (typeof this.type === 'string' && carouselConfig.hasOwnProperty(this.type) && this.selector) {\n this.$element = $(this.selector);\n }\n\n return this;\n };\n\n this.activate = function () {\n if (!this.initialized) {\n this.init();\n }\n\n if (this.$element.data('carouselEnabled') === false || this.$element.length <= 0) {\n return;\n }\n\n this.setConfig(this.config);\n\n this.$element.slick(this.config);\n };\n\n return this.init();\n};\n","'use strict';\n\nmodule.exports = {\n defaultSettings: {\n dots: false,\n infinite: false,\n mobileFirst: true,\n arrows: true,\n adaptiveHeight: true\n },\n pdpImageCarousel: {\n selector: '.variation-simple .primary-images .carousel.main',\n settings: {\n infinite: false,\n slidesToShow: 1,\n dots: true,\n fade: true,\n slidesToScroll: 1,\n responsive: [\n {\n breakpoint: globalConfig.bp.large,\n settings: {\n asNavFor: '.variation-simple .primary-images .carousel.thumbnails',\n touchMove: false,\n swipeToSlide: false,\n swipe: false,\n dots: false,\n arrows: false\n }\n }\n ]\n }\n },\n pdpProductSetImageCarousel: {\n selector: '.set-item .primary-images .carousel.main',\n settings: {\n infinite: false,\n slidesToShow: 1,\n dots: true,\n fade: true,\n slidesToScroll: 1\n }\n },\n pdpImageThumbnailsCarousel: {\n selector: '.variation-simple .primary-images .carousel.thumbnails',\n settings: {\n infinite: false,\n slidesToShow: 4,\n slidesToScroll: 1,\n asNavFor: '.variation-simple .primary-images .carousel.main',\n variableWidth: true,\n focusOnSelect: true\n }\n },\n bundleImageCarousel: {\n selector: '.product-detail.bundle .primary-images .carousel.main',\n settings: {\n infinite: false,\n slidesToShow: 1,\n dots: true,\n fade: true,\n slidesToScroll: 1,\n responsive: [\n {\n breakpoint: globalConfig.bp.large,\n settings: {\n asNavFor: '.product-detail.bundle .primary-images .carousel.thumbnails',\n dots: false,\n arrows: false\n }\n }\n ]\n }\n },\n bundlepdpImageThumbnailsCarousel: {\n selector: '.product-detail.bundle .primary-images .carousel.thumbnails',\n settings: {\n infinite: false,\n slidesToShow: 4,\n slidesToScroll: 1,\n asNavFor: '.product-detail.bundle .primary-images .carousel.main',\n variableWidth: true,\n focusOnSelect: true\n }\n },\n editModalImageCarousel: {\n selector: '#edickViewModal .primary-images .carousel.main',\n settings: {\n infinite: false,\n slidesToShow: 1,\n dots: true,\n fade: true,\n slidesToScroll: 1\n }\n },\n bonusImageCarousel: {\n selector: '#chooseBonusProductModal .carousel.main',\n settings: {\n infinite: false,\n slidesToShow: 1,\n dots: false,\n fade: true,\n slidesToScroll: 1\n }\n },\n quickViewImageCarousel: {\n selector: '#quickViewModal .primary-images .carousel.main',\n settings: {\n infinite: false,\n slidesToShow: 1,\n dots: true,\n fade: true,\n slidesToScroll: 1\n }\n },\n productTileCarousel: {\n selector: '.product-listing.slider',\n settings: {\n slidesToShow: 2,\n slidesToScroll: 1,\n responsive: [\n {\n breakpoint: globalConfig.bp.small,\n settings: {\n slidesToShow: 3,\n slidesToScroll: 2\n }\n },\n {\n breakpoint: globalConfig.bp.large,\n settings: {\n slidesToShow: 4,\n slidesToScroll: 3\n }\n }\n ]\n }\n },\n headerBannerCarousel: {\n selector: '.carousel.page-builder',\n settings: {\n infinite: false\n }\n },\n imageZoomCarousel: {\n selector: '.carousel.image-zoom',\n settings: {\n infinite: false,\n slidesToShow: 1,\n fade: true,\n slidesToScroll: 1,\n dots: false\n }\n }\n};\n","module.exports = {\n getParameter: function (paramName) {\n var searchString = window.location.search.substring(1),\n i,\n val,\n params = searchString.split('&');\n\n for (i = 0; i < params.length; i++) {\n val = params[i].split('=');\n\n if (val[0] === paramName) {\n return val[1];\n }\n }\n return null;\n },\n removeParam: function (key, sourceURL) {\n var rtn = sourceURL.split('?')[0],\n param,\n paramsArr = [],\n queryString = (sourceURL.indexOf('?') !== -1) ? sourceURL.split('?')[1] : '';\n if (queryString !== '') {\n paramsArr = queryString.split('&');\n for (var i = paramsArr.length - 1; i >= 0; i -= 1) {\n param = paramsArr[i].split('=')[0];\n if (param === key) {\n paramsArr.splice(i, 1);\n }\n }\n rtn = rtn + '?' + paramsArr.join('&');\n }\n return rtn;\n },\n updateQueryStringParameter: function (uri, key, value) {\n var re = new RegExp('([?&])' + key + '=.*?(&|$)', 'i');\n var separator = uri.indexOf('?') !== -1 ? '&' : '?';\n if (uri.match(re)) {\n return uri.replace(re, '$1' + key + '=' + value + '$2');\n }\n return uri + separator + key + '=' + value;\n },\n\n arraymove: function (arr, fromIndex, toIndex) {\n var element = arr[fromIndex];\n arr.splice(fromIndex, 1);\n arr.splice(toIndex, 0, element);\n }\n};\n","'use strict';\n\nmodule.exports = {\n defaultSettings: {\n dots: false,\n infinite: false,\n mobileFirst: true,\n arrows: true,\n adaptiveHeight: true\n },\n pdpImageCarousel: {\n selector: '.variation-simple .primary-images .carousel.main',\n settings: {\n infinite: true,\n slidesToShow: 1,\n dots: false,\n fade: true,\n slidesToScroll: 1\n }\n },\n pdpProductSetImageCarousel: {\n selector: '.set-item .primary-images .carousel.main',\n settings: {\n infinite: false,\n slidesToShow: 1,\n dots: true,\n fade: true,\n slidesToScroll: 1\n }\n },\n pdpImageThumbnailsCarousel: {\n selector: '.variation-simple .primary-images .carousel.thumbnails',\n settings: {\n infinite: false,\n slidesToShow: 4,\n slidesToScroll: 1,\n asNavFor: '.variation-simple .primary-images .carousel.main',\n variableWidth: true,\n focusOnSelect: true\n }\n },\n bundleImageCarousel: {\n selector: '.product-detail.bundle .primary-images .carousel.main',\n settings: {\n infinite: false,\n slidesToShow: 1,\n dots: true,\n fade: true,\n slidesToScroll: 1,\n responsive: [\n {\n breakpoint: globalConfig.bp.large,\n settings: {\n asNavFor: '.product-detail.bundle .primary-images .carousel.thumbnails',\n dots: false,\n arrows: false\n }\n }\n ]\n }\n },\n bundlepdpImageThumbnailsCarousel: {\n selector: '.product-detail.bundle .primary-images .carousel.thumbnails',\n settings: {\n infinite: false,\n slidesToShow: 4,\n slidesToScroll: 1,\n asNavFor: '.product-detail.bundle .primary-images .carousel.main',\n variableWidth: true,\n focusOnSelect: true\n }\n },\n editModalImageCarousel: {\n selector: '#edickViewModal .primary-images .carousel.main',\n settings: {\n infinite: false,\n slidesToShow: 1,\n dots: true,\n fade: true,\n slidesToScroll: 1\n }\n },\n bonusImageCarousel: {\n selector: '#chooseBonusProductModal .carousel.main',\n settings: {\n infinite: false,\n slidesToShow: 1,\n dots: false,\n fade: true,\n slidesToScroll: 1\n }\n },\n quickViewImageCarousel: {\n selector: '#quickViewModal .primary-images .carousel.main',\n settings: {\n infinite: false,\n slidesToShow: 1,\n dots: true,\n fade: true,\n slidesToScroll: 1\n }\n },\n productTileCarousel: {\n selector: '.product-listing.slider',\n settings: {\n slidesToShow: 2,\n slidesToScroll: 1,\n responsive: [\n {\n breakpoint: globalConfig.bp.small,\n settings: {\n slidesToShow: 3,\n slidesToScroll: 2\n }\n },\n {\n breakpoint: globalConfig.bp.large,\n settings: {\n slidesToShow: 4,\n slidesToScroll: 3\n }\n }\n ]\n }\n },\n featureCarousel: {\n selector: '.carousel.feature-slider',\n settings: {\n infinite: true,\n dots: true,\n customPaging: function (slider, i) {\n return (i + 1) + ' / ' + slider.$slides.length;\n }\n }\n },\n heroBannerCarouselAutoplay: {\n selector: '.carousel.page-builder:not(\".autoplay\")',\n settings: {\n infinite: true,\n fade: true,\n speed: 1000,\n cssEase: 'ease-in-out',\n touchThreshold: '50',\n autoplay: false,\n autoplaySpeed: 4000,\n adaptiveHeight: false\n }\n },\n heroBannerCarousel: {\n selector: '.carousel.page-builder.autoplay',\n settings: {\n infinite: true,\n fade: true,\n speed: 1000,\n cssEase: 'ease-in-out',\n touchThreshold: '50',\n autoplay: true,\n pauseOnHover: false,\n autoplaySpeed: 4000,\n adaptiveHeight: false\n }\n },\n imageZoomCarousel: {\n selector: '.carousel.image-zoom',\n settings: {\n infinite: false,\n slidesToShow: 1,\n fade: true,\n slidesToScroll: 1,\n dots: false\n }\n },\n topBannerPlpCarousel: {\n selector: '.carousel.banner-custom-carousel',\n settings: {\n infinite: true,\n slidesToShow: 1,\n fade: true,\n slidesToScroll: 1,\n dots: false\n }\n },\n portfolioCarousel: {\n selector: '.carousel.portfolio-carousel',\n settings: {\n slidesToShow: 1,\n infinite: true,\n dots: false,\n mobileFirst: true,\n arrows: false,\n focusOnSelect: false,\n variableWidth: true,\n asNavFor: '.carousel.portfolio-modal-carousel',\n responsive: [\n {\n breakpoint: globalConfig.bp.medium,\n settings: {\n slidesToShow: 3,\n arrows: true,\n variableWidth: true\n }\n },\n {\n breakpoint: globalConfig.bp.xlarge,\n settings: {\n slidesToShow: 4,\n arrows: true,\n variableWidth: false\n }\n }\n ]\n }\n },\n portfolioModalCarousel: {\n selector: '.carousel.portfolio-modal-carousel',\n settings: {\n infinite: true,\n slidesToShow: 1,\n fade: true,\n speed: 1,\n slidesToScroll: 1,\n responsive: [\n {\n breakpoint: globalConfig.bp.large,\n settings: {\n swipe: false\n }\n }\n ]\n }\n },\n pdpLifestyleGalleryCarousel: {\n selector: '.lifestyle-gallery',\n settings: {\n infinite: true,\n slidesToShow: 2,\n slidesToScroll: 1,\n dots: false,\n responsive: [\n {\n breakpoint: globalConfig.bp.medium,\n settings: {\n slidesToShow: 3,\n slidesToScroll: 1\n }\n }\n ]\n }\n },\n pdpLifestyleGalleryModalCarousel: {\n selector: '.lifestyle-gallery-modal',\n settings: {\n infinite: true,\n slidesToShow: 1,\n slidesToScroll: 1,\n dots: false,\n adaptiveHeight: true,\n speed: 1,\n fade: true,\n responsive: [\n {\n breakpoint: globalConfig.bp.large,\n settings: {\n swipe: false\n }\n }\n ]\n }\n },\n productConfiguratorSwatches: {\n selector: '.swatch-slider',\n settings: {\n infinite: true,\n slidesToShow: 1,\n slidesToScroll: 1,\n speed: 300,\n dots: false,\n adaptiveHeight: true,\n fade: true\n }\n },\n gridComponentCarousel: {\n selector: '.gridcomponentcarousel',\n settings: {\n infinite: true,\n slidesToShow: 2,\n slidesToScroll: 1,\n dots: false,\n speed: 750,\n arrows: true,\n autoplay: true,\n pauseOnHover: false,\n autoplaySpeed: 4000,\n responsive: [\n {\n breakpoint: globalConfig.bp.medium,\n settings: {\n slidesToShow: 3,\n slidesToScroll: 1\n }\n }\n ]\n }\n }\n};\n","'use strict';\n\nmodule.exports = function (include) {\n if (typeof include === 'function') {\n include();\n } else if (typeof include === 'object') {\n Object.keys(include).forEach(function (key) {\n if (typeof include[key] === 'function') {\n include[key]();\n }\n });\n }\n};\n","'use strict';\n\nvar processInclude = require('base/util');\n\n$(document).ready(function () {\n processInclude(require('./product/detail'));\n\n if (SitePreferences.WISHLIST_ENABLED) {\n processInclude(require('./product/wishlist'));\n }\n\n if (SitePreferences.GIFTREGISTRY_ENABLED) {\n processInclude(require('ba-base/product/giftRegistry'));\n }\n});\n\n","'use strict';\nvar base = require('./base');\nvar Carousel = require('../components/carousel');\n\n/**\n * Handles unslicking the carousel and removing the bootstrap modal\n * @param {Object} el - the carousel element\n */\nfunction handleUnslickAndRemoveModal(el) {\n if (el.hasClass('slick-initialized')) {\n el.slick('unslick');\n }\n $('#image-zoom-modal').modal('hide');\n}\n\n/**\n * Registers medium browser width with enquire.\n * When width is greater than medium, the carousel is activated.\n * When the width is less than medium, the carousel element is unslicked and the zoom modal is removed.\n * @param {Object} carousel - the carousel object\n */\nfunction handleBrowserWidth(carousel) {\n enquire.register('screen and (min-width: ' + (globalConfig.bp.medium + 1) + 'px)', {\n match: function () {\n if (!carousel.$element.hasClass('slick-initialized')) {\n carousel.activate();\n }\n },\n unmatch: function () {\n handleUnslickAndRemoveModal(carousel.$element);\n }\n });\n}\n\n/**\n * Inits the image zoom carousel, passes carousel to handleBrowserWidth\n */\nfunction initImageZoomCarousel() {\n var $imageZoomCarousel = new Carousel('imageZoomCarousel');\n handleBrowserWidth($imageZoomCarousel);\n}\n\n/**\n * registers handleUnslickAndRemoveModal to zoom-close click event\n */\nfunction initZoomRemove() {\n $('#zoom-close').on('click', function () {\n handleUnslickAndRemoveModal($('.image-zoom'));\n });\n}\n\n/**\n * Manually builds the first Product-Variation url for View Details button so that all attributes are included\n * @param {string} variantUrl - url for Product-Variation Ajax call - if left off, select first option for each variationAttribute\n */\nfunction callProductVariant(variantUrl) {\n var url;\n var $productContainer = $('.variation-attribute:visible').first().closest('.set-item');\n if (!$productContainer.length) {\n $productContainer = $('.variation-attribute:visible').first().closest('.details-view');\n }\n\n if (variantUrl && variantUrl !== null && variantUrl !== undefined) {\n // Call for specified variant\n url = variantUrl;\n } else {\n // Build url based on first selection from each variationAttribute\n\n // get url from first variationAttribute value's button and extract base pipeline url\n var buttonUrl = $('.variation-attribute:visible').find('.attribute button').first().data('url');\n var baseUrl = buttonUrl.substring(0, buttonUrl.indexOf('?'));\n\n // get pid from buttonUrl\n var pidStartIdx = buttonUrl.indexOf('pid=');\n var pidSubstr = buttonUrl.substring(pidStartIdx);\n var pid = pidSubstr.substring(4, pidSubstr.indexOf('&'));\n\n // select value for each variationAttribute\n var varString = $('.variation-attribute:visible').map(function () {\n return 'dwvar_double-arm-beldi_' + $(this).data('attr') + '=' + $(this).find('.attribute button').first()\n .find('.selectable')\n .data('attr-value');\n }).toArray().join('&');\n\n // combine into url for ajax call\n url = baseUrl + '?' + varString + '&pid=' + pid + '&quantity=1';\n }\n\n // call Product-Variation ajax using frontend flow from base so that page data is updated correctly\n base.attributeSelect(url, $productContainer);\n}\n\nmodule.exports = {\n initBase: function () {\n base.selectAttribute();\n base.colorAttribute();\n base.variantAttribute();\n base.removeBonusProduct();\n base.selectBonusProduct();\n base.enableBonusProductSelection();\n base.showMoreBonusProducts();\n base.addBonusProductsToCart();\n base.focusChooseBonusProductModal();\n base.trapChooseBonusProductModalFocus();\n base.onClosingChooseBonusProductModal();\n },\n availability: base.availability,\n addToCart: base.addToCart,\n initCarousel: base.initCarousel,\n initBundleCarousel: base.initBundleCarousel,\n\n updateAttributesAndDetails: function () {\n $('body').on('product:statusUpdate', function (e, data) {\n var $productContainer = $('.product-detail[data-pid=\"' + data.id + '\"]');\n\n $productContainer.find('.description-and-detail .product-attributes')\n .empty()\n .html(data.attributesHtml);\n\n if (data.shortDescription) {\n $productContainer.find('.description-and-detail .description')\n .removeClass('hidden-xl-down');\n $productContainer.find('.description-and-detail .description .content')\n .empty()\n .html(data.shortDescription);\n } else {\n $productContainer.find('.description-and-detail .description')\n .addClass('hidden-xl-down');\n }\n\n if (data.longDescription) {\n $productContainer.find('.description-and-detail .details')\n .removeClass('hidden-xl-down');\n $productContainer.find('.description-and-detail .details .content')\n .empty()\n .html(data.longDescription);\n } else {\n $productContainer.find('.description-and-detail .details')\n .addClass('hidden-xl-down');\n }\n });\n },\n\n showSpinner: function () {\n $('body').on('product:beforeAddToCart product:beforeAttributeSelect', function () {\n $.spinner().start();\n });\n },\n autoShowPDP: function () {\n // This will auto-display the \"View Details\" page if a sku is supplied in the Product-Show url params\n $(document).ready(function () {\n if ($('.view-details').data('show-on-load') === true) {\n $('.ctas .view-details').trigger('click');\n }\n });\n },\n updateAttribute: function () {\n $('body').on('product:afterAttributeSelect', function (e, response) {\n if ($('.product-detail>.bundle-items').length) {\n response.container.data('pid', response.data.product.id);\n response.container.find('.product-id').text(response.data.product.id);\n } else if ($('.product-set-detail').eq(0)) {\n response.container.data('pid', response.data.product.id);\n response.container.find('.product-id').text(response.data.product.id);\n response.container.find('.product-sku').text(response.data.product.id);\n } else {\n $('.product-id').text(response.data.product.id);\n $('.product-detail:not(\".bundle-item\")').data('pid', response.data.product.id);\n }\n });\n },\n updateAddToCart: function () {\n $('body').on('product:updateAddToCart', function (e, response) {\n // update local add to cart (for sets)\n $('button.add-to-cart', response.$productContainer).attr('disabled',\n (!response.product.readyToOrder || !response.product.available));\n\n var enable = $('.product-availability').toArray().every(function (item) {\n return $(item).data('available') && $(item).data('ready-to-order');\n });\n $('button.add-to-cart-global').attr('disabled', !enable);\n\n // Logic for applePay from CyberSource cartridge\n if (SitePreferences.CS_ENABLED) {\n if (response.product.readyToOrder) {\n var applePayButton = $('.apple-pay-pdp', response.$productContainer);\n if (applePayButton.length !== 0) {\n applePayButton.attr('sku', response.product.id);\n } else {\n if ($('.apple-pay-pdp').length === 0) { // eslint-disable-line no-lonely-if\n $('.cart-and-ipay').append('');\n }\n }\n } else {\n $('.apple-pay-pdp').remove();\n }\n }\n });\n },\n updateAvailability: function () {\n $('body').on('product:updateAvailability', function (e, response) {\n $('div.availability', response.$productContainer)\n .data('ready-to-order', response.product.readyToOrder)\n .data('available', response.product.available);\n\n $('.availability-msg', response.$productContainer)\n .empty().html(response.message);\n\n if ($('.global-availability').length) {\n var allAvailable = $('.product-availability').toArray()\n .every(function (item) { return $(item).data('available'); });\n\n var allReady = $('.product-availability').toArray()\n .every(function (item) { return $(item).data('ready-to-order'); });\n\n $('.global-availability')\n .data('ready-to-order', allReady)\n .data('available', allAvailable);\n\n $('.global-availability .availability-msg').empty()\n .html(allReady ? response.message : response.resources.info_selectforstock);\n }\n });\n },\n sizeChart: function () {\n $('.size-chart a').on('click', function (e) {\n e.preventDefault();\n var url = $(this).attr('href');\n $.ajax({\n url: url,\n type: 'get',\n dataType: 'json',\n success: function (data) {\n if ($('#sizeChartModal').length !== 0) {\n $('#sizeChartModal').remove();\n }\n\n var htmlString = ''\n + '
'\n + '
'\n + ''\n + '
'\n + '
'\n + ' '\n + '
'\n + '
' + data.content + '
'\n + '
'\n + '
'\n + '
'\n + '
';\n\n $('body').append(htmlString);\n $('#sizeChartModal').modal('show');\n }\n });\n });\n },\n zoomModal: function () {\n $(document).on('click', '.icon-pdp-zoom', function () {\n initZoomRemove();\n $('#image-zoom-modal').modal('show');\n $('#image-zoom-modal').on('shown.bs.modal', function () {\n initImageZoomCarousel();\n });\n });\n },\n copyProductLink: function () {\n $('body').on('click', '#fa-link', function () {\n event.preventDefault();\n var $temp = $('');\n $('body').append($temp);\n $temp.val($('#shareUrl').val()).select();\n document.execCommand('copy');\n $temp.remove();\n $('.copy-link-message').attr('role', 'alert');\n $('.copy-link-message').removeClass('d-none');\n setTimeout(function () {\n $('.copy-link-message').addClass('d-none');\n }, globalConfig.toastTimeout);\n });\n },\n\n openShareModal: function () {\n $('.product-wrapper .icon-share').on('click', function () {\n // in certain scenarios the modal background (which is used for my account / mini cart as well) is already visible\n // we only want to show it on 320 for the share modal\n if ($('.modal-background').is(':visible')) {\n $('.modal-background').hide();\n }\n $('.product-share-modal').removeClass('d-none');\n enquire.register('screen and (max-width: ' + (globalConfig.bp.xxsmall + 1) + 'px)', {\n match: function () {\n $('.modal-background').show();\n }\n });\n });\n },\n\n closeShareModal: function () {\n var container = $('.product-share-modal');\n\n $('.product-share-modal .icon-close').on('click', function () {\n container.addClass('d-none');\n enquire.register('screen and (max-width: ' + (globalConfig.bp.xxsmall + 1) + 'px)', {\n match: function () {\n $('.modal-background').hide();\n }\n });\n });\n\n $(document).on('click', function (e) {\n // if the target of the click isn't the container\n // nor a descendant of the container\n // nor the share icon\n // and the container isn't already hid\n if (!container.is(e.target)\n && container.has(e.target).length === 0\n && !$(e.target).hasClass('icon-share')\n && !container.hasClass('d-none')) {\n enquire.register('screen and (max-width: ' + (globalConfig.bp.xxsmall + 1) + 'px)', {\n match: function () {\n $('.modal-background').hide();\n }\n });\n container.addClass('d-none');\n }\n });\n },\n\n scrollToSection: function () {\n var scrollIt = function () {\n var position = $('.lifestyle-gallery').offset().top - $('.header.container').height() - 50;\n $('html, body').animate({\n scrollTop: position\n }, 500);\n };\n\n $(document).on('click', '.view-gallery', function () {\n scrollIt();\n });\n\n $(document).on('click', '.view-gallery-mobile', function () {\n scrollIt();\n });\n },\n\n openLifestyleModal: function () {\n var pdpLifeStyleGalleryIndex = 0;\n var $lifestyleImageModalCarousel = new Carousel('pdpLifestyleGalleryModalCarousel');\n\n $('#lifestyle-gallery-modal').on('shown.bs.modal', function () {\n $lifestyleImageModalCarousel.setConfig({ initialSlide: pdpLifeStyleGalleryIndex });\n $lifestyleImageModalCarousel.activate();\n $(window).on('resize', function () {\n $('.lifestyle-gallery-modal').slick('refresh');\n });\n });\n\n $('#lifestyle-gallery-modal').on('hidden.bs.modal', function () {\n $('.lifestyle-gallery-modal').slick('unslick');\n $(window).off('resize');\n });\n\n $('#pdp-lifestyle-gallery .gallery-slide').on('click', function () {\n pdpLifeStyleGalleryIndex = $(this).data('slickIndex');\n $('#lifestyle-gallery-modal').modal('show');\n $('.lifestyle-gallery-modal').find('.slick-list').attr('tabindex', 0).focus();\n });\n },\n\n openDetailsView: function () {\n $('.ctas .view-details').on('click', function () {\n $('.details-view').removeClass('d-none');\n callProductVariant($(this).data('default-variation-url'));\n $('.top-content').addClass('d-none');\n $('.additional-images').addClass('d-none');\n $('.lifestyle-gallery').addClass('d-none');\n $('.recommendations').addClass('d-none');\n $('.einstein-pdp-recommendations').addClass('d-none');\n $('.product-breadcrumb').addClass('d-none');\n // scroll to top\n $('html, body').animate({\n scrollTop: $('.lifestyle-gallery').offset().top - $('.header.container').height() - 50\n }, 500);\n });\n },\n\n closeDetailsView: function () {\n $('.details-view .icon-close').on('click', function () {\n $('.details-view').addClass('d-none');\n $('.top-content').removeClass('d-none');\n $('.additional-images').removeClass('d-none');\n $('.lifestyle-gallery').removeClass('d-none');\n $('.recommendations').removeClass('d-none');\n $('.einstein-pdp-recommendations').removeClass('d-none');\n $('.product-breadcrumb').removeClass('d-none');\n $('.carousel.main').slick('setPosition');\n });\n $(document).keydown(function (e) {\n if (e.keyCode === 27) {\n $('.details-view').addClass('d-none');\n $('.top-content').removeClass('d-none');\n $('.additional-images').removeClass('d-none');\n $('.lifestyle-gallery').removeClass('d-none');\n $('.recommendations').removeClass('d-none');\n $('.product-breadcrumb').removeClass('d-none');\n $('.carousel.main').slick('setPosition');\n }\n });\n },\n\n pauseVideo: function () {\n $(document).on('click', '.slick-arrow', function () {\n var slickActive = $(this).siblings('.slick-list').find('.slick-active');\n // unmount the video of the previous slide if going forward\n if (slickActive.prev().children('iframe')) {\n var prev = slickActive.prev().children('iframe');\n var prevSrc = prev.attr('src');\n prev.removeAttr('src');\n prev.attr('src', prevSrc);\n }\n // unmount the video of the previous slide if going backward\n if (slickActive.next().children('iframe')) {\n var next = slickActive.next().children('iframe');\n var nextSrc = next.attr('src');\n next.removeAttr('src');\n next.attr('src', nextSrc);\n }\n });\n\n $(document).on('click', '.icon-close', function () {\n // unmount the video of current slide if clicking x\n var slickActive = $('.lifestyle-gallery-modal').find('.slick-active');\n var active = slickActive.children('iframe');\n if (active) {\n var activeSrc = active.attr('src');\n active.removeAttr('src');\n active.attr('src', activeSrc);\n }\n });\n\n $(document).on('click', function (e) {\n var container = $('.modal-content');\n\n if (!container.is(e.target) && container.has(e.target).length === 0) {\n var slickActive = $('.lifestyle-gallery-modal').find('.slick-active');\n var active = slickActive.children('iframe');\n if (active) {\n var activeSrc = active.attr('src');\n active.removeAttr('src');\n active.attr('src', activeSrc);\n }\n }\n });\n },\n\n handlePDPZoom: function () {\n var enableZoom = function () {\n if (!$('.product-detail').hasClass('pdp-image-zoom')) {\n $('.product-detail').toggleClass('pdp-image-zoom');\n $('.carousel.main').slick('setPosition');\n }\n };\n\n $('.primary-images-pdp button').on('click', function (e) {\n e.stopPropagation();\n });\n $('.primary-images-pdp').not('button').not('pdp-close').on('click', function () {\n enableZoom();\n });\n $('.pdp-standard-image-container').not('button').not('pdp-close').on('click', function () {\n enableZoom();\n });\n $('.pdp-close').on('click', function () {\n if ($('.product-detail').hasClass('pdp-image-zoom')) {\n $('.product-detail').removeClass('pdp-image-zoom');\n $('.carousel.main').slick('setPosition');\n }\n });\n },\n\n loginModal: function () {\n $('body').on('click', '.add-tocart-login-modal', function (e) {\n e.preventDefault();\n $('body').trigger('display:loginModal');\n });\n },\n\n handleSampleModal: function () {\n $('body').on('click', '.open-sample-modal', function (e) {\n e.preventDefault();\n\n $('#sampleModal').modal('show');\n $('#sampleModal').find('select').trigger('change');\n });\n },\n\n breadcrumbsEvents: function () {\n $('.breadcrumb-trigger').on('mouseenter', function () {\n $(this).find('.breadcrumb-hover-dropdown').removeClass('d-none');\n });\n\n $('.breadcrumb-trigger').on('mouseleave', function () {\n $(this).find('.breadcrumb-hover-dropdown').addClass('d-none');\n });\n\n $('.breadcrumb-hide-dropdown').on('click', function (e) {\n e.preventDefault();\n\n $(this).closest('.breadcrumb-hover-dropdown').addClass('d-none');\n });\n },\n\n initEinsteinMutationObserver: function () {\n // Find Einstein recommendations container.\n var target = document.querySelector('.einstein-pdp-recommendations');\n // If container exists, add logic to lazy load images.\n if (target) {\n // Revalidate lazy loaded images before adding observer to ensure no gaps.\n $(document).trigger('blazy:revalidate');\n // Create mututation observer to kick off lazy load event.\n var observer = new MutationObserver(function () {\n // Lazy load images if not already loaded.\n $(document).trigger('blazy:revalidate');\n });\n // Target subtree modifications to Einstein recommendations only.\n observer.observe(target, { childList: true, subtree: true });\n }\n },\n\n focusChooseBonusProductModal: base.focusChooseBonusProductModal(),\n waitForImagesInit: base.waitForImagesInit(),\n loadSpec: base.loadSpecifications(),\n updateAddToCartBtn: base.updateAddToCartBtn()\n};\n","'use strict';\n\nvar formValidation = require('base/components/formValidation');\nvar utils = require('../components/utils');\n\n/**\n * Generates the modal window on the first call.\n * appends params to a url\n * @param {string} data - data returned from the server's ajax call\n * @param {Object} button - button that was clicked to add a product to the wishlist\n */\nfunction getModalHtmlElement(data, button) {\n if ($('.wishlistModal').length !== 0) {\n $('.wishlistModal').remove();\n }\n\n if (data.isFavorite) {\n var htmlString = '
'\n + '
'\n + ''\n + '
'\n + '
'\n + '

' + data.msg + '

'\n + ' ' + data.wishlistText + ''\n + '
'\n + '
'\n + '
'\n + '
';\n\n var $htmlElement = $(htmlString);\n\n $('.add-to-wish-list-container').append($htmlElement);\n\n $('.wishlistModal').modal('show');\n\n setTimeout(function () {\n $('.wishlistModal').modal('hide');\n }, 3000);\n\n button.removeAttr('disabled');\n }\n}\n\nvar wishlistSubmit = function ($this, url, isFavorite, pid, optionId, optionVal, wishlistUrl, wishlistText, button) {\n $.ajax({\n url: url,\n type: isFavorite ? 'get' : 'post',\n dataType: 'json',\n data: {\n pid: pid,\n optionId: optionId,\n optionVal: optionVal,\n rurl: window.location.href\n },\n success: function (data) {\n if (isFavorite) {\n $this.data('favorited', false);\n $this.removeClass('active');\n } else {\n $this.data('favorited', true);\n $this.addClass('active');\n }\n data.isFavorite = !isFavorite;\n data.wishlistUrl = wishlistUrl;\n data.wishlistText = wishlistText;\n if (data.redirectUrl) {\n window.location.href = data.redirectUrl;\n } else {\n getModalHtmlElement(data, button);\n }\n },\n error: function (err) {\n if (!err.responseJSON.loggedin) {\n var redirectUrl = (window.location.search === '') ? window.location.href + '?' : window.location.href + '&';\n\n redirectUrl += 'wishlistAction=add&wishlistPid=' + encodeURIComponent(pid) + '&wihslistOptionId=' + encodeURIComponent(optionId) + '&wishlistOptionVal=' + encodeURIComponent(optionVal);\n\n var $redirectElement = $('');\n\n $('.create-account-link').each(function () {\n var link = $(this).hasClass('trade') ? $(this).attr('href') + '&' : $(this).attr('href') + '?';\n link = link + 'rurlOverride=' + encodeURIComponent(redirectUrl);\n $(this).attr('href', link);\n });\n\n $('#loginModal form.login').append($redirectElement);\n $('body').trigger('display:loginModal');\n } else if (err.responseJSON.redirectUrl) {\n window.location.href = err.responseJSON.redirectUrl;\n } else {\n getModalHtmlElement(err, button);\n }\n }\n });\n};\n\nmodule.exports = {\n addToWishlist: function () {\n $('.add-to-wish-list').on('click', function (e) {\n e.preventDefault();\n var $this = $(this);\n var isFavorite = $this.data('favorited');\n var url = isFavorite ? $this.data('removeHref') : $this.data('addHref');\n var wishlistUrl = $this.data('wishlistHref');\n var wishlistText = $this.data('wishlistText');\n var button = $this;\n var pid = $this.data('pid');\n var optionId = $this.closest('.product-detail').find('.product-option').attr('data-option-id');\n var optionVal = $this.closest('.product-detail').find('.options-select option:selected').attr('data-value-id');\n optionId = optionId || null;\n optionVal = optionVal || null;\n if (!url || !pid) {\n return;\n }\n\n $this.attr('disabled', true);\n\n wishlistSubmit($this, url, isFavorite, pid, optionId, optionVal, wishlistUrl, wishlistText, button);\n });\n\n (function () {\n var qs = function (keyOld) {\n var key = keyOld.replace(/[*+?^$.[\\]{}()|\\\\/]/g, '\\\\$&'); // escape RegEx meta chars\n var match = location.search.match(new RegExp('[?&]' + key + '=([^&]+)(&|$)'));\n return match && decodeURIComponent(match[1].replace(/\\+/g, ' '));\n };\n\n if (qs('wishlistAction') === 'add') {\n var $this = $('.add-to-wish-list').first();\n var button = $this;\n var isFavorite = false;\n var pid = qs('wishlistPid');\n var optionId = qs('wishlistOptionId');\n var optionVal = qs('wishlistOptionVal');\n var wishlistUrl = $this.data('wishlistHref');\n var wishlistText = $this.data('wishlistText');\n var url = $this.data('addHref');\n wishlistSubmit($this, url, isFavorite, pid, optionId, optionVal, wishlistUrl, wishlistText, button);\n window.history.pushState({}, document.title, window.location.href.replace(window.location.search, ''));\n }\n }());\n },\n login: function () {\n $('form.login').off('submit').submit(function (e) {\n var form = $(this);\n e.preventDefault();\n e.stopImmediatePropagation();\n var url = form.attr('action');\n form.spinner().start();\n $('form.login').trigger('login:submit', e);\n $.ajax({\n url: url,\n type: 'post',\n dataType: 'json',\n data: form.serialize(),\n success: function (data) {\n form.spinner().stop();\n if (!data.success) {\n formValidation(form, data);\n $('form.login').trigger('login:error', data);\n } else {\n $('form.login').trigger('login:success', data);\n location.href = data.redirectUrl;\n }\n },\n error: function (data) {\n if (data.responseJSON.redirectUrl) {\n window.location.href = data.responseJSON.redirectUrl;\n } else {\n $('form.login').trigger('login:error', data);\n form.spinner().stop();\n }\n }\n });\n return false;\n });\n },\n showSuccessModal: function () {\n var showModal = utils.getParameter('successWishlist');\n var $addToWishlist = $('.add-to-wish-list');\n\n var isFavorite = $addToWishlist.data('favorited');\n var wishlistUrl = $addToWishlist.data('wishlistHref');\n var wishlistText = $addToWishlist.data('wishlistText');\n var wishlistMsg = $addToWishlist.data('successMsg');\n var data = {};\n\n data.isFavorite = isFavorite;\n data.wishlistUrl = wishlistUrl;\n data.wishlistText = wishlistText;\n data.msg = wishlistMsg;\n\n if (isFavorite && showModal === 'true') {\n $(document).on('pageLoaded:init', function () {\n getModalHtmlElement(data, $addToWishlist);\n\n // remove 'successWishlist' parameter so when page is reloaded event will not be fired\n history.replaceState && history.replaceState(null, '', location.pathname + location.search.replace(/[\\?&]successWishlist=[^&]+/, '').replace(/^&/, '?')); // eslint-disable-line\n });\n }\n },\n\n closeWishlistOnClick: function () {\n $('body').on('click', function (e) {\n // hide wishlist modal if its opened and user clicks outside of it\n if (!$('.wishlistModal').has(e.target).length && $('.wishlistModal').hasClass('show') && !$(e.target).hasClass('wishlistModal')) {\n $('.wishlistModal').modal('hide');\n }\n });\n }\n};\n","'use strict';\n\n/**\n * Remove all validation. Should be called every time before revalidating form\n * @param {element} form - Form to be cleared\n * @returns {void}\n */\nfunction clearFormErrors(form) {\n $(form).find('.form-control.is-invalid').removeClass('is-invalid');\n}\n\nmodule.exports = function (formElement, payload) {\n // clear form validation first\n clearFormErrors(formElement);\n $('.alert', formElement).remove();\n\n if (typeof payload === 'object' && payload.fields) {\n Object.keys(payload.fields).forEach(function (key) {\n if (payload.fields[key]) {\n var feedbackElement = $(formElement).find('[name=\"' + key + '\"]')\n .parent()\n .children('.invalid-feedback');\n\n if (feedbackElement.length > 0) {\n if (Array.isArray(payload[key])) {\n feedbackElement.html(payload.fields[key].join('
'));\n } else {\n feedbackElement.html(payload.fields[key]);\n }\n feedbackElement.siblings('.form-control').addClass('is-invalid');\n }\n }\n });\n }\n if (payload && payload.error) {\n var form = $(formElement).prop('tagName') === 'FORM'\n ? $(formElement)\n : $(formElement).parents('form');\n\n form.prepend('
'\n + payload.error.join('
') + '
');\n }\n};\n","'use strict';\n\nvar Carousel = require('../components/carousel');\nvar focusHelper = require('base/components/focus');\nvar formValidation = require('base/components/formValidation');\n\n/**\n * Inits the carousel for product sets\n * @param {string} selector - selector class used for carousel init\n */\nfunction initCarouselProductSet(selector) {\n var $imageCarousel = new Carousel('pdpProductSetImageCarousel', (selector || null));\n\n // activate image Carousel\n $imageCarousel.activate();\n}\n\n/**\n * Inits the edit product in cart modal carousel\n */\nfunction initEditModalCarousel() { // eslint-disable-line no-unused-vars\n var $imageCarousel = new Carousel('editModalImageCarousel');\n\n // activate image Carousel\n $imageCarousel.activate();\n}\n\n/**\n * Inits the quickview carousel\n */\nfunction initQuickViewCarousel() { // eslint-disable-line no-unused-vars\n var $imageCarousel = new Carousel('quickViewImageCarousel');\n\n // activate image Carousel\n $imageCarousel.activate();\n}\n\n/**\n * Inits the quickview carousel\n */\nfunction initBonusModalCarousel() { // eslint-disable-line no-unused-vars\n var $imageCarousel = new Carousel('bonusImageCarousel');\n\n // activate image Carousel\n $imageCarousel.activate();\n}\n\n/**\n * Inits the carousel for product sets\n * @param {string} selector - selector class used for carousel init\n * @param {jQuery} $productContainer - jQuery DOM object for product container\n *\n * @return {boolean} - true/false\n */\nfunction initCarousel(selector, $productContainer) {\n if ($('.product-set-detail').length > 0) {\n initCarouselProductSet(selector);\n $.spinner().stop();\n return true;\n }\n\n if ($productContainer && !!$productContainer.parents('#editProductModal').length) {\n initEditModalCarousel();\n $.spinner().stop();\n return true;\n }\n\n if ($productContainer && $productContainer.hasClass('product-quickview')) {\n initQuickViewCarousel();\n $.spinner().stop();\n return true;\n }\n\n var $imageCarousel = new Carousel('pdpImageCarousel');\n var $thumbnailCarousel = new Carousel('pdpImageThumbnailsCarousel');\n var $lifestyleImageCarousel = new Carousel('pdpLifestyleGalleryCarousel');\n\n // activate image Carousel\n $imageCarousel.activate();\n\n // activate lifestyle image Carousel\n $lifestyleImageCarousel.activate();\n\n enquire.register('screen and (min-width: ' + (globalConfig.bp.large + 1) + 'px)', {\n match: function () {\n if (!$thumbnailCarousel.$element.hasClass('slick-initialized')) {\n $thumbnailCarousel.activate();\n }\n }\n }).register('screen and (max-width: ' + globalConfig.bp.large + 'px)', {\n match: function () {\n if ($thumbnailCarousel.$element.hasClass('slick-initialized')) {\n $thumbnailCarousel.$element.slick('unslick');\n }\n }\n });\n\n $.spinner().stop();\n return true;\n}\n\n/**\n * Finds zoom carousel modal images and updates with current variation images\n * @param {jQuery} $productContainer - DOM container for a given product\n * @param {string} imagesHtml - image dom from Product-Variant Controller to replace content with\n * @param {Array} images - image Urls for carousel\n */\nfunction updateContainerImages($productContainer, imagesHtml) {\n var $imageWrapper = $productContainer.find('.primary-images');\n var outerHeight = $imageWrapper.outerHeight();\n\n $imageWrapper.replaceWith($(imagesHtml).css('min-height', outerHeight + 'px'));\n var $newImageWrapper = $productContainer.find('.primary-images');\n\n $newImageWrapper.waitForImages(function () {\n $newImageWrapper.removeAttr('style');\n initCarousel($newImageWrapper.find('.carousel.main'), $productContainer);\n });\n}\n\n\n/**\n * Retrieves the relevant pid value\n * @param {jquery} $el - DOM container for a given add to cart button\n * @return {string} - value to be used when adding product to cart\n */\nfunction getPidValue($el) {\n var pid;\n\n if ($('#quickViewModal').hasClass('show') && !$('.product-set').length) {\n pid = $($el).closest('.modal-content').find('.product-quickview').data('pid');\n } else if ($('.product-set-detail').length || $('.product-set').length) {\n pid = $($el).closest('.product-detail').find('.product-id').text();\n } else {\n pid = $('.product-detail:not(\".bundle-item\")').data('pid');\n }\n\n return pid;\n}\n\n/**\n * Retrieve contextual quantity selector\n * @param {jquery} $el - DOM container for the relevant quantity\n * @return {jquery} - quantity selector DOM container\n */\nfunction getQuantitySelector($el) {\n return $el && $('.set-items').length\n ? $($el).closest('.product-detail').find('.quantity-select')\n : $('.quantity-select');\n}\n\n/**\n * Retrieves the value associated with the Quantity pull-down menu\n * @param {jquery} $el - DOM container for the relevant quantity\n * @return {string} - value found in the quantity input\n */\nfunction getQuantitySelected($el) {\n return getQuantitySelector($el).val();\n}\n\n/**\n * Process the attribute values for an attribute that has image swatches\n *\n * @param {Object} attr - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {Object[]} attr.values - Array of attribute value objects\n * @param {string} attr.values.value - Attribute coded value\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\n * selected. If there is no variant that corresponds to a specific combination of attribute\n * values, an attribute may be disabled in the Product Detail Page\n * @param {jQuery} $productContainer - DOM container for a given product\n * @param {Object} msgs - object containing resource messages\n */\nfunction processSwatchValues(attr, $productContainer, msgs) {\n attr.values.forEach(function (attrValue) {\n var $attrValue = $productContainer.find('[data-attr=\"' + attr.id + '\"] [data-attr-value=\"' +\n attrValue.value + '\"]');\n var $swatchButton = $attrValue.parent();\n\n if (attrValue.selected) {\n $attrValue.addClass('selected');\n $swatchButton.addClass('selected');\n $attrValue.siblings('.selected-assistive-text').text(msgs.assistiveSelectedText);\n } else {\n $attrValue.removeClass('selected');\n $swatchButton.removeClass('selected');\n $attrValue.siblings('.selected-assistive-text').empty();\n }\n\n if (attrValue.url) {\n $swatchButton.attr('data-url', attrValue.url);\n } else {\n $swatchButton.removeAttr('data-url');\n }\n\n // Disable if not selectable\n $attrValue.removeClass('selectable unselectable');\n\n $attrValue.addClass(attrValue.selectable ? 'selectable' : 'unselectable');\n\n // Set non-selectable options to look disabled\n if (!attrValue.selectable) {\n $swatchButton.addClass('unselectable');\n } else {\n $swatchButton.removeClass('unselectable');\n }\n });\n}\n\n/**\n * Process attribute values associated with an attribute that does not have image swatches\n *\n * @param {Object} attr - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {Object[]} attr.values - Array of attribute value objects\n * @param {string} attr.values.value - Attribute coded value\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\n * selected. If there is no variant that corresponds to a specific combination of attribute\n * values, an attribute may be disabled in the Product Detail Page\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction processNonSwatchValues(attr, $productContainer) {\n var $attr = '[data-attr=\"' + attr.id + '\"]';\n var $defaultOption = $productContainer.find($attr + ' .select-' + attr.id + ' option:first');\n $defaultOption.attr('value', attr.resetUrl);\n\n attr.values.forEach(function (attrValue) {\n var $attrValue = $productContainer\n .find($attr + ' [data-attr-value=\"' + attrValue.value + '\"]');\n $attrValue.attr('value', attrValue.url)\n .removeAttr('disabled');\n\n if (!attrValue.selectable) {\n $attrValue.attr('disabled', true);\n }\n });\n}\n\n/**\n * Routes the handling of attribute processing depending on whether the attribute has image\n * swatches or not\n * process if in view details view, even if no swatch images\n *\n * @param {Object} attrs - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {jQuery} $productContainer - DOM element for a given product\n * @param {Object} msgs - object containing resource messages\n */\nfunction updateAttrs(attrs, $productContainer, msgs) {\n // Currently, the only attribute type that has image swatches is Color.\n var attrsWithSwatches = ['color'];\n var attrsWithButtons = ['variationKey'];\n\n attrs.forEach(function (attr) {\n var isVariationAttr = $productContainer.find('[data-attr=\"' + attr.id + '\"]')[0].classList.contains('variation-attribute');\n\n if (attrsWithSwatches.indexOf(attr.id) > -1) {\n processSwatchValues(attr, $productContainer, msgs);\n } else if (attrsWithButtons.indexOf(attr.id) > -1) {\n processSwatchValues(attr, $productContainer, msgs);\n } else if (isVariationAttr) {\n processSwatchValues(attr, $productContainer, msgs);\n } else {\n processNonSwatchValues(attr, $productContainer);\n }\n });\n}\n\n/**\n * Updates the availability status in the Product Detail Page\n *\n * @param {Object} response - Ajax response object after an\n * attribute value has been [de]selected\n * @param {jQuery} $productContainer - DOM element for a given product\n */\nfunction updateAvailability(response, $productContainer) {\n var availabilityValue = '';\n var availabilityMessages = response.product.availability.messages;\n if (!response.product.readyToOrder) {\n availabilityValue = '
  • ' + response.resources.info_selectforstock + '
  • ';\n } else {\n availabilityMessages.forEach(function (message) {\n availabilityValue += '
  • ';\n availabilityValue += message;\n if (response.product.availability.backInStockNotification) {\n availabilityValue += ' '\n + response.product.availability.backInStockMessage\n + '';\n }\n availabilityValue += '
  • ';\n });\n }\n\n $($productContainer).trigger('product:updateAvailability', {\n product: response.product,\n $productContainer: $productContainer,\n message: availabilityValue,\n resources: response.resources\n });\n}\n\n/**\n * Generates html for promotions section\n *\n * @param {array} promotions - list of promotions\n * @return {string} - Compiled HTML\n */\nfunction getPromotionsHtml(promotions) {\n if (!promotions) {\n return '';\n }\n\n var html = '
    ';\n\n promotions.forEach(function (promotion) {\n html += '
    ' + promotion.calloutMsg +\n '
    ';\n });\n\n return html;\n}\n\n/**\n * @typedef OptionSelectionResponse\n * @type Object\n * @property {string} priceHtml - Updated price HTML code\n * @property {Object} options - Updated Options\n * @property {string} options.id - Option ID\n * @property {UpdatedOptionValue[]} options.values - Option values\n */\n\n/**\n * Updates DOM using post-option selection Ajax response\n *\n * @param {OptionSelectionResponse} options - Ajax response options from selecting a product option\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction updateOptions(options, $productContainer) {\n options.forEach(function (option) {\n var $optionEl = $productContainer.find('.product-option[data-option-id*=\"' + option.id\n + '\"]');\n option.values.forEach(function (value) {\n var valueEl = $optionEl.find('option[data-value-id*=\"' + value.id + '\"]');\n valueEl.val(value.url);\n });\n });\n}\n\n/**\n * Updates DOM using post-option selection Ajax response\n *\n * @param {Object} product - product data to pull pricing info from\n * @returns {Object} - object container list and sales price\n */\nfunction getProductPrice(product) {\n var price = 0;\n\n if (product.price.hasOwnProperty('list') && product.price.list !== null && product.price.list !== 'undefined') {\n price = product.price.list.value;\n }\n\n if (product.price.hasOwnProperty('sales') && product.price.sales !== 'undefined') {\n price = product.price.sales.value;\n }\n\n if (product.price.hasOwnProperty('type') && product.price.type === 'tiered') {\n price = product.price.startingFromPrice.sales.value;\n }\n\n if (product.price.hasOwnProperty('type') && product.price.type === 'range') {\n price = product.price.min.sales.value;\n }\n\n return price;\n}\n\n/**\n * Updates the product data data attribute on the .product-detail.product-wrapper element for GTM\n * @param {Object} response - response from AJAX call to update product info\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction updateGTMData(response, $productContainer) {\n var oldData = $productContainer.data('productData');\n\n // combine old and new data\n var newData = $.extend({}, oldData, {\n id: response.product.id,\n name: response.product.productName,\n price: getProductPrice(response.product)\n });\n\n $productContainer.attr('data-product-data', JSON.stringify(newData));\n\n $('body').trigger('gtm:attribute:update');\n}\n\n/**\n * Parses JSON from Ajax call made whenever an attribute value is [de]selected\n * @param {Object} response - response from Ajax call\n * @param {Object} response.product - Product object\n * @param {string} response.product.id - Product ID\n * @param {Object[]} response.product.variationAttributes - Product attributes\n * @param {Object[]} response.product.images - Product images\n * @param {boolean} response.product.hasRequiredAttrsSelected - Flag as to whether all required\n * attributes have been selected. Used partially to\n * determine whether the Add to Cart button can be enabled\n * @param {jQuery} $productContainer - DOM element for a given product.\n */\nfunction handleVariantResponse(response, $productContainer) {\n var isChoiceOfBonusProducts =\n $productContainer.parents('.choose-bonus-product-dialog').length > 0;\n var isVaraint;\n if (response.product.variationAttributes) {\n updateAttrs(response.product.variationAttributes, $productContainer, response.resources);\n isVaraint = response.product.productType === 'variant';\n if (isChoiceOfBonusProducts && isVaraint) {\n $productContainer.parent('.bonus-product-item')\n .data('pid', response.product.id);\n\n $productContainer.parent('.bonus-product-item')\n .data('ready-to-order', response.product.readyToOrder);\n }\n }\n\n // Update primary images\n updateContainerImages($productContainer, response.product.imagesHtml);\n\n // Update promotions\n $('.promotions').empty().html(getPromotionsHtml(response.product.promotions));\n\n updateAvailability(response, $productContainer);\n updateGTMData(response, $productContainer);\n\n if (isChoiceOfBonusProducts) {\n var $selectButton = $productContainer.find('.select-bonus-product');\n $selectButton.trigger('bonusproduct:updateSelectButton', {\n product: response.product, $productContainer: $productContainer\n });\n } else {\n // Enable \"Add to Cart\" button if all required attributes have been selected\n $('button.add-to-cart, button.add-to-cart-global, button.update-cart-product-global').trigger('product:updateAddToCart', {\n product: response.product, $productContainer: $productContainer\n }).trigger('product:statusUpdate', response.product);\n }\n\n // Update attributes\n $productContainer.find('.product-attributes').empty()\n .html(response.product.attributesHtml);\n\n $productContainer.find('.product-attributes')\n .append(response.product.additionalLinks);\n}\n\n/**\n * @typespec UpdatedQuantity\n * @type Object\n * @property {boolean} selected - Whether the quantity has been selected\n * @property {string} value - The number of products to purchase\n * @property {string} url - Compiled URL that specifies variation attributes, product ID, options,\n * etc.\n */\n\n/**\n * Updates the quantity DOM elements post Ajax call\n * @param {UpdatedQuantity[]} quantities -\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction updateQuantities(quantities, $productContainer) {\n if (!($productContainer.parent('.bonus-product-item').length > 0)) {\n var optionsHtml = quantities.map(function (quantity) {\n var selected = quantity.selected ? ' selected ' : '';\n return '';\n }).join('');\n getQuantitySelector($productContainer).empty().html(optionsHtml);\n }\n}\n/**\n * Updates the details image\n * @param {obj} images - the image object\n */\nfunction updateImages(images) {\n if (images.details) {\n $('.pdp-details-image-container').empty();\n images.details.forEach(function (img) {\n var newImg = \"\" + img.alt + \"\";\n $('.pdp-details-image-container').append(newImg);\n });\n }\n}\n\n/**\n * updates the product view when a product attribute is selected or deselected or when\n * changing quantity\n * @param {string} selectedValueUrl - the Url for the selected variation value\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction attributeSelect(selectedValueUrl, $productContainer) {\n if (selectedValueUrl) {\n $('body').trigger('product:beforeAttributeSelect',\n { url: selectedValueUrl, container: $productContainer });\n\n $.ajax({\n url: selectedValueUrl,\n method: 'GET',\n success: function (data) {\n handleVariantResponse(data, $productContainer);\n updateOptions(data.product.options, $productContainer);\n updateQuantities(data.product.quantities, $productContainer);\n updateImages(data.product.images);\n $('body').trigger('product:afterAttributeSelect',\n { data: data, container: $productContainer });\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n }\n}\n\n/**\n * Retrieves url to use when adding a product to the cart\n *\n * @return {string} - The provided URL to use when adding a product to the cart\n */\nfunction getAddToCartUrl() {\n return $('.add-to-cart-url').val();\n}\n\n/**\n * Parses the html for a modal window\n * @param {string} html - representing the body and footer of the modal window\n *\n * @return {Object} - Object with properties body and footer.\n */\nfunction parseHtml(html) {\n var $html = $('
    ').append($.parseHTML(html));\n\n var body = $html.find('.choice-of-bonus-product');\n var footer = $html.find('.modal-footer').children();\n\n return { body: body, footer: footer };\n}\n\n/**\n * Retrieves url to use when adding a product to the cart\n *\n * @param {Object} data - data object used to fill in dynamic portions of the html\n */\nfunction chooseBonusProducts(data) {\n $('.modal-body').spinner().start();\n\n if ($('#chooseBonusProductModal').length !== 0) {\n $('#chooseBonusProductModal').remove();\n }\n var bonusUrl;\n if (data.bonusChoiceRuleBased) {\n bonusUrl = data.showProductsUrlRuleBased;\n } else {\n bonusUrl = data.showProductsUrlListBased;\n }\n\n var htmlString = ''\n + '
    '\n + ''\n + '
    '\n + ''\n + '
    '\n + '
    '\n + '

    ' + data.labels.selectprods + '

    '\n + ' '\n + '
    '\n + '
    '\n + '
    '\n + '
    '\n + '
    '\n + '
    ';\n $('body').append(htmlString);\n $('.modal-body').spinner().start();\n\n $('#chooseBonusProductModal').on('shown.bs.modal', function () {\n $(document).trigger('bonus:modal:shown');\n\n $('.modal-body').waitForImages(function () {\n initBonusModalCarousel();\n });\n });\n\n $.ajax({\n url: bonusUrl,\n method: 'GET',\n dataType: 'json',\n success: function (response) {\n var parsedHtml = parseHtml(response.renderedTemplate);\n $('#chooseBonusProductModal .modal-body').empty();\n $('#chooseBonusProductModal .enter-message').text(response.enterDialogMessage);\n $('#chooseBonusProductModal .modal-header .close .sr-only').text(response.closeButtonText);\n $('#chooseBonusProductModal .modal-body').html(parsedHtml.body);\n $('#chooseBonusProductModal .modal-footer').html(parsedHtml.footer);\n $('#chooseBonusProductModal').modal('show');\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n}\n\n/**\n * Updates the Mini-Cart quantity value after the customer has pressed the \"Add to Cart\" button\n * @param {string} response - ajax response from clicking the add to cart button\n */\nfunction handlePostCartAdd(response) {\n $('.minicart').trigger('count:update', response);\n var messageType = response.error ? 'alert-danger' : 'alert-success';\n if (window.SitePreferences.ADD_TO_CART_ACTION === 'showModal' && response.renderedTemplate && $(window).outerWidth() > globalConfig.bp.medium) {\n // show added to cart modal\n $('#addToCartModal').remove();\n $('body').append(response.renderedTemplate).addClass('static');\n $('#addToCartModal').modal('show');\n\n $('#addToCartModal .bonus-product-button').on('click', function () {\n $('#addToCartModal').modal('hide');\n chooseBonusProducts(response.newBonusDiscountLineItem);\n });\n } else if (window.SitePreferences.ADD_TO_CART_ACTION === 'openMiniCart') {\n $('.minicart').trigger('cart:update', response);\n } else if (response.newBonusDiscountLineItem\n && Object.keys(response.newBonusDiscountLineItem).length !== 0) {\n // show bonus product modal\n chooseBonusProducts(response.newBonusDiscountLineItem);\n } else {\n // show add to cart toast\n if ($('.add-to-cart-messages').length === 0) {\n $('body').append(\n '
    '\n );\n }\n\n $('.add-to-cart-messages').append(\n '
    '\n + response.message\n + '
    '\n );\n\n setTimeout(function () {\n $('.add-to-basket-alert').first().fadeOut(function () {\n this.remove();\n });\n }, globalConfig.toastTimeout);\n }\n}\n\n/**\n * Retrieves the bundle product item ID's for the Controller to replace bundle master product\n * items with their selected variants\n *\n * @return {string[]} - List of selected bundle product item ID's\n */\nfunction getChildProducts() {\n var childProducts = [];\n $('.bundle-item').each(function () {\n childProducts.push({\n pid: $(this).find('.product-id').text(),\n quantity: parseInt($(this).find('label.quantity').data('quantity'), 10)\n });\n });\n\n return childProducts.length ? JSON.stringify(childProducts) : [];\n}\n\n/**\n * Retrieve product options\n *\n * @param {jQuery} $productContainer - DOM element for current product\n * @return {string} - Product options and their selected values\n */\nfunction getOptions($productContainer) {\n var options = $productContainer\n .find('.product-option')\n .map(function () {\n var $elOption = $(this).find('.options-select');\n var urlValue = $elOption.val();\n var selectedValueId = $elOption.find('option[value=\"' + urlValue + '\"]')\n .data('value-id');\n return {\n optionId: String($(this).data('option-id')),\n selectedValueId: String(selectedValueId)\n };\n }).toArray();\n\n return JSON.stringify(options);\n}\n\n/**\n * Render schematic drawings images\n * @param {obj} images - the image object\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction updateSpecImages(images, $productContainer) {\n if (images.details) {\n images.details.forEach(function (img) {\n var newImg = \"\" + img.alt + \"\";\n $productContainer.append(newImg);\n });\n }\n}\n\n/**\n * Render schematic drawings images\n * @param {obj} response - product information object\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction updateSpecInfo(response, $productContainer) {\n $productContainer.html(response.product.attributesHtml);\n}\n\n/**\n * renders product's Schematic Drawings specs\n * @param {string} variationItemUrl - the Urls for the variation value\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction loadSchematicDrawings(variationItemUrl, $productContainer) {\n if (variationItemUrl) {\n $.ajax({\n url: variationItemUrl,\n method: 'GET',\n success: function (data) {\n updateSpecImages(data.product.images, $productContainer);\n }\n });\n }\n}\n\n/**\n * renders product's text specs\n * @param {string} variationItemUrl - the Urls for the variation value\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction loadTextSpecifications(variationItemUrl, $productContainer) {\n if (variationItemUrl) {\n $.ajax({\n url: variationItemUrl,\n method: 'GET',\n success: function (data) {\n updateSpecInfo(data, $productContainer);\n }\n }).done(function () {\n $productContainer.find('.content').addClass('p-0');\n $productContainer.find('.collapsible-xl').addClass('pl-0 mb-5').removeClass('collapsible-xl');\n });\n }\n}\n\n/**\n * craete modal element\n */\nfunction getStatusModalHtmlElement() {\n if ($('#cartError').length !== 0) {\n $('#cartError').remove();\n }\n var htmlString = ''\n + '
    '\n + ''\n + '
    '\n + ''\n + '
    '\n + '
    '\n + '

    '\n + '

    '\n + ''\n + '
    '\n + '
    '\n + '
    '\n + '
    ';\n $('body').append(htmlString);\n}\n\n/**\n * display status modal\n * @param {Object} msg msg to display\n * @param {boolean} success success modal\n */\nfunction displayStatusModal(msg, success) {\n // Init modal\n getStatusModalHtmlElement();\n $('#cartError .modal-body .modal-content-text').empty();\n $('#cartError .modal-body .dashboard-heading').html(success ? 'Success' : 'Error!');\n $('#cartError .modal-body .modal-content-text').html(msg);\n $('#cartError').modal('show');\n}\n\nmodule.exports = {\n attributeSelect: attributeSelect,\n methods: {\n editBonusProducts: function (data) {\n chooseBonusProducts(data);\n }\n },\n focusChooseBonusProductModal: function () {\n $('body').on('shown.bs.modal', '#chooseBonusProductModal', function () {\n $('#chooseBonusProductModal').siblings().attr('aria-hidden', 'true');\n $('#chooseBonusProductModal .close').focus();\n });\n },\n onClosingChooseBonusProductModal: function () {\n $('body').on('hidden.bs.modal', '#chooseBonusProductModal', function () {\n $('#chooseBonusProductModal').siblings().attr('aria-hidden', 'false');\n });\n },\n trapChooseBonusProductModalFocus: function () {\n $('body').on('keydown', '#chooseBonusProductModal', function (e) {\n var focusParams = {\n event: e,\n containerSelector: '#chooseBonusProductModal',\n firstElementSelector: '.close',\n lastElementSelector: '.add-bonus-products'\n };\n focusHelper.setTabNextFocus(focusParams);\n });\n },\n colorAttribute: function () {\n $(document).on('click', '[data-attr=\"color\"] button', function (e) {\n e.preventDefault();\n\n if ($(this).attr('disabled')) {\n return;\n }\n var $productContainer = $(this).closest('.set-item');\n if (!$productContainer.length) {\n $productContainer = $(this).closest('.product-detail');\n }\n\n attributeSelect($(this).attr('data-url'), $productContainer);\n });\n },\n variantAttribute: function () {\n $(document).on('click', '.variation-attribute button', function (e) {\n e.preventDefault();\n\n if ($(this).attr('disabled')) {\n return;\n }\n var $productContainer = $(this).closest('.set-item');\n if (!$productContainer.length) {\n $productContainer = $(this).closest('.details-view');\n }\n if (!$(this).hasClass('selected')) {\n attributeSelect($(this).attr('data-url'), $productContainer);\n }\n });\n },\n selectAttribute: function () {\n $(document).on('change', 'select[class*=\"select-\"], .options-select', function (e) {\n e.preventDefault();\n\n var $productContainer = $(this).closest('.set-item');\n if (!$productContainer.length) {\n $productContainer = $(this).closest('.product-detail');\n }\n attributeSelect(e.currentTarget.value, $productContainer);\n });\n },\n availability: function () {\n $(document).on('change', '.quantity-select', function (e) {\n e.preventDefault();\n\n var $productContainer = $(this).closest('.product-detail');\n if (!$productContainer.length) {\n $productContainer = $(this).closest('.modal-content').find('.product-quickview');\n }\n\n if ($('.bundle-items', $productContainer).length === 0 && !$(this).hasClass('quantity-selectpdp')) {\n attributeSelect($(e.currentTarget).find('option:selected').data('url'),\n $productContainer);\n }\n });\n },\n addToCart: function () {\n $(document).on('click', 'button.add-to-cart, button.add-to-cart-global', function () {\n var addToCartUrl;\n var pid;\n var pidsObj;\n var setPids;\n\n $('body').trigger('product:beforeAddToCart', this);\n\n if ($('.set-items').length && $(this).hasClass('add-to-cart-global')) {\n setPids = [];\n\n $('.product-detail').each(function () {\n if (!$(this).hasClass('product-set-detail')) {\n setPids.push({\n pid: $(this).find('.product-id').text(),\n qty: $(this).find('.quantity-select').val(),\n options: getOptions($(this))\n });\n }\n });\n pidsObj = JSON.stringify(setPids);\n }\n\n pid = getPidValue($(this));\n\n var $productContainer = $(this).closest('.product-detail');\n if (!$productContainer.length) {\n $productContainer = $(this).closest('.quick-view-dialog').find('.product-detail');\n }\n\n addToCartUrl = getAddToCartUrl();\n var $sampleRalColor = $('.sample_ral_color');\n var $sampleColorBrand = $('.sample_brand');\n var $sampleColorName = $('.sample_name');\n var $sampleColorCode = $('.sample_code');\n\n var $additionalNotes = $('.pliNotes');\n var form = {\n pid: pid,\n pidsObj: pidsObj,\n childProducts: getChildProducts(),\n quantity: getQuantitySelected($(this))\n };\n if ($additionalNotes.length) {\n form.notes = $additionalNotes.val();\n }\n\n if ($sampleRalColor.length > 0) {\n form[$sampleRalColor.attr('name')] = $sampleRalColor.children('option:selected').val();\n }\n\n if ($sampleColorBrand.length > 0) {\n form[$sampleColorBrand.attr('name')] = $sampleColorBrand.val();\n }\n\n if ($sampleColorName.length > 0) {\n form[$sampleColorName.attr('name')] = $sampleColorName.val();\n }\n\n if ($sampleColorCode.length > 0) {\n form[$sampleColorCode.attr('name')] = $sampleColorCode.val();\n }\n\n if (!$('.bundle-item').length) {\n form.options = getOptions($productContainer);\n }\n\n $(this).trigger('updateAddToCartFormData', form);\n if (addToCartUrl) {\n $.ajax({\n url: addToCartUrl,\n method: 'POST',\n data: form,\n success: function (data) {\n if (!data.success) {\n // update form errors\n formValidation($('.sample-form'), data);\n } else if (data.error || data.errorMessage) {\n // add an error message pop up\n } else {\n handlePostCartAdd(data);\n $('body').trigger('product:afterAddToCart', data);\n if ($('#sampleModal').hasClass('show')) {\n $('#sampleModal').modal('hide');\n }\n }\n $.spinner().stop();\n },\n error: function (err) {\n if (err.responseJSON.loggedin === false) {\n $('body').trigger('display:loginModal');\n $.spinner().stop();\n } else if (err.responseJSON.redirectUrl) {\n window.location.href = err.responseJSON.redirectUrl;\n } else {\n displayStatusModal(err.responseJSON.errorMessage, false);\n $.spinner().stop();\n }\n }\n });\n }\n });\n },\n initCarousel: initCarousel,\n initQuickViewCarousel: initQuickViewCarousel,\n initEditModalCarousel: initEditModalCarousel,\n initBundleCarousel: function () {\n if ($('.product-detail.bundle').length > 0) {\n var $imageCarousel = new Carousel('bundleImageCarousel');\n var $thumbnailCarousel = new Carousel('bundlepdpImageThumbnailsCarousel');\n\n // activate image Carousel\n $imageCarousel.activate();\n\n enquire.register('screen and (min-width: ' + (globalConfig.bp.large + 1) + 'px)', {\n match: function () {\n if (!$thumbnailCarousel.$element.hasClass('slick-initialized')) {\n $thumbnailCarousel.activate();\n }\n }\n }).register('screen and (max-width: ' + globalConfig.bp.large + 'px)', {\n match: function () {\n if ($thumbnailCarousel.$element.hasClass('slick-initialized')) {\n $thumbnailCarousel.$element.slick('unslick');\n }\n }\n });\n }\n },\n selectBonusProduct: function () {\n $(document).on('click', '.select-bonus-product', function () {\n var $choiceOfBonusProduct = $(this).parents('.choice-of-bonus-product');\n var pid = $(this).data('pid');\n var maxPids = $('.choose-bonus-product-dialog').data('total-qty');\n var submittedQty = parseInt($(this).parents('.choice-of-bonus-product').find('.bonus-quantity-select').val(), 10);\n var totalQty = 0;\n $.each($('#chooseBonusProductModal .selected-bonus-products .selected-pid'), function () {\n totalQty += $(this).data('qty');\n });\n totalQty += submittedQty;\n var optionID = $(this).parents('.choice-of-bonus-product').find('.product-option').data('option-id');\n var valueId = $(this).parents('.choice-of-bonus-product').find('.options-select option:selected').data('valueId');\n if (totalQty <= maxPids) {\n var selectedBonusProductHtml = ''\n + '
    '\n + '
    '\n + $choiceOfBonusProduct.find('.product-name').html()\n + '
    '\n + '
    '\n + '
    '\n ;\n $('#chooseBonusProductModal .selected-bonus-products').append(selectedBonusProductHtml);\n $('.pre-cart-products').html(totalQty);\n $('.selected-bonus-products .bonus-summary').removeClass('alert-danger');\n } else {\n $('.selected-bonus-products .bonus-summary').addClass('alert-danger');\n }\n });\n },\n removeBonusProduct: function () {\n $(document).on('click', '.selected-pid', function () {\n $(this).remove();\n var $selected = $('#chooseBonusProductModal .selected-bonus-products .selected-pid');\n var count = 0;\n if ($selected.length) {\n $selected.each(function () {\n count += parseInt($(this).data('qty'), 10);\n });\n }\n\n $('.pre-cart-products').html(count);\n $('.selected-bonus-products .bonus-summary').removeClass('alert-danger');\n });\n },\n enableBonusProductSelection: function () {\n $('body').on('bonusproduct:updateSelectButton', function (e, response) {\n $('button.select-bonus-product', response.$productContainer).attr('disabled',\n (!response.product.readyToOrder || !response.product.available));\n var pid = response.product.id;\n $('button.select-bonus-product').data('pid', pid);\n });\n },\n showMoreBonusProducts: function () {\n $(document).on('click', '.show-more-bonus-products', function () {\n var url = $(this).data('url');\n $('.modal-content').spinner().start();\n $.ajax({\n url: url,\n method: 'GET',\n success: function (html) {\n var parsedHtml = parseHtml(html);\n $('.modal-body').append(parsedHtml.body);\n $('.show-more-bonus-products:first').remove();\n $('.modal-content').spinner().stop();\n },\n error: function () {\n $('.modal-content').spinner().stop();\n }\n });\n });\n },\n addBonusProductsToCart: function () {\n $(document).on('click', '.add-bonus-products', function () {\n var $readyToOrderBonusProducts = $('.choose-bonus-product-dialog .selected-pid');\n var queryString = '?pids=';\n var url = $('.choose-bonus-product-dialog').data('addtocarturl');\n var pidsObject = {\n bonusProducts: []\n };\n\n $.each($readyToOrderBonusProducts, function () {\n var qtyOption =\n parseInt($(this)\n .data('qty'), 10);\n\n var option = null;\n if (qtyOption > 0) {\n if ($(this).data('optionid') && $(this).data('option-selected-value')) {\n option = {};\n option.optionId = $(this).data('optionid');\n option.productId = $(this).data('pid');\n option.selectedValueId = $(this).data('option-selected-value');\n }\n pidsObject.bonusProducts.push({\n pid: $(this).data('pid'),\n qty: qtyOption,\n options: [option]\n });\n pidsObject.totalQty = parseInt($('.pre-cart-products').html(), 10);\n }\n });\n queryString += JSON.stringify(pidsObject);\n queryString = queryString + '&uuid=' + $('.choose-bonus-product-dialog').data('uuid');\n queryString = queryString + '&pliuuid=' + $('.choose-bonus-product-dialog').data('pliuuid');\n\n $('.cart-line-items').spinner().start();\n\n $.ajax({\n url: url + queryString,\n method: 'POST',\n success: function (data) {\n $.spinner().stop();\n if (data.error) {\n $('.error-choice-of-bonus-products')\n .html(data.errorMessage);\n } else {\n $('.cart-line-items').empty().append(data.renderedTemplate);\n $('.configure-bonus-product-attributes').html(data);\n $('.bonus-products-step2').removeClass('hidden-xl-down');\n $('#chooseBonusProductModal').modal('hide');\n\n if ($('.add-to-cart-messages').length === 0) {\n $('body').append(\n '
    '\n );\n }\n $('.minicart-quantity').html(data.totalQty);\n $('.add-to-cart-messages').append(\n '
    '\n + data.msgSuccess + '
    '\n );\n setTimeout(function () {\n $('.add-to-basket-alert').remove();\n if ($('.cart-page').length) {\n location.reload();\n }\n }, 3000);\n }\n },\n error: function () {\n $.spinner().stop();\n }\n });\n });\n },\n\n getPidValue: getPidValue,\n getQuantitySelected: getQuantitySelected,\n waitForImagesInit: function () {\n $.fn.waitForImages = function (callback) {\n var $img = $('img', this),\n totalImg = $img.length;\n\n var waitImgLoad = function () {\n totalImg--;\n if (!totalImg) {\n callback();\n }\n $(this).on('error', callback);\n };\n\n $img.each(function () {\n if (this.complete) {\n waitImgLoad();\n }\n });\n\n $img.on('load', waitImgLoad);\n };\n },\n\n loadSpecifications: function () {\n $('.spec-details-image-container').each(function () {\n loadSchematicDrawings($(this).data('url'), $(this));\n });\n\n $('.spec-details-text-container').each(function () {\n loadTextSpecifications($(this).data('url'), $(this));\n });\n },\n updateAddToCartBtn: function () {\n $('body').on('click', '.update-cart-product-pdp', function (e) {\n e.preventDefault();\n\n var updateProductUrl = $(this).data('update-product-url');\n var selectedQuantity = $('.quantity-select').val();\n var uuid = $(this).data('uuid');\n\n var $sampleRalColor = $('.sample_ral_color');\n var $sampleColorBrand = $('.sample_brand');\n var $sampleColorName = $('.sample_name');\n var $sampleColorCode = $('.sample_code');\n\n var form = {\n uuid: uuid,\n pid: $(this).data('pid'),\n quantity: selectedQuantity\n };\n\n if ($sampleRalColor.length > 0) {\n form[$sampleRalColor.attr('name')] = $sampleRalColor.children('option:selected').val();\n }\n\n if ($sampleColorBrand.length > 0) {\n form[$sampleColorBrand.attr('name')] = $sampleColorBrand.val();\n }\n\n if ($sampleColorName.length > 0) {\n form[$sampleColorName.attr('name')] = $sampleColorName.val();\n }\n\n if ($sampleColorCode.length > 0) {\n form[$sampleColorCode.attr('name')] = $sampleColorCode.val();\n }\n\n form.options = getOptions($(this));\n\n if (uuid) {\n form.uuid = uuid;\n }\n\n if (updateProductUrl) {\n $.spinner().start();\n $.ajax({\n url: updateProductUrl,\n type: 'post',\n data: form,\n dataType: 'json',\n success: function (data) {\n if (data.redirectUrl) {\n window.location.href = data.redirectUrl;\n }\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n }\n });\n }\n};\n","'use strict';\n\nmodule.exports = {\n setTabNextFocus: function (focusParams) {\n var KEYCODE_TAB = 9;\n var isTabPressed = (focusParams.event.key === 'Tab' || focusParams.event.keyCode === KEYCODE_TAB);\n\n if (!isTabPressed) {\n return;\n }\n\n var firstFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.firstElementSelector);\n var lastFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.lastElementSelector);\n\n if ($(focusParams.containerSelector + ' ' + focusParams.lastElementSelector).is(':disabled')) {\n lastFocusableEl = $(focusParams.containerSelector + ' ' + focusParams.nextToLastElementSelector);\n if ($('.product-quickview.product-set').length > 0) {\n var linkElements = $(focusParams.containerSelector + ' a#fa-link.share-icons');\n lastFocusableEl = linkElements[linkElements.length - 1];\n }\n }\n\n if (focusParams.event.shiftKey) /* shift + tab */ {\n if ($(':focus').is(firstFocusableEl)) {\n lastFocusableEl.focus();\n focusParams.event.preventDefault();\n }\n } else /* tab */ {\n if ($(':focus').is(lastFocusableEl)) { // eslint-disable-line\n firstFocusableEl.focus();\n focusParams.event.preventDefault();\n }\n }\n }\n};\n","'use strict';\n\nvar carouselConfig = require('../config/carousel');\n\n/**\n * @package Blueacorn/Carousel\n * @version 1.0\n * @author Jamie Smith \n * @copyright Copyright © 2019 Blue Acorn.\n * @param {string} type - type of carousel to load, pulled from carousel.js config\n * @param {string} selector - selector class used to overwrite the carousel config selector value\n * @return {Object} Carousel\n */\nmodule.exports = function (type, selector) {\n this.type = type;\n this.selector = selector || null;\n this.$element = null;\n\n this.settings = {\n moduleName: 'Carousel',\n initialized: false\n };\n\n this.setConfig = function () {\n var config = {};\n\n if (typeof this.type === 'string') {\n config = $.extend(config, carouselConfig.defaultSettings, carouselConfig[this.type].settings);\n } else {\n config = $.extend(config, carouselConfig.defaultSettings);\n }\n\n return config;\n };\n\n this.init = function () {\n this.initialized = true;\n\n if (typeof this.type === 'string' && carouselConfig.hasOwnProperty(this.type) && !this.selector) {\n this.$element = $(carouselConfig[type].selector);\n } else if (typeof this.type === 'string' && carouselConfig.hasOwnProperty(this.type) && this.selector) {\n this.$element = $(this.selector);\n }\n\n return this;\n };\n\n this.activate = function () {\n if (!this.initialized) {\n this.init();\n }\n\n if (this.$element.data('carouselEnabled') === false || this.$element.length <= 0) {\n return;\n }\n\n this.$element.slick(this.setConfig(this.type));\n };\n\n return this.init();\n};\n","'use strict';\n\nvar base = require('./base');\n\n/**\n * Displays the message returned in the response\n * @param {string} data - data returned from the server's ajax call\n */\nfunction displayMessage(data) {\n var status;\n if (!data.error) {\n status = 'alert-success';\n } else {\n status = 'alert-danger';\n }\n\n if ($('.add-to-registry-messages').length === 0) {\n $('body').append('
    ');\n }\n $('.add-to-registry-messages').append(\n '
    ' + data.msg + '
    '\n );\n\n setTimeout(function () {\n $('.add-to-registry-alert').first().fadeOut(function () {\n this.remove();\n });\n }, globalConfig.toastTimeout);\n}\n\nmodule.exports = {\n updateAddToRegistry: function () {\n $('body').on('product:updateAddToCart', function (e, response) {\n $('button.add-to-gift-registry', response.$productContainer).attr('disabled',\n (!response.product.readyToOrder || !response.product.available));\n });\n },\n\n updateGiftRegistryURLQuantity: function () {\n $('body').on('product:afterAttributeSelect', function (e, response) {\n $('.add-to-gift-registry', response.container).data('href', response.data.product.giftRegistryLink);\n });\n },\n\n addToGiftRegistry: function () {\n $('.add-to-gift-registry').on('click', function (e) {\n e.preventDefault();\n var element = $(this);\n var url = element.data('href');\n\n $.spinner().start();\n\n var args = {\n pid: base.getPidValue($(this)),\n qty: base.getQuantitySelected($(this)),\n prodSetPid: $('.product-set-detail').data('pid') || ''\n };\n\n var encodedArgs = encodeURIComponent(JSON.stringify(args));\n\n $.ajax({\n url: url,\n type: 'get',\n data: { args: encodedArgs },\n dataType: 'json',\n success: function (data) {\n if (data.redirectUrl) {\n window.location.href = data.redirectUrl;\n } else {\n displayMessage(data, element);\n }\n\n $.spinner().stop();\n },\n error: function (err) {\n $.spinner().stop();\n window.location.href = err.responseJSON.redirectUrl;\n }\n });\n });\n }\n};\n","'use strict';\n\nvar Carousel = require('../components/carousel');\nvar focusHelper = require('base/components/focus');\n\n/**\n * Inits the carousel for product sets\n * @param {string} selector - selector class used for carousel init\n */\nfunction initCarouselProductSet(selector) {\n var $imageCarousel = new Carousel('pdpProductSetImageCarousel', (selector || null));\n\n // activate image Carousel\n $imageCarousel.activate();\n}\n\n/**\n * Inits the edit product in cart modal carousel\n */\nfunction initEditModalCarousel() { // eslint-disable-line no-unused-vars\n var $imageCarousel = new Carousel('editModalImageCarousel');\n\n // activate image Carousel\n $imageCarousel.activate();\n}\n\n/**\n * Inits the quickview carousel\n */\nfunction initQuickViewCarousel() { // eslint-disable-line no-unused-vars\n var $imageCarousel = new Carousel('quickViewImageCarousel');\n\n // activate image Carousel\n $imageCarousel.activate();\n}\n\n/**\n * Inits the quickview carousel\n */\nfunction initBonusModalCarousel() { // eslint-disable-line no-unused-vars\n var $imageCarousel = new Carousel('bonusImageCarousel');\n\n // activate image Carousel\n $imageCarousel.activate();\n}\n\n/**\n * Inits the carousel for product sets\n * @param {string} selector - selector class used for carousel init\n * @param {jQuery} $productContainer - jQuery DOM object for product container\n *\n * @return {boolean} - true/false\n */\nfunction initCarousel(selector, $productContainer) {\n if ($('.product-set-detail').length > 0) {\n initCarouselProductSet(selector);\n $.spinner().stop();\n return true;\n }\n\n if ($productContainer && !!$productContainer.parents('#editProductModal').length) {\n initEditModalCarousel();\n $.spinner().stop();\n return true;\n }\n\n if ($productContainer && $productContainer.hasClass('product-quickview')) {\n initQuickViewCarousel();\n $.spinner().stop();\n return true;\n }\n\n var $imageCarousel = new Carousel('pdpImageCarousel');\n var $thumbnailCarousel = new Carousel('pdpImageThumbnailsCarousel');\n\n // activate image Carousel\n $imageCarousel.activate();\n\n enquire.register('screen and (min-width: ' + (globalConfig.bp.large + 1) + 'px)', {\n match: function () {\n if (!$thumbnailCarousel.$element.hasClass('slick-initialized')) {\n $thumbnailCarousel.activate();\n }\n }\n }).register('screen and (max-width: ' + globalConfig.bp.large + 'px)', {\n match: function () {\n if ($thumbnailCarousel.$element.hasClass('slick-initialized')) {\n $thumbnailCarousel.$element.slick('unslick');\n }\n }\n });\n\n $.spinner().stop();\n return true;\n}\n\n/**\n * Finds zoom carousel modal images and updates with current variation images\n * @param {jQuery} $productContainer - DOM container for a given product\n * @param {string} imagesHtml - image dom from Product-Variant Controller to replace content with\n * @param {Array} images - image Urls for carousel\n */\nfunction updateContainerImages($productContainer, imagesHtml) {\n var $imageWrapper = $productContainer.find('.primary-images');\n var outerHeight = $imageWrapper.outerHeight();\n\n $imageWrapper.replaceWith($(imagesHtml).css('min-height', outerHeight + 'px'));\n var $newImageWrapper = $productContainer.find('.primary-images');\n\n $newImageWrapper.waitForImages(function () {\n $newImageWrapper.removeAttr('style');\n initCarousel($newImageWrapper.find('.carousel.main'), $productContainer);\n });\n}\n\n\n/**\n * Retrieves the relevant pid value\n * @param {jquery} $el - DOM container for a given add to cart button\n * @return {string} - value to be used when adding product to cart\n */\nfunction getPidValue($el) {\n var pid;\n\n if ($('#quickViewModal').hasClass('show') && !$('.product-set').length) {\n pid = $($el).closest('.modal-content').find('.product-quickview').data('pid');\n } else if ($('.product-set-detail').length || $('.product-set').length) {\n pid = $($el).closest('.product-detail').find('.product-id').text();\n } else {\n pid = $('.product-detail:not(\".bundle-item\")').data('pid');\n }\n\n return pid;\n}\n\n/**\n * Retrieve contextual quantity selector\n * @param {jquery} $el - DOM container for the relevant quantity\n * @return {jquery} - quantity selector DOM container\n */\nfunction getQuantitySelector($el) {\n return $el && $('.set-items').length\n ? $($el).closest('.product-detail').find('.quantity-select')\n : $('.quantity-select');\n}\n\n/**\n * Retrieves the value associated with the Quantity pull-down menu\n * @param {jquery} $el - DOM container for the relevant quantity\n * @return {string} - value found in the quantity input\n */\nfunction getQuantitySelected($el) {\n return getQuantitySelector($el).val();\n}\n\n/**\n * Process the attribute values for an attribute that has image swatches\n *\n * @param {Object} attr - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {Object[]} attr.values - Array of attribute value objects\n * @param {string} attr.values.value - Attribute coded value\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\n * selected. If there is no variant that corresponds to a specific combination of attribute\n * values, an attribute may be disabled in the Product Detail Page\n * @param {jQuery} $productContainer - DOM container for a given product\n * @param {Object} msgs - object containing resource messages\n */\nfunction processSwatchValues(attr, $productContainer, msgs) {\n attr.values.forEach(function (attrValue) {\n var $attrValue = $productContainer.find('[data-attr=\"' + attr.id + '\"] [data-attr-value=\"' +\n attrValue.value + '\"]');\n var $swatchButton = $attrValue.parent();\n\n if (attrValue.selected) {\n $attrValue.addClass('selected');\n $attrValue.siblings('.selected-assistive-text').text(msgs.assistiveSelectedText);\n } else {\n $attrValue.removeClass('selected');\n $attrValue.siblings('.selected-assistive-text').empty();\n }\n\n if (attrValue.url) {\n $swatchButton.attr('data-url', attrValue.url);\n } else {\n $swatchButton.removeAttr('data-url');\n }\n\n // Disable if not selectable\n $attrValue.removeClass('selectable unselectable');\n\n $attrValue.addClass(attrValue.selectable ? 'selectable' : 'unselectable');\n });\n}\n\n/**\n * Process attribute values associated with an attribute that does not have image swatches\n *\n * @param {Object} attr - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {Object[]} attr.values - Array of attribute value objects\n * @param {string} attr.values.value - Attribute coded value\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\n * selected. If there is no variant that corresponds to a specific combination of attribute\n * values, an attribute may be disabled in the Product Detail Page\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction processNonSwatchValues(attr, $productContainer) {\n var $attr = '[data-attr=\"' + attr.id + '\"]';\n var $defaultOption = $productContainer.find($attr + ' .select-' + attr.id + ' option:first');\n $defaultOption.attr('value', attr.resetUrl);\n\n attr.values.forEach(function (attrValue) {\n var $attrValue = $productContainer\n .find($attr + ' [data-attr-value=\"' + attrValue.value + '\"]');\n $attrValue.attr('value', attrValue.url)\n .removeAttr('disabled');\n\n if (!attrValue.selectable) {\n $attrValue.attr('disabled', true);\n }\n });\n}\n\n/**\n * Routes the handling of attribute processing depending on whether the attribute has image\n * swatches or not\n *\n * @param {Object} attrs - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {jQuery} $productContainer - DOM element for a given product\n * @param {Object} msgs - object containing resource messages\n */\nfunction updateAttrs(attrs, $productContainer, msgs) {\n // Currently, the only attribute type that has image swatches is Color.\n var attrsWithSwatches = ['color'];\n\n attrs.forEach(function (attr) {\n if (attrsWithSwatches.indexOf(attr.id) > -1) {\n processSwatchValues(attr, $productContainer, msgs);\n } else {\n processNonSwatchValues(attr, $productContainer);\n }\n });\n}\n\n/**\n * Updates the availability status in the Product Detail Page\n *\n * @param {Object} response - Ajax response object after an\n * attribute value has been [de]selected\n * @param {jQuery} $productContainer - DOM element for a given product\n */\nfunction updateAvailability(response, $productContainer) {\n var availabilityValue = '';\n var availabilityMessages = response.product.availability.messages;\n if (!response.product.readyToOrder) {\n availabilityValue = '
  • ' + response.resources.info_selectforstock + '
  • ';\n } else {\n availabilityMessages.forEach(function (message) {\n availabilityValue += '
  • ';\n availabilityValue += message;\n if (response.product.availability.backInStockNotification) {\n availabilityValue += ' '\n + response.product.availability.backInStockMessage\n + '';\n }\n availabilityValue += '
  • ';\n });\n }\n\n $($productContainer).trigger('product:updateAvailability', {\n product: response.product,\n $productContainer: $productContainer,\n message: availabilityValue,\n resources: response.resources\n });\n}\n\n/**\n * Generates html for promotions section\n *\n * @param {array} promotions - list of promotions\n * @return {string} - Compiled HTML\n */\nfunction getPromotionsHtml(promotions) {\n if (!promotions) {\n return '';\n }\n\n var html = '
    ';\n\n promotions.forEach(function (promotion) {\n html += '
    ' + promotion.calloutMsg +\n '
    ';\n });\n\n return html;\n}\n\n/**\n * Generates html for product attributes section\n *\n * @param {array} attributes - list of attributes\n * @return {string} - Compiled HTML\n */\nfunction getAttributesHtml(attributes) {\n if (!attributes) {\n return '';\n }\n\n var html = '';\n\n attributes.forEach(function (attributeGroup) {\n if (attributeGroup.ID === 'mainAttributes') {\n attributeGroup.attributes.forEach(function (attribute) {\n html += '
    ' + attribute.label + ': '\n + attribute.value + '
    ';\n });\n }\n });\n\n return html;\n}\n\n/**\n * @typedef OptionSelectionResponse\n * @type Object\n * @property {string} priceHtml - Updated price HTML code\n * @property {Object} options - Updated Options\n * @property {string} options.id - Option ID\n * @property {UpdatedOptionValue[]} options.values - Option values\n */\n\n/**\n * Updates DOM using post-option selection Ajax response\n *\n * @param {OptionSelectionResponse} options - Ajax response options from selecting a product option\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction updateOptions(options, $productContainer) {\n options.forEach(function (option) {\n var $optionEl = $productContainer.find('.product-option[data-option-id*=\"' + option.id\n + '\"]');\n option.values.forEach(function (value) {\n var valueEl = $optionEl.find('option[data-value-id*=\"' + value.id + '\"]');\n valueEl.val(value.url);\n });\n });\n}\n\n/**\n * Updates DOM using post-option selection Ajax response\n *\n * @param {Object} product - product data to pull pricing info from\n * @returns {Object} - object container list and sales price\n */\nfunction getProductPrice(product) {\n var price = 0;\n\n if (product.price.hasOwnProperty('list') && product.price.list !== null && product.price.list !== 'undefined') {\n price = product.price.list.value;\n }\n\n if (product.price.hasOwnProperty('sales') && product.price.sales !== 'undefined') {\n price = product.price.sales.value;\n }\n\n if (product.price.hasOwnProperty('type') && product.price.type === 'tiered') {\n price = product.price.startingFromPrice.sales.value;\n }\n\n if (product.price.hasOwnProperty('type') && product.price.type === 'range') {\n price = product.price.min.sales.value;\n }\n\n return price;\n}\n\n/**\n * Updates the product data data attribute on the .product-detail.product-wrapper element for GTM\n * @param {Object} response - response from AJAX call to update product info\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction updateGTMData(response, $productContainer) {\n var oldData = $productContainer.data('productData');\n\n // combine old and new data\n var newData = $.extend({}, oldData, {\n id: response.product.id,\n name: response.product.productName,\n price: getProductPrice(response.product)\n });\n\n $productContainer.attr('data-product-data', JSON.stringify(newData));\n\n $('body').trigger('gtm:attribute:update');\n}\n\n/**\n * Parses JSON from Ajax call made whenever an attribute value is [de]selected\n * @param {Object} response - response from Ajax call\n * @param {Object} response.product - Product object\n * @param {string} response.product.id - Product ID\n * @param {Object[]} response.product.variationAttributes - Product attributes\n * @param {Object[]} response.product.images - Product images\n * @param {boolean} response.product.hasRequiredAttrsSelected - Flag as to whether all required\n * attributes have been selected. Used partially to\n * determine whether the Add to Cart button can be enabled\n * @param {jQuery} $productContainer - DOM element for a given product.\n */\nfunction handleVariantResponse(response, $productContainer) {\n var isChoiceOfBonusProducts =\n $productContainer.parents('.choose-bonus-product-dialog').length > 0;\n var isVaraint;\n if (response.product.variationAttributes) {\n updateAttrs(response.product.variationAttributes, $productContainer, response.resources);\n isVaraint = response.product.productType === 'variant';\n if (isChoiceOfBonusProducts && isVaraint) {\n $productContainer.parent('.bonus-product-item')\n .data('pid', response.product.id);\n\n $productContainer.parent('.bonus-product-item')\n .data('ready-to-order', response.product.readyToOrder);\n }\n }\n\n // Update primary images\n updateContainerImages($productContainer, response.product.imagesHtml);\n\n // Update pricing\n if (!isChoiceOfBonusProducts) {\n var $priceSelector = $('.prices .price', $productContainer).length\n ? $('.prices .price', $productContainer)\n : $('.prices .price');\n $priceSelector.replaceWith(response.product.price.html);\n }\n\n // Update promotions\n $('.promotions').empty().html(getPromotionsHtml(response.product.promotions));\n\n updateAvailability(response, $productContainer);\n updateGTMData(response, $productContainer);\n\n if (isChoiceOfBonusProducts) {\n var $selectButton = $productContainer.find('.select-bonus-product');\n $selectButton.trigger('bonusproduct:updateSelectButton', {\n product: response.product, $productContainer: $productContainer\n });\n } else {\n // Enable \"Add to Cart\" button if all required attributes have been selected\n $('button.add-to-cart, button.add-to-cart-global, button.update-cart-product-global').trigger('product:updateAddToCart', {\n product: response.product, $productContainer: $productContainer\n }).trigger('product:statusUpdate', response.product);\n }\n\n // Update attributes\n $productContainer.find('.main-attributes').empty()\n .html(getAttributesHtml(response.product.attributes));\n}\n\n/**\n * @typespec UpdatedQuantity\n * @type Object\n * @property {boolean} selected - Whether the quantity has been selected\n * @property {string} value - The number of products to purchase\n * @property {string} url - Compiled URL that specifies variation attributes, product ID, options,\n * etc.\n */\n\n/**\n * Updates the quantity DOM elements post Ajax call\n * @param {UpdatedQuantity[]} quantities -\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction updateQuantities(quantities, $productContainer) {\n if (!($productContainer.parent('.bonus-product-item').length > 0)) {\n var optionsHtml = quantities.map(function (quantity) {\n var selected = quantity.selected ? ' selected ' : '';\n return '';\n }).join('');\n getQuantitySelector($productContainer).empty().html(optionsHtml);\n }\n}\n\n/**\n * updates the product view when a product attribute is selected or deselected or when\n * changing quantity\n * @param {string} selectedValueUrl - the Url for the selected variation value\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction attributeSelect(selectedValueUrl, $productContainer) {\n if (selectedValueUrl) {\n $('body').trigger('product:beforeAttributeSelect',\n { url: selectedValueUrl, container: $productContainer });\n\n $.ajax({\n url: selectedValueUrl,\n method: 'GET',\n success: function (data) {\n handleVariantResponse(data, $productContainer);\n updateOptions(data.product.options, $productContainer);\n updateQuantities(data.product.quantities, $productContainer);\n $('body').trigger('product:afterAttributeSelect',\n { data: data, container: $productContainer });\n },\n error: function () {\n $.spinner().stop();\n }\n });\n }\n}\n\n/**\n * Retrieves url to use when adding a product to the cart\n *\n * @return {string} - The provided URL to use when adding a product to the cart\n */\nfunction getAddToCartUrl() {\n return $('.add-to-cart-url').val();\n}\n\n/**\n * Parses the html for a modal window\n * @param {string} html - representing the body and footer of the modal window\n *\n * @return {Object} - Object with properties body and footer.\n */\nfunction parseHtml(html) {\n var $html = $('
    ').append($.parseHTML(html));\n\n var body = $html.find('.choice-of-bonus-product');\n var footer = $html.find('.modal-footer').children();\n\n return { body: body, footer: footer };\n}\n\n/**\n * Retrieves url to use when adding a product to the cart\n *\n * @param {Object} data - data object used to fill in dynamic portions of the html\n */\nfunction chooseBonusProducts(data) {\n $('.modal-body').spinner().start();\n\n if ($('#chooseBonusProductModal').length !== 0) {\n $('#chooseBonusProductModal').remove();\n }\n var bonusUrl;\n if (data.bonusChoiceRuleBased) {\n bonusUrl = data.showProductsUrlRuleBased;\n } else {\n bonusUrl = data.showProductsUrlListBased;\n }\n\n var htmlString = ''\n + '
    '\n + ''\n + '
    '\n + ''\n + '
    '\n + '
    '\n + '

    ' + data.labels.selectprods + '

    '\n + ' '\n + '
    '\n + '
    '\n + '
    '\n + '
    '\n + '
    '\n + '
    ';\n $('body').append(htmlString);\n $('.modal-body').spinner().start();\n\n $('#chooseBonusProductModal').on('shown.bs.modal', function () {\n $(document).trigger('bonus:modal:shown');\n\n $('.modal-body').waitForImages(function () {\n initBonusModalCarousel();\n });\n });\n\n $.ajax({\n url: bonusUrl,\n method: 'GET',\n dataType: 'json',\n success: function (response) {\n var parsedHtml = parseHtml(response.renderedTemplate);\n $('#chooseBonusProductModal .modal-body').empty();\n $('#chooseBonusProductModal .enter-message').text(response.enterDialogMessage);\n $('#chooseBonusProductModal .modal-header .close .sr-only').text(response.closeButtonText);\n $('#chooseBonusProductModal .modal-body').html(parsedHtml.body);\n $('#chooseBonusProductModal .modal-footer').html(parsedHtml.footer);\n $('#chooseBonusProductModal').modal('show');\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n}\n\n/**\n * Updates the Mini-Cart quantity value after the customer has pressed the \"Add to Cart\" button\n * @param {string} response - ajax response from clicking the add to cart button\n */\nfunction handlePostCartAdd(response) {\n $('.minicart').trigger('count:update', response);\n var messageType = response.error ? 'alert-danger' : 'alert-success';\n if (window.SitePreferences.ADD_TO_CART_ACTION === 'showModal' && response.renderedTemplate && $(window).outerWidth() > globalConfig.bp.medium) {\n // show added to cart modal\n $('#addToCartModal').remove();\n $('body').append(response.renderedTemplate).addClass('static');\n $('#addToCartModal').modal('show');\n\n $('#addToCartModal .bonus-product-button').on('click', function () {\n $('#addToCartModal').modal('hide');\n chooseBonusProducts(response.newBonusDiscountLineItem);\n });\n } else if (response.newBonusDiscountLineItem\n && Object.keys(response.newBonusDiscountLineItem).length !== 0) {\n // show bonus product modal\n chooseBonusProducts(response.newBonusDiscountLineItem);\n } else {\n // show add to cart toast\n if ($('.add-to-cart-messages').length === 0) {\n $('body').append(\n '
    '\n );\n }\n\n $('.add-to-cart-messages').append(\n '
    '\n + response.message\n + '
    '\n );\n\n setTimeout(function () {\n $('.add-to-basket-alert').first().fadeOut(function () {\n this.remove();\n });\n }, globalConfig.toastTimeout);\n }\n}\n\n/**\n * Retrieves the bundle product item ID's for the Controller to replace bundle master product\n * items with their selected variants\n *\n * @return {string[]} - List of selected bundle product item ID's\n */\nfunction getChildProducts() {\n var childProducts = [];\n $('.bundle-item').each(function () {\n childProducts.push({\n pid: $(this).find('.product-id').text(),\n quantity: parseInt($(this).find('label.quantity').data('quantity'), 10)\n });\n });\n\n return childProducts.length ? JSON.stringify(childProducts) : [];\n}\n\n/**\n * Retrieve product options\n *\n * @param {jQuery} $productContainer - DOM element for current product\n * @return {string} - Product options and their selected values\n */\nfunction getOptions($productContainer) {\n var options = $productContainer\n .find('.product-option')\n .map(function () {\n var $elOption = $(this).find('.options-select');\n var urlValue = $elOption.val();\n var selectedValueId = $elOption.find('option[value=\"' + urlValue + '\"]')\n .data('value-id');\n return {\n optionId: $(this).data('option-id'),\n selectedValueId: selectedValueId\n };\n }).toArray();\n\n return JSON.stringify(options);\n}\n\nmodule.exports = {\n attributeSelect: attributeSelect,\n methods: {\n editBonusProducts: function (data) {\n chooseBonusProducts(data);\n }\n },\n focusChooseBonusProductModal: function () {\n $('body').on('shown.bs.modal', '#chooseBonusProductModal', function () {\n $('#chooseBonusProductModal').siblings().attr('aria-hidden', 'true');\n $('#chooseBonusProductModal .close').focus();\n });\n },\n onClosingChooseBonusProductModal: function () {\n $('body').on('hidden.bs.modal', '#chooseBonusProductModal', function () {\n $('#chooseBonusProductModal').siblings().attr('aria-hidden', 'false');\n });\n },\n trapChooseBonusProductModalFocus: function () {\n $('body').on('keydown', '#chooseBonusProductModal', function (e) {\n var focusParams = {\n event: e,\n containerSelector: '#chooseBonusProductModal',\n firstElementSelector: '.close',\n lastElementSelector: '.add-bonus-products'\n };\n focusHelper.setTabNextFocus(focusParams);\n });\n },\n colorAttribute: function () {\n $(document).on('click', '[data-attr=\"color\"] button', function (e) {\n e.preventDefault();\n\n if ($(this).attr('disabled')) {\n return;\n }\n var $productContainer = $(this).closest('.set-item');\n if (!$productContainer.length) {\n $productContainer = $(this).closest('.product-detail');\n }\n\n attributeSelect($(this).attr('data-url'), $productContainer);\n });\n },\n selectAttribute: function () {\n $(document).on('change', 'select[class*=\"select-\"], .options-select', function (e) {\n e.preventDefault();\n\n var $productContainer = $(this).closest('.set-item');\n if (!$productContainer.length) {\n $productContainer = $(this).closest('.product-detail');\n }\n attributeSelect(e.currentTarget.value, $productContainer);\n });\n },\n availability: function () {\n $(document).on('change', '.quantity-select', function (e) {\n e.preventDefault();\n\n var $productContainer = $(this).closest('.product-detail');\n if (!$productContainer.length) {\n $productContainer = $(this).closest('.modal-content').find('.product-quickview');\n }\n\n if ($('.bundle-items', $productContainer).length === 0) {\n attributeSelect($(e.currentTarget).find('option:selected').data('url'),\n $productContainer);\n }\n });\n },\n addToCart: function () {\n $(document).on('click', 'button.add-to-cart, button.add-to-cart-global', function () {\n var addToCartUrl;\n var pid;\n var pidsObj;\n var setPids;\n\n $('body').trigger('product:beforeAddToCart', this);\n\n if ($('.set-items').length && $(this).hasClass('add-to-cart-global')) {\n setPids = [];\n\n $('.product-detail').each(function () {\n if (!$(this).hasClass('product-set-detail')) {\n setPids.push({\n pid: $(this).find('.product-id').text(),\n qty: $(this).find('.quantity-select').val(),\n options: getOptions($(this))\n });\n }\n });\n pidsObj = JSON.stringify(setPids);\n }\n\n pid = getPidValue($(this));\n\n var $productContainer = $(this).closest('.product-detail');\n if (!$productContainer.length) {\n $productContainer = $(this).closest('.quick-view-dialog').find('.product-detail');\n }\n\n addToCartUrl = getAddToCartUrl();\n\n var form = {\n pid: pid,\n pidsObj: pidsObj,\n childProducts: getChildProducts(),\n quantity: getQuantitySelected($(this))\n };\n\n if (!$('.bundle-item').length) {\n form.options = getOptions($productContainer);\n }\n\n $(this).trigger('updateAddToCartFormData', form);\n if (addToCartUrl) {\n $.ajax({\n url: addToCartUrl,\n method: 'POST',\n data: form,\n success: function (data) {\n handlePostCartAdd(data);\n $('body').trigger('product:afterAddToCart', data);\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n }\n });\n },\n initCarousel: initCarousel,\n initQuickViewCarousel: initQuickViewCarousel,\n initEditModalCarousel: initEditModalCarousel,\n initBundleCarousel: function () {\n if ($('.product-detail.bundle').length > 0) {\n var $imageCarousel = new Carousel('bundleImageCarousel');\n var $thumbnailCarousel = new Carousel('bundlepdpImageThumbnailsCarousel');\n\n // activate image Carousel\n $imageCarousel.activate();\n\n enquire.register('screen and (min-width: ' + (globalConfig.bp.large + 1) + 'px)', {\n match: function () {\n if (!$thumbnailCarousel.$element.hasClass('slick-initialized')) {\n $thumbnailCarousel.activate();\n }\n }\n }).register('screen and (max-width: ' + globalConfig.bp.large + 'px)', {\n match: function () {\n if ($thumbnailCarousel.$element.hasClass('slick-initialized')) {\n $thumbnailCarousel.$element.slick('unslick');\n }\n }\n });\n }\n },\n selectBonusProduct: function () {\n $(document).on('click', '.select-bonus-product', function () {\n var $choiceOfBonusProduct = $(this).parents('.choice-of-bonus-product');\n var pid = $(this).data('pid');\n var maxPids = $('.choose-bonus-product-dialog').data('total-qty');\n var submittedQty = parseInt($(this).parents('.choice-of-bonus-product').find('.bonus-quantity-select').val(), 10);\n var totalQty = 0;\n $.each($('#chooseBonusProductModal .selected-bonus-products .selected-pid'), function () {\n totalQty += $(this).data('qty');\n });\n totalQty += submittedQty;\n var optionID = $(this).parents('.choice-of-bonus-product').find('.product-option').data('option-id');\n var valueId = $(this).parents('.choice-of-bonus-product').find('.options-select option:selected').data('valueId');\n if (totalQty <= maxPids) {\n var selectedBonusProductHtml = ''\n + '
    '\n + '
    '\n + $choiceOfBonusProduct.find('.product-name').html()\n + '
    '\n + '
    '\n + '
    '\n ;\n $('#chooseBonusProductModal .selected-bonus-products').append(selectedBonusProductHtml);\n $('.pre-cart-products').html(totalQty);\n $('.selected-bonus-products .bonus-summary').removeClass('alert-danger');\n } else {\n $('.selected-bonus-products .bonus-summary').addClass('alert-danger');\n }\n });\n },\n removeBonusProduct: function () {\n $(document).on('click', '.selected-pid', function () {\n $(this).remove();\n var $selected = $('#chooseBonusProductModal .selected-bonus-products .selected-pid');\n var count = 0;\n if ($selected.length) {\n $selected.each(function () {\n count += parseInt($(this).data('qty'), 10);\n });\n }\n\n $('.pre-cart-products').html(count);\n $('.selected-bonus-products .bonus-summary').removeClass('alert-danger');\n });\n },\n enableBonusProductSelection: function () {\n $('body').on('bonusproduct:updateSelectButton', function (e, response) {\n $('button.select-bonus-product', response.$productContainer).attr('disabled',\n (!response.product.readyToOrder || !response.product.available));\n var pid = response.product.id;\n $('button.select-bonus-product').data('pid', pid);\n });\n },\n showMoreBonusProducts: function () {\n $(document).on('click', '.show-more-bonus-products', function () {\n var url = $(this).data('url');\n $('.modal-content').spinner().start();\n $.ajax({\n url: url,\n method: 'GET',\n success: function (html) {\n var parsedHtml = parseHtml(html);\n $('.modal-body').append(parsedHtml.body);\n $('.show-more-bonus-products:first').remove();\n $('.modal-content').spinner().stop();\n },\n error: function () {\n $('.modal-content').spinner().stop();\n }\n });\n });\n },\n addBonusProductsToCart: function () {\n $(document).on('click', '.add-bonus-products', function () {\n var $readyToOrderBonusProducts = $('.choose-bonus-product-dialog .selected-pid');\n var queryString = '?pids=';\n var url = $('.choose-bonus-product-dialog').data('addtocarturl');\n var pidsObject = {\n bonusProducts: []\n };\n\n $.each($readyToOrderBonusProducts, function () {\n var qtyOption =\n parseInt($(this)\n .data('qty'), 10);\n\n var option = null;\n if (qtyOption > 0) {\n if ($(this).data('optionid') && $(this).data('option-selected-value')) {\n option = {};\n option.optionId = $(this).data('optionid');\n option.productId = $(this).data('pid');\n option.selectedValueId = $(this).data('option-selected-value');\n }\n pidsObject.bonusProducts.push({\n pid: $(this).data('pid'),\n qty: qtyOption,\n options: [option]\n });\n pidsObject.totalQty = parseInt($('.pre-cart-products').html(), 10);\n }\n });\n queryString += JSON.stringify(pidsObject);\n queryString = queryString + '&uuid=' + $('.choose-bonus-product-dialog').data('uuid');\n queryString = queryString + '&pliuuid=' + $('.choose-bonus-product-dialog').data('pliuuid');\n\n $('.cart-line-items').spinner().start();\n\n $.ajax({\n url: url + queryString,\n method: 'POST',\n success: function (data) {\n $.spinner().stop();\n if (data.error) {\n $('.error-choice-of-bonus-products')\n .html(data.errorMessage);\n } else {\n $('.cart-line-items').empty().append(data.renderedTemplate);\n $('.configure-bonus-product-attributes').html(data);\n $('.bonus-products-step2').removeClass('hidden-xl-down');\n $('#chooseBonusProductModal').modal('hide');\n\n if ($('.add-to-cart-messages').length === 0) {\n $('body').append(\n '
    '\n );\n }\n $('.minicart-quantity').html(data.totalQty);\n $('.add-to-cart-messages').append(\n '
    '\n + data.msgSuccess + '
    '\n );\n setTimeout(function () {\n $('.add-to-basket-alert').remove();\n if ($('.cart-page').length) {\n location.reload();\n }\n }, 3000);\n }\n },\n error: function () {\n $.spinner().stop();\n }\n });\n });\n },\n\n getPidValue: getPidValue,\n getQuantitySelected: getQuantitySelected,\n waitForImagesInit: function () {\n $.fn.waitForImages = function (callback) {\n var $img = $('img', this),\n totalImg = $img.length;\n\n var waitImgLoad = function () {\n totalImg--;\n if (!totalImg) {\n callback();\n }\n $(this).on('error', callback);\n };\n\n $img.each(function () {\n if (this.complete) {\n waitImgLoad();\n }\n });\n\n $img.on('load', waitImgLoad);\n };\n }\n};\n"],"sourceRoot":""}