PageSourceSearch

https://www.karitraa.com/us/en/components-Header-BasketOverlay-c7e674201667e1c8cf15.js

js karitraa.com collected 2026-09-24 21:43:01 UTC 11,600 bytes, 2 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[7112],{9123:function(e,t,n){var r=n(2784),i=n(25987),o=n(38852),s=n(52322),a={border:0,clip:"rect(0, 0, 0, 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};t.Z=function(){var e=(0,r.useState)(null),t=e[0],n=e[1],l=(0,r.useRef)(0),u=(0,r.useRef)(null),c=(0,r.useCallback)((function(e){u.current&&clearTimeout(u.current),n(null),setTimeout((function(){l.current+=1,n({id:l.current,text:e}),u.current=setTimeout((function(){n(null),u.current=null}),1e4)}),100)}),[]);return(0,r.useEffect)((function(){var e=[{event:o.rA.PRODUCT_REMOVED,handler:function(e){c(function(e){var t,n=(null==e||null===(t=e.product)||void 0===t?void 0:t.name)||"",r=(null==e?void 0:e.newQuantity)||0;return null!=e&&e.isQuantityChange?n+" quantity decreased to "+r:n+" removed from cart"}(e))}},{event:o.rA.PRODUCT_ADDED,handler:function(e){var t=function(e){var t;return null!=e&&e.isQuantityChange?((null==e||null===(t=e.product)||void 0===t?void 0:t.name)||"")+" quantity increased to "+((null==e?void 0:e.newQuantity)||0):null}(e);t&&c(t)}},{event:o.rA.VOUCHER_ADDED,handler:function(){return c("Discount code applied")}},{event:o.rA.VOUCHER_REMOVED,handler:function(){return c("Discount code removed")}},{event:o.rA.ERROR,handler:function(e){e&&c(e)}}].map((function(e){var t=e.event,n=e.handler;return{event:t,handle:i.Z.subscribe(t,n)}}));return function(){e.forEach((function(e){var t=e.event,n=e.handle;void 0!==n&&i.Z.unsubscribe(t,n)})),u.current&&clearTimeout(u.current)}}),[c]),(0,s.jsx)("div",{"aria-atomic":"true","aria-live":"polite",role:"status",style:a,children:null==t?void 0:t.text})}},91701:function(e,t,n){n(84870),n(53985),n(82841),n(35114),n(12964)},17075:function(e,t,n){var r=n(57890),i=r._f?getComputedStyle(document.body):void 0,o=Object.assign({accountHeightHeader:20,bannerHeight:24,headerHeight:52,topLogoMobileHeight:32},r._f?{accountHeightHeader:parseInt((null==i?void 0:i.getPropertyValue("--height-header-account"))||"20",10),bannerHeight:parseInt((null==i?void 0:i.getPropertyValue("--height-banner"))||"24",10),headerHeight:parseInt((null==i?void 0:i.getPropertyValue("--height-header"))||"52",10),topLogoMobileHeight:parseInt((null==i?void 0:i.getPropertyValue("--height-top-logo-mobile"))||"32",10)}:{});t.Z=o},14465:function(e,t,n){var r=n(43444),i=n(51952);t.Z=function(){var e=(0,i.useStaticQuery)("2778817135").application.data.config.headerConfig||{},t=function(e){var t=[];return e.forEach((function(e){if("heading"===e.component&&t.push({component:e.component,text:e.text,type:e.type}),"paragraph"===e.component&&t.push({component:e.component,text:e.richText}),"button"===e.component){var n=(0,r.y)(e);t.push(Object.assign({component:e.component},n))}})),t},n={basketEmptyContent:t(e.basketEmptyContent),basketNavigationLabel:e.basketNavigationLabel,wishlistAuthenticatedEmptyContent:t(e.wishlistAuthenticatedEmptyContent),wishlistUnauthenticatedEmptyContent:t(e.wishlistUnauthenticatedEmptyContent),wishlistNavigationLabel:e.wishlistNavigationLabel,recentlyViewedNavigationLabel:e.recentlyViewedNavigationLabel,recentlyViewedEmptyContent:t(e.recentlyViewedEmptyContent)};return Object.assign({},n)}},77742:function(e,t,n){n.r(t);var r=n(2784),i=n(58245),o=n(49460),s=n(50326),a=n(17075),l=n(14465),u=n(9123),c=n(7937),d=n(91701),h=n(93812),v=n(90535),f=n(61651),p=n(75892),m=n(28568),y=n(57890),b=n(12785),g=n(37542),x=n(56403),w=n(29526),k=n(27292),A=n(92813),C=n(54146),Z=n(52322),E,_,j=(0,p.zo)("div",(E={width:"var(--width-basket-overlay)",maxWidth:"600px",height:"calc(var(--vh) - var(--height-header) - 16px)",display:"flex",position:"relative",margin:"8px",flexDirection:"column",backgroundColor:"var(--color-bg-highlight)",overflow:"hidden",borderRadius:"8px"},E[c.Z.min["desktop.sm"]]={borderRadius:"8px"},E[c.Z.max["mobile.sm"]]={overflow:"auto",paddingTop:"12px"},E)),R=(0,p.zo)("div",(_={display:"flex",width:"100%",gap:"8px",overflowX:"scroll",boxSizing:"content-box",flexBasis:"auto"},_[c.Z.max["mobile.sm"]]={flexShrink:0},_["::-webkit-scrollbar"]={display:"none"},_.scrollbarWidth="none",_)),N=function e(t){var d,E,_,N,H,O,D=t.titleId,L=(0,p.hQ)(),S=L[0],V=(0,i.v9)((function(e){return e.basket.items})),q=(0,i.v9)((function(e){return e.recentlyViewedList})),B=a.Z.headerHeight,P=(null==V?void 0:V.length)>0,U=(0,l.Z)(),I=(d={},d[g.e0]=(0,b.ZP)({resolved:{},chunkName:function(){return"components-Header-BasketOverlay-Basket"},isReady:function(e){var t=this.resolve(e);return!0===this.resolved[t]&&!!n.m[t]},importAsync:function(){return Promise.all([n.e(9351),n.e(2397)]).then(n.bind(n,10441))},requireAsync:function(e){var t=this,n=this.resolve(e);return this.resolved[n]=!1,this.importAsync(e).then((function(e){return t.resolved[n]=!0,e}))},requireSync:function e(t){var r=this.resolve(t);return n(r)},resolve:function e(){return 10441}}),d[g.ww]=(0,b.ZP)({resolved:{},chunkName:function(){return"components-Header-BasketOverlay-BasketEmpty"},isReady:function(e){var t=this.resolve(e);return!0===this.resolved[t]&&!!n.m[t]},importAsync:function(){return n.e(9039).then(n.bind(n,20618))},requireAsync:function(e){var t=this,n=this.resolve(e);return this.resolved[n]=!1,this.importAsync(e).then((function(e){return t.resolved[n]=!0,e}))},requireSync:function e(t){var r=this.resolve(t);return n(r)},resolve:function e(){return 20618}}),d[g.dd]=(0,b.ZP)({resolved:{},chunkName:function(){return"components-Header-BasketOverlay-Wishlist"},isReady:function(e){var t=this.resolve(e);return!0===this.resolved[t]&&!!n.m[t]},importAsync:function(){return n.e(8220).then(n.bind(n,64662))},requireAsync:function(e){var t=this,n=this.resolve(e);return this.resolved[n]=!1,this.importAsync(e).then((function(e){return t.resolved[n]=!0,e}))},requireSync:function e(t){var r=this.resolve(t);return n(r)},resolve:function e(){return 64662}}),d[g.Dk]=(0,b.ZP)({resolved:{},chunkName:function(){return"components-Header-BasketOverlay-Wishlist-WishlistUnauthenticated"},isReady:function(e){var t=this.resolve(e);return!0===this.resolved[t]&&!!n.m[t]},importAsync:function(){return n.e(1746).then(n.bind(n,54235))},requireAsync:function(e){var t=this,n=this.resolve(e);return this.resolved[n]=!1,this.importAsync(e).then((function(e){return t.resolved[n]=!0,e}))},requireSync:function e(t){var r=this.resolve(t);return n(r)},resolve:function e(){return 54235}}),d[g.Go]=(0,b.ZP)({resolved:{},chunkName:function(){return"components-Header-BasketOverlay-Wishlist-WishlistAuthenticatedEmpty"},isReady:function(e){var t=this.resolve(e);return!0===this.resolved[t]&&!!n.m[t]},importAsync:function(){return n.e(9174).then(n.bind(n,44350))},requireAsync:function(e){var t=this,n=this.resolve(e);return this.resolved[n]=!1,this.importAsync(e).then((function(e){return t.resolved[n]=!0,e}))},requireSync:function e(t){var r=this.resolve(t);return n(r)},resolve:function e(){return 44350}}),d[g.ZC]=(0,b.ZP)({resolved:{},chunkName:function(){return"components-Header-BasketOverlay-RecentlyViewed"},isReady:function(e){var t=this.resolve(e);return!0===this.resolved[t]&&!!n.m[t]},importAsync:function(){return Promise.all([n.e(9351),n.e(9256)]).then(n.bind(n,89150))},requireAsync:function(e){var t=this,n=this.resolve(e);return this.resolved[n]=!1,this.importAsync(e).then((function(e){return t.resolved[n]=!0,e}))},requireSync:function e(t){var r=this.resolve(t);return n(r)},resolve:function e(){return 89150}}),d[g.b6]=(0,b.ZP)({resolved:{},chunkName:function(){return"components-Header-BasketOverlay-RecentlyViewed-RecentlyViewedEmpty"},isReady:function(e){var t=this.resolve(e);return!0===this.resolved[t]&&!!n.m[t]},importAsync:function(){return n.e(5039).then(n.bind(n,62600))},requireAsync:function(e){var t=this,n=this.resolve(e);return this.resolved[n]=!1,this.importAsync(e).then((function(e){return t.resolved[n]=!0,e}))},requireSync:function e(t){var r=this.resolve(t);return n(r)},resolve:function e(){return 62600}}),d),T=P?g.e0:g.ww,M=(0,r.useState)(T),W=M[0],z=M[1],K=I[W],Q=function(){if(q.items.length>0)return z(g.ZC);var e=C.Z.get("ab_recently_viewed");if((0,m.Up)(e).length>0)return z(g.ZC);z(g.b6)},G=function(){z(P?g.e0:g.ww)},$=(0,i.v9)((function(e){return e.basket.items})),X=$.reduce((function(e,t){return e+t.quantity}),0),Y=(0,r.useState)(null),F=Y[0],J=Y[1],ee=function(){var e,t=null!==(e=window)&&void 0!==e&&e.visualVie
1wport?""+(window.visualViewport.height-8):null;J(t)};return(0,r.useEffect)((function(){if(y.gn){if(document.documentElement.style.minHeight="100vh",window.visualViewport.addEventListener("resize",ee),!y._f)return;return function(){window.visualViewport.removeEventListener("resize",ee),document.documentElement.style.minHeight="initial"}}}),[]),(0,Z.jsxs)(j,{className:"basket-overlay",children:[(0,Z.jsx)(u.Z,{}),(0,Z.jsxs)("div",{className:S((E={display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between",paddingBottom:"12px",marginBottom:"4px"},E[c.Z.max["mobile.sm"]]={display:"none"},E)),children:[(0,Z.jsx)(o.$,{id:D,render:(0,Z.jsx)(A.Z,{$style:{paddingLeft:"12px"},fontKeys:"Misc/12_100_-1_500_UC"}),children:"Your products"}),(0,Z.jsx)(s.G,{"aria-label":"Close cart",className:S(Object.assign({},(0,f.q)(),{display:"flex",alignItems:"center",width:"40px",height:"40px",cursor:"pointer",justifyContent:"center"})),onClick:function(){return v.Z.close(h.Rr.BASKET)},children:(0,Z.jsx)(k.Z,{size:"16px",state:"reset"})})]}),(0,Z.jsx)("div",{className:S((_={},_[c.Z.max["mobile.sm"]]={flexShrink:0},_)),children:(0,Z.jsxs)(R,{className:"basket-quick-btns",role:"tablist",children:[(0,Z.jsxs)(x.Z,{$style:(N={cursor:"pointer",borderRadius:"40px",flexBasis:0,flexGrow:1,textAlign:"left",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px",marginLeft:"12px"},N[c.Z.max["mobile.sm"]]={justifyContent:"flex-start",gap:"4px"},N),active:W===g.e0||W===g.ww,"aria-controls":"basket-tabpanel","aria-selected":W===g.e0||W===g.ww,id:"tab-basket",role:"tab",theme:"defaultsecondary",onClick:function(){G()},children:[(0,Z.jsxs)("div",{className:S({display:"flex",gap:"8px",alignItems:"center"}),children:[(0,Z.jsx)(w.Z,{width:"16px"}),(0,Z.jsx)(A.Z,{fontKeys:"Misc/12_100_-1_500_UC",children:U.basketNavigationLabel})]}),(0,Z.jsxs)("div",{className:S((H={},H[c.Z.max["mobile.sm"]]={alignSelf:"center",flexShrink:0},H)),children:["(",X,")"]})]}),(0,Z.jsx)(x.Z,{$style:{cursor:"pointer",borderRadius:"40px",flexBasis:0,flexGrow:1,textAlign:"left",display:"flex",marginRight:"12px",justifyContent:"center",alignItems:"center"},active:W===g.ZC||W===g.b6,"aria-controls":"basket-tabpanel","aria-selected":W===g.ZC||W===g.b6,id:"tab-recently-viewed",role:"tab",fontKeys:"Misc/12_100_-1_500_UC",theme:"defaultsecondary",onClick:function(){Q()},children:U.recentlyViewedNavigationLabel})]})}),(0,Z.jsx)("div",{className:S((O={height:y.gn?"calc("+F+"px - "+B+"px * 1.5)":"100%",overflow:"auto"},O[c.Z.max["mobile.sm"]]={height:"auto",overflow:"visible"},O)),"aria-labelledby":W===g.e0||W===g.ww?"tab-basket":"tab-recently-viewed",id:"basket-tabpanel",role:"tabpanel",children:(0,Z.jsx)(K,{content:U})})]})};t.default=N},37542:function(e,t,n){n.d(t,{Dk:function(){return s},Go:function(){return a},ZC:function(){return l},b6:function(){return u},dd:function(){return o},e0:function(){return r},ww:function(){return i}});var r="basket",i="basket-empty",o="wishlist",s="wishlist-unauthenticated",a="wishlist-authenticated-empty",l="recently-viewed",u="recently-viewed-empty"}}]);
2//# sourceMappingURL=components-Header-BasketOverlay-c7e674201667e1c8cf15.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.