PageSourceSearch

https://www.academy.com/static-assets/prod1east_component_registry…_category_carousel.component.js?cacheId=v17

js academy.com collected 2026-10-01 10:32:59 UTC 41,786 bytes, 3 lines download raw bytes

vendor: 4,254 bytes, lines 1-2
1/*! For license information please see personalized_category_carousel.component.js.LICENSE.txt */
2!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("axios"),require("prop-types"),require("react"),require("react-dom"),require("react-redux"),require("@emotion/react"),require("lodash")):"function"==typeof define&&define.amd?define("ASOPM",[,,,,,,],t):"object"==typeof exports?exports.ASOPM=t(require("axios"),require("prop-types"),require("react"),require("react-dom"),require("react-redux"),require("@emotion/react"),require("lodash")):(e.ASOPM=e.ASOPM||{},e.ASOPM.personalized_category_carousel=t(e.axios,e.PropTypes,e.React,e.ReactDOM,e.ReactRedux,e.EmotionReact,e.lodash))}(this,((e,t,r,n,o,i,a)=>(()=>{var c={338:(e,t,r)=>{"use strict";var n=r(569);n.createRoot,t.c=n.hydrateRoot},814:t=>{"use strict";t.exports=e},956:e=>{"use strict";e.exports=t},791:e=>{"use strict";e.exports=r},569:e=>{"use strict";e.exports=n},211:e=>{"use strict";e.exports=o},216:e=>{"use strict";e.exports=i},787:e=>{"use strict";e.exports=a},633:(e,t,r)=>{var n=r(738).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,a=i.hasOwnProperty,c=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},s=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(t){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof w?t:w,i=Object.create(o.prototype),a=new L(n||[]);return c(i,"_invoke",{value:E(e,r,a)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=p;var v="suspendedStart",g="suspendedYield",m="executing",y="completed",b={};function w(){}function x(){}function S(){}var C={};f(C,s,(function(){return this}));var _=Object.getPrototypeOf,j=_&&_(_(T([])));j&&j!==i&&a.call(j,s)&&(C=j);var O=S.prototype=w.prototype=Object.create(C);function P(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function r(o,i,c,l){var s=h(e[o],e,i);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==n(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,c,l)}),(function(e){r("throw",e,c,l)})):t.resolve(d).then((function(e){u.value=e,c(u)}),(function(e){return r("throw",e,c,l)}))}l(s.arg)}var o;c(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function E(e,r,n){var o=v;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=N(c,n);if(l){if(l===b)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?y:g,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=y,n.method="throw",n.arg=s.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[s];if(r)return r.call(e);
vendor: 1,086 bytes, line 2
2if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return x.prototype=S,c(O,"constructor",{value:S,configurable:!0}),c(S,"constructor",{value:x,configurable:!0}),x.displayName=f(S,d,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===x||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,f(e,d,"GeneratorFunction")),e.prototype=Object.create(O),e},r.awrap=function(e){return{__await:e}},P(k.prototype),f(k.prototype,u,(function(){return this})),r.AsyncIterator=k,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new k(p(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(O),f(O,d,"Generator"),f(O,s,(function(){return this})),f(O,"toString",(function(){return"[object Generator]"}
2)),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=T,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,r)=>{var n=r(633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},l={};function s(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={exports:{}};return c[e](r,r.exports,s),r.exports}(()=>{s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t}})(),(()=>{s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),void 0!==s&&Object.defineProperty(s,"p",{get:function(){try{if("string"!=typeof ASOPMEnv.publicPaths.personalized_category_carousel)throw new Error("WebpackRequireFrom: 'ASOPMEnv.publicPaths['personalized_category_carousel']' is not a string or not available at runtime. See https://github.com/agoldis/webpack-require-from#troubleshooting");return ASOPMEnv.publicPaths.personalized_category_carousel}catch(e){return console.error(e),"/webpack/"}},set:function(e){}});var u={};return(()=>{"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function t(t,r){if(t){if("string"==typeof t)return e(t,r);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e(t,r):void 0}}function r(r){return function(t){if(Array.isArray(t))return e(t)}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||t(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t,r,n,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,o)}function o(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;
2!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,r)||t(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}function c(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}s.r(u),s.d(u,{default:()=>pt});var l=s(756),d=s.n(l),f=s(791),p=s.n(f),h=s(338);function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v.apply(null,arguments)}function g(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var m=s(956),y=s.n(m),b=s(216),w=["auid","size","color","className","children"],x=p().forwardRef((function(e,t){var r=e.auid,n=e.size,o=void 0===n?"md":n,i=e.color,a=void 0===i?"blue":i,c=e.className,l=e.children,s=g(e,w),u=p().useMemo((function(){return"uiBtn circleBtn ".concat(o," ").concat(a," focusable ").concat(c||"").trim()}),[o,a,c]);return(0,b.jsx)("button",v({ref:t,type:"button",className:u,"data-auid":r},s),(0,b.jsx)("span",{className:"insetCircle"},(0,b.jsx)("span",{className:"contents"},l)))}));x.propTypes={auid:y().string,size:y().oneOf(["sm","md","lg"]),color:y().oneOf(["blue","gray"]),className:y().string,children:y().oneOfType([y().node,y().arrayOf(y().node)]).isRequired};var S=function(){return(0,b.jsx)("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},(0,b.jsx)("path",{d:"M16.5 3L7.5 12L16.5 21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))},C=function(){return(0,b.jsx)("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},(0,b.jsx)("path",{d:"M7.5 3L16.5 12L7.5 21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))},_=function(){return(0,b.jsx)("svg",{"aria-hidden":"true",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},(0,b.jsx)("path",{d:"M8 2L4 6L8 10",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"}))},j=function(){return(0,b.jsx)("svg",{"aria-hidden":"true",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},(0,b.jsx)("path",{d:"M4 2L8 6L4 10",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"}))};const O="carousel--gtD0D",P="wrapper--hH7mi";var k=["children","className"],E=p().forwardRef((function(e,t){var r=e.children,n=e.className,o=g(e,k),i=p().useMemo((function(){return"".concat(O," ").concat(n||"").trim()}),[n]);return(0,b.jsx)("div",{className:P},(0,b.jsx)("div",v({ref:t,className:i},o),r))}));E.propTypes={children:y().node,className:y().string};var N=s(787),R=function(){var e,t,r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=o.carouselRef,a=o.index,c=o.setSavedCarouselPosition,l=o.behavior,s=(null==i||null===(e=i.current)||void 0===e?void 0:e.childNodes)||[];null==i||null===(t=i.current)||void 0===t||t.scrollTo({behavior:l,left:null===(r=s[a])||void 0===r?void 0:r.offsetLeft,top:null===(n=s[a])||void 0===n?void 0:n.offsetTop}),"function"==typeof c&&c(a)},I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.index,r=e.totalSlides-e.visibleSlides;return t>r&&(t=r),t<0&&(t=0),t},L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.carouselRef,r=e.totalSlides,n=e.visibleSlides,o=e.savedCarouselPosition,i=e.setSavedCarouselPosition,a=e.towardEnd,c=I({index:o+(a?n:-n),totalSlides:r,visibleSlides:n});R({carouselRef:t,index:c,setSavedCarouselPosition:i,behavior:"smooth"})},T=(0,N.debounce)((function(e){var t=e.carouselRef,r=e.setSavedCarouselPosition,n=e.visibleSlides,i=e.totalSlides,a=e.manualScrolling,c=e.isProgramaticScroll,l=e.setIsProgramaticScroll,s=e.scrollsVertically,u=e.setSavedCarouselPositionAdjustment,d=e.visibilityThreshold,f=e.handleUpdate
2Controllers;if(a)if(a&&d&&f(),c)l(!1);else{var p=t.current.childNodes,h=p.length;if(!(h<2)){var v,g,m,y,b,w,x=o(p,2),S=x[0],C=x[1],_=S.getBoundingClientRect(),j=C.getBoundingClientRect();if(s){var O=t.current;v=O.scrollTop,g=O.scrollHeight,m=O.clientHeight,y=S.offsetHeight,b=_.bottom,w=j.top}else{var P=t.current;v=P.scrollLeft,g=P.scrollWidth,m=P.clientWidth,y=S.offsetWidth,b=_.right,w=j.left}var k=i-n,E=v/(y+(w-b)),N=Math.round(E),R=Math.ceil(Math.abs(g-m)),I=Math.ceil(v)>=R-1,L=0===v,T=E<k&&E>k-1;2!==h?E>0&&E<1?(r(1),u(0)):I?(r(k),u(0)):T?(r(k-1),u(1)):(r(N),u(0)):I?r(1):L&&r(0)}}}),100),A=function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.carouselRef,o=r.setSavedCarouselPosition;(0,N.isFunction)(null==n||null===(e=n.current)||void 0===e?void 0:e.scrollTo)&&(null==n||null===(t=n.current)||void 0===t||t.scrollTo({left:0,top:0})),(0,N.isFunction)(o)&&o(0)},D=function(e){return null==e?void 0:e.filter((function(e){return(window.innerWidth>=e.min||null===e.min)&&(window.innerWidth<=e.max||null===e.max)}))[0].slides},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.totalSlides,r=e.breakpoints,n=e.threshold,i=e.scrollsVertically,a=e.manualScrolling,c=e.slidesFocusElements,l=e.loading,s=e.visibilityThreshold,u=p().useRef(null),d=p().useRef(null),f=p().useRef(null),h=o(p().useState(0),2),v=h[0],g=h[1],m=o(p().useState(!1),2),y=m[0],b=m[1],w=o(p().useState(!1),2),x=w[0],S=w[1],C=o(p().useState(0),2),_=C[0],j=C[1],O=p().useRef(null),P=o(p().useState(!1),2),k=P[0],E=P[1],M=o(p().useState(0),2),W=M[0],z=M[1],B=o(p().useState([]),2),F=B[0],q=B[1],H=o(p().useState(0),2),V=H[0],G=H[1],U=p().useRef(null);p().useEffect((function(){U.current=window.innerWidth}),[]);var K=function(){return function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.visibleSlides,o=r.totalSlides,i=r.savedCarouselPosition,a=r.setShowCarouselNextController,c=r.setShowCarouselPreviousController,l=r.carouselRef,s=r.scrollsVertically,u=r.manualScrolling,d=r.visibilityThreshold;if(u&&d&&l.current){var f=l.current.childNodes,p=f.length;if(p>0){var h=f[0],v=f[p-1],g=l.current.getBoundingClientRect();if(h){var m,y,b=h.getBoundingClientRect();s?(m=Math.min(b.bottom,g.bottom)-Math.max(b.top,g.top),y=b.height):(m=Math.min(b.right,g.right)-Math.max(b.left,g.left),y=b.width),t=!(m>0&&m/y>=d)}if(v){var w,x,S=v.getBoundingClientRect();s?(w=Math.min(S.bottom,g.bottom)-Math.max(S.top,g.top),x=S.height):(w=Math.min(S.right,g.right)-Math.max(S.left,g.left),x=S.width),e=!(w>0&&w/x>=d)}}}else e=i<o-n,t=i>0;a&&a(e),c&&c(t)}({visibleSlides:v,totalSlides:t,savedCarouselPosition:_,showCarouselNextController:y,showCarouselPreviousController:x,setShowCarouselNextController:b,setShowCarouselPreviousController:S,carouselRef:u,scrollsVertically:i,manualScrolling:a,visibilityThreshold:s})};p().useEffect((function(){q(Array(t).fill(null).map((function(e,t){var r=_+W;return!(t>=r&&t<r+v)})))}),[t,v,_,W]),p().useEffect((function(){t<V+1&&G(0)}),[t]);var Y=function(){return A({carouselRef:u,setSavedCarouselPosition:j})},$=p().useCallback((function(){var e;O.current=new IntersectionObserver((function(e){g(e.reduce((function(e,t){var r=t.boundingClientRect,n=t.intersectionRect,o=r.width===n.width,a=r.height===n.height;return(i?a:o)?e+1:e}),0)),O.current.disconnect(),O.current=null}),{root:u.current}),null===(e=u.current)||void 0===e||null===(e=e.childNodes)||void 0===e||e.forEach((function(e){return O.current.observe(e)}))}),[]),Z=p().useCallback((0,N.debounce)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.threshold,r=e.setSavedCarouselPosition,n=e.carouselRef,o=e.setVisibleSlides,i=e.breakpoints,a=e.setVisibleSlidesWithObserver,c=e.previousWindowWidth,l=e.visibilityThreshold,s=e.manualScrolling,u=e.handleUpdateControllers,d=window.innerWidth;c&&c.current!==d&&(c.current=d,s&&l&&u(),d>=t&&(A({carouselRef:n,setSavedCarouselPosition:r}),i?o(D(i)):a()))}({threshold:n,setSavedCarouselPosition:j,carouselRef:u,setVisibleSlides:g,breakpoints:r,setVisibleSlidesWithObserver:$,previousWindowWidth:U,visibilityThreshold:s,manualScrolling:a,handleUpdate
2Controllers:K})}),100),[]);return p().useEffect((function(){r&&g(D(r))}),[]),p().useEffect((function(){r||l||(Y(),$())}),[t,l]),p().useEffect((function(){a&&s||K()}),[_]),p().useEffect((function(){K(),Y()}),[v,t]),p().useEffect((function(){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.carouselPreviousControllerRef,r=e.carouselNextControllerRef,n=e.showCarouselPreviousController,o=e.showCarouselNextController;document.activeElement===(null==t?void 0:t.current)?!n&&o&&r.current.focus():document.activeElement===(null==r?void 0:r.current)&&!o&&n&&t.current.focus()}({showCarouselPreviousController:x,showCarouselNextController:y,carouselPreviousControllerRef:f,carouselNextControllerRef:d})}),[x,y]),p().useEffect((function(){return window.addEventListener("resize",Z),function(){return window.removeEventListener("resize",Z)}}),[Z]),{handleScrollCarousel:function(e){if(a){var r=_+W;E(!0),z(0),L({carouselRef:u,totalSlides:t,visibleSlides:v,savedCarouselPosition:r,setSavedCarouselPosition:j,towardEnd:e})}else L({carouselRef:u,totalSlides:t,visibleSlides:v,savedCarouselPosition:_,setSavedCarouselPosition:j,towardEnd:e})},handleOnScroll:function(){return T({carouselRef:u,setSavedCarouselPosition:j,visibleSlides:v,totalSlides:t,manualScrolling:a,isProgramaticScroll:k,setIsProgramaticScroll:E,scrollsVertically:i,setSavedCarouselPositionAdjustment:z,visibilityThreshold:s,handleUpdateControllers:K})},handleResetCarousel:Y,onFocusSlide:function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.index,r=e.totalSlides,n=e.carouselRef,o=e.visibleSlides,i=e.setSavedCarouselPosition;return R({carouselRef:n,index:I({index:t,totalSlides:r,visibleSlides:o}),setSavedCarouselPosition:i})}({index:e,totalSlides:t,carouselRef:u,visibleSlides:v,setSavedCarouselPosition:j})},carouselRef:u,carouselNextControllerRef:d,carouselPreviousControllerRef:f,showCarouselNextController:y,showCarouselPreviousController:x,savedCarouselPosition:_,setSavedCarouselPosition:j,visibleSlides:v,onKeyDownSlide:function(e){var r,n,o=e.key,i=e.target,a=null!=c&&c.current?c.current:u.current.childNodes,l=i===a[0],s=F.findIndex((function(e){return!e})),d=i===a[s],f=i===a[t-1],p=F.findLastIndex((function(e){return!e})),h=i===a[p],g=0;switch(o){case"ArrowDown":case"ArrowRight":e.preventDefault(),f?(r=0,n=!0):h?(r=p+1,n=!0):(r=V+1,n=!1);break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),l?(r=t-1,n=!0):d?(r=s-1,g=v-1,n=!0):(r=V-1,n=!1);break;default:return}if(a[r].focus({preventScroll:!0}),G(r),n){var m=I({index:r-=g,totalSlides:t,visibleSlides:v});R({carouselRef:u,index:m,behavior:"smooth",setSavedCarouselPosition:j})}},onKeyDownController:function(e){var r=e.key,n=e.target,o=e.shiftKey,i=null!=c&&c.current?c.current:u.current.childNodes,a=n===d.current,l=n===f.current,s=F[V];if("Tab"===r)if(s&&(!o&&l||o&&a)){e.preventDefault(),i[V].focus({preventScroll:!0});var p=I({index:V,totalSlides:t,visibleSlides:v});R({carouselRef:u,index:p,behavior:"smooth",setSavedCarouselPosition:j})}},hiddenSlidesTracker:F,savedFocusPosition:V}},W=s(211),z=!("undefined"==typeof window||!window.document||!window.document.createElement),B=(z&&(!window.addEventListener&&window.attachEvent),z&&window.screen,s(814)),F=s.n(B);const q={get:function(e,t){return F().get(e,t)},post:function(e,t,r){return F().post(e,t,r)},request:function(e){return F()(e)}};var H=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(z)try{var r,n=t?e:"".concat("aso","_").concat(e),o=null===(r=window.localStorage)||void 0===r?void 0:r.getItem(n);return o?JSON.parse(o):null}catch(e){console.error("Error :: local storage fetch error :: ".concat(e))}},V=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!z)return"";var r="".concat(e,"=");try{for(var n=(t?document.cookie:decodeURIComponent(document.cookie)).split(";"),o=0;o<n.length;o+=1){for(var i=n[o];" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(r))return i.slice(r.length,i.length)}return""}catch(e){return console.error(e),""}},G=/WC_USERACTIVITY_\d+(?==)/,U="USERTYPE",K=function(){if(!z)return null;try{var e=decodeURIComponent(document.cookie).match(G);return e?e[0]:null}catch(e){return console.error(e),null}}
2,Y=function(e){var t=V(e,!1).split(",")[5];return t&&""!==t&&"null"!==t},$=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=K();return e?"R"===V(U)&&t&&Y(t):t&&Y(t)},Z=function(){var e;return("R"===V(U)||(null===(e=H("PERSISTENT_SESSION"))||void 0===e?void 0:e.firstName))&&!$(!1)};var J=function(){try{var e;return $()||Z()?{customerId:function(){return V(K(),!1).split(",")[0]||V("USERACTIVITY")}()||sessionStorage.getItem("userId"),userStatus:"R"}:{customerId:(null===(e=window)||void 0===e||null===(e=e.utag_data)||void 0===e?void 0:e.tealium_visitor_id)||function(){return V("utag_main_v_id")||""}(),userStatus:"G"}}catch(e){console.error("generateCdpData: error occurred in CDP component because of ".concat(e))}return{}},Q="data-cname",X="data-pz-seg-id",ee="data-pz-seg-name",te="data-pz-cat-crsl-id",re="data-pz-cat-crsl-model",ne="cs_",oe="mt_",ie="^=",ae="[".concat(Q).concat(ie,'"').concat(ne,'"]'),ce="[".concat(X).concat(ie,'"').concat(ne,'"]'),le="[".concat(ee).concat(ie,'"').concat(ne,'"]'),se="[".concat("data-pos","]"),ue="[".concat(Q).concat(ie,'"').concat(oe,'"]'),de="[".concat(X).concat(ie,'"').concat(oe,'"]'),fe="[".concat(ee).concat(ie,'"').concat(oe,'"]'),pe="".concat(ae).concat(ce).concat(le),he="".concat(ue).concat(de).concat(fe).concat(se),ve=("".concat(pe,",").concat(he),"[".concat(te,"][").concat(re,"]"),"[".concat("data-pz-cat-crsl-cat-type","]"),"impressionElements"),ge=(c(c(c(c({},"timestamp",null),ne,c(c({},"personalizedSegments",[]),ve,[])),oe,c(c({},"segments",[]),ve,[])),"personalizedCategoryCarousels",c({},ve,[])),"/myaccount/orders"),me="/myaccount/addressBook",ye="/myaccount/wishlist",be="/myaccount/profile",we="/myaccount/profile/deleteAccount",xe="/myaccount/yourItems/wishlist/favorites";c(c(c(c(c(c({},me,"myaccount > address book"),be,"myaccount > account settings"),ye,"myaccount > list"),ge,"myaccount > manage purchases"),we,"myaccount > account settings > delete account"),xe,"myaccount > yourItems > favorites");function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _e=function(e){switch(i(e)){case"boolean":case"number":return"".concat(+e);case"string":return e.replace(/['"]/g,"\\$&");default:return"not set"}},je={productName:function(e){return function(e,t,r){return"string"==typeof e&&"string"==typeof t&&"string"==typeof r?e.replace(new RegExp(t,"gm"),r):e}(e,",","")}},Oe=function(e){return e?Object.entries(e).reduce((function(e,t){var r=o(t,2),n=r[0],i=r[1];return"function"==typeof je[n]?e[n]=Array.isArray(i)?i.map((function(e){return _e(je[n](e))})):_e(je[n](i)):e[n]=Array.isArray(i)?i.map((function(e){return _e(e)})):_e(i),e}),{}):{}},Pe=function(e){var t;return null===(t=e.tealium)||void 0===t?void 0:t.loaded},ke=function(e){return{L1category:e,L2category:e,L3category:e,L4category:e}},Ee=function(){var e=H("userProfileData");return function(){return z&&(0,N.get)(window.ASOData,"uiConfig.cmsGlobal[".concat("ENABLE_META_TRACKING","]"),!1)}()&&"object"===i(e)&&null!==e?Object.keys(e).reduce((function(t,r){var n=e[r];return t[r]=n&&"function"==typeof n.toLowerCase?n.toLowerCase():n,t}),{}):{}};function Ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Re="CONTENT_STACK",Ie=function(e){var t={};switch(i(e)){case"string":try{t=JSON.parse(e)}catch(e){console.error(e)}break;case"object":t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
2t%2?Ne(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e)}return t},Le="personalized_category_carousel",Te="Roboto Flex",Ae=["Open Sans",Te],De="start",Me=c(c({},"Left",De),"Center","center"),We="cardsWithBorders",ze=c(c({},"Card With Border",We),"Card Without Border","cardsWithoutBorders"),Be="Pinned Category",Fe="Dynamic Category",qe=[Be,Fe],He=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,Ve="dynamic_carousel_click",Ge="pinned",Ue="next best",Ke="default",Ye=c(c(c({},Ge,"pinned"),Ue,"dynamic"),Ke,"default"),$e="next_best_category",Ze=[$e],Je=c({},$e,Ue),Qe=c({},$e,"next_best_category"),Xe=function(e,t,r,n){var o=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n={cms:Ie(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),labels:Ie(e),messages:Ie(t),uiConfig:Ie(r)},o=n.cms.source||Re;return{props:n,source:o,getContent:function(e,t){return(0,N.get)(n.cms,e,t)},getLabel:function(e,t){return(0,N.get)(n.labels,e,t)},getMessage:function(e,t){return(0,N.get)(n.messages,e,t)},getCMSGlobal:function(e,t){return(0,N.get)(n.uiConfig.cmsGlobal,e,t)},getUIFlag:function(e,t){return(0,N.get)(n.uiConfig.flags,e,t)}}}(e,t,r,n),a=o.getContent,c=o.getCMSGlobal,l=a("unique_id"),s=a("model"),u=Ze.includes(s)?s:$e,d=a("prioritized_category_group.pinned_category_group"),f=Array.isArray(d)?d:[],p=a("default_category_group"),h=Array.isArray(p)?p:[],v=a("prioritized_category_group.display_buckets_priority"),g=qe.includes(v)?v:Be,m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;switch(i(e)){case"string":case"number":var r=parseInt(e,10);return Number.isNaN(r)?t:r;case"boolean":return e?1:0;default:return t}}(a("total_no_of_cards")),y=m>0?m:10,b=c("pzCatCrslExcludedClassIds"),w="string"==typeof b&&""!==b?b.split(",").map((function(e){return e.trim()})):[],x=a("font_selection"),S=Ae.includes(x)?x:Te,C=a("headline_alignment"),_=Me[C]||De,j=a("display_card_style_selection"),O=ze[j]||We,P=a("hex_bg_fill"),k=null;O===We&&(k=He.test(P)?P:"#ffffff");var E={withDynamic:{headlineText:a("headline_dynamic_categories.headline"),subHeadlineText:a("headline_dynamic_categories.sub_headline"),headlineImgDesktop:a("headline_dynamic_categories.headline_image_desktop"),headlineImgMobile:a("headline_dynamic_categories.headline_image_mobile"),headlineImgAlt:a("headline_dynamic_categories.headline_image_alt_text")},withoutDynamic:{headlineText:a("headline_no_dynamic_categories.headline"),subHeadlineText:a("headline_no_dynamic_categories.sub_headline"),headlineImgDesktop:a("headline_no_dynamic_categories.headline_image_desktop"),headlineImgMobile:a("headline_no_dynamic_categories.headline_image_mobile"),headlineImgAlt:a("headline_no_dynamic_categories.headline_image_alt_text")}},R=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(i(e)){case"string":return"true"===e.toLowerCase();case"boolean":return e;case"number":return 0!==e;default:return t}}(a("display_category_name",!0));return{pzCatCrslId:l,model:u,carouselHeadlineValueConfig:E,carouselHeadlineAlignment:_,carouselFont:S,slideStyleType:O,slideBgColor:k,showCategoryNames:R,pinnedCategories:f,defaultCategories:h,priorityBucket:g,excludedClassIds:w,maxCategories:y}},et=function(e){return"string"!=typeof e?e:e.lastIndexOf("?")===e.length-1?e.replace("?",""):e},tt=function(e){return new RegExp("([?&])".concat(e,"=.*?(&|$)"),"i")},rt=function(e,t,r){return function(e,t,r,n){if(!z||r&&"string"!=typeof r)return null;var i=t;arguments.length>4&&void 0!==arguments[4]&&arguments[4]&&(i=encodeURIComponent(i));var a,c=et(r||window.location.href),l=tt(e);if(c.match(l))a=c.replace(l,"$1".concat(e,"=").concat(i,"$2"));else{var s=c.indexOf("?"),u=-1!==s,d=u?"&":"?",f=c.indexOf("#"),p=-1!==f;if(!p||u&&p&&s>f)a="".concat(c).concat(d).concat(e,"=").concat(i);else{var h=o(c.split("#"),2),v=h[0],g=h[1];a="".concat(v).concat(d).concat(e,"=").concat(i,"#").concat(g)}}return n||window.history.pushState(null,document.title,a),a}("pzCatCrsl","".concat(t).concat("~").concat(r),e,!0,!0)},nt=function(e,t,r){var n=e.category_name,o=e.category_display_name,i=e.image_url,a=e.aria_label,c=e.destination_path,l=e.image,s=e.image_alt,u=e.class_id,d={ariaLabel:a,imageAlt:s,t
2ype:t};switch(t){case Ue:d.key="".concat(o," ").concat(i),d.name=o,d.imageSrc=i,d.classId=u;break;case Ge:case Ke:d.key="".concat(n," ").concat(l),d.name=n,d.imageSrc=l}return d.href=rt(c,Qe[r],d.name),d},ot=function(e,t,n,o,i,a,c){return function(e,t){return e.slice(0,t)}(function(e,t){var r=new Set(t);return e.filter((function(e){return!r.has(e.classId)}))}(function(e){var t=new Set;return e.filter((function(e){var r=e.key;return!t.has(r)&&(t.add(r),!0)}))}(function(e,t,n,o){var i=[];o===Fe?(i.push.apply(i,r(t)),i.push.apply(i,r(e)),i.push.apply(i,r(n))):(i.push.apply(i,r(e)),i.push.apply(i,r(t)),i.push.apply(i,r(n)));return i}(e.map((function(e){return nt(e,Ge,c)})),t.map((function(e){return nt(e,Je[c],c)})),n.map((function(e){return nt(e,Ke,c)})),o)),i),a)};function it(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?it(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):it(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ct=function(e){var t,r=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!z)return{};var r=window.utag_data,n=void 0===r?{}:r,o=n.pageName,i=n.pageType,a=n.pageTitle,c=n.pageHierarchy,l=n.pageEnv,s=n.visitorStatus,u=n.visitorId,d=n.registrationStatus,f=n.authenticationMethod,p=n.storeSelected,h=n.componentsViewed,v=n.pageCategory,g=n.menuNavigationHierarchy,m=n.currency,y=Ce({pageName:o,pageType:i,pageTitle:a,pageHierarchy:c,pageEnv:l,visitorStatus:s,visitorId:u,registrationStatus:d,authenticationMethod:f,storeSelected:p,componentsViewed:h},Ee());return e&&(y.pageCategory=v),g&&(y.menuNavigationHierarchy=g),t&&(y.currency=m),y}(!0,!0),n=r.pageCategory;if("hp"===n)t=ke("home");else t=ke(n);var o=r.pageType;return e&&(o="".concat(r.pageType).concat(e)),at(at(at({},r),t),{},{pageType:o})};function lt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var st=function(e,t){var r=Qe[e],n=Ye[t.type],o="|".concat(r,"|").concat(n,"|").concat(Ve),i=ct(o);!function(e){if(z&&window.utag)try{return window.utag.link(Oe(e)),!0}catch(e){console.error("Error sending link data to utag:",e)}}(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({carousel_card_configured:t.name,tealium_event:Ve},i))};const ut={bp_sm:"320",bp_md:"540",bp_lg:"1024",bp_xl:"1720",mq_sm:"(min-width: 320px)",mq_md:"(min-width: 540px)",mq_lg:"(min-width: 1024px)",mq_xl:"(min-width: 1720px)",wrapper:"wrapper--oFkir",skeleton:"skeleton--O7vFi",skeletonHeadline:"skeletonHeadline--fTD4C",skeletonSlides:"skeletonSlides--brAEu",skeletonSlide:"skeletonSlide--vSkVz",headline:"headline--aVZZF",carouselWrapper:"carouselWrapper--oH5De",carousel:"carousel--jW9oD",slide:"slide--FFZZx",cardsWithBorders:"cardsWithBorders--tNGhb",noCategoryNames:"noCategoryNames--b_540",cardsWithoutBorders:"cardsWithoutBorders--BCRhZ",controller:"controller--VQaSs",previous:"previous--Xi8wt",next:"next--kWbYe"};var dt=c({},$e,(function(e){return function(e,t){var r="/api/cdp/".concat(e);return q.request({method:"POST",url:r,data:t})}($e,e).then((function(e){if(e&&e.data&&Array.isArray(e.data.next_best_categories))return e.data.next_best_categories;throw new Error("Unexpected response from CDP API for categories from ".concat($e," model"))}))})),ft=function(e){var t=e.cms,i=e.labels,a=e.messages,c=e.uiConfig,l=p().useMemo((function(){return Xe(t,i,a,
2c)}),[]),s=l.pzCatCrslId,u=l.model,f=l.carouselHeadlineValueConfig,h=l.carouselHeadlineAlignment,v=l.carouselFont,g=l.showCategoryNames,m=l.slideBgColor,y=l.slideStyleType,w=l.pinnedCategories,O=l.defaultCategories,P=l.priorityBucket,k=l.excludedClassIds,N=l.maxCategories,R=(0,W.useSelector)(Pe),I=o(p().useState(!0),2),L=I[0],T=I[1],A=o(p().useState([]),2),D=A[0],z=A[1],B=o(p().useState(null),2),F=B[0],q=B[1];p().useEffect((function(){var e=function(){var e=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function c(e){n(a,o,i,c,l,"next",e)}function l(e){n(a,o,i,c,l,"throw",e)}c(void 0)}))}}(d().mark((function e(){var t,n,o,i,a,c,l,s,f,p,h,v;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=[],e.prev=1,n=J(),i=(o=n||{}).customerId,a=o.userStatus,c=Boolean(i),l=Boolean(a),s=c&&l,f=H("cdp_data"),p=(null==f?void 0:f.cdpData)||{},h=p.customerId,v=void 0===h?"":h,!s){e.next=20;break}return e.t0=t.push,e.t1=t,e.t2=r,e.next=15,dt[u]({customerId:i,userStatus:a,cdpCustomerId:v});case 15:e.t3=e.sent,e.t4=(0,e.t2)(e.t3),e.t0.apply.call(e.t0,e.t1,e.t4),e.next=21;break;case 20:throw new Error("User not identifiable for CDP API call for categories from ".concat(u," model"));case 21:e.next=26;break;case 23:e.prev=23,e.t5=e.catch(1),console.error(e.t5);case 26:return e.prev=26,z(ot(w,t,O,P,k,N,u)),T(!1),q(t.length>0),e.finish(26);case 31:case"end":return e.stop()}}),e,null,[[1,23,26,31]])})));return function(){return e.apply(this,arguments)}}();e()}),[]);var V=p().useRef([]),G=M({totalSlides:D.length,threshold:0,manualScrolling:!0,slidesFocusElements:V,loading:L}),U=G.handleScrollCarousel,K=G.handleOnScroll,Y=G.carouselRef,$=G.carouselNextControllerRef,Z=G.carouselPreviousControllerRef,Q=G.showCarouselNextController,X=G.showCarouselPreviousController,ee=G.onKeyDownSlide,te=G.onKeyDownController,re=G.savedFocusPosition;if(p().useEffect((function(){!L&&R&&document.dispatchEvent(new CustomEvent("personalizedcategorycarouselload",{detail:Y.current}))}),[R,L]),L){var ne=new Array(10).fill(null).map((function(e,t){return(0,b.jsx)("div",{key:t,className:ut.skeletonSlide})}));return(0,b.jsx)("div",{"aria-hidden":"true",className:"contentMargin ".concat(ut.wrapper," ").concat(ut.skeleton),"data-auid":"personalized-category-carousel-skeleton-loader"},(0,b.jsx)("div",{className:ut.skeletonHeadline}),(0,b.jsx)("div",{className:ut.skeletonSlides},ne))}if(!D.length)return null;return(0,b.jsx)("div",{"data-auid":Le,className:"contentMargin ".concat(ut.wrapper),style:{fontFamily:v}},function(){var e=null,t=null,r=null,n=null,o=null;if(F){var i=f.withDynamic;e=i.headlineText,t=i.subHeadlineText,r=i.headlineImgDesktop,n=i.headlineImgMobile,o=i.headlineImgAlt}else{var a=f.withoutDynamic;e=a.headlineText,t=a.subHeadlineText,r=a.headlineImgDesktop,n=a.headlineImgMobile,o=a.headlineImgAlt}var c=null,l=e&&""!==e.trim(),s=l&&t&&""!==t.trim();return c=l&&s?(0,b.jsx)(p().Fragment,null,(0,b.jsx)("h2",null,e),(0,b.jsx)("span",null,t)):l?(0,b.jsx)("h2",null,e):(0,b.jsx)("picture",null,(0,b.jsx)("source",{media:"(min-width: 1024px)",srcSet:r}),(0,b.jsx)("img",{src:n,alt:o})),(0,b.jsx)("div",{"data-auid":"headline",className:ut.headline,style:{alignItems:h}},c)}(),(0,b.jsx)("div",{className:ut.carouselWrapper},function(){var e="".concat(ut.controller," ").concat(ut.previous),t=X?"dBlock":"dNone",r="".concat(e," ").concat(t),n=(0,b.jsx)("div",{className:"dFlex dNone-lg"},(0,b.jsx)(_,null)),o=(0,b.jsx)("div",{className:"dNone dFlex-lg"},(0,b.jsx)(S,null));return(0,b.jsx)(x,{onClick:function(){U(!1)},ref:Z,className:r,"aria-label":"previous",onKeyDown:te,color:"gray",size:"md"},n,o)}(),function(){return(0,b.jsx)(E,{role:"list",ref:Y,onScroll:K,className:"".concat(ut.carousel," hideScrollbar"),"data-pz-cat-crsl-id":s,"data-pz-cat-crsl-model":Qe[u]},function(){return D.map((function(e,t){var r=e.key,n=e.name,o=e.ariaLabel,i=e.href,a=e.imageSrc,c=e.imageAlt,l=e.type,s=[ut.slide,ut[y],g?"":ut.noCategoryNames].filter(Boolean).join(" "),d=re===t?0:-1;return(0,b.jsx)("li",{key:r},(0,b.jsx)("a",{href:i,className:s,"aria-label":o,onKeyDown:ee,onClick:function(t){t.preventDefault(),st(u,e),window.location.assign(i)},tabIndex:d,ref:function(e){V.current[t]=e},style:{backgroundColor:m},"data-pz-cat-crsl-cat-type":Ye[l]},(0,b.jsx)("img",{src:a,alt:c}),(0,b.jsx)("span",{className:"clamp2"},n)))}))}())}(),function(){var e="".concat(ut.controller," ").concat(ut.next),t=Q?"dBlock":"dNone",r="".concat(e," ").concat(t),n=(0,b.jsx)("div",{className:"dFlex dNone-lg"},(0,b.jsx)(j,null)),o=(0,b.jsx)("div",{className:"dNone dFlex-lg"},(0,b.jsx)(C,null));return(0,b.jsx)(x,{className:r,ref:$,onClick:function(){U(!0)},"aria-label":"Category Carousel next",onKeyDown:te,color:"gray",size:"md"},n,o)}()))};ft.enableRegistryCss=!0,z&&r(document.querySelectorAll('[data-component="'.concat(Le,'"]'))).forEac
2h((function(e){(0,h.c)(e,(0,b.jsx)(W.Provider,{store:window.store},(0,b.jsx)(ft,window.ASOData[e.getAttribute("".concat("data-compId"))])))}));const pt=ft})(),u})()));
3//# sourceMappingURL=personalized_category_carousel.component.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.