{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./cartridges/app_storefront_shoeshow/cartridge/client/default/js/components/carousel.js","webpack:///./cartridges/app_storefront_shoeshow/cartridge/client/default/js/components/collapsibleItem.js","webpack:///./cartridges/app_storefront_shoeshow/cartridge/client/default/js/components/keyboardAccessibility.js","webpack:///./cartridges/app_storefront_shoeshow/cartridge/client/default/js/components/zoom.js","webpack:///./cartridges/app_storefront_shoeshow/cartridge/client/default/js/gtm/container.js","webpack:///./cartridges/app_storefront_shoeshow/cartridge/client/default/js/gtm/setdatalayer.js","webpack:///./cartridges/app_storefront_shoeshow/cartridge/client/default/js/modalFocus.js","webpack:///./cartridges/app_storefront_shoeshow/cartridge/client/default/js/product/base.js","webpack:///./cartridges/app_storefront_shoeshow/cartridge/client/default/js/product/quickView.js","webpack:///./cartridges/app_storefront_shoeshow/cartridge/client/default/js/search.js","webpack:///./cartridges/app_storefront_shoeshow/cartridge/client/default/js/search/search.js","webpack:///./cartridges/app_storefront_shoeshow/cartridge/client/default/js/util.js","webpack:///./node_modules/lazyload/lazyload.js","webpack:///(webpack)/buildin/global.js"],"names":[],"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,mBAAmB,mBAAO,CAAC,2GAAkB;AAC7C,eAAe,mBAAO,CAAC,qDAAU;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;ACjEa;AACb;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,yBAAyB;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3Ha;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;ACda;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;ACzEa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA,kHAAkH;;AAElH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;AACL;;;;;;;;;;;;;ACvCa;;AAEb;AACA;AACA,mBAAmB,mCAAmC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,uCAAuC;AAC7E,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,uCAAuC;AAC7E,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,4CAA4C;AAClF,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB,iBAAiB;AACjB;AACA,SAAS;AACT,2BAA2B,uBAAuB;AAClD;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,yBAAyB;AACzB,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;AC9Za;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;;;;;;;;;;;;;AC/Ca;;AAEb,mBAAmB,mBAAO,CAAC,iHAAqB;;AAEhD;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA,oDAAoD,QAAQ;AAC5D;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gDAAgD,SAAS,IAAI,QAAQ;AACrE,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,WAAW,MAAM;AACjB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA,WAAW,MAAM;AACjB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,qBAAqB;AACnC;;AAEA;AACA;AACA;AACA,WAAW,wBAAwB;AACnC,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mBAAO,CAAC,uHAAwB;AAC5D,uBAAuB,mBAAO,CAAC,+GAAoB;AACnD;AACA;AACA,SAAS;AACT,KAAK;AACL;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA,4DAA4D,sDAAsD;;AAElH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,2CAA2C;AAC9G;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;;AAEA;AACA;;AAEA,YAAY;AACZ;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,KAAK;AACL;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,iDAAiD,UAAU;;AAE3D;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;;AAEA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT,KAAK;;AAEL;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;ACltCA;AACA;AACA;AACA;AACA;AACa;AACb,WAAW,mBAAO,CAAC,gGAAQ;AAC3B,iBAAiB,mBAAO,CAAC,qGAAe;;AAExC;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,cAAc;AAC1B;AACA;AACA;;AAEA;AACA;;AAEA,YAAY;AACZ;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,SAAS;AACT,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;;;;;;;;;;;;;AC1Qa;;AAEb,qBAAqB,mBAAO,CAAC,wFAAQ;AACrC,mBAAmB,mBAAO,CAAC,gHAAoB;AAC/C,mBAAmB,mBAAO,CAAC,0GAAiB;;AAE5C;AACA,mBAAmB,mBAAO,CAAC,0GAAiB;AAC5C,mBAAmB,mBAAO,CAAC,kHAAqB;AAChD;;AAEA;AACA;AACA;AACA;AACA,gFAAgF;AAChF,qFAAqF;AACrF,4EAA4E;AAC5E,iGAAiG;AACjG,yEAAyE;AACzE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA,CAAC;;;;;;;;;;;;;ACxCY;AACb,mBAAmB,mBAAO,CAAC,iHAAqB;AAChD,mBAAmB,mBAAO,CAAC,2GAAkB;AAC7C,eAAe,mBAAO,CAAC,qDAAU;AACjC,4BAA4B,mBAAO,CAAC,iJAAqC;;AAEzE;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA,kCAAkC;AAClC,sBAAsB,mBAAO,CAAC,qIAA+B;AAC7D;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,KAAK;AACL;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,4DAA4D,aAAa;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,GAAG,aAAa;AAC7D,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,GAAG,aAAa;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,yCAAyC,GAAG,aAAa;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,GAAG,aAAa;AAC7D;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kCAAkC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gFAAgF;AAChF,qFAAqF;AACrF,4EAA4E;AAC5E,yEAAyE;AACzE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,+DAA+D,MAAM,GAAG,aAAa;AACrF;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C,eAAe;;AAE5D;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,+CAA+C;AAC/C,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD,UAAU;AAC9D,qBAAqB;AACrB,oDAAoD,UAAU;AAC9D;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,qCAAqC;AAC9D;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;;AAElE;AACA;;AAEA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,mBAAO,CAAC,uHAAwB;AAChE;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;;AAEA;AACA;AACA;;;;;;;;;;;;;AC9hCa;;AAEb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,IAA2B;AACnC;AACA,KAAK,MAAM,EAIN;AACL,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,gBAAgB,OAAO;AACvB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;;AAEA;AACA;;AAEA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;;AAEb;AACA;AACA,aAAa;AACb,SAAS;;AAET;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA,SAAS;;AAET;AACA,iCAAiC,QAAQ;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb,SAAS;;AAET;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;;;AC5KD;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C","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 = \"./cartridges/app_storefront_shoeshow/cartridge/client/default/js/search.js\");\n","'use strict';\n\nvar gtmContainer = require('../gtm/container');\nvar lazyload = require('lazyload');\n\nfunction addPauseButton() {\n $('.slick-carousel').each(function () {\n var $slider = $(this);\n if ($slider.slick('slickGetOption', 'autoplay') === true) {\n $slider.prepend(`\n\t\t\t\t\n\t\t\t`);\n\n var pause = true;\n $('.pause-autoplay', $slider).on('click', function () {\n $slider.slick(pause ? 'slickPause' : 'slickPlay');\n $(this).attr('aria-pressed', pause ? 'true' : 'false');\n $('i', $slider).attr('class', pause ? 'fa fa-play' : 'fa fa-pause');\n $('.sr-only', $slider).text(pause ? 'Pause Slideshow' : 'Play Slideshow');\n pause = !pause;\n });\n }\n });\n}\n\nfunction productCarousel() {\n $('.product-carousel')\n .on('beforeChange', function (e, slick, currentSlide, nextSlide) {\n var direction;\n if (Math.abs(nextSlide - currentSlide) == 1) {\n direction = nextSlide - currentSlide > 0 ? 'right' : 'left';\n } else {\n direction = nextSlide - currentSlide > 0 ? 'left' : 'right';\n }\n\n $(this).attr('data-direction', direction);\n if (direction === 'left') {\n $('.slick-slide.slick-active', this).first().prev().find('a').first().focus();\n }\n })\n .on('afterChange', function (e, slick) {\n if ($(this).attr('data-direction') === 'right') {\n $('.slick-slide.slick-active', this).last().find('a').first().focus();\n }\n });\n}\n\nmodule.exports = {\n initialize: function () {\n $(document).ready(function () {\n gtmContainer.initPosition();\n $('.slick-carousel:not(.slick-initialized)').slick();\n $('.lazyload').lazyload();\n addPauseButton();\n productCarousel();\n });\n },\n\n refresh: function () {\n $('.slick-carousel.slick-initialized').slick('setPosition');\n $('.lazyload').lazyload();\n },\n};\n","'use strict';\nfunction addAccessibilityButtons(afterRefinement = false) {\n if ($(window).width() <= 794) {\n // hide desktop footer list and show mobile footer list\n $('.mobile-footer-list').show();\n $('.desktop-footer-list').hide();\n } else {\n $('.mobile-footer-list').hide();\n $('.desktop-footer-list').show();\n }\n\n var sizes = ['xs', 'sm', 'md', 'lg', 'xl'];\n\n sizes.forEach(function (size) {\n var selector =\n '.collapsible-' +\n size +\n ' .title, .collapsible-' +\n size +\n '>.card-header, .collapsible-' +\n size +\n '>.refinement-button-heading>.card-header';\n\n $(selector).each(function (i) {\n var $menuHeader = $(this);\n if ($menuHeader.hasClass('refinement-heading')) {\n // don't add more than one button\n // skip if a button has already been added\n if ($menuHeader.find('button').length !== 0) {\n return;\n }\n }\n // if on mobile screen size or a refinement button\n var containerSize = $menuHeader.parents('.container').css('width');\n if (Number(containerSize.replace('px', '')) <= 560 || $(this).hasClass('refinement-heading')) {\n // need to add button for accessiblility\n if ($(this).find('button').length === 0) {\n var text = $(this).text();\n var tabIndex = -1;\n if ($(this).hasClass('footer-title') || $(this).hasClass('collapsible-title')) {\n tabIndex = 0;\n $(this).attr('tabindex', -1);\n }\n $(this).html(\n ''\n );\n $menuHeader = $(this).find('button');\n\n if ($(this).hasClass('footer-title') || $(this).hasClass('collapsible-title')) {\n $(this).parents('.footer-item').attr('role', 'listitem');\n $(this).parents('.row').attr('role', 'list');\n $(this).removeAttr('role');\n $($menuHeader).on('click', function (e) {\n e.preventDefault();\n $(this).attr('aria-expanded', function (i, attr) {\n return attr == 'false' ? 'true' : 'false';\n });\n });\n }\n }\n\n var id = 'collapsible-item-' + i;\n var menu = $(this)\n .parents('.collapsible-' + size)\n .find('.card-body, .content')\n .first();\n if (!$menuHeader[0].hasAttribute('aria-controls') && !menu[0].hasAttribute('id')) {\n $menuHeader.attr('aria-controls', id);\n menu.attr('id', id);\n }\n }\n // else not mobile screen size or refinement buttons (return footer buttons to normal sections when browser resizes to desktop size)\n else {\n if ($(this).find('button').length !== 0) {\n var text = $(this).text();\n $menuHeader.text(text);\n $menuHeader.children().first().remove();\n }\n if (!$menuHeader.hasClass('nofocus-desktop')) {\n $menuHeader.attr('tabindex', '0');\n $menuHeader.attr('aria-label', $(this).text());\n }\n $menuHeader.removeAttr('role');\n $(this).parents('.footer-item').removeAttr('role');\n $(this).parents('.row').removeAttr('role');\n }\n // end selector forEach\n });\n\n // wire up click events once button has been built\n if (!afterRefinement) {\n $('body').on('click', selector, function (e) {\n e.preventDefault();\n var parent = $(this).parents('.collapsible-' + size);\n parent.toggleClass('active');\n var expanded = $(this).attr('aria-expanded') === 'true' ? 'true' : 'false';\n $(this).attr('aria-expanded', expanded);\n });\n } else {\n $('body').off('click', selector);\n $('body').on('click', selector, function (e) {\n e.preventDefault();\n var parent = $(this).parents('.collapsible-' + size);\n parent.toggleClass('active');\n // This is here to make sure the buttons still announce properly after a refinement is selected\n parent\n .find('button[aria-expanded]')\n .first()\n .attr('aria-expanded', function (i, attr) {\n return attr == 'false' ? 'true' : 'false';\n });\n });\n }\n // end size forEach\n });\n}\nwindow.onresize = addAccessibilityButtons;\nmodule.exports = {\n addAccessibilityButtons: addAccessibilityButtons,\n};\n","'use strict';\n\nmodule.exports = function (selector, keyFunctions, preFunction) {\n $(selector).on('keydown', function (e) {\n var key = e.which;\n var supportedKeyCodes = [32, 37, 38, 39, 40, 27];\n if (supportedKeyCodes.indexOf(key) >= 0) {\n e.preventDefault();\n }\n var returnedScope = preFunction.call(this);\n if (keyFunctions[key]) {\n keyFunctions[key].call(this, returnedScope);\n }\n });\n};\n","'use strict';\n\nfunction removeZoom() {\n // Clear any existing zoom elements\n $('.slick-current [data-zoom-image]').removeData('elevateZoom');\n $('.zoomContainer').remove();\n}\n\nfunction enableZoom() {\n removeZoom();\n\n // Zoom is only enabled for non-mobile views\n if (window.innerWidth >= 795) {\n var $currentZoomSlide = $('.slick-current [data-zoom-image]');\n\n if ($currentZoomSlide.length > 0) {\n $currentZoomSlide.elevateZoom({\n zoomType: 'inner',\n cursor: 'crosshair',\n zoomWindowFadeIn: 100,\n zoomWindowFadeOut: 100,\n loadingIcon: 'True',\n });\n }\n }\n}\n\nfunction loadZoomImage(slideIndex) {\n // Zoom is only enabled for non-mobile views\n if (window.innerWidth >= 795) {\n var zoomImage = $('.primary-image-carousel .slick-slide[data-slick-index=' + slideIndex + '] img').data(\n 'zoom-image'\n );\n\n if (zoomImage) {\n $('.primary-images').addClass('zoom-loading');\n $('')\n .attr('src', zoomImage)\n .on('load', function () {\n $(this).remove();\n $('.primary-images').removeClass('zoom-loading');\n });\n }\n }\n}\n\nmodule.exports = {\n initialize: function () {\n // Reinitialize zoom on window resize\n var throttleResize;\n $(window).resize(function () {\n clearTimeout(throttleResize);\n throttleResize = setTimeout(function () {\n enableZoom();\n }, 100);\n });\n\n $('.primary-image-carousel').on('beforeChange', function (event, slick, currentSlide, nextSlide) {\n loadZoomImage(nextSlide);\n });\n\n $('.primary-image-carousel').on('afterChange', function (event, slick, currentSlide) {\n enableZoom();\n });\n\n $('.primary-image-carousel').on('init', function (slick) {\n $('body').trigger('product:afterCarouselInit', this);\n });\n },\n\n enable: function () {\n enableZoom();\n },\n};\n","'use strict';\n\nmodule.exports = {\n initPosition: function () {\n var $gtmContainers = $('.gtm-container:not(.gtm-container-initialized)');\n\n $gtmContainers.each(function () {\n var $currentContainer = $(this),\n $gtmProducts = $currentContainer.find('.gtmproduct'),\n containerIndexStart = $currentContainer.data('page-size') * $currentContainer.data('page-number'); // Paging starts at 0\n\n $currentContainer.addClass('gtm-container-initialized');\n\n // Register the index position of the GTM products inside each GTM container.\n $gtmProducts.each(function () {\n var $currentProduct = $(this);\n $currentProduct.data('position', $gtmProducts.index($currentProduct) + containerIndexStart + 1);\n\n if ($currentProduct.parents('.grid-tile').first().find('.price [itemprop=mapmessage]').length > 0) {\n $currentProduct.data('price', 0.0);\n } else {\n var $price = $currentProduct\n .parents('.grid-tile')\n .first()\n .find('.adjusted-price')\n .data('productPrice');\n $currentProduct.data('price', $price);\n }\n });\n\n $('span[itemprop=\"price\"]').each(function () {\n var priceValue = $(this).attr('content');\n if (priceValue.endsWith('.98')) {\n $(this).parent('.sales').addClass('strike-price-available');\n $(this).parent('.sales').prev().addClass('strike-price-available');\n }\n });\n });\n },\n};\n","'use strict';\n\nfunction gtmproduct(data) {\n var gtmdata = [];\n for (var x = 0; x < data.order.items.items.length; x++) {\n gtmdata.push({\n id: data.order.items.items[x].masterID,\n name: setReg(data.order.items.items[x].productName),\n price: data.order.items.items[x].price.sales.decimalPrice,\n brand: data.order.items.items[x].brand != null ? setReg(data.order.items.items[x].brand) : '',\n category: setReg(data.order.items.items[x].categoryFullPath),\n variant:\n setVariant(\n data.order.items.items[x].variationAttributes[0] != null\n ? data.order.items.items[x].variationAttributes[0].displayValue\n : '',\n 'c'\n ) +\n setVariant(\n data.order.items.items[x].variationAttributes[1] != null\n ? data.order.items.items[x].variationAttributes[1].displayValue\n : null,\n 's'\n ) +\n setVariant(\n data.order.items.items[x].variationAttributes[2] != null\n ? data.order.items.items[x].variationAttributes[2].displayValue\n : '',\n 'w'\n ),\n quantity: data.order.items.items[x].quantity,\n });\n }\n return gtmdata;\n}\n\nfunction gtmPrice(data) {\n var mapType = data.mapType;\n if (mapType && data.mapFirstRevealOurPrice) {\n if (mapType === 'B' || mapType === 'C') {\n return 0.0;\n }\n }\n return data.price.sales.value;\n}\nfunction setReg(data) {\n // Decode all HTML entities in the given parameter.\n var temp = document.createElement('div');\n temp.innerHTML = data;\n return temp.childNodes.length === 0 ? '' : temp.childNodes[0].nodeValue;\n}\n\nfunction convertHalfSize(size) {\n var sizetoConvert = size.toString(),\n halfsize = sizetoConvert.match(/\\½/i) ? true : false;\n\n if (halfsize) {\n halfsize = sizetoConvert.replace(/\\½/g, '');\n return parseInt(halfsize) + 0.5;\n } else {\n return size;\n }\n}\n\nfunction setVariant(data, type) {\n var result = '';\n\n switch (type) {\n case 'c':\n if (data != null && data.length > 0) {\n result = 'Color:' + data;\n }\n break;\n\n case 's':\n if (data != null) {\n result = ',Size:' + convertHalfSize(data);\n }\n break;\n\n case 'w':\n if (data != null && data.length > 0) {\n result = ',Width:' + data;\n }\n break;\n\n default:\n result = '';\n }\n\n return result;\n}\n\nmodule.exports = {\n MiniCartIncreaseQty: function (data) {\n try {\n ssDataLayer.push({\n event: 'ecom.cart.add',\n ecommerce: {\n add: {\n products: [\n {\n id: data.masterid,\n name: setReg(data.name),\n price: data.price,\n brand: setReg(data.brand),\n category: setReg(data.category),\n variant:\n setVariant(data.color, 'c') +\n setVariant(data.size, 's') +\n setVariant(data.width, 'w'),\n quantity: eval(data.newQty + '-' + data.oldQty),\n },\n ],\n },\n },\n });\n } catch (ex) {\n console.log('GTM-MiniCartIncreaseQty Error:' + ex);\n }\n },\n\n MiniCartDecreaseQty: function (data) {\n try {\n ssDataLayer.push({\n event: 'ecom.cart.remove',\n ecommerce: {\n remove: {\n products: [\n {\n id: data.masterid,\n name: setReg(data.name),\n price: data.price,\n brand: setReg(data.brand),\n category: setReg(data.category),\n variant:\n setVariant(data.color, 'c') +\n setVariant(data.size, 's') +\n setVariant(data.width, 'w'),\n quantity: eval(data.oldQty + '-' + data.newQty),\n },\n ],\n },\n },\n });\n } catch (ex) {\n console.log('GTM-MiniCartDecreaseQty Error:' + ex);\n }\n },\n\n RemoveLineItemfromCart: function (data) {\n try {\n ssDataLayer.push({\n event: 'ecom.cart.remove',\n ecommerce: {\n remove: {\n products: [\n {\n id: data.masterid,\n name: setReg(data.name),\n price: data.price,\n brand: setReg(data.brand),\n category: setReg(data.category),\n variant:\n setVariant(data.color, 'c') +\n setVariant(data.size, 's') +\n setVariant(data.width, 'w'),\n quantity: data.qty,\n },\n ],\n },\n },\n });\n } catch (ex) {\n console.log('GTM-MiniCartDecreaseQty Error:' + ex);\n }\n },\n\n EmailSignUp: function (email) {\n try {\n ssDataLayer.push({\n event: 'signup.newsletter.footer',\n email: email,\n });\n } catch (ex) {\n console.log('GTM-MiniCartDecreaseQty Error:' + ex);\n }\n },\n\n ProductCarousel: function (data) {\n try {\n ssDataLayer.push({\n event: 'ecom.product.list',\n ecommerce: {\n impressions: data,\n },\n });\n } catch (ex) {\n console.log('GTM-ProductCarousel Error:' + ex);\n }\n },\n\n PDP: function (data) {\n try {\n var avail = '';\n if (data && data.availability && data.availability.status) {\n avail = data.availability.status;\n }\n ssDataLayer.push({\n event: 'ecom.product.detail',\n ecommerce: {\n detail: {\n products: [\n {\n id: data.id,\n name: setReg(data.productName),\n price: gtmPrice(data),\n brand: setReg(data.brand),\n category: setReg(data.categoryFullPath),\n availability: avail,\n },\n ],\n },\n },\n });\n } catch (ex) {\n console.log('GTM-ProductCarousel Error:' + ex);\n }\n },\n\n AddToCart: function (data) {\n try {\n ssDataLayer.push({\n event: 'ecom.cart.add',\n ecommerce: {\n add: {\n products: [\n {\n id: data.masterid,\n name: setReg(data.productName),\n price: gtmPrice(data),\n brand: setReg(data.brand),\n category: setReg(data.categoryFullPath),\n variant:\n setVariant(data.color, 'c') +\n setVariant(data.size, 's') +\n setVariant(data.width, 'w'),\n quantity: data.qty,\n },\n ],\n },\n },\n });\n } catch (ex) {\n console.log('GTM-AddToCart Error:' + ex);\n }\n },\n\n ShippingOption: function (data) {\n try {\n ssDataLayer.push({\n event: 'ecom.checkout.shipping.validation',\n ecommerce: {\n checkout: {\n actionField: { step: 3, option: data.shippingMethod },\n },\n },\n });\n } catch (ex) {\n console.log('GTM-ShippingOption:' + ex);\n }\n },\n\n ProceedToPayment: function (data) {\n try {\n ssDataLayer.push({\n event: 'ecom.checkout.shipping.completeStep',\n ecommerce: {\n checkout: {\n actionField: { step: 3, option: data.shippingMethod },\n },\n },\n });\n } catch (ex) {\n console.log('GTM-ShippingOption:' + ex);\n }\n },\n\n Payment: function (data) {\n try {\n ssDataLayer.push({\n event: 'ecom.checkout.payment',\n ecommerce: {\n checkout: {\n actionField: { step: 4 },\n products: gtmproduct(data),\n },\n },\n });\n } catch (ex) {\n console.log('GTM-Payment:' + ex);\n }\n },\n\n PaymentOption: function (data) {\n try {\n ssDataLayer.push({\n event: 'ecom.checkout.payment.completeStep',\n ecommerce: {\n checkout: {\n actionField: { step: 4, option: data.paymentMethod.value },\n },\n },\n });\n } catch (ex) {\n console.log('GTM-PaymentOption:' + ex);\n }\n },\n\n OrderReview: function (data) {\n try {\n ssDataLayer.push({\n event: 'ecom.checkout.review',\n ecommerce: {\n checkout: {\n actionField: { step: 5 },\n products: gtmproduct(data),\n },\n },\n });\n } catch (ex) {\n console.log('GTM-OrderReview:' + ex);\n }\n },\n\n PlaceOrder: function (data) {\n try {\n ssDataLayer.push({\n event: 'ecom.checkout.review.completeStep',\n ecommerce: {\n checkout: {\n actionField: { step: 5 },\n // 'products': gtmproduct(data)\n },\n },\n });\n } catch (ex) {\n console.log('GTM-OrderReview:' + ex);\n }\n },\n\n StoreLocator: function (data) {\n try {\n ssDataLayer.push({\n event: 'search.locations',\n zipCode: data.searchKey.postalCode,\n });\n } catch (ex) {\n console.log('GTM-StoreLocator:' + ex);\n }\n },\n\n PromotionalBanners: function () {\n try {\n var promotions = [];\n $.each($('.gtmpromo'), function (k, v) {\n var $this = $(this);\n promotions.push({\n id: $this.data('prid'),\n name: $this.data('prname'),\n creative: $this.data('prcreative'),\n position: $this.data('prposition'),\n });\n });\n\n if (promotions.length > 0) {\n ssDataLayer.push({\n event: 'ecom.promo.view',\n ecommerce: {\n promoView: {\n promotions: promotions,\n },\n },\n });\n }\n } catch (ex) {\n console.log('${GTM-PromotionalBanners} Error:' + ex);\n }\n },\n\n PromotionClickHandler: function () {\n try {\n $('.gtmpromo').click(function () {\n var $this = $(this);\n ssDataLayer.push({\n event: 'ecom.promo.click',\n ecommerce: {\n promoClick: {\n promotions: [\n {\n id: $this.data('prid'),\n name: $this.data('prname'),\n creative: $this.data('prcreative'),\n position: $this.data('prposition'),\n },\n ],\n },\n },\n });\n });\n } catch (ex) {\n console.log('GTM-PromotionClickHandler Error:' + ex);\n }\n },\n};\n","'use strict';\n\nmodule.exports = {\n trapFocus: function (afterCloseElement, isQuickview = false) {\n var focusableEls = $('.modal-content').find('select, input, textarea, button, a').filter(':visible');\n if (isQuickview) {\n var firstFocusableEl = focusableEls[1];\n var lastFocusableEl = focusableEls[focusableEls.length - 2];\n } else {\n var firstFocusableEl = focusableEls[0];\n var lastFocusableEl = focusableEls[focusableEls.length - 1];\n }\n var KEYCODE_TAB = 9;\n firstFocusableEl.focus();\n // remove previous listener first\n $('.modal-content').off('keydown');\n $('.modal-content').on('keydown', function (e) {\n if (e.key === 'Escape') {\n $('.close').trigger('click');\n }\n var isTabPressed = e.key === 'Tab' || e.keyCode === KEYCODE_TAB;\n\n if (!isTabPressed) {\n return;\n }\n\n if (e.shiftKey) {\n /* shift + tab */ if (document.activeElement === firstFocusableEl) {\n lastFocusableEl.focus();\n e.preventDefault();\n }\n } /* tab */ else {\n if (document.activeElement === lastFocusableEl) {\n firstFocusableEl.focus();\n e.preventDefault();\n }\n }\n });\n $('.close').on('click', function (e) {\n $('.modal-content').off('keydown');\n // the quickview modal has its own method to change the focus after the modal is closed\n if (!isQuickview) {\n afterCloseElement.focus();\n }\n e.preventDefault();\n });\n },\n};\n","'use strict';\n\nvar setdatalayer = require('../gtm/setdatalayer');\n\n/**\n * Retrieves the relevant pid value\n * @param {jquery} $el - DOM container for a given add to cart button\n * @return {string} - value to be used when adding product to cart\n */\nfunction getPidValue($el) {\n var pid;\n\n if ($('#quickViewModal').hasClass('show') && !$('.product-set').length) {\n pid = $($el).closest('.modal-content').find('.product-quickview').data('pid');\n } else if ($('.product-set-detail').length || $('.product-set').length) {\n pid = $($el).closest('.product-detail').find('.product-id').text();\n } else {\n pid = $('.product-detail:not(\".bundle-item\")').data('pid');\n }\n\n return pid;\n}\n\n/**\n * Retrieve contextual quantity selector\n * @param {jquery} $el - DOM container for the relevant quantity\n * @return {jquery} - quantity selector DOM container\n */\nfunction getQuantitySelector($el) {\n return $el && $('.set-items').length\n ? $($el).closest('.product-detail').find('.quantity-select')\n : $('.quantity-select');\n}\n\n/**\n * Retrieves the value associated with the Quantity pull-down menu\n * @param {jquery} $el - DOM container for the relevant quantity\n * @return {string} - value found in the quantity input\n */\nfunction getQuantitySelected($el) {\n return getQuantitySelector($el).val();\n}\n\n/**\n * Process attribute values associated with an attribute that uses buttons as selectors\n *\n * @param {Object} attr - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {Object[]} attr.values - Array of attribute value objects\n * @param {string} attr.values.value - Attribute coded value\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\n * selected. If there is no variant that corresponds to a specific combination of attribute\n * values, an attribute may be disabled in the Product Detail Page\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction processButtonValues(attr, $productContainer) {\n // disable all buttons to start\n if (attr.id == 'width') {\n $('.button-group-width').find('.pdp-variation-button');\n }\n\n if (attr.id == 'size') {\n $('.button-group-size').find('.pdp-variation-button');\n }\n\n attr.values.forEach(function (attrValue) {\n var $attrValue = $productContainer.find(\n '[data-attr=\"' + attr.id + '\"] [data-attr-value=\"' + attrValue.value + '\"]'\n );\n // change button url to account for other selected attributes\n $attrValue.attr('href', attrValue.url);\n\n if (attrValue.orderableAttribute) {\n $attrValue.removeClass('strikethrough');\n $attrValue.attr('aria-disabled', false);\n } else {\n $attrValue.addClass('strikethrough');\n $attrValue.attr('aria-disabled', true);\n $attrValue.attr('aria-description', 'Unavailable');\n }\n\n if (attrValue.selected) {\n $attrValue.addClass('selected');\n } else {\n $attrValue.removeClass('selected');\n }\n });\n}\n\n/**\n * Process the attribute values for an attribute that has image swatches\n *\n * @param {Object} attr - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {Object[]} attr.values - Array of attribute value objects\n * @param {string} attr.values.value - Attribute coded value\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\n * selected. If there is no variant that corresponds to a specific combination of attribute\n * values, an attribute may be disabled in the Product Detail Page\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction processSwatchValues(attr, $productContainer) {\n attr.values.forEach(function (attrValue) {\n var $attrValue = $productContainer.find(\n '[data-attr=\"' + attr.id + '\"] [data-attr-value=\"' + attrValue.value + '\"]'\n );\n var $swatchAnchor = $attrValue.parent();\n\n if (attrValue.selected) {\n $attrValue.addClass('selected');\n $attrValue.parent().addClass('selected').attr('aria-pressed', 'true');\n $swatchAnchor\n .parents('.attribute')\n .find('.swatch-display-value')\n .text($attrValue.data('attr-display-value'));\n } else {\n $attrValue.removeClass('selected');\n $attrValue.parent().removeClass('selected').attr('aria-pressed', 'false');\n }\n\n if (attrValue.url) {\n $swatchAnchor.attr('href', attrValue.url);\n } else {\n $swatchAnchor.removeAttr('href');\n }\n\n // Disable if not selectable\n $attrValue.removeClass('selectable unselectable');\n $attrValue.parent().removeClass('selectable unselectable');\n\n $attrValue.addClass(attrValue.selectable ? 'selectable' : 'unselectable');\n $attrValue.parent().addClass(attrValue.selectable ? 'selectable' : 'unselectable');\n });\n\n var $mainAttrContainer = $productContainer.find('[data-attr=\"' + attr.id + '\"]');\n if ($mainAttrContainer.find('.swatch-container.selected').length == 0) {\n var $swatchDisplayValue = $mainAttrContainer.find('.swatch-display-value');\n $swatchDisplayValue.text($swatchDisplayValue.data('default'));\n }\n}\n\n/**\n * Process attribute values associated with an attribute that does not have image swatches\n *\n * @param {Object} attr - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {Object[]} attr.values - Array of attribute value objects\n * @param {string} attr.values.value - Attribute coded value\n * @param {string} attr.values.url - URL to de/select an attribute value of the product\n * @param {boolean} attr.values.isSelectable - Flag as to whether an attribute value can be\n * selected. If there is no variant that corresponds to a specific combination of attribute\n * values, an attribute may be disabled in the Product Detail Page\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction processNonSwatchValues(attr, $productContainer) {\n var $attr = '[data-attr=\"' + attr.id + '\"]';\n var $defaultOption = $productContainer.find($attr + ' .select-' + attr.id + ' option:first');\n $defaultOption.attr('value', attr.resetUrl);\n\n if (attr.id == 'width') {\n $('.custom-select.form-control.select-width').find('option').attr('disabled', 'disabled');\n $('.custom-select.form-control.select-width').find('option:first').removeAttr('disabled');\n }\n\n if (attr.id == 'size') {\n $('.custom-select.form-control.select-size').find('option').attr('disabled', 'disabled');\n $('.custom-select.form-control.select-size').find('option:first').removeAttr('disabled');\n }\n\n attr.values.forEach(function (attrValue) {\n var $attrValue = $productContainer.find($attr + ' [data-attr-value=\"' + attrValue.value + '\"]');\n $attrValue.attr('value', attrValue.url).removeAttr('disabled');\n\n if (!attrValue.selectable) {\n $attrValue.attr('disabled', true);\n }\n\n if (attr.id == 'width') {\n $('.custom-select.form-control.select-width')\n .find(' [data-attr-value=\"' + attrValue.value + '\"]')\n .removeAttr('disabled');\n }\n\n if (attr.id == 'size') {\n $('.custom-select.form-control.select-size')\n .find(' [data-attr-value=\"' + attrValue.value + '\"]')\n .removeAttr('disabled');\n }\n\n if (attrValue.selected) {\n $attrValue.attr('selected');\n }\n });\n\n // Check if current selected attribute is valid/available\n var $select = $productContainer.find(`.select-${attr.id}`);\n $select.toggleClass('selection-unavailable', !$select.val());\n}\n\n/**\n * Routes the handling of attribute processing depending on whether the attribute has image\n * swatches or not\n *\n * @param {Object} attrs - Attribute\n * @param {string} attr.id - Attribute ID\n * @param {jQuery} $productContainer - DOM element for a given product\n */\nfunction updateAttrs(attrs, $productContainer) {\n // After updating the PDP to use buttons instead of selects, all attributes work like the swatches now\n var attrsWithSwatches = ['color'];\n var attrsWithButtons = ['size', 'width'];\n\n attrs.forEach(function (attr) {\n if (attrsWithSwatches.indexOf(attr.id) > -1) {\n processSwatchValues(attr, $productContainer);\n } else if (attrsWithButtons.indexOf(attr.id) > -1) {\n processButtonValues(attr, $productContainer);\n } else {\n processNonSwatchValues(attr, $productContainer);\n }\n });\n}\n\n/**\n * Updates the availability status in the Product Detail Page\n *\n * @param {Object} response - Ajax response object after an\n * attribute value has been [de]selected\n * @param {jQuery} $productContainer - DOM element for a given product\n */\nfunction updateAvailability(response, $productContainer) {\n var availabilityValue = '';\n var availabilityMessages = response.product.availability.messages;\n var divClass = '';\n if (!response.product.readyToOrder) {\n availabilityValue = '
' + response.resources.info_selectforstock + '
';\n } else {\n if (response.product.availability.isLowStock) {\n divClass = 'low-stock';\n } else {\n divClass = 'in-stock';\n }\n availabilityMessages.forEach(function (message) {\n availabilityValue += `
${message}
`;\n });\n }\n\n $($productContainer).trigger('product:updateAvailability', {\n product: response.product,\n $productContainer: $productContainer,\n message: availabilityValue,\n resources: response.resources,\n });\n}\n\n/**\n * Generates html for promotions section\n *\n * @param {array} promotions - list of promotions\n * @return {string} - Compiled HTML\n */\nfunction getPromotionsHtml(promotions) {\n if (!promotions) {\n return '';\n }\n\n var html = '';\n\n promotions.forEach(function (promotion) {\n if (!promotion.cartOnly)\n html += '
' + promotion.calloutMsg + '
';\n });\n\n return html;\n}\n\n/**\n * Generates html for product attributes section\n *\n * @param {array} attributes - list of attributes\n * @return {string} - Compiled HTML\n */\nfunction getAttributesHtml(attributes) {\n if (!attributes) {\n return '';\n }\n\n var html = '';\n\n attributes.forEach(function (attributeGroup) {\n if (attributeGroup.ID === 'mainAttributes') {\n attributeGroup.attributes.forEach(function (attribute) {\n html += '
' + attribute.label + ': ' + attribute.value + '
';\n });\n }\n });\n\n return html;\n}\n\n/**\n * @typedef UpdatedOptionValue\n * @type Object\n * @property {string} id - Option value ID for look up\n * @property {string} url - Updated option value selection URL\n */\n\n/**\n * @typedef OptionSelectionResponse\n * @type Object\n * @property {string} priceHtml - Updated price HTML code\n * @property {Object} options - Updated Options\n * @property {string} options.id - Option ID\n * @property {UpdatedOptionValue[]} options.values - Option values\n */\n\n/**\n * Updates DOM using post-option selection Ajax response\n *\n * @param {OptionSelectionResponse} options - Ajax response options from selecting a product option\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction updateOptions(options, $productContainer) {\n options.forEach(function (option) {\n var $optionEl = $productContainer.find('.product-option[data-option-id*=\"' + option.id + '\"]');\n option.values.forEach(function (value) {\n var valueEl = $optionEl.find('option[data-value-id*=\"' + value.id + '\"]');\n valueEl.val(value.url);\n });\n });\n}\n\nfunction updateProductImages() {\n var $primaryImages = $('.primary-images'),\n $productInfo = $('.product-detail'),\n masterId = $productInfo.data('master');\n\n $primaryImages.addClass('loading');\n\n // Build attribute data parameters\n var params = {\n pid: masterId,\n quickview: $productInfo.data('quickview'),\n };\n\n $('[data-attr]').each(function () {\n var $attr = $(this),\n attrId = $attr.data('attr'),\n $attrSelected = $attr.find('span.selected, [selected]');\n\n $attrSelected.each(function () {\n var $currentAttr = $(this);\n params['dwvar_' + masterId + '_' + attrId] = $currentAttr.data('attr-value');\n });\n });\n\n $.ajax({\n url: $productInfo.data('image-url'),\n type: 'get',\n data: params,\n success: function (data) {\n $primaryImages.replaceWith(data);\n var carousels = require('../components/carousel'),\n zoom = require('../components/zoom');\n zoom.initialize();\n carousels.initialize();\n },\n });\n}\n\n/**\n * Parses JSON from Ajax call made whenever an attribute value is [de]selected\n * @param {Object} response - response from Ajax call\n * @param {Object} response.product - Product object\n * @param {string} response.product.id - Product ID\n * @param {Object[]} response.product.variationAttributes - Product attributes\n * @param {Object[]} response.product.images - Product images\n * @param {boolean} response.product.hasRequiredAttrsSelected - Flag as to whether all required\n * attributes have been selected. Used partially to\n * determine whether the Add to Cart button can be enabled\n * @param {jQuery} $productContainer - DOM element for a given product.\n */\nfunction handleVariantResponse(response, $productContainer) {\n var isChoiceOfBonusProducts = $productContainer.parents('.choose-bonus-product-dialog').length > 0;\n var isVaraint;\n if (response.product.variationAttributes) {\n updateAttrs(response.product.variationAttributes, $productContainer);\n isVaraint = response.product.productType === 'variant';\n if (isChoiceOfBonusProducts && isVaraint) {\n $productContainer.parent('.bonus-product-item').data('pid', response.product.id);\n\n $productContainer.parent('.bonus-product-item').data('ready-to-order', response.product.readyToOrder);\n }\n }\n\n // Update primary images\n updateProductImages();\n\n // Update pricing\n if (!isChoiceOfBonusProducts) {\n var $priceSelector = $('.prices:not(.prices-mobile) .price', $productContainer).length\n ? $('.prices:not(.prices-mobile) .price', $productContainer)\n : $('.prices:not(.prices-mobile) .price');\n $priceSelector.replaceWith(response.product.price.html);\n\n var $priceSelectorMobile = $('.prices.prices-mobile .price', $productContainer).length\n ? $('.prices.prices-mobile .price', $productContainer)\n : $('.prices.prices-mobile .price');\n $priceSelectorMobile.replaceWith(response.product.price.htmlmobile);\n }\n\n // Update promotions\n $productContainer.find('.promotions').empty().html(getPromotionsHtml(response.product.promotions));\n\n updateAvailability(response, $productContainer);\n\n if (isChoiceOfBonusProducts) {\n var $selectButton = $productContainer.find('.select-bonus-product');\n $selectButton.trigger('bonusproduct:updateSelectButton', {\n product: response.product,\n $productContainer: $productContainer,\n });\n } else {\n // Enable \"Add to Cart\" button if all required attributes have been selected\n $('button.add-to-cart, button.add-to-cart-global, button.update-cart-product-global')\n .trigger('product:updateAddToCart', {\n product: response.product,\n $productContainer: $productContainer,\n })\n .trigger('product:statusUpdate', response.product);\n }\n\n // Update attributes\n $productContainer.find('.main-attributes').empty().html(getAttributesHtml(response.product.attributes));\n}\n\n/**\n * @typespec UpdatedQuantity\n * @type Object\n * @property {boolean} selected - Whether the quantity has been selected\n * @property {string} value - The number of products to purchase\n * @property {string} url - Compiled URL that specifies variation attributes, product ID, options,\n * etc.\n */\n\n/**\n * Updates the quantity DOM elements post Ajax call\n * @param {UpdatedQuantity[]} quantities -\n * @param {jQuery} $productContainer - DOM container for a given product\n */\nfunction updateQuantities(quantities, $productContainer) {\n if (!($productContainer.parent('.bonus-product-item').length > 0)) {\n var optionsHtml = quantities\n .map(function (quantity) {\n var selected = quantity.selected ? ' selected ' : '';\n return (\n ''\n );\n })\n .join('');\n getQuantitySelector($productContainer).empty().html(optionsHtml);\n }\n}\n\n/**\n * updates the product view when a product attribute is selected or deselected or when\n * changing quantity\n * @param {string} selectedValueUrl - the Url for the selected variation value\n * @param {jQuery} $productContainer - DOM element for current product\n */\nfunction attributeSelect(selectedValueUrl, $productContainer) {\n if (selectedValueUrl) {\n $('body').trigger('product:beforeAttributeSelect', { url: selectedValueUrl, container: $productContainer });\n\n $.ajax({\n url: selectedValueUrl,\n method: 'GET',\n success: function (data) {\n handleVariantResponse(data, $productContainer);\n updateOptions(data.product.options, $productContainer);\n updateQuantities(data.product.quantities, $productContainer);\n $('body').trigger('product:afterAttributeSelect', { data: data, container: $productContainer });\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n },\n });\n }\n}\n\n/**\n * Retrieves url to use when adding a product to the cart\n *\n * @return {string} - The provided URL to use when adding a product to the cart\n */\nfunction getAddToCartUrl() {\n return $('.add-to-cart-url').val();\n}\n\n/**\n * Parses the html for a modal window\n * @param {string} html - representing the body and footer of the modal window\n *\n * @return {Object} - Object with properties body and footer.\n */\nfunction parseHtml(html) {\n var $html = $('
').append($.parseHTML(html));\n\n var body = $html.find('.choice-of-bonus-product');\n var footer = $html.find('.modal-footer').children();\n\n return { body: body, footer: footer };\n}\n\n/**\n * Retrieves url to use when adding a product to the cart\n *\n * @param {Object} data - data object used to fill in dynamic portions of the html\n */\nfunction chooseBonusProducts(data) {\n $('.modal-body').spinner().start();\n\n if ($('#chooseBonusProductModal').length !== 0) {\n $('#chooseBonusProductModal').remove();\n }\n var bonusUrl;\n if (data.bonusChoiceRuleBased) {\n bonusUrl = data.showProductsUrlRuleBased;\n } else {\n bonusUrl = data.showProductsUrlListBased;\n }\n\n var htmlString =\n '' +\n '
' +\n '
' +\n '' +\n '
' +\n '
' +\n ' ' +\n data.labels.selectprods +\n '' +\n ' ' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
';\n $('body').append(htmlString);\n $('.modal-body').spinner().start();\n\n $.ajax({\n url: bonusUrl,\n method: 'GET',\n dataType: 'html',\n success: function (html) {\n var parsedHtml = parseHtml(html);\n $('#chooseBonusProductModal .modal-body').empty();\n $('#chooseBonusProductModal .modal-body').html(parsedHtml.body);\n $('#chooseBonusProductModal .modal-footer').html(parsedHtml.footer);\n $('#chooseBonusProductModal').modal('show');\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n },\n });\n}\n\n/**\n * Updates the Mini-Cart quantity value after the customer has pressed the \"Add to Cart\" button\n * @param {string} response - ajax response from clicking the add to cart button\n */\nfunction handlePostCartAdd(response) {\n $('.minicart').trigger('count:update', response);\n var messageType = response.error ? 'alert-danger' : 'alert-success';\n // show add to cart toast\n if (response.newBonusDiscountLineItem && Object.keys(response.newBonusDiscountLineItem).length !== 0) {\n chooseBonusProducts(response.newBonusDiscountLineItem);\n } else {\n if ($('.add-to-cart-messages').length === 0) {\n $('body').append('
');\n }\n\n $('.add-to-cart-messages').append(\n '
' +\n response.message +\n '
'\n );\n\n setTimeout(function () {\n $('.add-to-basket-alert').remove();\n }, 5000);\n }\n}\n\n/**\n * Retrieves the bundle product item ID's for the Controller to replace bundle master product\n * items with their selected variants\n *\n * @return {string[]} - List of selected bundle product item ID's\n */\nfunction getChildProducts() {\n var childProducts = [];\n $('.bundle-item').each(function () {\n childProducts.push({\n pid: $(this).find('.product-id').text(),\n quantity: parseInt($(this).find('label.quantity').data('quantity'), 10),\n });\n });\n\n return childProducts.length ? JSON.stringify(childProducts) : [];\n}\n\n/**\n * Retrieve product options\n *\n * @param {jQuery} $productContainer - DOM element for current product\n * @return {string} - Product options and their selected values\n */\nfunction getOptions($productContainer) {\n var options = $productContainer\n .find('.product-option')\n .map(function () {\n var $elOption = $(this).find('.options-select');\n var urlValue = $elOption.val();\n var selectedValueId = $elOption.find('option[value=\"' + urlValue + '\"]').data('value-id');\n return {\n optionId: $(this).data('option-id'),\n selectedValueId: selectedValueId,\n };\n })\n .toArray();\n\n return JSON.stringify(options);\n}\n\nfunction updateStockNumber(stockNumber) {\n var $stockNumberContainer = $('.stock-number-content');\n if (stockNumber === '') {\n $stockNumberContainer.hide();\n } else {\n $stockNumberContainer.find('.value').text(stockNumber);\n $stockNumberContainer.show();\n }\n}\n\n// Accessibility - Keyboard navigation\n\nfunction showTooltip(e) {\n $(e.currentTarget).children('.swatch-tooltip').css('display', 'inline-block');\n // var productId = e.target.getAttribute('data-product');\n // var swatchTooltip = $(`div[data-product=${productId}]`).filter('[class=swatch-tooltip]')[1];\n\n // $(swatchTooltip).css('display', 'inline-block');\n}\n\nfunction navigationInTooltip(e) {\n // var activeSwatchTooltip = $('.swatch-tooltip:visible')[0];\n var activeSwatchTooltip = $(e.currentTarget).children('.swatch-tooltip');\n\n if (e.type === 'mouseleave' || e.type === 'focusout') {\n $(activeSwatchTooltip).css('display', 'none');\n return;\n }\n\n var activeElement = e.target;\n var lastLink = $(activeSwatchTooltip).children('a').last()[0];\n\n var swatchesDiv = $(activeSwatchTooltip).siblings()[0];\n\n if (\n (!e.shiftKey && e.key === 'Tab' && activeElement === lastLink) ||\n (e.shiftKey && e.key === 'Tab' && activeElement === swatchesDiv)\n ) {\n $(activeSwatchTooltip).css('display', 'none');\n }\n}\n/**\n * Event handler function that displays swatch tooltip on tab focus per current target,\n * if the currentTarget is currently active.\n */\nfunction showTooltipFocus(e) {\n var currentTooltip = $(e.currentTarget).siblings('.swatch-tooltip');\n currentTooltip.css('display', 'inline-block');\n //Adds the swatch-option divs to the tab order to focus on\n currentTooltip.children('.swatch-option').each(function () {\n $(this).children('.swatch-tooltip__caption').attr('tabindex', '0');\n //Set Tab index to -1 as the div caption will be used for focusing\n $(this).attr('tabindex', '-1');\n });\n //Tooltip is getting skipped due to swatches being the next element to tab to, hiding them causes the next available element to be the tooltip\n $('.swatches').each(function () {\n $(this).attr('tabindex', '-1');\n });\n}\n/**\n * Event handler function that hides swatch tooltip off tab focus per current target,\n * if the key down isn't shift.\n */\nfunction hideTooltipFocus(e) {\n var eventTarget = $(e.currentTarget);\n if (!e.shiftKey && e.keyCode === 9) {\n //Readd swatches to tabbing order\n $('.swatches').each(function () {\n $(this).attr('tabindex', '0');\n });\n eventTarget.parents('.swatch-tooltip').css('display', 'none');\n //Remove the current tooltip swatches from the tabbing order\n eventTarget\n .parents('.swatch-tooltip')\n .children('.swatch-option')\n .each(function () {\n $(this).children('.swatch-tooltip__caption').attr('tabindex', '-1');\n });\n } else {\n e.currentTarget.focus();\n }\n}\n\nfunction swatchOverride() {\n $('.swatch-tooltip__caption').on('focus mouseover touchstart', function (e) {\n e.preventDefault();\n let tile = $(this).closest('.product-tile');\n var swatchOptionParent = $(this).parents('.swatch-option')[0];\n tile.find('.tile-image').attr('src', swatchOptionParent.dataset.productImg);\n tile.find('.product-tile-link').attr('href', swatchOptionParent.href);\n tile.find('.product-name-link').attr('href', swatchOptionParent.href);\n tile.find('.swatch-circle').removeClass('selected-plp');\n $(this).find('img.swatch-circle').addClass('selected-plp');\n });\n}\n\nfunction addToCart(element) {\n var addToCartUrl;\n var pid;\n var pidsObj;\n var setPids;\n var $productDetail = $('.product-detail');\n var gtmdata = $productDetail.data('pdpdetails');\n\n $('body').trigger('product:beforeAddToCart', element);\n\n if ($('.set-items').length && $(element).hasClass('add-to-cart-global')) {\n setPids = [];\n\n $('.product-detail').each(function () {\n if (!$(element).hasClass('product-set-detail')) {\n setPids.push({\n pid: $(element).find('.product-id').text(),\n qty: $(element).find('.quantity-select').val(),\n options: getOptions($(element)),\n });\n }\n });\n pidsObj = JSON.stringify(setPids);\n }\n\n pid = getPidValue($(element));\n\n var $productContainer = $(element).closest('.product-detail');\n if (!$productContainer.length) {\n $productContainer = $(element).closest('.quick-view-dialog').find('.product-detail');\n }\n\n addToCartUrl = getAddToCartUrl();\n\n var form = {\n pid: pid,\n pidsObj: pidsObj,\n childProducts: getChildProducts(),\n quantity: getQuantitySelected($(element)),\n };\n\n var $productContainer = $(element).closest('.product-detail');\n if (!$productContainer.length) {\n $productContainer = $(element).closest('.modal-content').find('.product-quickview');\n }\n\n var color = $('.swatch-attributes-container.order-1')\n .find('a.selectable.selected')\n .find('span')\n .attr('data-attr-display-value');\n var pSize = $('.btn-size.selected', $productContainer).data('attr-value');\n\n var pWidth = $('.btn-width.selected', $productContainer).data('attr-value');\n\n if (color != null) {\n gtmdata.color = color;\n } else {\n gtmdata.color = null;\n }\n\n if (pSize != null) {\n gtmdata.size = parseFloat(pSize);\n } else {\n gtmdata.size = null;\n }\n\n if (pWidth != null) {\n gtmdata.width = pWidth;\n } else {\n gtmdata.width = null;\n }\n\n gtmdata.qty = getQuantitySelected($(element));\n gtmdata.masterid = $productDetail.data('masterid');\n\n if (!$('.bundle-item').length) {\n form.options = getOptions($productContainer);\n }\n\n $(element).trigger('updateAddToCartFormData', form);\n if (addToCartUrl) {\n form.addedFromStoreId = $('body')[0].id;\n $.ajax({\n url: addToCartUrl,\n method: 'POST',\n data: form,\n success: function (data) {\n handlePostCartAdd(data);\n $('body').trigger('product:afterAddToCart', data);\n setdatalayer.AddToCart(gtmdata);\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n },\n });\n }\n}\n\nfunction initializeSwatches() {\n var delay = 500;\n var setTimeoutId;\n $('.swatch-option').on('mouseover', function (e) {\n const swatch = $(this);\n setTimeoutId = setTimeout(function () {\n swatch.nextAll('.swatch-text-container').first().find('.swatch-alt-text').show();\n }, delay);\n });\n $('.swatch-option').on('mouseout', function (e) {\n clearTimeout(setTimeoutId);\n $(this).nextAll('.swatch-text-container').first().find('.swatch-alt-text').hide();\n });\n}\n\nfunction slickCarouselADA() {\n $(document).on('click', 'button.slick-arrow', function (e) {\n if ($(this).hasClass('slick-next')) {\n var slides = $(this).siblings('.slick-list').find('.slick-active');\n var imgAlt = $(slides[slides.length - 1])\n .find('img')\n .attr('alt');\n if ($(this).closest('.slick-carousel').hasClass('home-carousel')) {\n $('.home-carousel-updates').html(imgAlt ? imgAlt : '');\n } else {\n $(this)\n .closest('.slick-carousel')\n .parent()\n .find('.carousel-updates')\n .html(imgAlt ? imgAlt : '');\n }\n } else if ($(this).hasClass('slick-prev')) {\n var slides = $(this).siblings('.slick-list').find('.slick-active');\n var imgAlt = $(slides[0]).find('img').attr('alt');\n if ($(this).closest('.slick-carousel').hasClass('home-carousel')) {\n $('.home-carousel-updates').html(imgAlt ? imgAlt : '');\n } else {\n $(this)\n .closest('.slick-carousel')\n .parent()\n .find('.carousel-updates')\n .html(imgAlt ? imgAlt : '');\n }\n }\n });\n}\n\nmodule.exports = {\n iniatilize: function () {\n $(document).ready(function () {\n swatchOverride();\n initializeSwatches();\n $(document).on('mouseover touchstart', '.swatch-option', function (e) {\n initializeSwatches();\n swatchOverride();\n });\n slickCarouselADA();\n });\n },\n attributeSelect: attributeSelect,\n methods: {\n editBonusProducts: function (data) {\n chooseBonusProducts(data);\n },\n },\n colorAttribute: function () {\n $(document).on('click', '[data-attr=\"color\"] a', function (e) {\n e.preventDefault();\n\n if (\n $(this).attr('disabled') ||\n ($('[data-attr=\"color\"] a').length === 1 && $('[data-attr=\"color\"] a').hasClass('selected'))\n ) {\n return;\n }\n var $productContainer = $(this).closest('.set-item');\n if (!$productContainer.length) {\n $productContainer = $(this).closest('.product-detail');\n }\n\n attributeSelect(e.currentTarget.href, $productContainer);\n });\n },\n\n buttonAttribute: function () {\n $(document).on('click', '.pdp-variation-button', function (e) {\n e.preventDefault();\n\n if ($('.pdp-variation-button').length === 1 && $('.pdp-variation-button').hasClass('selected')) {\n return;\n }\n\n // de-select all buttons within the current group\n $(this).parent().find('.pdp-variation-button').removeClass('selected').attr('aria-pressed', false);\n\n $(this).attr('aria-pressed', true);\n\n var $productContainer = $(this).closest('.set-item');\n if (!$productContainer.length) {\n $productContainer = $(this).closest('.product-detail');\n }\n\n attributeSelect(e.currentTarget.href, $productContainer);\n });\n },\n\n selectAttribute: function () {\n $(document).on('change', 'select[class*=\"select-\"], .options-select', function (e) {\n e.preventDefault();\n\n var $productContainer = $(this).closest('.set-item');\n if (!$productContainer.length) {\n $productContainer = $(this).closest('.product-detail');\n }\n attributeSelect(e.currentTarget.value, $productContainer);\n });\n },\n\n availability: function () {\n $(document).on('change', '.quantity-select', function (e) {\n e.preventDefault();\n\n var $productContainer = $(this).closest('.product-detail');\n if (!$productContainer.length) {\n $productContainer = $(this).closest('.modal-content').find('.product-quickview');\n }\n\n if ($('.bundle-items', $productContainer).length === 0) {\n attributeSelect($(e.currentTarget).find('option:selected').data('url'), $productContainer);\n }\n });\n },\n\n addToCart: function () {\n $(document).on('click', 'button.add-to-cart, button.add-to-cart-global', function () {\n addToCart(this);\n });\n },\n\n buyNow: function () {\n $(document).on('click', 'button.buy-now', function () {\n addToCart(this);\n\n window.location.href = $('.buy-now-url').val();\n });\n },\n\n selectBonusProduct: function () {\n $(document).on('click', '.select-bonus-product', function () {\n var $choiceOfBonusProduct = $(this).parents('.choice-of-bonus-product');\n var pid = $(this).data('pid');\n var maxPids = $('.choose-bonus-product-dialog').data('total-qty');\n var submittedQty = parseInt(\n $(this).parents('.choice-of-bonus-product').find('.bonus-quantity-select').val(),\n 10\n );\n var totalQty = 0;\n $.each($('#chooseBonusProductModal .selected-bonus-products .selected-pid'), function () {\n totalQty += $(this).data('qty');\n });\n totalQty += submittedQty;\n var optionID = $(this).parents('.choice-of-bonus-product').find('.product-option').data('option-id');\n var valueId = $(this)\n .parents('.choice-of-bonus-product')\n .find('.options-select option:selected')\n .data('valueId');\n if (totalQty <= maxPids) {\n var selectedBonusProductHtml =\n '' +\n '
' +\n '
' +\n $choiceOfBonusProduct.find('.product-name').html() +\n '
' +\n '
' +\n '
';\n $('#chooseBonusProductModal .selected-bonus-products').append(selectedBonusProductHtml);\n $('.pre-cart-products').html(totalQty);\n $('.selected-bonus-products .bonus-summary').removeClass('alert-danger');\n } else {\n $('.selected-bonus-products .bonus-summary').addClass('alert-danger');\n }\n });\n },\n removeBonusProduct: function () {\n $(document).on('click', '.selected-pid', function () {\n $(this).remove();\n var $selected = $('#chooseBonusProductModal .selected-bonus-products .selected-pid');\n var count = 0;\n if ($selected.length) {\n $selected.each(function () {\n count += parseInt($(this).data('qty'), 10);\n });\n }\n\n $('.pre-cart-products').html(count);\n $('.selected-bonus-products .bonus-summary').removeClass('alert-danger');\n });\n },\n enableBonusProductSelection: function () {\n $('body').on('bonusproduct:updateSelectButton', function (e, response) {\n $('button.select-bonus-product', response.$productContainer).attr(\n 'disabled',\n !response.product.readyToOrder || !response.product.available\n );\n var pid = response.product.id;\n $('button.select-bonus-product').data('pid', pid);\n });\n },\n showMoreBonusProducts: function () {\n $(document).on('click', '.show-more-bonus-products', function () {\n var url = $(this).data('url');\n $('.modal-content').spinner().start();\n $.ajax({\n url: url,\n method: 'GET',\n success: function (html) {\n var parsedHtml = parseHtml(html);\n $('.modal-body').append(parsedHtml.body);\n $('.show-more-bonus-products:first').remove();\n $('.modal-content').spinner().stop();\n },\n error: function () {\n $('.modal-content').spinner().stop();\n },\n });\n });\n },\n addBonusProductsToCart: function () {\n $(document).on('click', '.add-bonus-products', function () {\n var $readyToOrderBonusProducts = $('.choose-bonus-product-dialog .selected-pid');\n var queryString = '?pids=';\n var url = $('.choose-bonus-product-dialog').data('addtocarturl');\n var pidsObject = {\n bonusProducts: [],\n };\n\n $.each($readyToOrderBonusProducts, function () {\n var qtyOption = parseInt($(this).data('qty'), 10);\n\n var option = null;\n if (qtyOption > 0) {\n if ($(this).data('optionid') && $(this).data('option-selected-value')) {\n option = {};\n option.optionId = $(this).data('optionid');\n option.productId = $(this).data('pid');\n option.selectedValueId = $(this).data('option-selected-value');\n }\n pidsObject.bonusProducts.push({\n pid: $(this).data('pid'),\n qty: qtyOption,\n options: [option],\n });\n pidsObject.totalQty = parseInt($('.pre-cart-products').html(), 10);\n }\n });\n queryString += JSON.stringify(pidsObject);\n queryString = queryString + '&uuid=' + $('.choose-bonus-product-dialog').data('uuid');\n queryString = queryString + '&pliuuid=' + $('.choose-bonus-product-dialog').data('pliuuid');\n $.spinner().start();\n $.ajax({\n url: url + queryString,\n method: 'POST',\n success: function (data) {\n $.spinner().stop();\n if (data.error) {\n $('.error-choice-of-bonus-products').html(data.errorMessage);\n } else {\n $('.configure-bonus-product-attributes').html(data);\n $('.bonus-products-step2').removeClass('hidden-xl-down');\n $('#chooseBonusProductModal').modal('hide');\n\n if ($('.add-to-cart-messages').length === 0) {\n $('body').append('
');\n }\n $('.minicart-quantity').html(data.totalQty);\n $('.add-to-cart-messages').append(\n '
' +\n data.msgSuccess +\n '
'\n );\n setTimeout(function () {\n $('.add-to-basket-alert').remove();\n if ($('.cart-page').length) {\n location.reload();\n }\n }, 3000);\n }\n },\n error: function () {\n $.spinner().stop();\n },\n });\n });\n },\n openSocialLink: function () {\n $(document).on('click', '.social-container a', function (e) {\n var $link = $(this),\n productID = $('.product-number .product-id').text(),\n productURL = $link.parents('.social-container').data('producturl').replace('PRODUCT_ID', productID),\n imageURL = $('.primary-image-carousel .slick-current img').attr('src'),\n socialURL = $link\n .data('socialurl')\n .replace('PRODUCT_URL', encodeURIComponent(productURL))\n .replace('IMAGE_URL', encodeURIComponent(imageURL));\n\n $link.attr('href', socialURL);\n });\n },\n\n getPidValue: getPidValue,\n\n updateStockNumber: updateStockNumber,\n\n initializeImages: function () {\n var $productContainer = $('.product-detail'),\n $selectAttr = $('[data-attr] select'),\n $colorAttr = $('[data-attr=\"color\"] a.selectable'),\n $sizeAttr = $('[data-attr=\"size\"] a.selectable:not(.strikethrough)'),\n $widthAttr = $('[data-attr=\"width\"] a.selectable:not(.strikethrough)');\n\n if ($colorAttr.length > 0) {\n // There is 1 or more color swatches...\n if ($colorAttr.find('.selected').length === 0) {\n // ...and none of them are selected.\n // Auto-select the first color to display the C1 MAP product price and the correct product images.\n $colorAttr.first().click();\n } else {\n // ...and one of them is selected.\n if ($selectAttr.length === 0 && $sizeAttr.length === 0 && $widthAttr.length === 0) {\n // Accessory product with variant (likely color variant) pre-selected in URL leads here\n // There are no dropdown attributes or button attributes.\n // Extract and display the stock number and display the correct product images.\n var stockNumber = $('[data-pid]').first().data('pid').split('-')[1].slice(0, 6);\n updateStockNumber(stockNumber);\n updateProductImages();\n } else {\n // Product with variant pre-selected leads here\n // There is at least 1 dropdown attribute.\n // Trigger the first dropdown attribute to display the price for C1 MAP products and the correct product images.\n attributeSelect($productContainer.data('pdpdetails').selectedVariantUrl, $productContainer);\n }\n }\n } else if ($selectAttr.length > 0) {\n // gift card PDP should trigger this block\n // There are no color swatches, but there is at least 1 dropdown attribute.\n // Trigger the first dropdown attribute to display the price for C1 MAP products and the correct product images.\n attributeSelect($productContainer.data('pdpdetails').selectedVariantUrl, $productContainer);\n } else {\n // There are no swatch and dropdown attributes, just display the correct product images.\n updateProductImages();\n }\n },\n};\n","/* eslint-disable newline-per-chained-call */\n/* eslint-disable func-names */\n/* eslint-disable max-len */\n/* eslint-disable indent */\n/* eslint-disable vars-on-top */\n'use strict';\nvar base = require('./base');\nvar modalFocus = require('../modalFocus');\n\n/**\n * Generates the modal window on the first call.\n *@param {string} productName - Name of the Product to be appended in full-pdp-link text\n */\nfunction getModalHtmlElement(productName, productId) {\n if ($('#quickViewModal').length !== 0) {\n $('#quickViewModal').remove();\n }\n var htmlString =\n '' +\n '
' +\n '
' +\n '' +\n '
' +\n '
' +\n ' View Full Details of ' +\n productName +\n '' +\n ' ' +\n '
' +\n '
' +\n '' +\n '
' +\n '
' +\n '
' +\n '
';\n $('body').append(htmlString);\n}\n\n/**\n * @typedef {Object} QuickViewHtml\n * @property {string} body - Main Quick View body\n * @property {string} footer - Quick View footer content\n */\n\n/**\n * Parse HTML code in Ajax response\n *\n * @param {string} html - Rendered HTML from quickview template\n * @return {QuickViewHtml} - QuickView content components\n */\nfunction parseHtml(html) {\n var $html = $('
').append($.parseHTML(html));\n\n var body = $html.find('.product-quickview');\n var footer = $html.find('.modal-footer').children();\n\n return { body: body, footer: footer };\n}\n\n/**\n * replaces the content in the modal window on for the selected product variation.\n * @param {string} productUrl - url to be used for going to the product details page\n * @param {string} selectedValueUrl - url to be used to retrieve a new product model\n */\nfunction fillModalElement(productUrl, selectedValueUrl) {\n $('.modal-body').spinner().start();\n $.ajax({\n url: selectedValueUrl,\n method: 'GET',\n dataType: 'html',\n success: function (html) {\n var parsedHtml = parseHtml(html);\n\n $('.modal-body').empty();\n // $('.modal-body').html(html);\n $('.modal-body').html(parsedHtml.body);\n $('.modal-footer').html(parsedHtml.footer);\n $('#quickViewModal .full-pdp-link').attr('href', productUrl);\n $('#quickViewModal .size-chart').attr('href', productUrl);\n $('#quickViewModal').modal('show');\n\n setTimeout(function () {\n base.initializeImages();\n $('#quickViewModal').find('a').eq(0).focus();\n }, 300);\n\n $.spinner().stop();\n setTimeout(function () {\n // empty first parameter since quickView has its own method to handle changing focus on modal close\n modalFocus.trapFocus($(''), true);\n }, 500);\n },\n error: function () {\n $.spinner().stop();\n },\n });\n}\n\n/**\n * On Modal Close, Focuses on the Product Quickview button that triggered the Modal\n *\n */\nfunction focusOnLastClick() {\n var pid = $('.product-quickview').data('pid');\n setTimeout(function () {\n if ($('#quickViewModal').css('display') === 'none') {\n $('.product-grid')\n .find('[data-pid=' + pid + ']')\n .attr('tabindex', -1)\n .find('a.quickview')\n .focus();\n // Remove aria-hidden\n $('.page').removeAttr('aria-hidden');\n }\n }, 300);\n}\n\n/**\n * Adds Exit Modal action on Tab and then uses focusOnLastClick() function\n * @param {string} classParam - The class selector to handle the Action\n */\nfunction onTabExitModal(classParam) {\n $('body').on('keydown', classParam, function (e) {\n if (e.key === 'Tab') {\n $('button.close').focus();\n }\n });\n}\n\nmodule.exports = {\n initialize: base.iniatilize(),\n showQuickview: function () {\n $('body').on('click', '.quickview', function (e) {\n e.preventDefault();\n var selectedValueUrl = $(this).closest('a.quickview').attr('href');\n var productUrl = selectedValueUrl.replace('Product-ShowQuickView', 'Product-Show');\n $(e.target).trigger('quickview:show');\n\n var productGrid = $(this).closest('.product-tile');\n var productName = $(productGrid).find('.product-name').text();\n var productId = $(productGrid).find('.product-id').text();\n getModalHtmlElement(productName, productId);\n fillModalElement(productUrl, selectedValueUrl);\n onTabExitModal('.full-pdp-link:eq(1)');\n $('.page').attr('aria-hidden', true);\n });\n // On Modal Exit, Focus on the Product that triggered the Modal\n $('body').on('click', '#quickViewModal', function () {\n focusOnLastClick();\n });\n },\n colorAttribute: base.colorAttribute,\n selectAttribute: base.selectAttribute,\n buttonAttribute: base.buttonAttribute,\n removeBonusProduct: base.removeBonusProduct,\n selectBonusProduct: base.selectBonusProduct,\n enableBonusProductSelection: base.enableBonusProductSelection,\n showMoreBonusProducts: base.showMoreBonusProducts,\n addBonusProductsToCart: base.addBonusProductsToCart,\n availability: base.availability,\n addToCart: base.addToCart,\n buyNow: base.buyNow,\n showSpinner: function () {\n $('body').on('product:beforeAddToCart', function (e, data) {\n $(data).closest('.modal-content').spinner().start();\n });\n },\n hideDialog: function () {\n $('body').on('product:afterAddToCart', function () {\n $('#quickViewModal').modal('hide');\n });\n },\n beforeUpdateAttribute: function () {\n $('body').on('product:beforeAttributeSelect', function () {\n $('.modal.show .modal-content').spinner().start();\n });\n },\n updateAttribute: function () {\n $('body').on('product:afterAttributeSelect', function (e, response) {\n if ($('.modal.show .product-quickview>.bundle-items').length) {\n $('.modal.show').find(response.container).data('pid', response.data.product.id);\n $('.modal.show').find(response.container).find('.product-id').text(response.data.product.id);\n } else if ($('.set-items').length) {\n response.container.find('.product-id').text(response.data.product.id);\n } else {\n $('.modal.show .product-quickview').data('pid', response.data.product.id);\n $('.modal.show .full-pdp-link').attr('href', response.data.product.selectedProductUrl);\n }\n base.updateStockNumber(response.data.product.stockNumber);\n });\n },\n updateAddToCart: function () {\n $('body').on('product:updateAddToCart', function (e, response) {\n // update local add to cart (for sets)\n $('button.add-to-cart', response.$productContainer).attr(\n 'disabled',\n !response.product.readyToOrder || !response.product.available\n );\n\n // update global add to cart (single products, bundles)\n var dialog = $(response.$productContainer).closest('.quick-view-dialog');\n\n $('.add-to-cart-global', dialog).attr(\n 'disabled',\n !$('.global-availability', dialog).data('ready-to-order') ||\n !$('.global-availability', dialog).data('available')\n );\n\n $('button.buy-now', dialog).attr(\n 'disabled',\n !$('.global-availability', dialog).data('ready-to-order') ||\n !$('.global-availability', dialog).data('available')\n );\n });\n },\n updateAvailability: function () {\n $('body').on('product:updateAvailability', function (e, response) {\n // bundle individual products\n $('.product-availability', response.$productContainer)\n .data('ready-to-order', response.product.readyToOrder)\n .data('available', response.product.available)\n .find('.availability-msg')\n .empty()\n .html(response.message);\n\n var dialog = $(response.$productContainer).closest('.quick-view-dialog');\n\n if ($('.product-availability', dialog).length) {\n // bundle all products\n var allAvailable = $('.product-availability', dialog)\n .toArray()\n .every(function (item) {\n return $(item).data('available');\n });\n\n var allReady = $('.product-availability', dialog)\n .toArray()\n .every(function (item) {\n return $(item).data('ready-to-order');\n });\n\n $('.global-availability', dialog).data('ready-to-order', allReady).data('available', allAvailable);\n\n $('.global-availability .availability-msg', dialog)\n .empty()\n .html(allReady ? response.message : response.resources.info_selectforstock);\n } else {\n // single product\n $('.global-availability', dialog)\n .data('ready-to-order', response.product.readyToOrder)\n .data('available', response.product.available)\n .find('.availability-msg')\n .empty()\n .html(response.message);\n }\n });\n },\n openSocialLink: base.openSocialLink,\n};\n","'use strict';\n\nvar processInclude = require('./util');\nvar setdatalayer = require('./gtm/setdatalayer');\nvar gtmContainer = require('./gtm/container');\n\n$(document).ready(function () {\n processInclude(require('./search/search'));\n processInclude(require('./product/quickView'));\n gtmContainer.initPosition();\n\n var gtmdata = [];\n try {\n $('.gtmproduct').each(function () {\n var data = $(this).data('object'),\n productName = data.name == null ? '' : data.name.replace(/\\'/g, \"'\"),\n category = data.category == null ? '' : data.category.replace(/\\'/g, \"'\"),\n brand = data.brand == null ? '' : data.brand.replace(/\\'/g, \"'\"),\n availability = data.availability == null ? '' : data.availability.replace(/\\'/g, \"'\"),\n list = data.list == null ? '' : data.list.replace(/\\'/g, \"'\"),\n isCategory = $('.product-grid').find('.grid-footer-top').data('iscategory-search'),\n searchKeyword = $('.product-grid').find('.grid-footer-top').data('search-keyword');\n\n if (data.view == 'Category:') {\n gtmdata.push({\n id: data.id,\n name: productName,\n price: $(this).data('price'),\n brand: brand,\n category: category,\n position: $(this).data('position'),\n list: isCategory == true ? data.view + list : 'Search:' + searchKeyword,\n availability: availability,\n });\n }\n });\n setdatalayer.ProductCarousel(gtmdata);\n } catch (ex) {\n console.log('GTM-Error:' + ex);\n }\n});\n","'use strict';\nvar setdatalayer = require('../gtm/setdatalayer');\nvar gtmContainer = require('../gtm/container');\nvar lazyload = require('lazyload');\nvar keyboardAccessibility = require('../components/keyboardAccessibility');\n\n// Force a page reload on back/forward buttons so pagination history works\nwindow.addEventListener('popstate', function () {\n window.location.reload();\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 * 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\n $results.find('.' + $(this)[0].className.replace(/ /g, '.')).addClass('active');\n });\n\n updateDom($results, '.refinements');\n window.history.replaceState({}, '', $('.permalink').val());\n var collapsible = require('../components/collapsibleItem');\n collapsible.addAccessibilityButtons(true);\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 if ($results.find('.no-result-content').length) {\n $('.container.search-results').empty().html($results.html());\n } else {\n // Update DOM elements that do not require special handling\n [\n 'h1',\n 'h2.refinement-button-heading',\n '.breadcrumb',\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\n Object.keys(specialHandlers).forEach(function (selector) {\n specialHandlers[selector]($results);\n });\n $('.lazyload').lazyload();\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 $('.lazyload').lazyload();\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\n// hides background elements from mobile safari while filters are open\nfunction disableBackgroundElements() {\n $(\n '.header-banner, header, .search-results-main-content, .search-mobile, footer, .back-to-top, .skip-link, .cid-cookie_hint'\n )\n .attr('aria-hidden', 'true')\n .attr('inert', '');\n}\n\n//restores hidden background elements\nfunction enableBackgroundElements() {\n $(\n '.header-banner, header, .search-results-main-content, .search-mobile, footer, .back-to-top, .skip-link, .cid-cookie_hint'\n )\n .attr('aria-hidden', 'false')\n .removeAttr('inert');\n}\n\nfunction closeRefinements() {\n $('.refinement-bar, .modal-background').hide();\n $('.refinements .color-attribute .filter-selected').parent().removeAttr('aria-label');\n $('.refinements .filter-selected').removeClass('filter-selected');\n}\n\nfunction updateRefinements() {\n // Make selected price refinements stay selected in dropdowns\n var params = new URLSearchParams(window.location.search);\n\n if (params.get('pmin')) {\n $('.price-dropdown.min-price').addClass('selected');\n var pmin = parseInt(params.get('pmin'));\n var pmax = parseInt(params.get('pmax'));\n $('.price-dropdown.min-price option[value=' + pmin + ']').attr('selected', true);\n $('.price-dropdown.max-price option[value=' + pmax + ']').attr('selected', true);\n }\n\n var $refinments =\n $('.menu-toggleable-left').css('position') !== 'absolute'\n ? $('.refinement')\n : $('.refinement:not(.refinement-category)');\n //Variable to keep track of all the filters\n var numOfFilters = 0;\n $refinments.each(function () {\n var $this = $(this);\n // If there are selected refinements, leave the refinement group accordion open\n if ($this.find('span.selected').length > 0 || $this.find('.price-dropdown.min-price').hasClass('selected')) {\n numOfFilters += $this.find('span.selected').length;\n $this.removeClass('active');\n $this.find('.card-header').attr('aria-expanded', 'true');\n }\n });\n\n // Disable Reset Filters button if there are no selected filters\n var noSelectedFilters = $('.refinement:not(.refinement-category) .selected').length == 0;\n $('.reset-filters')\n .toggleClass('disabled', noSelectedFilters)\n .attr('tabindex', noSelectedFilters ? '-1' : '0')\n .attr('aria-disabled', noSelectedFilters ? 'true' : 'false');\n\n // Close the mobile filters menu\n closeRefinements();\n\n // Add selected filter class for refinement filters in mobile views\n if ($('.filter-results').is(':visible')) {\n $('.refinements .selected').addClass('filter-selected');\n\n // special aria-label for color refinements\n $('.refinements .color-attribute .selected').each(function () {\n var outerColorLink = $(this).parent();\n var colorText = outerColorLink.find('p').text().trim();\n outerColorLink.attr('aria-label', colorText + ', selected');\n });\n }\n\n if (window._lastFocus) {\n var clickedElement = $('#' + $(window._lastFocus).attr('id'));\n clickedElement.parents('.refinement').find('button').focus();\n }\n $('#filter-results-button').children('span').append(`(${numOfFilters})`);\n $('.hide-filters-btn').on('click', hideFilters);\n}\nfunction hideFilters() {\n var numOfFilters = $('span.selected').length;\n // if we are not on the search page, don't count the category in the count of refinements\n // if category refinement is hidden, it won't be included in the refinements, so don't subtract one in that case\n const categoryRefinement = $('.refinement.refinement-category');\n if (\n !window.location.href.includes('?q=') &&\n !window.location.href.includes('&q=') &&\n numOfFilters > 0 &&\n categoryRefinement.length\n ) {\n numOfFilters--;\n }\n if (numOfFilters <= 0) {\n $('.reset').css('display', 'none');\n } else {\n $('.reset').css('display', 'flex');\n }\n $('.refinements-to-hide').toggleClass('hide-refinements');\n if (!$('.refinements-to-hide').hasClass('hide-refinements')) {\n $('.search-results-main-content').addClass('col-md-14');\n $('.search-results-main-content').addClass('offset-md-1');\n $('.search-results-main-content').removeClass('custom-search-adjusted ');\n $('.grid-tile-container').removeClass('grid-tile-container-four');\n $('#product-search-results').children('.row').css('display', 'flex');\n $('.hide-sort-container').css('margin-left', '-1rem');\n $('.custom-select').addClass('ml-auto');\n $('.hide-filters-btn').text('HIDE FILTERS');\n $('.hide-filters-btn').append(` (${numOfFilters})`);\n } else {\n $('.search-results-main-content').removeClass('col-md-14');\n $('.search-results-main-content').addClass('custom-search-adjusted ');\n $('.search-results-main-content').removeClass('offset-md-1');\n $('.grid-tile-container').addClass('grid-tile-container-four');\n $('#product-search-results').children('.row').removeAttr('display');\n $('.custom-select').removeClass('ml-auto');\n $('.hide-filters-btn').text('SHOW FILTERS');\n $('.hide-filters-btn').append(` (${numOfFilters})`);\n }\n}\nfunction hideFiltersSetup() {\n var numOfFilters = $('span.selected').length;\n // if we are not on the search page, don't count the category in the count of refinements\n // if category refinement is hidden, it won't be included in the refinements, so don't subtract one in that case\n const categoryRefinement = $('.refinement.refinement-category');\n if (\n !window.location.href.includes('?q=') &&\n !window.location.href.includes('&q=') &&\n numOfFilters > 0 &&\n categoryRefinement.length\n ) {\n numOfFilters--;\n }\n if (numOfFilters <= 0) {\n $('.reset').css('display', 'none');\n } else {\n $('.reset').css('display', 'flex');\n }\n if (!$('.refinements-to-hide').hasClass('hide-refinements')) {\n $('.search-results-main-content').addClass('offset-md-1');\n $('.hide-filters-btn').text('HIDE FILTERS');\n } else {\n $('.grid-tile-container').addClass('grid-tile-container-four');\n $('.hide-filters-btn').text('SHOW FILTERS');\n }\n $('.hide-filters-btn').append(` (${numOfFilters})`);\n $('.hide-filters-btn').off('click');\n $('.hide-filters-btn').on('click', hideFilters);\n}\n$('.hide-filters-btn').on('click', hideFilters);\n$(window).on('resize', function () {\n if (window.innerWidth <= 1204) {\n var numOfFilters = $('span.selected').length;\n // if we are not on the search page, don't count the category in the count of refinements\n // if category refinement is hidden, it won't be included in the refinements, so don't subtract one in that case\n const categoryRefinement = $('.refinement.refinement-category');\n if (\n !window.location.href.includes('?q=') &&\n !window.location.href.includes('&q=') &&\n numOfFilters > 0 &&\n categoryRefinement.length\n ) {\n numOfFilters--;\n }\n $('.search-results-main-content').addClass('col-md-14');\n $('#product-search-results').children('.row').css('display', 'flex');\n $('.refinements-to-hide').removeClass('hide-refinements');\n $('.search-results-main-content').removeClass('custom-search-adjusted ');\n $('.hide-filters-btn').text('HIDE FILTERS');\n $('.hide-filters-btn').append(` (${numOfFilters})`);\n $('.grid-tile-container').removeClass('grid-tile-container-four');\n } else {\n return;\n }\n});\nfunction updateCategoryName() {\n if (!window.location.href.includes('?q=') && !window.location.href.includes('&q=')) {\n //Used to get the full category name\n var categoryName = '';\n var counter = 1;\n if ($('.breadcrumb-item').length > 3) {\n counter = 2;\n }\n for (let i = counter; i < $('.breadcrumb-item').length; i++) {\n categoryName += $('.breadcrumb-item')[i].innerText + ' ';\n //Remove first category (Men's Woman's kid's accessories, brand) for certain cases\n if (\n $('.breadcrumb-item')[i].innerText.includes('Shop All') ||\n ($('.breadcrumb-item')[i].innerText.includes('Accessories') && i > 1) ||\n $('.breadcrumb-item')[i - 1].innerText.includes('Brands') ||\n ($('.breadcrumb-item')[i - 1].innerText.includes(\"Kids'\") && i > 1)\n ) {\n categoryName = $('.breadcrumb-item')[i].innerText + ' ';\n }\n }\n $('#plp-search-heading-custom').text(categoryName);\n }\n}\n\nfunction setApplyFilterEnable() {\n // If there are no newly selected or deselected filters, disable the Apply Filters button\n var noNewlySelectedFilters =\n $('.filter-selected:not(.selected)').length + $('.selected:not(.filter-selected)').length == 0;\n\n // use class price-selected so button only is enabled when both dropdowns have a value\n var priceDropdownSelected =\n $('.price-dropdown.min-price').hasClass('price-selected') &&\n $('.price-dropdown.max-price').hasClass('price-selected');\n if (priceDropdownSelected) {\n noNewlySelectedFilters = false;\n }\n\n $('.apply-filters')\n .toggleClass('disabled', noNewlySelectedFilters)\n .attr('tabindex', noNewlySelectedFilters ? '-1' : '0')\n .attr('aria-disabled', noNewlySelectedFilters ? 'true' : 'false');\n}\n\n// push product list data to gtm data\nfunction gtmProductData() {\n gtmContainer.initPosition();\n\n var gtmdata = [];\n\n try {\n //SHOE-914 view all is reporting all productHits\n var gridContainer = $('.grid-tile-container'),\n gtmProducts = gridContainer.eq(0).find('.gtmproduct'),\n isViewAll = gridContainer.length > 0;\n if (isViewAll) {\n gtmProducts = gridContainer.eq(gridContainer.length - 1).find('.gtmproduct');\n }\n\n gtmProducts.each(function () {\n var data = $(this).data('object'),\n productName = data.name == null ? '' : data.name.replace(/\\'/g, \"'\"),\n category = data.category == null ? '' : data.category.replace(/\\'/g, \"'\"),\n brand = data.brand == null ? '' : data.brand.replace(/\\'/g, \"'\"),\n list = data.list == null ? '' : data.list.replace(/\\'/g, \"'\"),\n isCategory = $('.product-grid').find('.grid-footer-top').data('iscategory-search'),\n searchKeyword = $('.product-grid').find('.grid-footer-top').data('search-keyword');\n\n if (data.view == 'Category:') {\n gtmdata.push({\n id: data.id,\n name: productName,\n price: $(this).data('price'),\n brand: brand,\n category: category,\n position: $(this).data('position'),\n list: isCategory == true ? data.view + list : 'Search:' + searchKeyword,\n });\n }\n });\n setdatalayer.ProductCarousel(gtmdata);\n } catch (ex) {\n console.log('GTM-Error:' + ex);\n }\n}\n\n/**\n * Traps focus within refinement menu\n * @param {element} jQuery - the element to trap focus on\n */\nfunction trapMenuFocus(e) {\n var focusableEls = this.querySelectorAll(\n '.refinement-heading, .close, .refinement-actions button:not([aria-disabled=true])'\n ),\n firstFocusableEl = focusableEls[0],\n lastFocusableEl = focusableEls[focusableEls.length - 1],\n KEYCODE_TAB = 9;\n\n var isTabPressed = e.key === 'Tab' || e.keyCode === KEYCODE_TAB;\n var secondToLastEl = focusableEls[focusableEls.length - 2];\n\n if (!isTabPressed) {\n return;\n }\n\n if (e.shiftKey) {\n /* shift + tab */ if (document.activeElement === firstFocusableEl) {\n lastFocusableEl.focus();\n e.preventDefault();\n }\n } /* tab */ else {\n if (document.activeElement.parentElement === secondToLastEl) {\n var lastElId = lastFocusableEl.id;\n lastElId = '#' + lastElId;\n var lastRefineTab = $(lastElId);\n lastRefineTab.focus();\n e.preventDefault();\n }\n }\n}\n\nfunction focusFilter(filter) {\n if ($('#' + filter).length) {\n $('#' + filter)\n .closest('.collapsible-sm')\n .removeClass('active');\n $('#' + filter)\n .closest('.refinement-heading')\n .attr('aria-expanded', true);\n $('#' + filter).trigger('focus');\n }\n}\n\n// used to remove options higher than the selected value so that the \"to\" filter doesnt have access to values higher than the \"from\" filter\nfunction showHideMinPriceFilter() {\n var selectedMax = $('.price-dropdown.max-price').val();\n if (selectedMax) {\n $('.price-dropdown.min-price option').each(function () {\n var $element = $(this);\n var elementValue = $element.val();\n if (elementValue < selectedMax) {\n $element.prop('disabled', false);\n } else {\n $element.prop('disabled', true);\n }\n $element.toggle($element.val() < selectedMax);\n });\n }\n}\n\n// used to remove options lower than the selected value so that the \"to\" filter doesnt have access to values lower than the \"from\" filter\nfunction showHideMaxPriceFilter() {\n var selectedMin = $('.price-dropdown.min-price').val();\n if (selectedMin) {\n $('.price-dropdown.max-price option').each(function () {\n var $element = $(this);\n var elementValue = $element.val();\n if (elementValue > selectedMin) {\n $element.prop('disabled', false);\n } else {\n $element.prop('disabled', true);\n }\n $element.toggle($element.val() > selectedMin);\n });\n }\n}\n\nfunction removeDoublePriceSelect() {\n $('#refinement-id-price .price-refinement-link .selected').removeClass('selected');\n $('#refinement-id-price .price-refinement-link .filter-selected').removeClass('filter-selected');\n}\n\nfunction updateProductCount() {\n // update the number of products found at the top of the page above the refinements\n $('.num-items-span').text($('.product-grid .grid-footer .result-count > span').text());\n\n // update status ARIA live region for screen readers\n $('.num-items-sr.sr-only').text($('.product-grid .grid-footer .result-count > span').text());\n}\n\nfunction applyFiltersAjaxCall(url, $selectedFilter, callback, event) {\n $.spinner().start();\n $selectedFilter.trigger('search:filter', event);\n $.ajax({\n url: url,\n data: {\n page: $('.grid-footer').data('page-number'),\n selectedUrl: url,\n },\n method: 'GET',\n success: function (response) {\n $.spinner().stop();\n parseResults(response);\n gtmProductData();\n updateRefinements();\n swatchOverride();\n\n callback(response);\n },\n error: function () {\n $.spinner().stop();\n },\n complete: function () {\n $('.refinement-bar').toggleClass('hide-refinement-bar');\n hideFiltersSetup();\n updateProductCount();\n // $('.hide-filters-btn').on('click', hideFilters);\n },\n });\n}\n\nfunction swatchOverride() {\n $('.swatch-option').on('mouseover touchstart', function (e) {\n e.preventDefault();\n let tile = $(this).closest('.product-tile');\n tile.find('.tile-image').attr('src', this.dataset.productImg);\n tile.find('.product-tile-link').attr('href', this.href);\n tile.find('.product-name-link').attr('href', this.href);\n tile.find('.swatch-circle').removeClass('selected-plp');\n $(this).find('img.swatch-circle').addClass('selected-plp');\n });\n}\n\nfunction adjustRefinementCount() {\n //Added to either hide or remove the clear all button on load\n var numOfFilters = $('span.selected').length;\n // if we are not on the search page, don't count the category in the count of refinements\n // if category refinement is hidden, it won't be included in the refinements, so don't subtract one in that case\n const categoryRefinement = $('.refinement.refinement-category');\n if (\n !window.location.href.includes('?q=') &&\n !window.location.href.includes('&q=') &&\n numOfFilters > 0 &&\n categoryRefinement.length\n ) {\n numOfFilters--;\n }\n if (numOfFilters <= 0) {\n $('.reset').css('display', 'none');\n } else {\n $('.reset').css('display', 'flex');\n }\n}\n\nfunction handleShowMoreBtn(e) {\n var content = $(e.currentTarget).siblings('.content')[0];\n var showLessText = $(e.currentTarget).data('showLessText');\n var showMoreText = $(e.currentTarget).data('showMoreText');\n\n var initiallyVisibleRefinements = $(e.currentTarget).siblings('.original-refinement-values')[0];\n var allRefinements = $(e.currentTarget).siblings('.all-refinement-values')[0];\n\n if ($(content).hasClass('initial-refinement-values')) {\n $(content).removeClass('initial-refinement-values');\n $(content).addClass('all-refinement-values');\n $(content).html($(allRefinements).html());\n $(e.currentTarget).text(showLessText);\n } else {\n $(content).removeClass('all-refinement-values');\n $(content).addClass('initial-refinement-values');\n $(content).html($(initiallyVisibleRefinements).html());\n $(e.currentTarget).text(showMoreText);\n }\n}\n\nfunction updateFilterNumber() {\n var $refinments =\n $('.menu-toggleable-left').css('position') !== 'absolute'\n ? $('.refinement')\n : $('.refinement:not(.refinement-category)');\n //Variable to keep track of all the filters\n var numOfFilters = 0;\n $refinments.each(function () {\n var $this = $(this);\n // If there are selected refinements, add them to the total\n if ($this.find('span.selected').length > 0 || $this.find('.price-dropdown.min-price').hasClass('selected')) {\n numOfFilters += $this.find('span.selected').length;\n }\n });\n $('#filter-results-button').children('span').append(`  (${numOfFilters})`);\n}\n\n$(document).ready(updateFilterNumber);\n$(document).ready(updateCategoryName);\n$(document).ajaxComplete(function () {\n $('.refinement-bar').toggleClass('hide-refinement-bar');\n hideFiltersSetup();\n});\n\nmodule.exports = {\n init: function () {\n $(document).ready(function () {\n swatchOverride();\n adjustRefinementCount();\n hideFiltersSetup();\n\n $(document).on('click', '.show-more-button', handleShowMoreBtn);\n });\n },\n\n filter: function () {\n $('.refinement-bar')[0].addEventListener('keydown', trapMenuFocus);\n // Display refinements bar when Menu icon clicked\n $('.container').on('click', 'button.filter-results', function () {\n $('.refinement-bar, .modal-background').show();\n $('.refinements .refinement-category').addClass('collapsible-sm');\n $('.refinements .selected').addClass('filter-selected');\n // special aria-label for color refinements\n $('.refinements .color-attribute .selected').each(function () {\n var outerColorLink = $(this).parent();\n var colorText = outerColorLink.find('p').text().trim();\n outerColorLink.attr('aria-label', colorText + ', selected');\n });\n setApplyFilterEnable();\n setTimeout(function () {\n $('#refinement-heading-button-1').focus();\n }, 0);\n disableBackgroundElements();\n });\n },\n\n closeRefinments: function () {\n // Refinements close button\n $('.container').on('click', '.refinement-bar button.close, .modal-background', function () {\n closeRefinements();\n enableBackgroundElements();\n setTimeout(function () {\n $('#filter-results-button').focus();\n }, 0);\n });\n },\n\n resize: function () {\n // Close refinement bar and hide modal background if user resizes browser\n $(window).resize(function () {\n !isMobile() && closeRefinements();\n enableBackgroundElements();\n });\n },\n\n sort: function () {\n // Handle sort order menu selection\n $('.product-grid').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 gtmProductData();\n swatchOverride();\n $('.lazyload').lazyload();\n $.spinner().stop();\n window.history.replaceState({}, '', $('.permalink').val());\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 $.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 $('.show-more').remove();\n $('.product-grid').append(response);\n $('.grid-header:not(:first-child)').remove();\n $('.grid-tile-container').eq(0).addClass('is-start');\n updateSortOptions(response);\n gtmProductData();\n swatchOverride();\n $('.lazyload').lazyload();\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n },\n });\n });\n\n // Pagination\n $('.container').on('click', '.pagination a', function (e) {\n e.preventDefault();\n e.stopPropagation();\n var showMoreUrl = $(this).data('url');\n $.spinner().start();\n $(this).trigger('search:showMore', e);\n var target = $(this);\n if (target.hasClass('view-all')) {\n $('.product-grid').addClass('view-all');\n $('.grid-tile-container').eq(0).addClass('is-start');\n } else {\n $('.product-grid').removeClass('view-all');\n $('.grid-tile-container').removeClass('is-start');\n }\n\n $.ajax({\n url: showMoreUrl,\n data: { selectedUrl: showMoreUrl },\n method: 'GET',\n success: function (response) {\n if (target.hasClass('view-all')) {\n $('.product-grid').html(response);\n } else if ($('.product-grid').hasClass('view-all')) {\n $('.product-grid').append(response);\n } else {\n $('.product-grid').html(response);\n $('.grid-tile-container').removeClass('is-start');\n }\n updateSortOptions(response);\n $('.lazyload').lazyload();\n\n if (!$('.product-grid').hasClass('view-all')) {\n var page = $('.pagination').find('.current-page').data('page');\n var pagecount = $('.pagination').find('.current-page').data('pagecount');\n if (page > 1) {\n $('.pagination').find('.previous-page').removeClass('disabled');\n $('.pagination').find('.previous-page').attr('tabindex', '0');\n } else {\n $('.pagination').find('.previous-page').addClass('disabled');\n $('.pagination').find('.previous-page').attr('tabindex', '-1');\n }\n\n if (page >= pagecount) {\n $('.pagination').find('.next-page').addClass('disabled');\n $('.pagination').find('.next-page').attr('tabindex', '-1');\n } else {\n $('.pagination').find('.next-page').removeClass('disabled');\n $('.pagination').find('.next-page').attr('tabindex', '0');\n }\n }\n\n gtmProductData();\n swatchOverride();\n\n $.spinner().stop();\n $('html, body').animate({ scrollTop: 0 });\n\n var currentURL = new URL(window.location);\n\n var updateGridURL = showMoreUrl;\n\n var url =\n currentURL.href.toString().split('?').splice(0, 1) +\n '?' +\n updateGridURL.split('?').splice(1, 1);\n\n window.history.pushState({}, null, url);\n },\n error: function () {\n $.spinner().stop();\n },\n });\n });\n },\n\n applyFilter: function () {\n // Handle refinement value deselection and reset click\n $('.container').on('click', '.filter-bar a.reset, .filter-value a, .swatch-filter a', function (e) {\n e.preventDefault();\n e.stopPropagation();\n\n applyFiltersAjaxCall(\n e.currentTarget.href,\n $(this),\n function () {\n $('#filter-results-button').focus();\n },\n e\n );\n });\n\n // Handle refinement value selection\n $('.container').on('click', '.refinements li a', function (e) {\n e.preventDefault();\n e.stopPropagation();\n\n var $refinementsContainer = $('.refinements');\n $refinementsContainer.data('selectedFilter', $(this).attr('id'));\n var $this = $(this),\n $filterResults = $('.filter-results');\n\n // Toggle select behavior only when Filters menu is visible (i.e. mobile views)\n if ($filterResults.is(':visible')) {\n // Category and price refinement links behave like radio buttons; only one is active at a given time\n if ($this.hasClass('category-refinement-link')) {\n $('.category-refinement-link span').removeClass('filter-selected');\n }\n if ($this.hasClass('price-refinement-link')) {\n $('.price-refinement-link span').removeClass('filter-selected');\n $('.price-dropdown .selected').removeClass('selected');\n }\n\n $this.find('span').toggleClass('filter-selected');\n\n // special aria-label for color refinements\n if ($this.parent().hasClass('color-attribute')) {\n var colorText = $this.find('p').text().trim();\n if ($this.find('span').hasClass('filter-selected')) {\n $this.attr('aria-label', `${colorText}, selected`);\n } else {\n $this.attr('aria-label', `${colorText}`);\n }\n }\n\n setApplyFilterEnable();\n return false;\n }\n\n applyFiltersAjaxCall(\n e.currentTarget.href,\n $this,\n function (response) {\n // Update SEO by fetching it from the target category page and changing the page url state\n var categoryLink = e.currentTarget;\n $('.search-results .seo-content-slot').last().html($(response).find('.seo-content-slot').last());\n history.replaceState(\n { category: categoryLink.text.trim() },\n categoryLink.text.trim(),\n categoryLink.href\n );\n\n showHideMinPriceFilter();\n showHideMaxPriceFilter();\n\n updateCategoryName();\n var selectedFilter = $refinementsContainer.data('selectedFilter');\n focusFilter(selectedFilter);\n },\n e\n );\n });\n\n // enable spacebar for filters\n document.onkeypress = function (e) {\n e = e || window.event;\n var charCode = e.keyCode || e.which;\n if (charCode === 32 && $(document.activeElement).is('.container .refinements li a')) {\n e.preventDefault();\n $(e.target).click();\n return false;\n }\n };\n\n // handle price drop down select\n $(document).on('change', '.price-dropdown', function (e) {\n e.preventDefault();\n e.stopPropagation();\n\n // ensure that none of the radio boxes for price are checked\n removeDoublePriceSelect();\n\n var $refinementsContainer = $('.refinements');\n var $this = $(this);\n $refinementsContainer.data('selectedFilter', $(this).attr('id'));\n var $dropdownContainer = $this.closest('.price-dropdown');\n var min;\n var max;\n\n // make sure apply filter is enabled on mobile\n if ($('.filter-results').is(':visible')) {\n $this.addClass('price-selected');\n setApplyFilterEnable();\n }\n\n // hides/shows price options based on selections\n if ($dropdownContainer.hasClass('min-price')) {\n showHideMaxPriceFilter();\n } else {\n showHideMinPriceFilter();\n }\n\n min = $('.price-dropdown.min-price').val();\n max = $('.price-dropdown.max-price').val();\n\n // Make sure both values are selected before ajax call\n if (max === '') {\n $('.price-dropdown.max-price').trigger('click');\n return;\n } else if (min === '') {\n $('.price-dropdown.min-price').trigger('click');\n return;\n }\n\n // edit url to use new pmin and pmax\n var url = $dropdownContainer.attr('data-href');\n var urlObj = new URL(url, window.location.origin);\n urlObj.searchParams.set('pmin', min);\n urlObj.searchParams.set('pmax', max);\n url = urlObj.toString();\n\n // make ajax call\n if (url && !$('.filter-results').is(':visible')) {\n applyFiltersAjaxCall(\n url,\n $(this),\n function (response) {\n // Update SEO by fetching it from the target category page and changing the page url state\n $('.search-results .seo-content-slot')\n .last()\n .html($(response).find('.seo-content-slot').last());\n history.replaceState({ category: 'Price' }, 'Price', url);\n\n showHideMinPriceFilter();\n showHideMaxPriceFilter();\n\n var selectedFilter = $refinementsContainer.data('selectedFilter');\n focusFilter(selectedFilter);\n },\n e\n );\n }\n });\n\n // Apply Filters button click\n $('.container').on('click', '.apply-filters', function (e) {\n e.preventDefault();\n e.stopPropagation();\n\n var $this = $(this),\n filterGroups = {},\n buildQuery = '',\n prefCount = 1,\n $refinementsContainer = $('.refinements'),\n searchURL = $refinementsContainer.data('url') + '?',\n searchString = $refinementsContainer.data('q'),\n $minPriceFromButtons = $('.price-dropdown.min-price .selected'),\n $maxPriceFromButtons = $('.price-dropdown.max-price .selected'),\n $minDropdownOption = $('.price-dropdown.min-price'),\n $maxDropdownOption = $('.price-dropdown.max-price');\n\n if (searchString) {\n buildQuery = 'q=' + searchString + '&';\n }\n var isCategoryRefinementShown = false;\n // Build the query string based on all refinement li's that contain the selected class.\n $('.refinement .filter-selected').each(function () {\n var $link = $(this).parent(),\n filterData = {\n id: $link.data('id'),\n value: $link.data('value'),\n isCategory: !!$link.data('category'),\n isPrice: !!$link.data('price'),\n min: $link.data('from'),\n max: $link.data('to'),\n };\n if (filterData.isCategory) {\n // Only 1 category refinement is active so it is ok to put the name/value pair in the build query\n buildQuery += 'cgid=' + filterData.value + '&';\n isCategoryRefinementShown = true;\n } else if (\n filterData.isPrice &&\n $minPriceFromButtons.length === 0 &&\n $maxPriceFromButtons.length === 0\n ) {\n // Only 1 price refinement is active so it is ok to put the name/value pairs in the build query\n buildQuery += 'pmin=' + filterData.min + '&';\n buildQuery += 'pmax=' + filterData.max + '&';\n } else {\n // Other refinement values are grouped based on their refinement IDs\n if (filterGroups[filterData.id]) {\n filterGroups[filterData.id] += '|' + filterData.value;\n } else {\n filterGroups[filterData.id] = filterData.value;\n }\n }\n });\n if (!isCategoryRefinementShown) {\n buildQuery += 'cgid=' + $('.category-id').val() + '&';\n }\n\n if ($minPriceFromButtons.length > 0 && $maxPriceFromButtons.length > 0) {\n // Only 1 price refinement is active so it is ok to put the name/value pairs in the build query\n buildQuery += 'pmin=' + $minPriceFromButtons.data('from') + '&';\n buildQuery += 'pmax=' + $maxPriceFromButtons.data('to') + '&';\n } else if ($minDropdownOption.val() !== '' && $maxDropdownOption.val() !== '') {\n // This is for when the dropdowns are used instead of the buttons\n buildQuery += 'pmin=' + $minDropdownOption.val() + '&';\n buildQuery += 'pmax=' + $maxDropdownOption.val() + '&';\n }\n\n // Append the other grouped refinement values to the build query\n Object.keys(filterGroups).forEach(function (filterId) {\n if (filterId != 'undefined') {\n buildQuery +=\n 'prefn' +\n prefCount +\n '=' +\n filterId +\n '&' +\n 'prefv' +\n prefCount +\n '=' +\n filterGroups[filterId] +\n '&';\n prefCount++;\n }\n });\n\n $.spinner().start();\n $this.trigger('search:filter', e);\n $.ajax({\n url: searchURL + buildQuery,\n data: {\n selectedUrl: searchURL + buildQuery,\n },\n method: 'GET',\n success: function (response) {\n $.spinner().stop();\n $('.close').trigger('click');\n parseResults(response);\n gtmProductData();\n updateRefinements();\n swatchOverride();\n $('#filter-results-button').focus();\n $('.search-results .seo-content-slot').last().html($(response).find('.seo-content-slot').last());\n history.replaceState({}, null, searchURL + buildQuery);\n updateCategoryName();\n },\n error: function () {\n $.spinner().stop();\n },\n });\n });\n },\n\n showTabs: function () {\n // Display tab results from the search\n $('.container').on(\n 'shown.bs.tab',\n 'a[href=\"#product-search-results\"], a[href=\"#content-search-results-pane\"]',\n function () {\n var carousels = require('../components/carousel');\n carousels.refresh();\n }\n );\n },\n\n handlePriceRangeDropdowns: function () {\n $(window).on('load', function () {\n showHideMinPriceFilter();\n showHideMaxPriceFilter();\n });\n },\n};\n\nfunction isMobile() {\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n}\n","'use strict';\n\nmodule.exports = function (include) {\n if (typeof include === 'function') {\n include();\n } else if (typeof include === 'object') {\n Object.keys(include).forEach(function (key) {\n if (typeof include[key] === 'function') {\n include[key]();\n }\n });\n }\n};\n","/*!\n * Lazy Load - JavaScript plugin for lazy loading images\n *\n * Copyright (c) 2007-2017 Mika Tuupola\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/mit-license.php\n *\n * Project home:\n * https://appelsiini.net/projects/lazyload\n *\n * Version: 2.0.0-beta.2\n *\n */\n\n(function (root, factory) {\n if (typeof exports === \"object\") {\n module.exports = factory(root);\n } else if (typeof define === \"function\" && define.amd) {\n define([], factory(root));\n } else {\n root.LazyLoad = factory(root);\n }\n}) (typeof global !== \"undefined\" ? global : this.window || this.global, function (root) {\n\n \"use strict\";\n\n const defaults = {\n src: \"data-src\",\n srcset: \"data-srcset\",\n selector: \".lazyload\"\n };\n\n /**\n * Merge two or more objects. Returns a new object.\n * @private\n * @param {Boolean} deep If true, do a deep (or recursive) merge [optional]\n * @param {Object} objects The objects to merge together\n * @returns {Object} Merged values of defaults and options\n */\n const extend = function () {\n\n let extended = {};\n let deep = false;\n let i = 0;\n let length = arguments.length;\n\n /* Check if a deep merge */\n if (Object.prototype.toString.call(arguments[0]) === \"[object Boolean]\") {\n deep = arguments[0];\n i++;\n }\n\n /* Merge the object into the extended object */\n let merge = function (obj) {\n for (let prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n /* If deep merge and property is an object, merge properties */\n if (deep && Object.prototype.toString.call(obj[prop]) === \"[object Object]\") {\n extended[prop] = extend(true, extended[prop], obj[prop]);\n } else {\n extended[prop] = obj[prop];\n }\n }\n }\n };\n\n /* Loop through each object and conduct a merge */\n for (; i < length; i++) {\n let obj = arguments[i];\n merge(obj);\n }\n\n return extended;\n };\n\n function LazyLoad(images, options) {\n this.settings = extend(defaults, options || {});\n this.images = images || document.querySelectorAll(this.settings.selector);\n this.observer = null;\n this.init();\n }\n\n LazyLoad.prototype = {\n init: function() {\n\n /* Without observers load everything and bail out early. */\n if (!root.IntersectionObserver) {\n this.loadImages();\n return;\n }\n\n let self = this;\n let observerConfig = {\n root: null,\n rootMargin: \"0px\",\n threshold: [0]\n };\n\n this.observer = new IntersectionObserver(function(entries) {\n entries.forEach(function (entry) {\n if (entry.intersectionRatio > 0) {\n self.observer.unobserve(entry.target);\n let src = entry.target.getAttribute(self.settings.src);\n let srcset = entry.target.getAttribute(self.settings.srcset);\n if (\"img\" === entry.target.tagName.toLowerCase()) {\n if (src) {\n entry.target.src = src;\n }\n if (srcset) {\n entry.target.srcset = srcset;\n }\n } else {\n entry.target.style.backgroundImage = \"url(\" + src + \")\";\n }\n }\n });\n }, observerConfig);\n\n this.images.forEach(function (image) {\n self.observer.observe(image);\n });\n },\n\n loadAndDestroy: function () {\n if (!this.settings) { return; }\n this.loadImages();\n this.destroy();\n },\n\n loadImages: function () {\n if (!this.settings) { return; }\n\n let self = this;\n this.images.forEach(function (image) {\n let src = image.getAttribute(self.settings.src);\n let srcset = image.getAttribute(self.settings.srcset);\n if (\"img\" === image.tagName.toLowerCase()) {\n if (src) {\n image.src = src;\n }\n if (srcset) {\n image.srcset = srcset;\n }\n } else {\n image.style.backgroundImage = \"url(\" + src + \")\";\n }\n });\n },\n\n destroy: function () {\n if (!this.settings) { return; }\n this.observer.disconnect();\n this.settings = null;\n }\n };\n\n root.lazyload = function(images, options) {\n return new LazyLoad(images, options);\n };\n\n if (root.jQuery) {\n const $ = root.jQuery;\n $.fn.lazyload = function (options) {\n options = options || {};\n options.attribute = options.attribute || \"data-src\";\n new LazyLoad($.makeArray(this), options);\n return this;\n };\n }\n\n return LazyLoad;\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":""}