{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///../autobahn_client_core/cartridges/autobahn_client_core/cartridge/client/default/js/search.js","webpack:///../autobahn_client_core/cartridges/autobahn_client_core/cartridge/client/default/js/search/search.js","webpack:///../link_afterpay/node_modules/lodash/_Symbol.js","webpack:///../link_afterpay/node_modules/lodash/_baseGetTag.js","webpack:///../link_afterpay/node_modules/lodash/_baseTrim.js","webpack:///../link_afterpay/node_modules/lodash/_freeGlobal.js","webpack:///../link_afterpay/node_modules/lodash/_getRawTag.js","webpack:///../link_afterpay/node_modules/lodash/_objectToString.js","webpack:///../link_afterpay/node_modules/lodash/_root.js","webpack:///../link_afterpay/node_modules/lodash/_trimmedEndIndex.js","webpack:///../link_afterpay/node_modules/lodash/debounce.js","webpack:///../link_afterpay/node_modules/lodash/isObject.js","webpack:///../link_afterpay/node_modules/lodash/isObjectLike.js","webpack:///../link_afterpay/node_modules/lodash/isSymbol.js","webpack:///../link_afterpay/node_modules/lodash/now.js","webpack:///../link_afterpay/node_modules/lodash/toNumber.js","webpack:///../rvw_autobahn_core/cartridges/rvw_autobahn_core/cartridge/client/default/js/search/search.js","webpack:///../rvw_autobahn_core/cartridges/rvw_autobahn_core/cartridge/scripts/constants/SiteConstants.js","webpack:///../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/search/search.js","webpack:///../storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js","webpack:///(webpack)/buildin/global.js"],"names":["processInclude","require","baseFiles","search","$","document","ready","Object","keys","forEach","key","module","exports","extend","SiteConstants","debounce","endpoint","minChars","UP_KEY","DOWN_KEY","DIRECTION_DOWN","DIRECTION_UP","setRefinementCollapseStates","status","addClass","removeClass","find","attr","toggleRefinementDrawer","$refinementBar","$modalBackground","$header","headerNavHeight","outerHeight","scrollTopHeight","offset","top","scrollTop","body","documentElement","css","siblings","fadeIn","TransitionSpeed","closest","focus","fadeOut","toggleFilters","e","preventDefault","toggleDirection","hasClass","updateDom","$results","selector","$updates","empty","html","getContent","$element","$target","showMoreUrl","data","spinner","start","ajax","url","method","success","response","append","complete","stop","updateSortOptions","promoTileCount","$tempDom","sortOptions","options","pageSize","Number","option","pageUrl","URL","window","location","urlPageSize","searchParams","get","optionUrl","optionPageSize","isNaN","updatedPageSize","set","toString","id","val","handleRefinements","each","activeDiv","className","replace","parseResults","openedDropdownID","isMobile","$refinements","refinementStyle","$filterBar","filterBarStyle","filterBar","verticalMobile","verticalDesktop","horizontalMultipleDropdownsDesktop","horizontalOneDropdownDesktop","horizontalOneDropdownDesktopActive","horizontalOneDropdownDesktopOpen","filterDrawer","filterDrawerActive","filterDrawerOpen","openAttributeIDs","children","length","openAttributes","push","specialHandlers","refinements","overflowRefinements","dropdown","$refinementGroup","$refinementTitle","trigger","refinementStickyBar","oneDropdownSlideToggle","oneDropdownFilter","menuToggle","unbind","on","slideToggle","toggleClass","showStickyRefinementData","getElementById","showStickyRefinementBarCheck","getAttribute","mainContent","topHeaderHeight","heightCalculation","querySelector","offsetTop","lastPosition","pageYOffset","addEventListener","scrollHeight","innerHeight","offsetHeight","classList","add","setAttribute","contains","remove","removeAttribute","closeOneRefinementsDropdown","$oneRefinementsDropdown","is","target","has","slideUp","initialize","collapseMobile","collapseDesktop","refinementCategoryOpen","localStorage","getItem","closeRefinements","sort","$xhr","stopPropagation","thisValue","value","urlParams","URLSearchParams","split","sortOrder","newUrl","newSelection","selectedOptions","prop","removeAttr","abort","selectedUrl","isSortUpdate","timeout","beforeSend","$result","$productGridElement","updatedGridHtml","affirm","ui","refresh","tilesSameHeightLogic","i","el","pageOptionUrl","startsWith","origin","pageOptionUrlObj","history","replaceState","undefined","gtmData","filter","searchSort","selectedStartIndex","selectedSize","sortOptionUrl","sortOptionUrlObj","productsPerPage","showMore","$showMoreButton","replaceWith","showMoreUrlObject","currentProductsCount","newProductsCount","newTotalProductCount","parseInt","currentUrl","href","currentUrlParams","error","applyFilter","event","category","currentTarget","desktopLayout","mobileLayout","setItem","selectedSort","sortingRule","selectedPageSize","trim","text","selectedPageSizeValue","includes","refinementUrl","indexOf","page","methods","$searchGTMelement","searchGTMData","$searchFilterEvent","searchFilterData","priceRangeFilter","storeFilter","storeID","$storeFilter","baseUrl","actionUrl","minPrice","parseFloat","maxPrice","test","console","log","setChecked","index","ele","fromPricing","show","hide","selectedRefinementCount","$searchContainer","$refinementNodes","$selectedAttributesNodes","$label","$moreFilterButton","$selectedOverflowAttributes","expandSelectedFilters","element","productViewData","productViewObj","getSuggestionsWrapper","scope","isMobileSearch","toggleSuggestionsIcon","action","mobileSearchIcon","iconSearch","iconSearchClose","positionSuggestions","$scope","$suggestions","handleMoreContentBelowIcon","scroll","clearModals","applyModals","addEmptySpanForADA","form","wrapper","processResponse","$suggestionsWrapper","getSuggestions","context","encodeURIComponent","handleArrow","direction","suggestionsList","first","idx","eq","removeProp","searchSuggestionsOverride","debounceSuggestions","which","$tileContainer","marketingTiles","tilesHeight","maxHeight","Math","max","apply","map","toggleVisibility","eleObject","ar","toArray","$el","debounceTimer","clearTimeout","setTimeout","setSameHeightToTiles","toggle","reset","resize","root","Symbol","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","toStringTag","baseGetTag","trimmedEndIndex","reTrimStart","baseTrim","string","slice","freeGlobal","global","objectProto","prototype","hasOwnProperty","nativeObjectToString","isOwn","call","tag","unmasked","result","freeSelf","self","Function","reWhitespace","charAt","isObject","now","toNumber","FUNC_ERROR_TEXT","nativeMax","nativeMin","min","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","arguments","type","isObjectLike","symbolTag","isSymbol","Date","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","other","valueOf","isBinary","bannerHeight","navHeight","topHeader","windowWidth","width","BreakpointSizes","ComponentAnimationDelay","Spacer","placeholderImagePaths","defaultMapMarker","defaultStoreType","showContentTab","include","g"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb,IAAIA,cAAc,GAAGC,mBAAO,CAAC,0HAAD,CAA5B;;AAEA,IAAIC,SAAS,GAAG;AACZC,QAAM,EAAEF,mBAAO,CAAC,6HAAD;AADH,CAAhB;AAIAG,CAAC,CAACC,QAAD,CAAD,CAAYC,KAAZ,CAAkB,YAAY;AAC1BC,QAAM,CAACC,IAAP,CAAYN,SAAZ,EAAuBO,OAAvB,CAA+B,UAAUC,GAAV,EAAe;AAC1CV,kBAAc,CAACE,SAAS,CAACQ,GAAD,CAAV,CAAd;AACH,GAFD;AAGH,CAJD;AAMAC,MAAM,CAACC,OAAP,GAAiB;AACbV,WAAS,EAATA;AADa,CAAjB,C;;;;;;;;;;;;;ACdA,IAAIU,OAAO,GAAGR,CAAC,CAACS,MAAF,CAAS,EAAT,EAAaZ,mBAAO,CAAC,0HAAD,CAApB,CAAd;;AACA,IAAIa,aAAa,GAAGb,mBAAO,CAAC,+HAAD,CAA3B;;AAEA,IAAIc,QAAQ,GAAGd,mBAAO,CAAC,yEAAD,CAA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AAI;AACH;AACAA,GAAC,GAAGA,CAAC,IAAI,IAAIjE,QAAJ,CAAa,aAAb,GAAT;AACA,CAHD,CAGE,OAAOtT,CAAP,EAAU;AACX;AACA,MAAI,QAAOmC,MAAP,yCAAOA,MAAP,OAAkB,QAAtB,EAAgCoV,CAAC,GAAGpV,MAAJ;AAChC,C,CAED;AACA;AACA;;;AAEAxE,MAAM,CAACC,OAAP,GAAiB2Z,CAAjB,C","file":"default/js/search.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 = \"../autobahn_client_core/cartridges/autobahn_client_core/cartridge/client/default/js/search.js\");\n","'use strict';\n\nvar processInclude = require('base/util');\n\nvar baseFiles = {\n search: require('./search/search'),\n}\n\n$(document).ready(function () {\n Object.keys(baseFiles).forEach(function (key) {\n processInclude(baseFiles[key]);\n });\n});\n\nmodule.exports = {\n baseFiles\n};\n","var exports = $.extend({}, require('core/search/search'));\nvar SiteConstants = require('constants/SiteConstants');\n\nvar debounce = require('lodash/debounce');\n//var endpoint = $('.suggestions-wrapper').data('url');\nvar endpoint;\nvar minChars = 1;\nvar UP_KEY = 38;\nvar DOWN_KEY = 40;\nvar DIRECTION_DOWN = 1;\nvar DIRECTION_UP = -1;\n\nvar setRefinementCollapseStates = status => {\n\n if (status === 'open') {\n $('.refinement').addClass('active');\n }\n else if (status === 'closed') {\n $('.refinement').removeClass('active');\n $('.refinement').find('button.title').attr('aria-expanded','false');\n }\n};\n\nvar toggleRefinementDrawer = status => {\n var $refinementBar = $('.refinement-bar');\n var $modalBackground = $('.modal-background');\n\n if (status === 'open') {\n var $header = $('header');\n var headerNavHeight = $header.outerHeight();\n var scrollTopHeight = $header.offset().top;\n $('html').scrollTop(scrollTopHeight);\n // Following two lines for MS Edge to work\n document.body.scrollTop = scrollTopHeight;\n document.documentElement.scrollTop = scrollTopHeight;\n $('html').addClass('lock-scroll');\n $('body').addClass('mobile-filter-drawer-in');\n $refinementBar.addClass('in').css('top', headerNavHeight).siblings().attr('aria-hidden', true);\n $modalBackground.fadeIn(SiteConstants.TransitionSpeed).css('top', headerNavHeight);\n $refinementBar.closest('.row').siblings().attr('aria-hidden', true);\n $refinementBar.closest('.tab-pane.active').siblings().attr('aria-hidden', true);\n $refinementBar.closest('.container.search-results').siblings().attr('aria-hidden', true);\n $refinementBar.find('.close').focus();\n } else {\n $('html').removeClass('lock-scroll');\n $('body').removeClass('mobile-filter-drawer-in');\n $refinementBar.removeClass('in').css('top', '').siblings().attr('aria-hidden', false);\n $modalBackground.fadeOut(SiteConstants.TransitionSpeed);\n $refinementBar.closest('.row').siblings().attr('aria-hidden', false);\n $refinementBar.closest('.tab-pane.active').siblings().attr('aria-hidden', false);\n $refinementBar.closest('.container.search-results').siblings().attr('aria-hidden', false);\n $('.btn.filter-results').focus();\n }\n};\n\nvar toggleFilters = (e) => {\n e.preventDefault();\n var toggleDirection = 'open';\n if ($('.refinement-bar .refinement').hasClass('active')) {\n toggleDirection = 'closed';\n }\n setRefinementCollapseStates(toggleDirection);\n};\n\n/**\n * Update DOM elements with Ajax results\n *\n * @param {Object} $results - jQuery DOM element\n * @param {string} selector - DOM element to look up in the $results\n * @return {undefined}\n */\nfunction updateDom($results, selector) {\n var $updates = $results.find(selector);\n $(selector).empty().html($updates.html());\n}\n\n/**\n * This function retrieves another page of content to display in the content search grid\n * @param {JQuery} $element - the jquery element that has the click event attached\n * @param {JQuery} $target - the jquery element that will receive the response\n * @return {undefined}\n */\nfunction getContent($element, $target) {\n var showMoreUrl = $element.data('url');\n $.spinner().start();\n $.ajax({\n url: showMoreUrl,\n method: 'GET',\n success: function (response) {\n $target.append(response);\n },\n complete: function () {\n $.spinner().stop();\n }\n });\n}\n\n/**\n * Update sort option URLs from Ajax response\n *\n * @param {string} response - Ajax response HTML code\n * @return {undefined}\n */\nfunction updateSortOptions(response, promoTileCount) {\n var $tempDom = $('
').append($(response));\n var sortOptions = $tempDom.find('.grid-footer').data('sort-options').options;\n var pageSize = Number($tempDom.find('.grid-footer').data('page-size'));\n\n sortOptions.forEach(option => {\n var pageUrl = new URL(window.location);\n var urlPageSize = pageUrl.searchParams.get('sz') !== null ? Number(pageUrl.searchParams.get('sz')) : null;\n var optionUrl = new URL(option.url);\n var optionPageSize = Number(optionUrl.searchParams.get('sz'));\n\n // If 'sz' is already defined in URL, but promo tiles aren't already accounted for, decrement sz param\n if (!isNaN(urlPageSize) && urlPageSize !== optionPageSize - pageSize) {\n var updatedPageSize = optionPageSize - promoTileCount;\n optionUrl.searchParams.set('sz', updatedPageSize);\n option.url = optionUrl.toString();\n }\n\n $('option.' + option.id).val(option.url);\n });\n}\n\n/**\n * Keep refinement panes expanded/collapsed after Ajax refresh\n *\n * @param {Object} $results - jQuery DOM element\n * @return {undefined}\n */\nfunction handleRefinements($results, selector) {\n $('.refinement.active').each(function () {\n $(this).removeClass('active');\n var activeDiv = $results.find('.' + $(this)[0].className.replace(/ /g, '.'));\n activeDiv.addClass('active');\n activeDiv.find('button.title').attr('aria-expanded', 'true');\n });\n updateDom($results, selector);\n}\n\n/**\n * Parse Ajax results and updated select DOM elements\n *\n * @param {string} response - Ajax response HTML code\n * @return {undefined}\n */\nfunction parseResults(response, openedDropdownID) {\n var $results = $(response);\n var isMobile = window.isMobile();\n if (isMobile) {\n var $refinements = $results.find('.refinements[data-refinement-style-mobile]');\n var refinementStyle = $refinements.data('refinement-style-mobile');\n var selector = `[data-refinement-style-mobile=\"${refinementStyle}\"]`;\n } else {\n var $refinements = $results.find('.refinements[data-refinement-style-desktop]');\n var refinementStyle = $refinements.data('refinement-style-desktop');\n var selector = `[data-refinement-style-desktop=\"${refinementStyle}\"]`;\n };\n\n var $filterBar = $results.find('.filter-bar');\n var filterBarStyle = !isMobile ? $filterBar.attr('data-filter-bar-style-desktop') : $filterBar.attr('data-filter-bar-style-mobile');\n var filterBar = !isMobile ? '[data-filter-bar-style-desktop=\"' + filterBarStyle + '\"]' : '[data-filter-bar-style-mobile=\"' + filterBarStyle + '\"]';\n\n var verticalMobile = isMobile && selector === '[data-refinement-style-mobile=\"vertical\"]';\n var verticalDesktop = !isMobile && selector === '[data-refinement-style-desktop=\"vertical\"]';\n var horizontalMultipleDropdownsDesktop = !isMobile && selector === '[data-refinement-style-desktop=\"horizontal-multiple-dropdowns\"]';\n var horizontalOneDropdownDesktop = !isMobile && selector === '[data-refinement-style-desktop=\"horizontal-one-dropdown\"]';\n var horizontalOneDropdownDesktopActive = $('.collapse-filters-wrapper').hasClass('active');\n var horizontalOneDropdownDesktopOpen = false;\n\n var filterDrawer = $('.vertical-filter-drawer');\n var filterDrawerActive = $('.vertical-filter-drawer').hasClass('active');\n var filterDrawerOpen = false;\n var openAttributeIDs = [];\n if (filterDrawer && filterDrawerActive && filterDrawer.children().length > 0) {\n filterDrawerOpen = true;\n // find currently expanded attributes\n var openAttributes = filterDrawer.find('.collapse.show');\n openAttributes.each(function () {\n openAttributeIDs.push($(this).attr('id'));\n });\n }\n\n if (horizontalOneDropdownDesktop && horizontalOneDropdownDesktopActive) {\n horizontalOneDropdownDesktopOpen = true;\n }\n\n if (verticalMobile || verticalDesktop) {\n var specialHandlers = {\n selector : handleRefinements\n };\n\n Object.keys(specialHandlers).forEach(function (selector) {\n specialHandlers[selector]($results, selector);\n });\n };\n\n if (!isMobile) {\n var refinements = '.desktop-search-refinements';\n } else {\n var refinements = '.mobile-search-refinements';\n };\n var overflowRefinements = '.vertical-filter-drawer';\n\n // Update DOM elements that do not require special handling\n [\n '.grid-header',\n '.header-bar',\n '.header.page-title',\n '.product-grid',\n '.show-more',\n refinements,\n overflowRefinements,\n filterBar\n ].forEach((selector) => {\n updateDom($results, selector);\n });\n\n // reopen selected/clicked dropdrown after DOM update\n if (openedDropdownID && horizontalMultipleDropdownsDesktop) {\n $('button#' + openedDropdownID).dropdown('toggle');\n }\n\n if (horizontalOneDropdownDesktopOpen === true) {\n $('.collapse-filters-wrapper').addClass('active').css('display', 'block');\n }\n\n // close filter drawer if no result found\n if ($(overflowRefinements).children().length <= 0) {\n $(overflowRefinements).removeClass('active');\n } else if (filterDrawerOpen === true) {\n // re-expand selected attributes\n $('.vertical-filter-drawer').addClass('active');\n openAttributeIDs.forEach(function(selector) {\n var $refinementGroup = $(overflowRefinements + ' #' + selector);\n var $refinementTitle = $('[aria-controls=\"'+selector+'\"]');\n $refinementGroup.addClass('show');\n $refinementTitle.attr('aria-expanded', 'true');\n });\n\n }\n\n $('body').trigger('ajax:load.ajaxEvents', [$('.search-results')]);\n $('body').trigger('search:updateCount');\n exports.refinementStickyBar();\n exports.oneDropdownSlideToggle();\n}\n\nexports.oneDropdownSlideToggle = function() {\n var oneDropdownFilter = $('.horizontal-onedropdown-filter');\n if (oneDropdownFilter) {\n var menuToggle = $('.horizontal-onedropdown-filter-btn').unbind();\n menuToggle.removeClass('open');\n\n menuToggle.on('touchstart click', function(e) {\n e.preventDefault();\n $('.collapse-filters-wrapper').slideToggle(SiteConstants.TransitionSpeed).toggleClass('active');\n menuToggle.toggleClass('open');\n });\n }\n}\n\nexports.refinementStickyBar = function() {\n var showStickyRefinementData = window.isMobile() ? document.getElementById('horizontal-filter-mobile') : document.getElementById('horizontal-filter');\n if (showStickyRefinementData) {\n var showStickyRefinementBarCheck = showStickyRefinementData.getAttribute('data-sticky-refinement-bar');\n var mainContent = document.getElementById('maincontent');\n var topHeaderHeight = 0;\n var heightCalculation = document.querySelector('.search-results').offsetTop;\n\n if (showStickyRefinementData && showStickyRefinementBarCheck == 'true') {\n // Note: This is intentionally not using utilities/scroll.js so that it can fix immediately vs. being debounced. Should be replaced with CSS position:sticky once IE11 support is dropped.\n var lastPosition = window.pageYOffset;\n window.addEventListener('scroll', function() {\n //main sticky horizontal dropdown filter functionality - only show when scrolled past in-page refinement button section\n if ((window.pageYOffset > heightCalculation && mainContent.scrollHeight > (window.innerHeight + showStickyRefinementData.offsetHeight)) && lastPosition - window.pageYOffset > 0) {\n showStickyRefinementData.classList.add('sticky-filters');\n showStickyRefinementData.setAttribute('style', 'top:' + topHeaderHeight + 'px;');\n mainContent.setAttribute('style', 'padding-top:0px;');\n } else if (showStickyRefinementData.classList.contains('sticky-filters') && window.pageYOffset < heightCalculation || (lastPosition - window.pageYOffset < 0)) {\n showStickyRefinementData.classList.remove('sticky-filters');\n mainContent.removeAttribute('style');\n }\n lastPosition = window.pageYOffset;\n });\n }\n }\n\n}\n\nvar closeOneRefinementsDropdown = (e) => {\n var $oneRefinementsDropdown = $('.horizontal-onedropdown-filter-group');\n if ((!$('.collapse-one-dropdown-filter').is(e.target) && $oneRefinementsDropdown.has(e.target).length === 0)\n || $('.close-one-refinements-dropdown').is(e.target)) {\n $('.collapse-filters-wrapper').slideUp().removeClass('active');\n }\n};\n\nexports.initialize = () => $(document).ready(function () {\n var isMobile = window.isMobile();\n var collapseMobile = $('[data-collapse-mobile]').attr('data-collapse-mobile') === 'true' ? true : false;\n var collapseDesktop = $('[data-collapse-desktop]').attr('data-collapse-desktop') === 'true' ? true : false;\n if (isMobile && collapseMobile) {\n setRefinementCollapseStates('close');\n } else if (isMobile && !collapseMobile) {\n setRefinementCollapseStates('open');\n } else if (!isMobile && collapseDesktop) {\n setRefinementCollapseStates('close');\n } else if (!isMobile && !collapseDesktop) {\n setRefinementCollapseStates('open');\n }\n if ($('#articles-tab').hasClass('active') && $('#content-search-results').html() === '') {\n getContent($('.content-search'), $('#content-search-results'));\n }\n\n var refinementCategoryOpen = localStorage.getItem('refinement-category');\n if (refinementCategoryOpen) {\n $('.refinement-category').addClass('active');\n }\n $('body').trigger('search:updateCount');\n});\n\nexports.closeRefinements = function () {\n\n $('html').on('click', '.refinement-bar button.close, .mobile-filter-drawer-in .modal-background', () => toggleRefinementDrawer('close'));\n //for horizontal one dropdown menu\n $('html').on('click', (e) => closeOneRefinementsDropdown(e));\n}\n\nexports.sort = function () {\n var $xhr;\n // Handle sort order menu selection\n $('.container').on('change', '[name=sort-order]', function (e) {\n e.preventDefault();\n e.stopPropagation();\n\n var thisValue = this.value;\n $(this).trigger('search:sort', this.value);\n var urlParams = new URLSearchParams($(this).val().split('?')[1]);\n var sortOrder = urlParams.get('srule');\n\n const newUrl = new URL(window.location);\n newUrl.searchParams.set(\"srule\", sortOrder);\n\n var newSelection = this.selectedOptions[0];\n $('[name=\"sort-order\"]').find('option[selected=\"selected\"], option:selected').prop('selected',false).removeAttr('selected');\n $(newSelection).prop('selected', true).attr('selected', true);\n\n // Cancel previous request\n $xhr && $xhr.abort && $xhr.abort();\n\n $xhr = $.ajax({\n url: thisValue + '&isAjax=true',\n data: {\n selectedUrl: thisValue,\n isSortUpdate: true\n },\n method: 'GET',\n timeout: 10000,\n beforeSend: function () {\n $.spinner().start();\n },\n success: function (response) {\n var $result = $(response)\n var $productGridElement = $result.find('.product-grid'); // if response is coming from page designer\n var updatedGridHtml = $productGridElement.length > 0 ? $productGridElement.children() : response;\n $('.product-grid').empty().html(updatedGridHtml);\n affirm && affirm.ui.ready(function () {\n affirm.ui.refresh();\n });\n\n tilesSameHeightLogic();\n \n\n // update page size dropdown url params to selected sorting rule\n $('select[name=\"page-size\"] option').each((i, el) => {\n if ($(el).attr('value') && newUrl) {\n let pageOptionUrl = $(el).attr('value').startsWith('http') ? $(el).attr('value') : window.location.origin + $(el).attr('value');\n let pageOptionUrlObj = new URL(pageOptionUrl);\n pageOptionUrlObj.searchParams.set(\"srule\", sortOrder);\n $(el).attr('value', pageOptionUrlObj.toString());\n }\n });\n\n history.replaceState(undefined, '', newUrl);\n var gtmData = $result.filter('input#viewcat-gtmdata');\n if (gtmData.length) {\n gtmData = gtmData.val();\n if (gtmData){\n $('body').trigger('gtm:pushData', [gtmData, true]);\n }\n }\n var searchSort = $result.filter('input#viewSearch-sortdata');\n if (searchSort.length) {\n searchSort = searchSort.val();\n if (searchSort){\n $('body').trigger('gtm:pushData', [searchSort, true]);\n }\n }\n $('body').trigger('search:sort--success');\n $('body').trigger('ajax:load.ajaxEvents', [$('.product-grid')]);\n },\n complete: function () {\n $.spinner().stop();\n }\n });\n });\n}\n\nexports.pageSize = function () {\n var $xhr;\n // Handle page size dropdown menu selection\n $('.container').on('change', '[name=page-size]', function (e) {\n e.preventDefault();\n e.stopPropagation();\n\n var thisValue = this.value;\n var urlParams = new URLSearchParams(thisValue.split('?')[1]);\n var selectedStartIndex = urlParams.get('start');\n var selectedSize = urlParams.get('sz');\n\n const newUrl = new URL(window.location);\n newUrl.searchParams.set(\"start\", selectedStartIndex);\n newUrl.searchParams.set(\"sz\", selectedSize);\n\n var newSelection = this.selectedOptions[0];\n $('[name=\"page-size\"]').find('option[selected=\"selected\"], option:selected').prop('selected', false).removeAttr('selected');\n $(newSelection).prop('selected', true).attr('selected', true);\n\n // Cancel previous request\n $xhr && $xhr.abort && $xhr.abort();\n\n $xhr = $.ajax({\n url: thisValue + '&isAjax=true',\n data: {\n selectedUrl: thisValue\n },\n method: 'GET',\n timeout: 10000,\n beforeSend: function () {\n $.spinner().start();\n },\n success: function (response) {\n var $productGridElement = $(response).find('.product-grid'); // if response is coming from page designer\n var updatedGridHtml = $productGridElement.length > 0 ? $productGridElement.children() : response;\n $('.product-grid').empty().html(updatedGridHtml);\n affirm && affirm.ui.ready(function () {\n affirm.ui.refresh();\n });\n\n tilesSameHeightLogic();\n\n // update sort dropdown url params to selected page size\n $('select[name=\"sort-order\"] option').each((i, el) => {\n if ($(el).attr('value')) {\n let sortOptionUrl = $(el).attr('value').startsWith('http') ? $(el).attr('value') : window.location.origin + $(el).attr('value');\n let sortOptionUrlObj = new URL(sortOptionUrl);\n sortOptionUrlObj.searchParams.set(\"start\", selectedStartIndex);\n sortOptionUrlObj.searchParams.set(\"sz\", selectedSize);\n $(el).attr('value', sortOptionUrlObj.toString());\n }\n });\n\n history.replaceState(undefined, '', newUrl);\n var gtmData = $(response).filter('input#viewcat-gtmdata');\n if (gtmData.length) {\n gtmData = gtmData.val();\n if (gtmData){\n $('body').trigger('gtm:pushData', [gtmData, true]);\n }\n }\n var productsPerPage = $(response).filter('input#viewSearch-productsPerPage');\n if (productsPerPage.length) {\n productsPerPage = productsPerPage.val();\n if (productsPerPage){\n $('body').trigger('gtm:pushData', [productsPerPage, true]);\n }\n }\n $('body').trigger('search:pageSize--success');\n $('body').trigger('ajax:load.ajaxEvents', [$('.product-grid')]);\n },\n complete: function () {\n $.spinner().stop();\n }\n });\n });\n}\n\nexports.showMore = function () {\n // Show more products\n $('.container').on('click', '.show-more button', function (e) {\n e.stopPropagation();\n e.preventDefault();\n var showMoreUrl = $(this).data('url');\n var $showMoreButton = $(e.target);\n $.spinner().start();\n $(this).trigger('search:showMore', e);\n\n $.ajax({\n url: showMoreUrl,\n data: { selectedUrl: showMoreUrl },\n method: 'GET',\n success: function (response) {\n var promoTileCount = $showMoreButton.closest('.product-grid').find('[class*=\"experience-promoTile\"]').length;\n $('.grid-footer').replaceWith(response);\n updateSortOptions(response, promoTileCount);\n $('body').trigger('search:showMore--success');\n\n // get total product counts for new page load and replace current url to contain the counts without refreshing,\n // so when redirected and navigated back it would auto scroll to previous position\n let showMoreUrlObject = new URL(showMoreUrl);\n let currentProductsCount = showMoreUrlObject.searchParams.get('start'); // get current products count\n let newProductsCount = showMoreUrlObject.searchParams.get('sz'); // get the newly added products' count\n let newTotalProductCount = parseInt(currentProductsCount || 0) + parseInt(newProductsCount || 24);\n // get current url's params and update/set \"sz\" param\n let currentUrl = new URL(window.location.href);\n let currentUrlParams = currentUrl.searchParams;\n currentUrlParams.set('sz', newTotalProductCount);\n // replace current url to a new url with updated params\n history.replaceState({}, null, `${currentUrl.search}`);\n\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n });\n}\n\nexports.applyFilter = function () {\n var $xhr;\n // Handle refinement value selection and reset click\n $('.container').on(\n 'click',\n '.refinements li button, .filter-bar button.reset, .filter-value button, .swatch-filter button, .price-range-btn',\n function (event) {\n\t\t\tconst currentUrl = new URLSearchParams(window.location.search);\n var category = $(event.currentTarget).closest('.refinement');\n var openedDropdownID = $(event.currentTarget).closest('.dropdown-menu').attr('aria-labelledby');\n var desktopLayout = $('.refinements .grid-layout-toggle').attr('data-selected-desktop');\n var mobileLayout = $('.refinements .grid-layout-toggle').attr('data-selected-mobile');\n if (category && category.hasClass('refinement-category')) {\n localStorage.setItem('refinement-category', true);\n }\n //find new attr on Sort if selected, if not use the default\n var selectedSort = $('select[name=\"sort-order\"]').find('option[selected=\"selected\"]');\n if (selectedSort.data('id') != null) {\n var sortingRule = selectedSort.data('id');\n } else {\n var sortingRule = $('select[name=\"sort-order\"] option:selected').data('id');\n }\n\n // find current paging size option, if not use the default\n var selectedPageSize = $('select[name=\"page-size\"]').find('option[selected]');\n if ($.trim(selectedPageSize.text()) != null) {\n var selectedPageSizeValue = $.trim(selectedPageSize.text());\n } else {\n var selectedPageSizeValue = $.trim($('select[name=\"page-size\"] option:selected').text());\n }\n\n //create a new url with the correct preferences\n if ($(this).data('href').includes('srule')) {\n var refinementUrl = $(this).data('href').replace(/(srule=).*?(&|$)/,'$1' + sortingRule + '$2');\n } else if (!$(this).data('href').includes('srule') && sortingRule != null) {\n var split = $(this).data('href').indexOf('?') !== -1 ? '&' : '?';\n var refinementUrl = $(this).data('href') + split + 'srule=' + sortingRule;\n } else {\n var refinementUrl = $(this).data('href');\n }\n // append/update page size to the new url\n if (refinementUrl.includes('sz')) {\n refinementUrl = refinementUrl.replace(/(sz=).*?(&|$)/, '$1' + selectedPageSizeValue + '$2');\n } else if (!refinementUrl.includes('sz') && selectedPageSizeValue != null) {\n var split = refinementUrl.indexOf('?') !== -1 ? '&' : '?';\n var refinementUrl = refinementUrl + split + 'sz=' + selectedPageSizeValue;\n }\n // Append grid layout to new URL\n if (currentUrl.has('gridLayout')) {\n refinementUrl = refinementUrl + '&gridLayout=' + currentUrl.get('gridLayout');\n }\n event.preventDefault();\n event.stopPropagation();\n $(this).trigger('search:filter', event);\n\n // Cancel previous request\n $xhr && $xhr.abort && $xhr.abort();\n\n $xhr = $.ajax({\n url: refinementUrl + '&isAjax=true',\n data: {\n page: $('.grid-footer').data('page-number'),\n selectedUrl: refinementUrl\n },\n method: 'GET',\n timeout: 10000,\n beforeSend: function () {\n $.spinner().start();\n },\n success: function (response) {\n module.exports.methods.parseResults(response, openedDropdownID);\n affirm && affirm.ui.ready(function () {\n affirm.ui.refresh();\n });\n history.replaceState(undefined, '', refinementUrl);\n $('.grid-layout-toggle').attr('data-selected-desktop', desktopLayout);\n $('.grid-layout-toggle').attr('data-selected-mobile', mobileLayout);\n $('body').trigger('search:filter--success');\n var $searchGTMelement= $(response).filter('input#search-gtmdata');\n if($searchGTMelement.length){\n var searchGTMData = $searchGTMelement.val();\n if(searchGTMData){\n $('body').trigger('gtm:pushData',[searchGTMData , true]);\n }\n }\n var $searchFilterEvent= $(response).filter('input#search-filter');\n if($searchFilterEvent.length){\n var searchFilterData = $searchFilterEvent.val();\n if(searchFilterData){\n $('body').trigger('gtm:pushData',[searchFilterData , true]);\n }\n }\n exports.priceRangeFilter();\n tilesSameHeightLogic();\n },\n complete: function () {\n $.spinner().stop();\n }\n });\n });\n};\n\nexports.storeFilter = function () {\n $('body').on('click', '.refine-by-store', function (e) {\n var storeID = $(this).data('store-id');\n if (storeID) {\n var $storeFilter = $(`#instoredisplaystores ul.values li[data-value='${storeID}']`);\n if($storeFilter.length > 0) {\n $storeFilter.find('button').trigger('click');\n }\n }\n });\n};\n\nexports.priceRangeFilter = function () {\n var baseUrl = $('.price-range-btn').attr('data-base-url');\n var actionUrl = $('.price-range-btn').attr('data-href');\n var append = baseUrl && actionUrl && (baseUrl.length > 0 && baseUrl === actionUrl && baseUrl.indexOf('?') === -1) ? '?' : '&';\n\n var minPrice = $.trim($('#price-min').val()).length ? parseFloat($.trim($('#price-min').val())) : 0;\n var maxPrice = $.trim($('#price-max').val()).length ? parseFloat($.trim($('#price-max').val())) : 0;\n if (maxPrice > minPrice) {\n $('.price-range-btn').attr('data-href', actionUrl + append + 'pmin=' + minPrice.toString() + '&pmax=' + maxPrice.toString());\n $('.price-range-btn').prop('disabled', false);\n }\n\n $('#price-min').on('input', function() {\n if (/^\\d+\\.?\\d{0,2}$/.test($.trim($(this).val()))) {\n var minPrice = $.trim($(this).val()).length ? parseFloat($.trim($(this).val())) : 0;\n var maxPrice = $.trim($('#price-max').val()).length ? parseFloat($.trim($('#price-max').val())) : 0;\n console.log(maxPrice + '>' + minPrice + ': ' + (maxPrice > minPrice));\n if (maxPrice > minPrice) {\n $('.price-range-btn').attr('data-href', actionUrl + append + 'pmin=' + minPrice.toString() + '&pmax=' + maxPrice.toString());\n $('.price-range-btn').prop('disabled', false);\n } else {\n $('.price-range-btn').prop('disabled', true);\n }\n }\n });\n\n $('#price-max').on('input', function() {\n if (/^\\d+\\.?\\d{0,2}$/.test($.trim($(this).val()))) {\n var maxPrice = $.trim($(this).val()).length ? parseFloat($.trim($(this).val())) : 0;\n var minPrice = $.trim($('#price-min').val()).length ? parseFloat($.trim($('#price-min').val())) : 0;\n console.log(maxPrice + '>' + minPrice + ': ' + (maxPrice > minPrice));\n if (maxPrice > minPrice) {\n $('.price-range-btn').attr('data-href', actionUrl + append + 'pmin=' + minPrice.toString() + '&pmax=' + maxPrice.toString());\n $('.price-range-btn').prop('disabled', false);\n } else {\n $('.price-range-btn').prop('disabled', true);\n }\n if (!minPrice) {\n $('#price-min').val('0');\n }\n }\n });\n\n $('.price-range-clear').on('click', function() {\n $('.price-range-btn').prop('disabled', true);\n $('#price-min').val('');\n $('#price-max').val('');\n })\n}\n\nexports.setChecked = function () {\n $('body').on('search:filter--success', function () {\n $('.dropdown .selected').each((index, ele) => {\n $(ele).closest('.category-button').attr('checked', true);\n })\n })\n}\n\nexports.fromPricing = function () {\n if ($('.search-results').data('from-pricing')) {\n $('.sales .display-price-from').show();\n $('.standard-from-pricing').hide();\n }\n}\n\nexports.selectedRefinementCount = function () {\n $('body').on('search:updateCount', function() {\n var $searchContainer = $('.search-results');\n var $refinementNodes = $searchContainer.find('.js-refinement');\n $refinementNodes.each((index, ele) => {\n var $selectedAttributesNodes = $(ele).find('button .fa-check-circle, button .fa-check-square');\n var $label = $(ele).find('.js-refinement-label');\n if ( $selectedAttributesNodes.length > 0 ) {\n $label.append(\"(\" + $selectedAttributesNodes.length +\")\");\n $label.addClass('font-weight-bold');\n } else {\n $label.removeClass('font-weight-bold');\n }\n });\n\n //More Filter Count\n var $moreFilterButton = $('.js-morefilters');\n var $selectedOverflowAttributes = $('.overflow-search-refinements .js-refinement:not(.d-lg-none) .fa-check-circle, .overflow-search-refinements .js-refinement:not(.d-lg-none) .fa-check-square');\n if ($selectedOverflowAttributes.length > 0) {\n $moreFilterButton.append(\" (\" + $selectedOverflowAttributes.length + \")\");\n $moreFilterButton.addClass('font-weight-bold');\n } else {\n $moreFilterButton.removeClass('font-weight-bold');\n }\n })\n}\n\nexports.expandSelectedFilters = function () {\n $('body').on('click', '.selected-filters-toggle', (element) => {\n $(element.currentTarget).hide();\n $('.more-selected-filters').show();\n });\n}\n\nexports.productViewData = function () {\n $(document).on('click', '.layout-desktop-grid, .layout-mobile-grid, .layout-desktop-list, .layout-mobile-block', function(e) {\n var productViewObj = {\n 'event': 'product_view',\n 'product_view_method': $(this).val()\n };\n $('body').trigger('gtm:pushData', [productViewObj, true]);\n tilesSameHeightLogic();\n });\n}\n\n/**\n * Retrieves Suggestions element relative to scope\n *\n * @param {Object} scope - Search input field DOM element\n * @return {JQuery} - .suggestions-wrapper element\n */\nfunction getSuggestionsWrapper(scope) {\n return $(scope).siblings('.suggestions-wrapper');\n}\n\n/**\n * Determines whether DOM element is inside the .search-mobile class\n *\n * @param {Object} scope - DOM element, usually the input.search-field element\n * @return {boolean} - Whether DOM element is inside div.search-mobile\n */\nfunction isMobileSearch(scope) {\n return !!$(scope).closest('.search-mobile').length;\n}\n\n/**\n * Toggle search field icon from search to close and vice-versa\n *\n * @param {string} action - Action to toggle to\n */\nfunction toggleSuggestionsIcon(action) {\n var mobileSearchIcon = '.search-mobile button.';\n var iconSearch = 'fa-search';\n var iconSearchClose = 'fa-close';\n\n if (action === 'close') {\n $(mobileSearchIcon + iconSearch).removeClass(iconSearch).addClass(iconSearchClose).attr('type', 'button');\n } else {\n $(mobileSearchIcon + iconSearchClose).removeClass(iconSearchClose).addClass(iconSearch).attr('type', 'submit');\n }\n}\n\n/**\n * Positions Suggestions panel on page\n *\n * @param {Object} scope - DOM element, usually the input.search-field element\n */\nfunction positionSuggestions(scope) {\n var outerHeight;\n var $scope;\n var $suggestions;\n var top;\n\n if (isMobileSearch(scope)) {\n $scope = $(scope);\n top = $scope.offset().top;\n outerHeight = $scope.outerHeight();\n $suggestions = getSuggestionsWrapper(scope).find('.suggestions');\n $suggestions.css('top', top + outerHeight);\n\n handleMoreContentBelowIcon(scope);\n\n // Unfortunately, we have to bind this dynamically, as the live scroll event was not\n // properly detecting dynamic suggestions element's scroll event\n $suggestions.scroll(function () {\n handleMoreContentBelowIcon(this);\n });\n }\n}\n\n/**\n * Remove modal classes needed for mobile suggestions\n *\n */\nfunction clearModals() {\n $('body').removeClass('modal-open');\n $('header').siblings().attr('aria-hidden', 'false');\n $('.suggestions').removeClass('modal');\n}\n\n/**\n * Apply modal classes needed for mobile suggestions\n *\n * @param {Object} scope - Search input field DOM element\n */\nfunction applyModals(scope) {\n if (isMobileSearch(scope)) {\n $('body').addClass('modal-open');\n $('header').siblings().attr('aria-hidden', 'true');\n getSuggestionsWrapper(scope).find('.suggestions').addClass('modal');\n }\n}\n\nfunction addEmptySpanForADA(form) {\n var wrapper = form.find('.suggestions-wrapper');\n var html = '';\n wrapper.html(html);\n}\n\n/**\n * Process Ajax response for SearchServices-GetSuggestions\n *\n * @param {Object|string} response - Empty object literal if null response or string with rendered\n * suggestions template contents\n */\nfunction processResponse(response) {\n var $suggestionsWrapper = getSuggestionsWrapper(this).empty();\n\n $.spinner().stop();\n\n if (typeof (response) !== 'object') {\n $suggestionsWrapper.append(response).show();\n\n $(this).siblings('.reset-button').addClass('d-sm-block');\n positionSuggestions(this);\n\n if (isMobileSearch(this)) {\n toggleSuggestionsIcon('close');\n applyModals(this);\n }\n } else {\n $suggestionsWrapper.hide();\n addEmptySpanForADA($(this).closest('form'));\n }\n}\n\n/**\n * Retrieve suggestions\n *\n * @param {Object} scope - Search field DOM element\n */\nfunction getSuggestions(scope) {\n if ($(scope).val().length >= minChars) {\n $.spinner().start();\n endpoint = $(scope).closest('form').find('.suggestions-wrapper').attr('data-url');\n $.ajax({\n context: scope,\n url: endpoint + encodeURIComponent($(scope).val()),\n method: 'GET',\n success: processResponse,\n error: function () {\n getSuggestionsWrapper(scope).find('span.sr-only').text('Zero Results Found');\n $.spinner().stop();\n }\n });\n } else {\n toggleSuggestionsIcon('search');\n $(scope).siblings('.reset-button').removeClass('d-sm-block');\n clearModals();\n getSuggestionsWrapper(scope).empty();\n addEmptySpanForADA($(scope).closest('form'));\n }\n\n $('.site-search .reset-button').on('click', function () {\n $(this).removeClass('d-sm-block');\n getSuggestionsWrapper(scope).empty();\n addEmptySpanForADA($(scope).closest('form'));\n });\n}\n\n/**\n * Handle Search Suggestion Keyboard Arrow Keys\n *\n * @param {Integer} direction takes positive or negative number constant, DIRECTION_UP (-1) or DIRECTION_DOWN (+1)\n */\nfunction handleArrow(direction) {\n // get all li elements in the suggestions list\n var suggestionsList = $('.suggestions .item');\n if (suggestionsList.filter('.selected').length === 0) {\n suggestionsList.first().addClass('selected');\n $('input.search-field').each(function () {\n $(this).attr('aria-activedescendant', suggestionsList.first()[0].id);\n });\n } else {\n suggestionsList.each(function (index) {\n var idx = index + direction;\n if ($(this).hasClass('selected')) {\n $(this).removeClass('selected');\n $(this).removeAttr('aria-selected');\n if (suggestionsList.eq(idx).length !== 0) {\n suggestionsList.eq(idx).addClass('selected');\n suggestionsList.eq(idx).attr('aria-selected', true);\n $(this).removeProp('aria-selected');\n $('input.search-field').each(function () {\n $(this).attr('aria-activedescendant', suggestionsList.eq(idx)[0].id);\n });\n } else {\n suggestionsList.first().addClass('selected');\n suggestionsList.first().attr('aria-selected', true);\n $('input.search-field').each(function () {\n $(this).attr('aria-activedescendant', suggestionsList.first()[0].id);\n });\n }\n return false;\n }\n return true;\n });\n }\n}\n\nexports.searchSuggestionsOverride = function () {\n $('input.search-field').each(function () {\n /**\n * Use debounce to avoid making an Ajax call on every single key press by waiting a few\n * hundred milliseconds before making the request. Without debounce, the user sees the\n * browser blink with every key press.\n */\n var debounceSuggestions = debounce(getSuggestions, 300);\n $(this).on('keyup focus', function (e) {\n // Capture Down/Up Arrow Key Events\n switch (e.which) {\n case DOWN_KEY:\n handleArrow(DIRECTION_DOWN);\n e.preventDefault(); // prevent moving the cursor\n break;\n case UP_KEY:\n handleArrow(DIRECTION_UP);\n e.preventDefault(); // prevent moving the cursor\n break;\n default:\n debounceSuggestions(this, e);\n }\n });\n });\n}\n\nfunction tilesSameHeightLogic() {\n var $tileContainer = $('.product-grid .grid-tile');\n \n // If no tiles with .experience-component are found, exit early\n if($tileContainer.has('.experience-component').length === 0) {\n return false;\n }\n \n var marketingTiles = [\n $tileContainer.find('.marketing-tile-d-grid'),\n $tileContainer.find('.marketing-tile-m-grid'),\n $tileContainer.find('.marketing-tile-m-block'),\n $tileContainer.find('.marketing-tile-d-block'),\n $tileContainer.find('.marketing-tile-d-list'),\n $tileContainer.find('.marketing-tile-m-list')\n ];\n\n // Function to set the height of tiles\n function tilesHeight() {\n $tileContainer.css('height', '');\n var maxHeight = Math.max.apply(null, $tileContainer.map(function () {\n return $(this).outerHeight();\n }).get());\n\n $tileContainer.css('height', maxHeight);\n }\n\n function toggleVisibility(eleObject) {\n $tileContainer.find('div').css('height', '');\n $tileContainer.find('.experience-component').removeClass('d-none');\n $tileContainer.find('.flex-grid-item').removeClass('d-none');\n \n $.each(eleObject, function(index, element) {\n var ar = $(element).toArray();\n $.each(ar, function(i) {\n var $el = $(this);\n if($el.is(':visible')) {\n $el.closest($tileContainer).find('div').css('height', '100%');\n $el.find('div').css('height', '');\n } else {\n $el.closest('.experience-component').toggleClass('d-none');\n $el.closest('.flex-grid-item').toggleClass('d-none');\n }\n });\n });\n }\n\n tilesHeight();\n toggleVisibility($(marketingTiles).toArray());\n\n // Debounce function to limit resize event firing\n var debounceTimer;\n $(window).on('resize', function () {\n clearTimeout(debounceTimer);\n debounceTimer = setTimeout(function() {\n tilesHeight();\n toggleVisibility($(marketingTiles).toArray());\n }, 200);\n });\n}\n\nexports.setSameHeightToTiles = tilesSameHeightLogic();\n\nexports.filter = () => $('html').on('click', 'button.filter-results', () => toggleRefinementDrawer('open'));\nexports.toggle = () => $('html').on('click', '.js-toggle-filters', (e) => toggleFilters(e));\nexports.reset = () => $('html').on('click', '.js-reset', (e) => $('.refinements li button').trigger('click'));\nexports.resize = () => $(window).resize(() => {toggleRefinementDrawer('close'); exports.oneDropdownSlideToggle();});\n\nexports.methods = {\n parseResults: parseResults\n}\nmodule.exports = exports;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var exports = $.extend({}, require('base/search/search'));\nvar SiteConstants = require('constants/SiteConstants');\n\nvar setRefinementCollapseStates = status => {\n\n if (status === 'open') {\n $('.refinement').addClass('active');\n }\n else if (status === 'closed') {\n $('.refinement').removeClass('active');\n $('.refinement').find('button.title').attr('aria-expanded','false');\n }\n};\n\nvar toggleRefinementDrawer = status => {\n var $refinementBar = $('.refinement-bar');\n var $modalBackground = $('.modal-background');\n\n if (status === 'open') {\n var $header = $('header');\n var bannerHeight = $header.find('.header-banner').length ? $header.find('.header-banner').outerHeight() : 0;\n var navHeight = $header.find('.header-nav').length ? $header.find('.header-nav').outerHeight() : 0;\n var headerNavHeight = bannerHeight + navHeight;\n var scrollTopHeight = $header.offset().top;\n $('html').scrollTop(scrollTopHeight);\n // Following two lines for MS Edge to work\n document.body.scrollTop = scrollTopHeight;\n document.documentElement.scrollTop = scrollTopHeight;\n $('html').addClass('lock-scroll');\n $('body').addClass('mobile-filter-drawer-in');\n $refinementBar.addClass('in').css('top', headerNavHeight).siblings().attr('aria-hidden', true);\n $modalBackground.fadeIn(SiteConstants.TransitionSpeed).css('top', headerNavHeight);\n $refinementBar.closest('.row').siblings().attr('aria-hidden', true);\n $refinementBar.closest('.tab-pane.active').siblings().attr('aria-hidden', true);\n $refinementBar.closest('.container.search-results').siblings().attr('aria-hidden', true);\n $refinementBar.find('.close').focus();\n } else {\n $('html').removeClass('lock-scroll');\n $('body').removeClass('mobile-filter-drawer-in');\n $refinementBar.removeClass('in').css('top', '').siblings().attr('aria-hidden', false);\n $modalBackground.fadeOut(SiteConstants.TransitionSpeed);\n $refinementBar.closest('.row').siblings().attr('aria-hidden', false);\n $refinementBar.closest('.tab-pane.active').siblings().attr('aria-hidden', false);\n $refinementBar.closest('.container.search-results').siblings().attr('aria-hidden', false);\n $('.btn.filter-results').focus();\n }\n};\n\nvar toggleFilters = (e) => {\n e.preventDefault();\n var toggleDirection = 'open';\n if ($('.refinement-bar .refinement').hasClass('active')) {\n toggleDirection = 'closed';\n }\n setRefinementCollapseStates(toggleDirection);\n};\n\n/**\n * Update DOM elements with Ajax results\n *\n * @param {Object} $results - jQuery DOM element\n * @param {string} selector - DOM element to look up in the $results\n * @return {undefined}\n */\nfunction updateDom($results, selector) {\n var $updates = $results.find(selector);\n $(selector).empty().html($updates.html());\n}\n\n/**\n * This function retrieves another page of content to display in the content search grid\n * @param {JQuery} $element - the jquery element that has the click event attached\n * @param {JQuery} $target - the jquery element that will receive the response\n * @return {undefined}\n */\nfunction getContent($element, $target) {\n var showMoreUrl = $element.data('url');\n $.spinner().start();\n $.ajax({\n url: showMoreUrl,\n method: 'GET',\n success: function (response) {\n $target.append(response);\n },\n complete: function () {\n $.spinner().stop();\n }\n });\n}\n\n/**\n * Update sort option URLs from Ajax response\n *\n * @param {string} response - Ajax response HTML code\n * @return {undefined}\n */\nfunction updateSortOptions(response, promoTileCount) {\n var $tempDom = $('
').append($(response));\n var sortOptions = $tempDom.find('.grid-footer').data('sort-options').options;\n var pageSize = Number($tempDom.find('.grid-footer').data('page-size'));\n\n sortOptions.forEach(option => {\n var pageUrl = new URL(window.location);\n var urlPageSize = pageUrl.searchParams.get('sz') !== null ? Number(pageUrl.searchParams.get('sz')) : null;\n var optionUrl = new URL(option.url);\n var optionPageSize = Number(optionUrl.searchParams.get('sz'));\n\n // If 'sz' is already defined in URL, but promo tiles aren't already accounted for, decrement sz param\n if (!isNaN(urlPageSize) && urlPageSize !== optionPageSize - pageSize) {\n var updatedPageSize = optionPageSize - promoTileCount;\n optionUrl.searchParams.set('sz', updatedPageSize);\n option.url = optionUrl.toString();\n }\n\n $('option.' + option.id).val(option.url);\n });\n}\n\n/**\n * Keep refinement panes expanded/collapsed after Ajax refresh\n *\n * @param {Object} $results - jQuery DOM element\n * @return {undefined}\n */\nfunction handleRefinements($results, selector) {\n $('.refinement.active').each(function () {\n $(this).removeClass('active');\n var activeDiv = $results.find('.' + $(this)[0].className.replace(/ /g, '.'));\n activeDiv.addClass('active');\n activeDiv.find('button.title').attr('aria-expanded', 'true');\n });\n updateDom($results, selector);\n}\n\n/**\n * Parse Ajax results and updated select DOM elements\n *\n * @param {string} response - Ajax response HTML code\n * @return {undefined}\n */\nfunction parseResults(response) {\n var $results = $(response);\n var isMobile = window.isMobile();\n\n if (isMobile) {\n var $refinements = $results.find('.refinements[data-refinement-style-mobile]');\n var refinementStyle = $refinements.data('refinement-style-mobile');\n var selector = `[data-refinement-style-mobile=\"${refinementStyle}\"]`;\n } else {\n var $refinements = $results.find('.refinements[data-refinement-style-desktop]');\n var refinementStyle = $refinements.data('refinement-style-desktop');\n var selector = `[data-refinement-style-desktop=\"${refinementStyle}\"]`;\n };\n\n var $filterBar = $results.find('.filter-bar');\n var filterBarStyle = !isMobile ? $filterBar.attr('data-filter-bar-style-desktop') : $filterBar.attr('data-filter-bar-style-mobile');\n var filterBar = !isMobile ? '[data-filter-bar-style-desktop=\"' + filterBarStyle + '\"]' : '[data-filter-bar-style-mobile=\"' + filterBarStyle + '\"]';\n\n var verticalMobile = isMobile && selector === '[data-refinement-style-mobile=\"vertical\"]';\n var verticalDesktop = !isMobile && selector === '[data-refinement-style-desktop=\"vertical\"]';\n var horizontalMultipleDropdownsDesktop = !isMobile && selector === '[data-refinement-style-desktop=\"horizontal-multiple-dropdowns\"]';\n var horizontalOneDropdownDesktop = !isMobile && selector === '[data-refinement-style-desktop=\"horizontal-one-dropdown\"]';\n var horizontalOneDropdownDesktopActive = $('.collapse-filters-wrapper').hasClass('active');\n var horizontalOneDropdownDesktopOpen = false;\n\n if (horizontalOneDropdownDesktop && horizontalOneDropdownDesktopActive) {\n horizontalOneDropdownDesktopOpen = true;\n }\n\n if (verticalMobile || verticalDesktop) {\n var specialHandlers = {\n selector : handleRefinements\n };\n\n Object.keys(specialHandlers).forEach(function (selector) {\n specialHandlers[selector]($results, selector);\n });\n };\n\n if (!isMobile) {\n var refinements = '.desktop-search-refinements';\n } else {\n var refinements = '.mobile-search-refinements';\n };\n\n // Update DOM elements that do not require special handling\n [\n '.grid-header',\n '.header-bar',\n '.header.page-title',\n '.product-grid',\n '.show-more',\n refinements,\n filterBar\n ].forEach((selector) => {\n updateDom($results, selector);\n });\n\n if (horizontalOneDropdownDesktopOpen === true) {\n $('.collapse-filters-wrapper').addClass('active').css('display', 'block');\n }\n\n $('body').trigger('ajax:load.ajaxEvents', [$('.search-results')]);\n\n exports.refinementStickyBar();\n exports.oneDropdownSlideToggle();\n}\n\nexports.oneDropdownSlideToggle = function() {\n var oneDropdownFilter = $('.horizontal-onedropdown-filter');\n if (oneDropdownFilter) {\n var menuToggle = $('.horizontal-onedropdown-filter-btn').unbind();\n menuToggle.removeClass('open');\n\n menuToggle.on('touchstart click', function(e) {\n e.preventDefault();\n $('.collapse-filters-wrapper').slideToggle(SiteConstants.TransitionSpeed).toggleClass('active');\n menuToggle.toggleClass('open');\n });\n }\n}\n\nexports.refinementStickyBar = function() {\n var showStickyRefinementData = document.getElementById('horizontal-filter');\n if (showStickyRefinementData) {\n var showStickyRefinementBarCheck = showStickyRefinementData.getAttribute('data-sticky-refinement-bar');\n var topHeader = document.getElementById('top-header'); // includes promobar and nav\n var headerNavHeight = document.querySelector('.header-nav').offsetHeight;\n var mainContent = document.getElementById('maincontent');\n var isMobile = window.isMobile();\n\n //if header is fixed, use just the nav bar to measure top of page, else use the entire header (may contain promo bar)\n if (topHeader.classList.contains('fixed-header')) {\n var topHeaderHeight = headerNavHeight;\n var heightCalculation = (document.querySelector('.search-results').offsetTop - headerNavHeight);\n } else {\n var topHeaderHeight = 0;\n var heightCalculation = document.querySelector('.search-results').offsetTop;\n }\n\n if (showStickyRefinementData && !isMobile && showStickyRefinementBarCheck == 'true') {\n // Note: This is intentionally not using utilities/scroll.js so that it can fix immediately vs. being debounced. Should be replaced with CSS position:sticky once IE11 support is dropped.\n window.addEventListener('scroll', function() {\n //main sticky horiziontal dropdown filter functionality - only show when scrolled past in-page refinement button section\n if (window.pageYOffset > heightCalculation && mainContent.scrollHeight > (window.innerHeight + showStickyRefinementData.offsetHeight)) {\n showStickyRefinementData.classList.add('sticky-filters');\n showStickyRefinementData.setAttribute('style', 'top:' + topHeaderHeight + 'px;');\n mainContent.setAttribute('style', 'padding-top:' + showStickyRefinementData.offsetHeight + 'px;');\n } else if (showStickyRefinementData.classList.contains('sticky-filters') && window.pageYOffset < heightCalculation) {\n showStickyRefinementData.classList.remove('sticky-filters');\n mainContent.removeAttribute('style');\n }\n });\n }\n }\n}\n\nvar closeOneRefinementsDropdown = (e) => {\n var $oneRefinementsDropdown = $('.horizontal-onedropdown-filter-group');\n if ((!$('.collapse-one-dropdown-filter').is(e.target) && $oneRefinementsDropdown.has(e.target).length === 0)\n || $('.close-one-refinements-dropdown').is(e.target)) {\n $('.collapse-filters-wrapper').slideUp().removeClass('active');\n }\n};\n\nexports.initialize = () => $(document).ready(function () {\n var isMobile = window.isMobile();\n var collapseMobile = $('[data-collapse-mobile]').attr('data-collapse-mobile') === 'true' ? true : false;\n var collapseDesktop = $('[data-collapse-desktop]').attr('data-collapse-desktop') === 'true' ? true : false;\n if (isMobile && collapseMobile) {\n setRefinementCollapseStates('close');\n } else if (isMobile && !collapseMobile) {\n setRefinementCollapseStates('open');\n } else if (!isMobile && collapseDesktop) {\n setRefinementCollapseStates('close');\n } else if (!isMobile && !collapseDesktop) {\n setRefinementCollapseStates('open');\n }\n if ($('#articles-tab').hasClass('active') && $('#content-search-results').html() === '') {\n getContent($('.content-search'), $('#content-search-results'));\n }\n\n var refinementCategoryOpen = localStorage.getItem('refinement-category');\n if (refinementCategoryOpen) {\n $('.refinement-category').addClass('active');\n }\n});\n\nexports.closeRefinements = function () {\n\n $('html').on('click', '.refinement-bar button.close, .mobile-filter-drawer-in .modal-background', () => toggleRefinementDrawer('close'));\n //for horizontal one dropdown menu\n $('html').on('click', (e) => closeOneRefinementsDropdown(e));\n}\n\nexports.sort = function () {\n var $xhr;\n // Handle sort order menu selection\n $('.container').on('change', '[name=sort-order]', function (e) {\n e.preventDefault();\n e.stopPropagation();\n\n var thisValue = this.value;\n $(this).trigger('search:sort', thisValue);\n var sortOrder = $(this).val().split('srule')[1];\n var url = window.location.toString().split('&srule')[0];\n var newUrl = url + \"&srule\" + sortOrder;\n\n var newSelection = this.selectedOptions[0];\n $('[name=\"sort-order\"]').find('option[selected=\"selected\"], option:selected').prop('selected',false).removeAttr('selected');\n $(newSelection).prop('selected', true).attr('selected', true);\n\n // Cancel previous request\n $xhr && $xhr.abort && $xhr.abort();\n\n $xhr = $.ajax({\n url: thisValue,\n data: {\n selectedUrl: thisValue,\n isSortUpdate: true \n },\n method: 'GET',\n timeout: 10000,\n beforeSend: function () {\n $.spinner().start();\n },\n success: function (response) {\n var $productGridElement = $(response).find('.product-grid'); // if response is coming from page designer\n var updatedGridHtml = $productGridElement.length > 0 ? $productGridElement.children() : response;\n $('.product-grid').empty().html(updatedGridHtml);\n history.replaceState(undefined, '', newUrl);\n $('body').trigger('search:sort--success');\n $('body').trigger('ajax:load.ajaxEvents', [$('.product-grid')]);\n },\n complete: function () {\n $.spinner().stop();\n }\n });\n });\n}\n\nexports.showMore = function () {\n // Show more products\n $('.container').on('click', '.show-more button', function (e) {\n e.stopPropagation();\n e.preventDefault();\n var showMoreUrl = $(this).data('url');\n var $showMoreButton = $(e.target);\n $.spinner().start();\n $(this).trigger('search:showMore', e);\n\n $.ajax({\n url: showMoreUrl,\n data: { selectedUrl: showMoreUrl },\n method: 'GET',\n success: function (response) {\n var promoTileCount = $showMoreButton.closest('.product-grid').find('[class*=\"experience-promoTile\"]').length;\n $('.grid-footer').replaceWith(response);\n updateSortOptions(response, promoTileCount);\n $('body').trigger('search:showMore--success');\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n });\n}\n\nexports.applyFilter = function () {\n var $xhr;\n // Handle refinement value selection and reset click\n $('.container').on(\n 'click',\n '.refinements li button, .refinement-bar button.reset, .filter-value button, .swatch-filter button',\n function (event) {\n var category = $(event.currentTarget).closest('.refinement');\n\n if (category && category.hasClass('refinement-category')) {\n localStorage.setItem('refinement-category', true);\n return;\n }\n //find new attr on Sort if selected, if not use the default\n var selectedSort = $('select[name=\"sort-order\"]').find('option[selected=\"selected\"]');\n if (selectedSort.data('id') != null) {\n var sortingRule = selectedSort.data('id');\n } else {\n var sortingRule = $('select[name=\"sort-order\"] option:selected').data('id');\n }\n //create a new url with the correct preferences\n if ($(this).data('href').includes('srule')) {\n var refinementUrl = $(this).data('href').replace(/(srule=).*?(&|$)/,'$1' + sortingRule + '$2');\n } else if (!$(this).data('href').includes('srule') && sortingRule != null) {\n var split = $(this).data('href').indexOf('?') !== -1 ? '&' : '?';\n var refinementUrl = $(this).data('href') + split + 'srule=' + sortingRule;\n } else {\n var refinementUrl = $(this).data('href');\n }\n\n event.preventDefault();\n event.stopPropagation();\n $(this).trigger('search:filter', event);\n\n // Cancel previous request\n $xhr && $xhr.abort && $xhr.abort();\n\n $xhr = $.ajax({\n url: refinementUrl,\n data: {\n page: $('.grid-footer').data('page-number'),\n selectedUrl: refinementUrl\n },\n method: 'GET',\n timeout: 10000,\n beforeSend: function () {\n $.spinner().start();\n },\n success: function (response) {\n module.exports.methods.parseResults(response);\n history.replaceState(undefined, '', refinementUrl);\n $('body').trigger('search:filter--success');\n },\n complete: function () {\n $.spinner().stop();\n }\n });\n });\n};\n\nexports.filter = () => $('html').on('click', 'button.filter-results', () => toggleRefinementDrawer('open'));\nexports.toggle = () => $('html').on('click', '.js-toggle-filters', (e) => toggleFilters(e));\nexports.reset = () => $('html').on('click', '.js-reset', (e) => $('.refinements li button').trigger('click'));\nexports.resize = () => {\n var windowWidth = $(window).width();\n\n $(window).resize(() => {\n // iOS fix: make sure window actually resized before triggering resize functions\n if (windowWidth !== $(window).width()) {\n windowWidth = $(window).width();\n toggleRefinementDrawer('close');\n exports.oneDropdownSlideToggle();\n }\n });\n};\n\nexports.methods = {\n parseResults: parseResults\n}\nmodule.exports = exports;\n","'use strict';\n\n// These values should always match the variables set in _variables.scss and the contentImageBreakpoints site pref\nmodule.exports.BreakpointSizes = {\n 'sm': 544,\n 'md': 769,\n 'lg': 1024,\n 'xl': 1440\n};\n\nmodule.exports.TransitionSpeed = 200;\n\nmodule.exports.ComponentAnimationDelay = 0;\n\nmodule.exports.Spacer = 16;\n\nmodule.exports.placeholderImagePaths = {\n 'thumbnail': '/gray.png',\n 'imageMissing': '/placeholder 410x410.png'\n}\n\nmodule.exports.defaultMapMarker = {\n 'color': 'white',\n 'backgroundImage': '/images/icons/map-marker-default.svg'\n}\n\nmodule.exports.defaultStoreType = {\n 'id': 0,\n 'displayValue': 'Retail',\n 'value': 'retail'\n}\n","'use strict';\n\n/**\n * Update DOM elements with Ajax results\n *\n * @param {Object} $results - jQuery DOM element\n * @param {string} selector - DOM element to look up in the $results\n * @return {undefined}\n */\nfunction updateDom($results, selector) {\n var $updates = $results.find(selector);\n $(selector).empty().html($updates.html());\n}\n\n/**\n * Keep refinement panes expanded/collapsed after Ajax refresh\n *\n * @param {Object} $results - jQuery DOM element\n * @return {undefined}\n */\nfunction handleRefinements($results) {\n $('.refinement.active').each(function () {\n $(this).removeClass('active');\n var activeDiv = $results.find('.' + $(this)[0].className.replace(/ /g, '.'));\n activeDiv.addClass('active');\n activeDiv.find('button.title').attr('aria-expanded', 'true');\n });\n\n updateDom($results, '.refinements');\n}\n\n/**\n * Parse Ajax results and updated select DOM elements\n *\n * @param {string} response - Ajax response HTML code\n * @return {undefined}\n */\nfunction parseResults(response) {\n var $results = $(response);\n var specialHandlers = {\n '.refinements': handleRefinements\n };\n\n // Update DOM elements that do not require special handling\n [\n '.grid-header',\n '.header-bar',\n '.header.page-title',\n '.product-grid',\n '.show-more',\n '.filter-bar'\n ].forEach(function (selector) {\n updateDom($results, selector);\n });\n\n Object.keys(specialHandlers).forEach(function (selector) {\n specialHandlers[selector]($results);\n });\n}\n\n/**\n * This function retrieves another page of content to display in the content search grid\n * @param {JQuery} $element - the jquery element that has the click event attached\n * @param {JQuery} $target - the jquery element that will receive the response\n * @return {undefined}\n */\nfunction getContent($element, $target) {\n var showMoreUrl = $element.data('url');\n $.spinner().start();\n $.ajax({\n url: showMoreUrl,\n method: 'GET',\n success: function (response) {\n $target.append(response);\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n}\n\n/**\n * Update sort option URLs from Ajax response\n *\n * @param {string} response - Ajax response HTML code\n * @return {undefined}\n */\nfunction updateSortOptions(response) {\n var $tempDom = $('
').append($(response));\n var sortOptions = $tempDom.find('.grid-footer').data('sort-options').options;\n sortOptions.forEach(function (option) {\n $('option.' + option.id).val(option.url);\n });\n}\n\nmodule.exports = {\n filter: function () {\n // Display refinements bar when Menu icon clicked\n $('.container').on('click', 'button.filter-results', function () {\n $('.refinement-bar, .modal-background').show();\n $('.refinement-bar').siblings().attr('aria-hidden', true);\n $('.refinement-bar').closest('.row').siblings().attr('aria-hidden', true);\n $('.refinement-bar').closest('.tab-pane.active').siblings().attr('aria-hidden', true);\n $('.refinement-bar').closest('.container.search-results').siblings().attr('aria-hidden', true);\n $('.refinement-bar .close').focus();\n });\n },\n\n closeRefinements: function () {\n // Refinements close button\n $('.container').on('click', '.refinement-bar button.close, .modal-background', function () {\n $('.refinement-bar, .modal-background').hide();\n $('.refinement-bar').siblings().attr('aria-hidden', false);\n $('.refinement-bar').closest('.row').siblings().attr('aria-hidden', false);\n $('.refinement-bar').closest('.tab-pane.active').siblings().attr('aria-hidden', false);\n $('.refinement-bar').closest('.container.search-results').siblings().attr('aria-hidden', false);\n $('.btn.filter-results').focus();\n });\n },\n\n resize: function () {\n // Close refinement bar and hide modal background if user resizes browser\n $(window).resize(function () {\n $('.refinement-bar, .modal-background').hide();\n $('.refinement-bar').siblings().attr('aria-hidden', false);\n $('.refinement-bar').closest('.row').siblings().attr('aria-hidden', false);\n $('.refinement-bar').closest('.tab-pane.active').siblings().attr('aria-hidden', false);\n $('.refinement-bar').closest('.container.search-results').siblings().attr('aria-hidden', false);\n });\n },\n\n sort: function () {\n // Handle sort order menu selection\n $('.container').on('change', '[name=sort-order]', function (e) {\n e.preventDefault();\n\n $.spinner().start();\n $(this).trigger('search:sort', this.value);\n $.ajax({\n url: this.value,\n data: { selectedUrl: this.value },\n method: 'GET',\n success: function (response) {\n $('.product-grid').empty().html(response);\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n });\n },\n\n showMore: function () {\n // Show more products\n $('.container').on('click', '.show-more button', function (e) {\n e.stopPropagation();\n var showMoreUrl = $(this).data('url');\n e.preventDefault();\n\n $.spinner().start();\n $(this).trigger('search:showMore', e);\n $.ajax({\n url: showMoreUrl,\n data: { selectedUrl: showMoreUrl },\n method: 'GET',\n success: function (response) {\n $('.grid-footer').replaceWith(response);\n updateSortOptions(response);\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n });\n },\n\n applyFilter: function () {\n // Handle refinement value selection and reset click\n $('.container').on(\n 'click',\n '.refinements li button, .refinement-bar button.reset, .filter-value button, .swatch-filter button',\n function (e) {\n e.preventDefault();\n e.stopPropagation();\n\n $.spinner().start();\n $(this).trigger('search:filter', e);\n $.ajax({\n url: $(this).data('href'),\n data: {\n page: $('.grid-footer').data('page-number'),\n selectedUrl: $(this).data('href')\n },\n method: 'GET',\n success: function (response) {\n parseResults(response);\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n });\n },\n\n showContentTab: function () {\n // Display content results from the search\n $('.container').on('click', '.content-search', function () {\n if ($('#content-search-results').html() === '') {\n getContent($(this), $('#content-search-results'));\n }\n });\n\n // Display the next page of content results from the search\n $('.container').on('click', '.show-more-content button', function () {\n getContent($(this), $('#content-search-results'));\n $('.show-more-content').remove();\n });\n }\n};\n","'use strict';\n\nmodule.exports = function (include) {\n if (typeof include === 'function') {\n include.call(this);\n } else if (typeof include === 'object') {\n Object.keys(include).forEach(function (key) {\n if (typeof include[key] === 'function') {\n include[key].call(include);\n }\n });\n }\n};\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n"],"sourceRoot":""}