function simulateClickOnEnter(n){if(n.key==="Enter"){const t=n.target;t.click();(n.target.classList.contains("coveo-facet-value-caption")||n.target.classList.contains("coveo-facet-header-eraser")&&n.target.classList.contains("coveo-accessible-button"))&&setTimeout(function(){makeTabable(".coveo-facet-value-label .coveo-facet-value-label-wrapper .coveo-facet-value-caption");document.querySelectorAll(".coveo-facet-value-caption").forEach(n=>{n.addEventListener("keydown",simulateClickOnEnter)});addEnterEvent(".coveo-facet-header-eraser.coveo-accessible-button")},1500)}}function makeTabable(n){var t=document.querySelectorAll(n);t.forEach(n=>{n.setAttribute("tabindex","0")})}function makeListTabable(n){var t=document.querySelectorAll(n);t.forEach(n=>{n.childNodes.length>1&&n.setAttribute("tabindex","0")})}function addAccordionAriaAttributes(n){const t=document.querySelectorAll(n);t.forEach(n=>{const r=n.parentElement,t=r.dataset.title,e=r.dataset.enableCollapse,u=`${t}-facet-toggle`,i=n.nextElementSibling,f=`${t}-facet-panel`;n.setAttribute("role","button");n.setAttribute("id",u);n.setAttribute("aria-controls",f);e==="true"?(n.setAttribute("aria-expanded","false"),n.setAttribute("aria-label",`Expand ${t} facet`)):(n.setAttribute("aria-expanded","true"),n.setAttribute("aria-label",`Collapse ${t} facet`));i.classList.contains("coveo-facet-values")&&(i.setAttribute("role","region"),i.setAttribute("aria-labelledby",u),i.setAttribute("id",f))})}function addEnterEvent(n){document.querySelectorAll(n).forEach(n=>{n.addEventListener("keydown",simulateClickOnEnter)})}function addEnterEventCategories(n){document.querySelectorAll(n).forEach(n=>{n.addEventListener("keydown",function(n){n.key==="Enter"&&(setTimeout(function(){document.querySelector(".coveo-dynamic-hierarchical-facet-value-label").setAttribute("tabindex","0");document.querySelector(".coveo-dynamic-hierarchical-facet-value-label").focus();addEnterEventCategories(".coveo-dynamic-hierarchical-facet-values li .coveo-dynamic-hierarchical-facet-value");addEnterEventCategories(".coveo-dynamic-hierarchical-facet-all.coveo-show-when-collapsed")},1500),n.target==document.querySelector(".coveo-dynamic-hierarchical-facet-all.coveo-show-when-collapsed")&&setTimeout(function(){addEnterEventCategories(".coveo-dynamic-hierarchical-facet-values li .coveo-dynamic-hierarchical-facet-value");document.querySelector(".coveo-dynamic-hierarchical-facet-value-label").removeAttribute("tabindex")},2e3))})})}function focusVisualization(n){document.querySelectorAll(n).forEach(n=>{n.addEventListener("focus",function(){this.style.outline="2px dotted #000";makeTabable(".coveo-facet-value-label .coveo-facet-value-label-wrapper .coveo-facet-value-caption")}),n.addEventListener("blur",function(){this.style.outline="none";makeTabable(".coveo-facet-value-label .coveo-facet-value-label-wrapper .coveo-facet-value-caption")})})}(function(n,t){typeof exports=="object"&&typeof module=="object"?module.exports=t(require("Coveo")):typeof define=="function"&&define.amd?define(["Coveo"],t):typeof exports=="object"?exports.CoveoExtension=t(require("Coveo")):n.CoveoExtension=t(n.Coveo);setTimeout(function(){addAccordionAriaAttributes(".coveo-facet-header");addEnterEvent(".coveo-facet-header");addEnterEvent(".coveo-facet-value-caption");addEnterEvent(".coveo-facet-header-eraser.coveo-accessible-button");addEnterEvent(".store-locator-modal__invoke.store-locator_set-store-after-change");addEnterEvent(".clear-all-link");makeTabable(".coveo-facet-header");makeTabable(".coveo-facet-value-label .coveo-facet-value-label-wrapper .coveo-facet-value-caption");makeTabable(".store-locator-modal__invoke.store-locator_set-store-after-change");makeTabable(".clear-all-link");makeListTabable(".item-result__rating");document.querySelector(".caleres-option-value-filter-input")!=null&&document.querySelector(".caleres-option-value-filter-input").setAttribute("aria-label","Search input");addEnterEventCategories(".coveo-dynamic-hierarchical-facet-values li .coveo-dynamic-hierarchical-facet-value");focusVisualization(".coveo-facet-more.coveo-accessible-button");focusVisualization(".coveo-facet-less.coveo-accessible-button");focusVisualization(".coveo-facet-header-eraser.coveo-accessible-button")},5e3)})(typeof self!="undefined"?self:this,function(n){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};return t.m=n,t.c=i,t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var i=n&&n.__esModule?function(){return n["default"]}:function(){return n};return t.d(i,"a",i),i},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="/js/",t(t.s=4)}([function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n}();i.registerVariantFields="registerVariantFields";i.buildingVariantFilters="buildingVariantFilters";t.CommerceEvents=i},function(t){t.exports=n},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(12).detect,f=r(),u=function(){function n(){}return n.initializeFacetManager=function(){var t=Coveo.Facet.prototype.createDom;Coveo.Facet.options.enableExpandCollapse=Coveo.ComponentOptions.buildBooleanOption({defaultValue:!0});Coveo.Facet.options.autoCollapse=Coveo.ComponentOptions.buildBooleanOption({defaultValue:!1});Coveo.Facet.options.actionPositionCollapse=Coveo.ComponentOptions.buildStringOption({defaultValue:"top-right"});Coveo.Facet.prototype.createDom=function(){var i=this;t.call(i);n.autoCollapse(i);n.setActionPositionCollapse(i);n.bindCollapseToggleEvent(i)}},n.setActionPositionCollapse=function(n){n.options.enableExpandCollapse&&Coveo.$$(n.element).addClass("action-position-collapse-"+n.options.actionPositionCollapse)},n.autoCollapse=function(n){n.options.autoCollapse&&n.options.enableExpandCollapse&&n.collapse()},n.bindCollapseToggleEvent=function(n){var t,i;if(n.options.enableExpandCollapse&&(n.options.actionPositionCollapse=="top-left"?t=Coveo.$$(n.element).findClass("coveo-facet-header-title-section")[0]:n.options.actionPositionCollapse=="top-right"&&(t=Coveo.$$(n.element).findClass("coveo-facet-header")[0]),t)){i=function(t){const i=t.target.classList.contains("coveo-facet-header")?t.target:t.target.closest(".coveo-facet-header");t.target&&Coveo.$$(t.target).hasClass("coveo-facet-header-eraser")||(Coveo.$$(n.element).hasClass("coveo-facet-collapsed")?(n.expand(),i&&i.setAttribute("aria-expanded","true")):(n.collapse(),i&&i.setAttribute("aria-expanded","false")))};Coveo.$$(t).on("click",i)}},n}();t.FacetManager=u},function(n){n.exports='<svg viewBox="0 0 10 5" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title>5F14616B-4827-49FC-B1B8-FC20CF1DC946<\/title><desc>Created with sketchtool.<\/desc><g id="UI-Desktop" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><g id="ALL" transform="translate(-750.000000, -536.000000)" stroke="#111111"><g id="See-Per-Page" transform="translate(570.000000, 528.000000)"><g id="small-down" transform="translate(177.000000, 2.000000)"><g id="Group" transform="translate(3.000000, 6.000000)"><polyline id="Shape" points="0.5 0.5 5 5 9.5 0.5"><\/polyline><\/g><\/g><\/g><\/g><\/g><\/svg>'},function(n,t,i){n.exports=i(5)},function(n,t,i){"use strict";function r(n){for(var i in n)t.hasOwnProperty(i)||(t[i]=n[i])}Object.defineProperty(t,"__esModule",{value:!0});r(i(6));var u=i(20);u.swapVar(this)},function(n,t,i){"use strict";var r,u,f,e,o,s,h,c,l,a,v;Object.defineProperty(t,"__esModule",{value:!0});i(7);r=i(8);t.UrlUtils=r.UrlUtils;u=i(9);t.CustomEvents=u.CustomEvents;f=i(10);t.PsComponentsHelper=f.PsComponentsHelper;e=i(11);t.PsComponentsInit=e.PsComponentsInit;o=i(2);t.FacetManager=o.FacetManager;s=i(14);t.PsComponentsCusto=s.PsComponentsCusto;h=i(15);t.CustomSortDropdown=h.CustomSortDropdown;c=i(16);t.PagerManager=c.PagerManager;l=i(0);t.CommerceEvents=l.CommerceEvents;a=i(17);t.ItemInventory=a.ItemInventory;v=i(19);t.StorePicker=v.StorePicker},function(){String.prototype.getInitials=function(n){n===void 0&&(n=!0);var t=this.replace(/[^a-zA-Z- ]/g,"").match(/\b\w/g)||[];return n?t.join(""):t};String.prototype.capitalize=function(){return this.toLowerCase().replace(/\b\w/g,function(n){return n.toUpperCase()})}},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n}();i.getUrlParams=function(n){var i,t,r,u;return n?(i=document.createElement("a"),t="",i.href=n,r=i.hash.substring(1),r?(u=document.createElement("a"),u.href=r,t=u.search.substring(1)):t=i.search.substring(1),t=t||n,(/^[?#]/.test(t)?t.slice(1):t).split("&").reduce(function(n,t){var i=t.split("="),u=i[0],r=i[1];return n[u]=r?decodeURIComponent(r.replace(/\+/g," ")):"",n},{})):{}};i.getLocationFromUri=function(n){var t;return n?(t=document.createElement("a"),t.href=n,{href:t.href,pathname:t.pathname,hostname:t.hostname,host:t.host,search:t.search,protocol:t.protocol,hash:t.hash}):{}};t.UrlUtils=i},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n}();i.yourCustomEvent="yourCustomEvent";t.CustomEvents=i},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function n(){}return n.yourHelperMethod=function(){return""},n}();t.PsComponentsHelper=i},function(n,t,i){"use strict";function u(n,t){t===void 0&&(t={});Coveo.Initialization.initializeFramework(n,t,function(){var u=new r(n),i=_.extend(t,{});return Coveo.Initialization.initSearchInterface(n,i)})}Object.defineProperty(t,"__esModule",{value:!0});var f=i(2),r=function(){function n(n){this.searchInterfaceElement=n;f.FacetManager.initializeFacetManager()}return n}();t.PsComponentsInit=r;t.initCoveoCusto=u;Coveo.Initialization.registerNamedMethod("initCoveoCusto",function(n,t){t===void 0&&(t={});u(n,t)})},function(n,t,i){"use strict";(function(n){function l(){return typeof navigator!="undefined"?o(navigator.userAgent):h()}function o(n){var r=n!==""&&c.reduce(function(t,i){var u=i[0],f=i[1],r;return t?t:(r=f.exec(n),!!r&&[u,r])},!1),e,o,t;return r?(e=r[0],o=r[1],e==="searchbot")?new u:(t=o[1]&&o[1].split(/[._]/).slice(0,3),t?t.length<f&&(t=t.concat(a(f-t.length))):t=[],new i(e,t.join("."),s(n))):null}function s(n){for(var t=0,i=e.length;t<i;t++){var r=e[t],u=r[0],f=r[1],o=f.test(n);if(o)return u}return null}function h(){var t=typeof n!="undefined"&&n.version;return t?new r(n.version.slice(1)):null}function a(n){for(var t=[],i=0;i<n;i++)t.push("0");return t}var i,r,u;Object.defineProperty(t,"__esModule",{value:!0});i=function(){function n(n,t,i){this.name=n;this.version=t;this.os=i}return n}();t.BrowserInfo=i;r=function(){function t(t){this.version=t;this.name="node";this.os=n.platform}return t}();t.NodeInfo=r;u=function(){function n(){this.bot=!0;this.name="bot";this.version=null;this.os=null}return n}();t.BotInfo=u;var f=3,c=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/],],e=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/],];t.detect=l;t.parseUserAgent=o;t.detectOS=s;t.getNodeVersion=h}).call(t,i(13))},function(n){function h(){throw new Error("setTimeout has not been defined");}function c(){throw new Error("clearTimeout has not been defined");}function l(n){if(i===setTimeout)return setTimeout(n,0);if((i===h||!i)&&setTimeout)return i=setTimeout,setTimeout(n,0);try{return i(n,0)}catch(t){try{return i.call(null,n,0)}catch(t){return i.call(this,n,0)}}}function y(n){if(r===clearTimeout)return clearTimeout(n);if((r===c||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(n);try{return r(n)}catch(t){try{return r.call(null,n)}catch(t){return r.call(this,n)}}}function p(){o&&e&&(o=!1,e.length?u=e.concat(u):s=-1,u.length&&a())}function a(){var t,n;if(!o){for(t=l(p),o=!0,n=u.length;n;){for(e=u,u=[];++s<n;)e&&e[s].run();s=-1;n=u.length}e=null;o=!1;y(t)}}function v(n,t){this.fun=n;this.array=t}function f(){}var t=n.exports={},i,r;(function(){try{i=typeof setTimeout=="function"?setTimeout:h}catch(n){i=h}try{r=typeof clearTimeout=="function"?clearTimeout:c}catch(n){r=c}})();var u=[],o=!1,e,s=-1;t.nextTick=function(n){var i=new Array(arguments.length-1),t;if(arguments.length>1)for(t=1;t<arguments.length;t++)i[t-1]=arguments[t];u.push(new v(n,i));u.length!==1||o||l(a)};v.prototype.run=function(){this.fun.apply(null,this.array)};t.title="browser";t.browser=!0;t.env={};t.argv=[];t.version="";t.versions={};t.on=f;t.addListener=f;t.once=f;t.off=f;t.removeListener=f;t.removeAllListeners=f;t.emit=f;t.prependListener=f;t.prependOnceListener=f;t.listeners=function(){return[]};t.binding=function(){throw new Error("process.binding is not supported");};t.cwd=function(){return"/"};t.chdir=function(){throw new Error("process.chdir is not supported");};t.umask=function(){return 0}},function(n,t){"use strict";var r=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var u=Coveo.Component,f=Coveo.Initialization,e=Coveo.ComponentOptions,i=function(n){function t(i,r,u){var f=n.call(this,i,t.ID,u)||this;f.element=i;f.options=r;f.bindings=u;f.options=e.initComponentOptions(i,t,r);f.bind.onRootElement(Coveo.InitializationEvents.beforeInitialization,f.handleBeforeInit);f.bind.onRootElement(Coveo.InitializationEvents.afterComponentsInitialization,f.handleAfterComponentsInit);f.bind.onRootElement(Coveo.InitializationEvents.afterInitialization,f.handleAfterInit);f.bind.onRootElement(Coveo.QueryEvents.newQuery,f.handleNewQuery);f.bind.onRootElement(Coveo.QueryEvents.buildingQuery,f.handleBuildingQuery);f.bind.onRootElement(Coveo.QueryEvents.doneBuildingQuery,f.handleDoneBuildingQuery);f.bind.onRootElement(Coveo.QueryEvents.preprocessResults,f.handlePreprocessResults);f.bind.onRootElement(Coveo.QueryEvents.deferredQuerySuccess,f.handleDeferredQuerySuccess);Coveo.$$(f.root).on(Coveo.QueryEvents.querySuccess,function(n,t){return f.handleQuerySuccess(n,t)});return f}return r(t,n),t.prototype.handleBeforeInit=function(){},t.prototype.handleAfterComponentsInit=function(){},t.prototype.handleAfterInit=function(){},t.prototype.handleNewQuery=function(){},t.prototype.handleBuildingQuery=function(){},t.prototype.handleDoneBuildingQuery=function(){},t.prototype.handlePreprocessResults=function(){},t.prototype.handleQuerySuccess=function(){},t.prototype.handleDeferredQuerySuccess=function(){this.BuildColorFacet()},t.prototype.BuildColorFacet=function(){for(var i,u,r,t=document.querySelectorAll(".CoveoFacet[data-facet-color='true']"),n=0;n<t.length;++n)i=t[n].querySelectorAll(".coveo-facet-value"),u=t[n].querySelectorAll(".coveo-facet-more"),i!=null&&Array.prototype.forEach.call(i,function(n){r=n.getElementsByClassName("coveo-facet-value-caption")[0].textContent;n.getElementsByClassName("coveo-facet-value-checkbox")[0].classList.add(r.toLowerCase());n.getElementsByClassName("coveo-hook-svg")[0].classList.add(r.toLowerCase())})},t}(u);i.ID="PsComponentsCusto";i.options={};t.PsComponentsCusto=i;f.registerAutoCreateComponent(i)},function(n,t,i){"use strict";var e=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=Coveo.Component,f=Coveo.Initialization,s=Coveo.ComponentOptions,r=Coveo.$$,h=i(3),u=function(n){function t(i,r,u){var f=n.call(this,i,t.ID,u)||this,e;f.element=i;f.options=r;f.bindings=u;f.options=s.initComponentOptions(i,t,r);f.bind.onRootElement(Coveo.InitializationEvents.beforeInitialization,f.handleBeforeInit);f.bind.onRootElement(Coveo.InitializationEvents.afterComponentsInitialization,f.handleAfterComponentsInit);f.bind.onRootElement(Coveo.InitializationEvents.afterInitialization,f.handleAfterInit);e=f.getStateEventName(Coveo.QueryStateModel.eventTypes.changeOne+Coveo.QueryStateModel.attributesEnum.sort);f.bind.onRootElement(e,function(n){return f.handleCoveoStateChanged(n)});return f.render(),f}return e(t,n),t.prototype.handleCoveoStateChanged=function(n){this.currentSearchSort=n.value},t.prototype.getStateEventName=function(n){return Coveo.QueryStateModel.ID+":"+n},t.prototype.handleBeforeInit=function(){},t.prototype.handleAfterComponentsInit=function(){},t.prototype.handleAfterInit=function(){this.htmlSortCriteriasList();this.handleCustomStyledDropdownClick()},t.prototype.htmlTextComponent=function(){return r("span",{className:"coveo-custom-sort-dropdown-text"},Coveo.l("SortBy")).el},t.prototype.htmlPickerComponent=function(){const i=this,n=r(this.element).parent(".coveo-custom-sort-section"),u=n.classList.contains("coveo-styled-sort-dropdown-section")?"ul":"select",f=n.classList.contains("coveo-styled-sort-dropdown-section")?"click":"change",e=n.classList.contains("coveo-styled-sort-dropdown-section")?"coveo-styled-sort-dropdown-picker":"coveo-custom-sort-dropdown-picker",t=r(u,{className:e}),o=function(){return i.handleChangeCriteria()};t.on(f,o);return this.sortCriteriasList=t.el,t.el},t.prototype.htmlSortCriteriasList=function(){const n=this,t=r(this.element).parent(".coveo-custom-sort-section"),i=r(t).siblings(".CoveoSort[data-available-in-dropdown='true']");_.each(i,function(i){const u=Coveo.get(i,"Sort");let f;u.options.sortCriteria.forEach(function(t){var i=(t.sort+" "+t.direction).trim();i==n.currentSearchSort&&(f=!0);n.criteriasList[i]=u.options.caption});let e;const o=t.classList.contains("coveo-styled-sort-dropdown-section")?"li":"option";e=f?r(o,{className:"coveo-custom-sort-dropdown-list-item-text",value:u.options.caption,title:u.options.caption,tabindex:0,selected:""},u.options.caption):r(o,{className:"coveo-custom-sort-dropdown-list-item-text",value:u.options.caption,title:u.options.caption,tabindex:0},u.options.caption);n.sortCriteriasList.appendChild(e.el)})},t.prototype.handleChangeCriteria=function(){let n=event.target.value?event.target.value:event.target.title;const t=r(this.element).parent(".coveo-custom-sort-section"),i=r(t).siblings(".CoveoSort[data-available-in-dropdown='true']");if(event.target.tagName.toLowerCase()==="li"){const n=event.target.parentElement.querySelectorAll("li");n.forEach(n=>{n.removeAttribute("selected")});event.target.setAttribute("selected","")}_.each(i,function(t){var i=Coveo.get(t,"Sort");n==i.options.caption&&i.element.click()})},t.prototype.handleCustomStyledDropdownClick=function(){const n=this.element,t=n.classList.contains("coveo-styled-sort-dropdown");if(t){const i=n.parentElement;let t=!1;i.addEventListener("click",()=>{t?(n.style.display="none",t=!1):(n.style.display="block",t=!0)});document.addEventListener("click",i=>{t&&!i.target.classList.contains("coveo-custom-dropdown-span")&&(n.style.display="none",t=!1)});document.addEventListener("keydown",r=>{r.key==="Escape"&&t&&(n.style.display="none",t=!1,i.focus())});i.addEventListener("keydown",n=>{if(n.key==="Enter"){const n=i.firstElementChild?.classList?.contains("coveo-custom-dropdown-span");n&&(i.firstElementChild.click(),i.firstElementChild.nextElementSibling?.querySelector("li[selected]")?.focus())}(n.key==="ArrowUp"||n.key==="ArrowDown")&&t&&(n.preventDefault(),r(n.key))});document.addEventListener("keydown",n=>{n.key==="Enter"&&n.target.classList.contains("coveo-custom-sort-dropdown-list-item-text")&&n.target.click()});function r(t){const r=Array.from(n.querySelectorAll("li")),u=document.activeElement;let i=r.indexOf(u);t==="ArrowUp"&&i>=0?(r[i-1]?.focus(),i--):t==="ArrowDown"&&i<=r.length-1&&(r[i+1]?.focus(),i++)}}},t.prototype.render=function(){r(this.element).append(this.htmlTextComponent());r(this.element).append(this.htmlPickerComponent());this.criteriasList={}},t}(o);u.ID="CustomSortDropdown";t.CustomSortDropdown=u;f.isComponentClassIdRegistered(u.ID)||f.registerAutoCreateComponent(u)},function(n,t,i){"use strict";var e=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=Coveo.Component,f=Coveo.Initialization,s=Coveo.ComponentOptions,r=Coveo.$$,h=i(3),u=function(n){function t(i,r,u){var f=n.call(this,i,t.ID,u)||this,e;f.element=i;f.options=r;f.bindings=u;f.options=s.initComponentOptions(i,t,r);f.bind.onRootElement(Coveo.InitializationEvents.beforeInitialization,f.handleBeforeInit);f.bind.onRootElement(Coveo.InitializationEvents.afterComponentsInitialization,f.handleAfterComponentsInit);f.bind.onRootElement(Coveo.InitializationEvents.afterInitialization,f.handleAfterInit);f.bind.onRootElement(Coveo.QueryEvents.deferredQuerySuccess,f.handleDeferredQuerySuccess);e=f.getStateEventName(Coveo.QueryStateModel.eventTypes.changeOne+Coveo.QueryStateModel.attributesEnum.first);f.bind.onRootElement(e,function(n){return f.handleCoveoStateChanged(n)});return f}return e(t,n),t.prototype.handleCoveoStateChanged=function(n){var t=n.value},t.prototype.getStateEventName=function(n){return Coveo.QueryStateModel.ID+":"+n},t.prototype.handleBeforeInit=function(){},t.prototype.handleAfterComponentsInit=function(){},t.prototype.handleDeferredQuerySuccess=function(n){this.BuildPagerNavigation(n)},t.prototype.insertAfter=function(n,t){t!=null&&t.parentNode.insertBefore(n,t.nextSibling)},t.prototype.insertBefore=function(n,t){t!=null&&t.parentNode.insertBefore(n,t)},t.prototype.BuildPagerNavigation=function(n){var t=this,i=document.querySelectorAll(".CoveoPager[data-pager-extended='true']"),r;this.docCount=n.results.totalCount;this.firstResult=n.queryBuilder.firstResult;this.numberOfResults=n.queryBuilder.numberOfResults;r=document.querySelector(".CoveoPager[data-pager-extended='true']");this.totalNumberOfPages=Math.ceil(this.docCount/this.numberOfResults);this.LastAvailablePage=this.totalNumberOfPages;_.each(i,function(n){var i=Coveo.get(n,"Pager"),s=i.options.numberOfPages,u=i.currentPage,o=t.BuildPageOneBlockElements(i),h=t.BuildPageSpacerBlockElements(),c=t.BuildPageSpacerBlockElements(),f,r,e;u<t.LastAvailablePage-1&&t.totalNumberOfPages>s&&(f=t.BuildPageLastBlockElements(i));r=n.querySelectorAll(".coveo-pager-previous");e=n.querySelectorAll(".coveo-pager-next");r!=null&&o!=null&&u>3&&(t.insertAfter(h,r[0]),t.insertAfter(o,r[0]));f!=null&&(u<t.LastAvailablePage-2&&t.insertBefore(c,e[0]),t.insertBefore(f,e[0]))})},t.prototype.handleClickLastPage=function(n){n.setPage(this.LastAvailablePage)},t.prototype.handleClickFirstPage=function(n){n.setPage(1)},t.prototype.BuildPageOneBlockElements=function(n){var t=r("li",{className:"coveo-pager-list-item coveo-accessible-button",tabindex:"0",role:"button"}).el,i=r("a",{className:"coveo-pager-list-item-text coveo-pager-anchor"},Coveo.l("1")).el;return i.addEventListener("click",this.handleClickFirstPage.bind(this,n)),t.appendChild(i),t},t.prototype.BuildPageSpacerBlockElements=function(){var n=r("li",{className:"coveo-pager-list-item coveo-accessible-button coveo-pager-anchor-spacer-block",tabindex:"0",role:"button"}).el,t=r("a",{className:"coveo-pager-list-item-text coveo-pager-anchor"},Coveo.l("...")).el;return n.appendChild(t),n},t.prototype.BuildPageLastBlockElements=function(n){var t=r("li",{className:"coveo-pager-list-item coveo-accessible-button",tabindex:"0",role:"button"}).el,i=r("a",{className:"coveo-pager-list-item-text coveo-pager-anchor"},this.totalNumberOfPages.toString()).el;return i.addEventListener("click",this.handleClickLastPage.bind(this,n)),t.appendChild(i),t},t.prototype.handleAfterInit=function(){},t}(o);u.ID="PagerManager";t.PagerManager=u;f.isComponentClassIdRegistered(u.ID)||f.registerAutoCreateComponent(u)},function(n,t,i){"use strict";var e=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var f=i(0),o=i(18),r=i(1),u=function(n){function t(i,u,f){var e=n.call(this,i,t.ID,f)||this;e.element=i;e.options=u;e.bindings=f;e.options=r.ComponentOptions.initComponentOptions(i,t,u);e.bind.onRootElement(r.InitializationEvents.afterInitialization,function(){e.registerAllFacetVariants();e.bind.onRootElement(r.QueryEvents.doneBuildingQuery,function(n){return e.handleDoneBuildingQuery(n)})});return e}return e(t,n),t.prototype.registerAllFacetVariants=function(){for(var i,t=document.querySelectorAll(".CoveoFacet[data-variant=\"true\"], .CoveoFacet[data-variant='true']"),n=0,r=t.length;n<r;n++)i=Coveo.get(t.item(n),Coveo.Facet),o.VariantFacet.registerFacetForVariants(i)},t.prototype.handleDoneBuildingQuery=function(n){var e=this,s=e.variantItemExpression,h=e.productItemExpression,i=this.options,c=i.productIdField,l=i.itemTypeField,a=i.productItemFieldValue,v=i.variantItemFieldValue,u=n.queryBuilder,t={variantFieldDefinitions:[],queryBuilder:u,variantAdvancedExpression:new r.ExpressionBuilder,productIdField:c,itemTypeField:l,productItemFieldValue:a,variantItemFieldValue:v,variantItemExpression:s,productItemExpression:h},o;r.$$(this.root).trigger(f.CommerceEvents.registerVariantFields,t);t.variantAdvancedExpression=this.buildVariantAdvancedExpressionBuilderFromDefinitions(t.variantFieldDefinitions);this.removeVariantExpressionFromQueryBuilder(t.variantFieldDefinitions,u);r.$$(this.root).trigger(f.CommerceEvents.buildingVariantFilters,t);u.advancedExpression.add(this.productItemExpression);o=this.buildNestedVariantExpression(t.variantAdvancedExpression.build());u.advancedExpression.add(o)},t.prototype.buildVariantAdvancedExpressionBuilderFromDefinitions=function(n){return n.filter(function(n){return n.hasSelectedValue}).map(function(n){return n.expression}).reduce(function(n,t){return n.add(t),n},new r.ExpressionBuilder)},t.prototype.removeVariantExpressionFromQueryBuilder=function(n,t){var i=this;n.filter(function(n){return n.hasSelectedValue}).map(function(n){return n.expression}).forEach(function(n){t.advancedExpression.remove("("+n+")");t.advancedExpression.remove(n);t.groupByRequests.filter(function(n){return!!n.advancedQueryOverride}).forEach(function(t){return t.advancedQueryOverride=i.removeExpression(t.advancedQueryOverride,n)||"@uri"})})},t.prototype.removeExpression=function(n,t){return n.replace("("+t+")","").replace(t,"").trim()},t.prototype.buildNestedVariantExpression=function(n){var t=this.options.productIdField,i=[this.variantItemExpression,n,this.storesExpression].filter(function(n){return!!n}).join(" ");return"[["+t+"] "+i+"]"},Object.defineProperty(t.prototype,"productItemExpression",{get:function(){var n=this.options,t=n.itemTypeField,i=n.productItemFieldValue;return t+'="'+i+'"'},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"variantItemExpression",{get:function(){var n=this.options,t=n.itemTypeField,i=n.variantItemFieldValue;return t+'="'+i+'"'},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"storesExpression",{get:function(){return""},enumerable:!0,configurable:!0}),t}(r.Component);u.ID="ItemInventory";u.options={productIdField:r.ComponentOptions.buildFieldOption({defaultValue:"@productid"}),itemTypeField:r.ComponentOptions.buildFieldOption({defaultValue:"@objecttype"}),variantItemFieldValue:r.ComponentOptions.buildStringOption({defaultValue:"Variant"}),productItemFieldValue:r.ComponentOptions.buildStringOption({defaultValue:"SellableItem"})};t.ItemInventory=u;r.Initialization.registerAutoCreateComponent(u)},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),f=i(1),u=function(){function n(){}return n.registerFacetForVariants=function(t){t.bind.onRootElement(r.CommerceEvents.registerVariantFields,function(i){return n.onRegisterVariantField(t,i)});t.bind.onRootElement(r.CommerceEvents.buildingVariantFilters,function(i){return n.onBuildingVariantFilter(t,i)})},n.onRegisterVariantField=function(t,i){var r=t.getSelectedValues(),u=r.length>0;i.variantFieldDefinitions.push({field:t.options.field.toString(),values:r,hasSelectedValue:u,expression:n.generateExpressionForFacet(t.options.field.toString(),r)})},n.onBuildingVariantFilter=function(n,t){var r=t.queryBuilder,i=r.groupByRequests.filter(function(t){return t.field==n.options.field})[0];i.queryOverride="";i.advancedQueryOverride=this.buildQueryOverrideForFacet(n,t)},n.buildQueryOverrideForFacet=function(t,i){var r=i.queryBuilder,u=i.variantFieldDefinitions,f=i.variantAdvancedExpression,e=i.productIdField,o=i.productItemExpression,s=u.filter(function(n){return n.field==t.options.field})[0],h=f.getParts().filter(function(n){return n!==s.expression}).join(" "),c=n.mergeExpressions(o,r.expression.build(),r.advancedExpression.build());return n.mergeExpressions(h,"[["+e+"] "+c+"]")},n.mergeExpressions=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.filter(function(n){return!!n}).join(" ")},n}();u.generateExpressionForFacet=function(n,t){if(t.length>0){var i=new f.ExpressionBuilder;return i.addFieldExpression(n,"==",t),i.build()}return""};t.VariantFacet=u},function(n,t,i){"use strict";var f=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),u,r;Object.defineProperty(t,"__esModule",{value:!0});u=i(1);r=function(n){function t(i,r,f,e){var o=n.call(this,i,t.ID,f)||this;o.element=i;o.options=r;o.bindings=f;o.result=e;o.filterForCurrentStore=!1;o.options=u.ComponentOptions.initComponentOptions(i,t,r);o.retrieveStoreFromLocalStorage();o.bind.onRootElement(Coveo.InitializationEvents.afterComponentsInitialization,function(){o.bindLocalStorageEvent();o.updateCurrentStore(o)});o.element.appendChild(Coveo.$$("input",{type:"checkbox","class":"store-locator-modal__invoke store-picker-checkbox"}).el);o.element.appendChild(Coveo.$$("span",{"class":"pickup-label"}).el);o.bindCheckboxInput();o.bind.onRootElement("state:change:f:@storename",o.handleStateChangeExternal);o.bind.onRootElement(Coveo.QueryEvents.preprocessResults,o.handleQuerySuccess);return o}return f(t,n),t.prototype.bindLocalStorageEvent=function(){var n=this,i=localStorage.setItem,t;localStorage.setItem=function(){i.apply(this,arguments);n.retrieveStoreFromLocalStorage()&&(n.element.querySelector("input").checked=!1,Coveo.state(document.getElementById("search"),"f:@storename",""),n.updateCurrentStore(n))};t=localStorage.removeItem;localStorage.removeItem=function(){t.apply(this,arguments);n.retrieveStoreFromLocalStorage();n.element.querySelector("input").checked=!1;Coveo.state(document.getElementById("search"),"f:@storename","");n.updateCurrentStore(n)}},t.prototype.updateCurrentStore=function(n){var i,r;Coveo.$$(this.element).show();t.currentStore&&t.currentStore.storeName?(i=n.element.querySelector(".store-picker-checkbox"),!i||i.classList.remove("store-locator-modal__invoke"),r=n.element.querySelector(".pickup-label"),!r||(r.innerHTML="Pick Up Today at "+t.currentStore.storeName),this.sendLocationToDistanceResources(t.currentStore.storeLatitude,t.currentStore.storeLongitude),this.checkInputStatus()):(i=n.element.querySelector(".store-picker-checkbox"),!i||i.classList.add("store-locator-modal__invoke"),r=n.element.querySelector(".pickup-label"),!r||(r.innerHTML="Pick Up Today at a Store Nearby"),this.sendLocationToDistanceResources(undefined,undefined),this.updateStateAndQuery(""))},t.prototype.sendLocationToDistanceResources=function(n,t){var r=document.querySelector(".CoveoDistanceResources"),i;r&&(i=Coveo.get(r,Coveo.DistanceResources),!n||!t?i.getLastPositionRequest().then(function(n){i.setPosition(n.latitude,n.longitude)}):i.setPosition(n,t))},t.prototype.bindCheckboxInput=function(){var n=this;Coveo.$$(this.element.querySelector("input")).on("click",function(){n.checkInputStatus(!0)})},t.prototype.checkInputStatus=function(n){n===void 0&&(n=!1);this.element.querySelector("input").checked&&this.updateStateAndQuery(t.currentStore.storeName,n)},t.prototype.updateStateAndQuery=function(n,t){n===void 0&&(n="");t===void 0&&(t=!1);n?Coveo.state(document.getElementById("search"),"f:@storename",[n]):Coveo.state(document.getElementById("search"),"f:@storename","");Coveo.logSearchEvent(this.root,{name:"storeChange",type:"storePicker"},{selected_store:!n?"No Store Query":localStorage.getItem("your-store-model")});t&&Coveo.executeQuery(this.root)},t.prototype.handleQuerySuccess=function(n){n.results.exception&&n.results.exception.code=="InvalidQueryFunctionSyntax"&&(n.results.exception=undefined,Coveo.$$(this.element).hide())},t.prototype.handleStateChangeExternal=function(n){if(n.value.length==1){var i=n.value[0].toLowerCase();i==t.currentStore.storeName&&(this.element.querySelector("input").checked=!0)}else this.element.querySelector("input").checked=!1},t.prototype.retrieveStoreFromLocalStorage=function(){var n=localStorage.getItem("bopisMyStore");return!!n&&t.currentStore&&t.currentStore.storeName!=JSON.parse(n).storeName?(t.currentStore=JSON.parse(n),!0):(t.currentStore=JSON.parse(n),!1)},t}(u.Component);r.ID="StorePicker";r.options={};t.StorePicker=r;u.Initialization.registerAutoCreateComponent(r)},function(n,t){"use strict";function i(n){window.Coveo==undefined?window.Coveo=n:_.each(_.keys(n),function(t){window.Coveo[t]=n[t]})}Object.defineProperty(t,"__esModule",{value:!0});t.swapVar=i}])});document.addEventListener("keydown",n=>{n.code==="Space"&&n.target.classList.contains("coveo-facet-header")&&n.target.click()});document.addEventListener("keyup",n=>{n.code==="Enter"&&(n.target.classList.contains("coveo-facet-more")||n.target.classList.contains("coveo-facet-less"))&&(n.target.classList.contains("coveo-facet-more")&&n.target.previousElementSibling.classList.contains("coveo-facet-less")&&setTimeout(()=>{n.target.previousElementSibling.focus()},100),n.target.classList.contains("coveo-facet-less")&&n.target.nextElementSibling.classList.contains("coveo-facet-more")&&setTimeout(()=>{n.target.nextElementSibling.focus()},100))});String.toLocaleString({en:{ShowingResultsOf:"{0}<pl>-{1}<\/pl> of {2} products",ShowingResultsOfWithQuery:'{0}<pl>-{1}<\/pl> of {2} products for "{3}"',RemoveContext:"Remove Case Filters",GoToFullSearch:"Full Search Page",NoCaseContext:"Context Search is disabled",CustomFullSearchButton:"Go to Full Search",CancelLastAction:"Continue shopping"},fr:{CancelLastAction:"Continuer à Magasiner"}});const expandCollapsedFacets=()=>{const n=document.querySelectorAll(".CoveoFacet.coveo-facet-collapsed.coveo-active"),t=document.querySelectorAll(".CoveoDynamicHierarchicalFacet.coveo-dynamic-hierarchical-facet-collapsed");n.forEach(n=>{n.classList.remove("coveo-facet-collapsed")});t.forEach(n=>{const t=n.querySelectorAll("button.coveo-selected");t.length>0&&n.classList.remove("coveo-dynamic-hierarchical-facet-collapsed")})},initFacetSelection=function(n){var r=Coveo.$$(n).findAll(".CoveoFacet, .CoveoCategoryFacet, .CoveoDynamicHierarchicalFacet"),t=[],f=!1,u=null;if(coveoSource&&(u=coveoSource),r&&r.length!==0){r.forEach(function(n){var i={field:n.getAttribute("data-field"),id:n.getAttribute("data-id"),queryOverride:u?"@source==("+u+")":null,maximumNumberOfValues:1e3};t.push(i)});var h=t.length===1&&t[0].field=="disabled",e=$(n).data("enable-history"),c=$("body.on-page-editor").length>0;if(!e&&h){console.log("Coveo Facet Selection: Coveo Search History is disabled and only found the disabled field. The Facet Selector will be disabled.");return}if(e){console.log("Coveo Facet Selection: Coveo Search History is enabled. The Facet Selector will be disabled.");return}if(c){console.log("Coveo Facet Selection: The page is in experience editor mode. The Facet Selector will be disabled.");return}var l=function(){var n=createSanitizedUrl(window.location.pathname,window.location),t=n.toString().replace(facetSelectionBasePath,"");return t.replace(/-/g," ").split("/").map(function(n){return n.split("+")}).reduce(function(n,t){return n.concat(t)},[])},a=function(r,u,f){var e={},h=s("@currentprice",n),c=s("@percentageoff",n),o=function(n,t,r,u){var o=u?n+":range":n,f,s,h,c;e[o]||(e[o]={values:[]});t==="@categories"?(f=e[o].values,s=[],f.length>0?(h=r.filter(function(n){var t=n.split("|");if(t.length>f.length)for(i=0;i<f.length;i++)return f[i]!=t[i]?!1:!0;return!1}),s=h.length>0?h[0].split("|"):f):(c=r.filter(function(n){return n.split("|").length==1}),s=c.length>0?c[0].split("|"):[]),s.length>f.length&&(e[o].values=s)):Array.isArray(r)?r.forEach(function(n){e[o].values.push(n)}):e[o].values.push(r)},l=function(){u.forEach(function(n){var t=null,s,i,e,a;if((n.toLowerCase().lastIndexOf("price ",0)===0?t=h:n.toLowerCase().lastIndexOf("percent off ",0)===0&&(t=c),t)&&(s=/^[a-zA-z\s-]+[\s-]([0-9]+.[0-9]+)[\s-]to[\s-]([0-9]+.[0-9]+)$/i,i=s.exec(n),i&&i.length===3)){var u=Number(i[1]),f=Number(i[2]),r,l=!1;t.options.rangeSlider?(r=[],r.push(u),r.push(f),l=!0):(e=t.options.ranges.filter(function(n){return Number(n.start)==u&&Number(n.end)==f}),a=e.length>0&&e[0].endInclusive?0:1e-5,r=u.toFixed(6)+".."+(f-a).toFixed(6));o(t.options.id,t.options.field,r,l)}})};r.forEach(function(n,i){var r=t[i].id,f=t[i].field;u.forEach(function(t){const i=n.filter(function(n){return v(t,n.value)});if(i.length>=1){var u=i.map(function(n){return n.value});o(r,f,u)}})});l();y(e,f)},v=function(n,t){if(!n||!t)return!1;if(n.toLowerCase()==t.toLowerCase())return!0;var i=t.split("|");return t=p(i.pop()),n=n.split(" ").join("-").toLowerCase(),n===t},o=function(n){return Coveo.SearchEndpoint.endpoints.default.listFieldValuesBatch({batch:t}).then(function(t){var i=l();a(t,i,n);return})},y=function(t,i){var c=Coveo.state(n),f=Object.keys(t).reduce(function(n,i){const r="f:"+i.split(" ").join("");return t[i].values.length>0&&(n[r]=t[i].values),n},{}),h,u,o,e,s,r;for(w(f),h=window.location.hash.split("&"),u=[],h.forEach(function(n){u.push(n.replace("#","").split("="))}),u.forEach(function(n){n[0]=="first"?f[n[0]]=Number(n[1]):n[0]=="sort"&&(f[n[0]]=decodeURIComponent(n[1]))}),c.setMultiple(f,{silent:!1}),o="",r=0;r<u.length;r++)u[r][0]=="sort"&&(o=decodeURIComponent(u[r][1]));for(e=document.querySelectorAll(".CoveoSort[data-available-in-dropdown='true']"),s=$(".coveo-custom-sort-dropdown-picker").val(),r=0;r<e.length;r++)o==e[r].dataset.sortCriteria&&(s=e[r].dataset.caption);$(".coveo-custom-sort-dropdown-picker").val(s);i()},p=function(n){if(!n)return"";return n=n.toLowerCase().replace(/\s&\s/," and "),n=n.split(" ").join("-"),n.replace(/[^a-zA-Z0-9_\-.]/,"")},w=function(i){var r=Coveo.$$(n).findAll(".CoveoCategoryFacet"),u=r.length>0&&r[0].CoveoCategoryFacet?r[0].CoveoCategoryFacet:null;t.forEach(function(n){var t="f:"+n.id,r=i[t];!r&&u&&u.options.id===n.id?i[t]=u.options.basePath:r||(i[t]=[])})},s=function(n,t){var r=Coveo.$$(t).findAll(".CoveoFacetRange, .CoveoFacetSlider"),i=r.filter(function(t){return t.CoveoFacetRange?n===t.CoveoFacetRange.options.field:t.CoveoFacetSlider?n===t.CoveoFacetSlider.options.field:void 0});return i.length>0?i[0].CoveoFacetRange?i[0].CoveoFacetRange:i[0].CoveoFacetSlider:null};Coveo.$$(n).on("afterInitialization",function(t,i){i.defer.push(o(function(){n.disableUrlWriter=!0}))});Coveo.$$(n).on("querySuccess",function(){f=!0;setTimeout(()=>{expandCollapsedFacets()},500)});window.onpopstate=function(){f&&o(function(){n.disableUrlWriter=!0;Coveo.executeQuery(n)})}}};document.addEventListener("DOMContentLoaded",function(){var n=document.querySelectorAll(".CoveoSearchInterface"),t;if(n&&n.length!==0)for(t=0;t<n.length;t++)initFacetSelection(n[t])});document.addEventListener("CaleresSidesheetHasOpened",()=>{setTimeout(()=>{expandCollapsedFacets()},50)});var processRedirect=function(n,t,i){if(n){n=n.replace(/"/g,"");var r=$.get("/api/calxa/search/keywordredirect",{keyword:n},function(n){n&&n.HasRedirect?t(n.Url):i&&i()});r.fail(function(){i&&i()})}else i&&i()},initSearchPagesRedirect=function(){for(var t=document.querySelectorAll(".CoveoSearchInterface"),n=0,i=t.length;n<i;n++)initSearchPageRedirect(t[n])},initSearchPageRedirect=function(n){var t="";Coveo.$$(n).on("newQuery",function(){var u=Coveo.state(n),i=u.attributes.q,r;i&&i!==t&&(t=i,r=i.toLowerCase(),processRedirect(r,function(n){window.location.href.includes(n)||(window.data&&window.data.event("searchKeywordRedirected",{url:n}),window.location=n,window.location.href.includes("/search")&&n.includes("/search")&&location.reload())},function(){}))})},initSearchBoxRedirect=function(){var n=Coveo.StandaloneSearchInterface.prototype.redirectToSearchPage;Coveo.StandaloneSearchInterface.prototype.redirectToSearchPage=function(t){var i=this,r=Coveo.state(i.element).attributes.q.toLowerCase();processRedirect(r,function(n){window.data&&window.data.event("searchKeywordRedirected",{url:n});window.location=n},function(){n.call(i,t)})}};document.addEventListener("DOMContentLoaded",function(){initSearchBoxRedirect();initSearchPagesRedirect()})