PageSourceSearch

https://www.trendhim.cz/_next/static/chunks/1881-5ef21c6fa2606b55.js

js trendhim.cz collected 2026-10-06 04:53:51 UTC 31,359 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6d7cafb0-104b-5e4a-b87d-44772623cc88")}catch(e){}}();
3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1881],{7502:e=>{e.exports={productSlider:"ProductTactics_productSlider__li9ZJ",slider:"ProductTactics_slider__opwPj"}},11881:(e,t,r)=>{"use strict";r.d(t,{A:()=>eJ});var i=r(83804),c=r(60838),l=r.n(c),n=r(65744),s=r(32030),o=r(56564),d=r(15877),a=r(67906),u=r(95833),p=r(40912),_=r(52887),m=r.n(_);let h=e=>{var t,r,c,l,s;let{children:o,header:d}=e,{onSlide:_,sliderRef:h,sliderState:v}=(0,u.P)();return(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:m().complementaryProductsTitle,children:[(0,i.jsx)("p",{draggable:!1,children:d}),(0,i.jsx)(p.E,{className:m().arrowLeft,onClick:null==(l=h.current)?void 0:l.prev,sliderState:v}),(0,i.jsx)(p.P,{className:m().arrowRight,onClick:null==(s=h.current)?void 0:s.next,sliderState:v})]}),(0,i.jsxs)("div",{className:m().complementaryProducts,children:[(0,i.jsx)(u.A,{className:(0,a.A)(m().slider,2>=n.Children.count(o)&&m().singleColumn,n.Children.count(o)>2&&m().grid),onSlide:_,ref:h,children:o}),(0,i.jsx)("input",{className:(0,a.A)(m().range,(!v||v.rangeMax===v.rangeMin)&&m().hidden),max:null!=(t=null==v?void 0:v.rangeMax)?t:0,min:null!=(r=null==v?void 0:v.rangeMin)?r:0,onChange:()=>null,type:"range",value:null!=(c=null==v?void 0:v.rangeValue)?c:0})]})]})};var v=r(49830),g=r.n(v),x=r(49702),f=r(26558),y=r(85036),j=r(92738),P=r(15056),D=r.n(P);let S=(0,n.memo)(e=>{let{children:t,expanded:r,image:c,link:l,onClick:n,title:s}=e,o=(0,i.jsxs)("div",{className:D().item,children:[(null==c?void 0:c.url)&&(0,i.jsx)("div",{className:D().image,children:(0,i.jsx)(y.sg,{alt:s,className:D().image,height:54,src:c.url,width:54})}),t]});return l?(0,i.jsx)(j.N,{className:"".concat(D().wrapper," ").concat(r?"":D().collapsed),href:l,onClick:n,children:o}):(0,i.jsx)("div",{className:"".concat(D().wrapper," ").concat(r?"":D().collapsed),children:o})});var N=r(68491),b=r(73796),T=r.n(b);let I=(0,n.memo)(e=>{var t,r,c;let{bundleItems:s,bundlePrice:o,disablePrices:d=!1,disableProductLinks:a=!1}=e,{t:u}
3=(0,N.B)(),[p,_]=(0,n.useState)(!1),m=g()(s,e=>!!e.product);if(!(null==m?void 0:m.length))return null;let h=(null==o||null==(r=o.originalPrice)||null==(t=r.discount)?void 0:t.format)||(null==o||null==(c=o.originalPrice)?void 0:c.format)||"";return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:T().title,children:u("products:PP_PACKAGE_CONTAINS")}),(0,i.jsxs)("div",{className:T().list,children:[l()(m,(e,t)=>{var r,c,l,n,s;let{product:o,quantity:_}=e,{id:m,image:h="",name:v,url:g=""}=o,x=(null==o||null==(l=o.masterVariant)||null==(c=l.price)||null==(r=c.discount)?void 0:r.format)||(null==o||null==(s=o.masterVariant)||null==(n=s.price)?void 0:n.format)||"";return(0,i.jsx)(S,{expanded:p||t<3,image:h,link:a?"":g||"",price:d?void 0:x,title:v,children:(_||0)>1?u("products:PP_BUNDLE_ITEM_QUANTITY","{{arg1}}x {{arg2}}",{arg1:_,arg2:v}):v},m)}),m.length>3&&(0,i.jsxs)("button",{className:T().toggle,onClick:()=>_(!p),type:"button",children:[p?u("cms:SHOW_LESS_LABEL","Show more"):u("cms:SHOW_MORE_LABEL","Show less"),p?(0,i.jsx)(x.A,{}):(0,i.jsx)(f.A,{})]}),h&&!d&&(0,i.jsxs)("div",{className:T().summary,children:[u("common:BUNDLE_COMBINED_VALUE"),(0,i.jsx)("strong",{children:h})]})]})]})});var k=r(81299),L=r(40323),A=r.n(L);let B=e=>{let{sizes:t,variations:r}=e,{t:c}=(0,N.B)(),n=l()(t,e=>({...e,sourceID:"linked_products_size"})),o=[...l()(r,e=>({...e,sourceID:"linked_products_variation"})),...n];return(0,i.jsx)(s.Z,{appearance:{backgroundColor:"var(--green-500)",textColor:"var(--white)"},className:A().productSliderWrapper,common:{position:"left",title:c("products:VARIATIONS"),titleElement:"h2",text:{key:"cms:SIMILAR_PRODUCTS_LABEL",value:{children:[{children:[{text:c("cms:SIMILAR_PRODUCTS_LABEL")}],type:"p"}]}}},children:(0,i.jsx)(k.$,{className:A().productSlider,products:o,sourceID:"linked_products_variations"})})};var C=r(42459),E=r.n(C);let O=e=>{let{products:t,sourceID:r}=e,{t:c}=(0,N.B)();return t&&0!==t.length?(0,i.jsx)(s.Z,{appearance:{backgroundColor:"var(--green-500)",textColor:"var(--white)"},className:A().productSliderWrapper,common:{position:"left",title:c("products:WB_RELATED_PRODUCTS_LABEL"),titleElement:"h2",text:{key:"cms:SIMILAR_PRODUCTS_LABEL",value:{children:[{children:[{text:c("products:PRODUCT_RECOMMENDATION_FREQUENTLY_BOUGHT_TOGETHER_LABEL","Frequently bought together")}],type:"p"}]}}},children:(0,i.jsx)(k.$,{className:A().productSlider,products:E()(t,18),sourceID:r})}):null};var w=r(75345),R=r(24584),U=r(59194),W=r(43612),M=r.n(W);let Y=e=>{let{children:t,className:r}
3=e,[c,l]=(0,n.useState)(!1),s=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let e=e=>{var t;(null==(t=s.current)?void 0:t.contains(e.target))||!c||l(!1)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[c]),(0,i.jsxs)("div",{className:(0,a.A)(M().tooltip,r),ref:s,children:[(0,i.jsx)("button",{"aria-label":"Open",className:"".concat(M().trigger," ").concat(c?M().open:""),onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!c)},type:"button",children:(0,i.jsx)(U.A,{})}),(0,i.jsx)("div",{className:"".concat(M().content," ").concat(c?M().open:""),children:t})]})};var H=r(84614),Q=r.n(H);let V=e=>{var t,r,c,l,s;let{id:o,offer:d,onChange:u,product:p,productHeader:_,selected:m,size:h="small",type:v}=e,{t:g}=(0,N.B)(),x=n.useRef(null);if(!p||!(null==(t=p.primaryAsset)?void 0:t.url))return null;let{id:f,masterVariant:P,name:D,url:S}=p,b=o||f,T=(null==d?void 0:d.price)||(null==P?void 0:P.price)||null;if(!T)return null;let I=!!(null==T?void 0:T.discount),k=(null==T?void 0:T.value)===0||(null==T||null==(r=T.discount)?void 0:r.value)===0,L=g("products:ALSO_ADD_PRODUCT_TO_CART",{arg1:D}),A=k?g("header:FREE_LABEL"):null==T?void 0:T.format,B=v||(null==p||null==(l=p.masterVariant)||null==(c=l.type)?void 0:c.value.key),C=(0,i.jsx)(y.sg,{alt:D||"",height:"large"===h?90:100,objectFit:"contain",src:p.primaryAsset.url,width:"large"===h?70:100});return S&&(C=(0,i.jsx)(j.N,{analytics:{dest_page_type:"product",dest_page_type_id:p.id},href:S,onClick:e=>e.stopPropagation(),children:C})),(0,i.jsxs)("div",{className:(0,a.A)(Q().item,Q()[h]),onClick:e=>{var t;console.log(e.target,e.currentTarget,x.current),null==(t=x.current)||t.click()},title:D||"",children:[(0,i.jsx)("div",{className:Q().image,children:C}),(0,i.jsx)("div",{className:Q().content,children:(0,i.jsxs)("div",{className:Q().description,children:[_&&(0,i.jsx)("div",{className:Q().productHeader,children:(0,i.jsx)(R.k,{wordbook:_})}),(0,i.jsxs)("div",{className:Q().name,children:[D,"engrave"===B&&(0,i.jsx)(Y,{children:g("products:TOOL_TIP_ENGRAVING")}),"deboss"===B&&(0,i.jsx)(Y,{children:g("products:TOOL_TIP_DEBOSS")}),"giftWrappings"===B&&(0,i.jsx)(Y,{children:g("products:TOOL_TIP_GIFT_WRAPPING")})]}),(0,i.jsxs)("div",{className:Q().priceWrapper,children:[!k&&"+ ",I&&(0,i.jsx)("span",{className:Q().beforePrice,children:"".concat(null==T?void 0:T.format)}),(0,i.jsx)("span",{className:"".concat(Q().price," ").concat(I?Q().discount:""),children:"".concat(!k&&I?null==T||null==(s=T.discount)?void 0:s.format:A)})]})]})}),(0,i.jsx)("div",{className:Q().checkboxWrapper,children:(0,i.jsx)(w.S,{"aria-label":L,checked:m,id:"crossSell".concat(b),indicatorClassName:Q().checkbox,label:"",onChange:u,ref:x,title:L,value:b,withoutEmptySpan:!0})})]},b)};var z=r(42232),F=r.n(z);let q=e=>{var t;let{tactic:r}=e,{t:c}=(0,N.B)();return r&&r.items&&0!==r.items.length?(0,i.jsxs)("div",{className:F().assortmentLadder,children:[(0,i.jsx)("p",{className:F().title,children:c("products:PRODUCT_DETAILS")}),(0,i.jsx)("dl",{children:null==r||null==(t=r.items)?void 0:t.map(e=>(0,i.jsxs)("div",{children:[e.iconURL&&(0,i.jsx)("img",{alt:"",src:e.iconURL}),e.header&&(0,i.jsx)("dt",{children:(0,i.jsx)(R.k,{wordbook:e.header})}),e.text&&(0,i.jsx)("dd",{children:(0,i.jsx)(R.k,{wordbook:e.text})})]},null==e?void 0:e.id))})]}):null};var G=r(67877),Z=r(77872);let K=e=>{let{tactic:t}=e;return(0,Z.V)((null==t?void 0:t.blocks)||[],"",!1,G.wOz.Full)};var X=r(31645),$=r.n(X),J=r(88956),ee=r(93784),et=r(94320),er=r(31958),ei=r.n(er);let ec=e=>{let{className:t,discountPrice:r,firstPriceWeighted:c=!0,isDiscountPriceFree:l,isPriceFree:n,price:s,showPlus:o,style:d,theme:u="black_red"}=e,{t:p}=(0,N.B)();return(0,i.jsxs)("div",{className:(0,a.A)(t,ei().priceWrapper,ei()[u],c&&ei().firstPriceWeighted),style:d,children:[o&&(0,i.jsx)("p",{className:ei().additionalPrice,children:"+ "}),r&&!n&&(0,i.jsx)("p",{className:(0,a.A)(ei().discount,"discountPrice",l&&ei().freeDiscount),children:"".concat(l?p("common:FREE_LABEL"):r)}),(0,i.jsx)("p",{className:(0,a.A)(ei().price,"price",!n&&r&&ei().discounted,!n&&r&&"discountedPrice",n&&ei().freePrice),children:"".concat(n?p("c
3ommon:FREE_LABEL"):s||"")})]})};var el=r(16839),en=r(60886),es=r.n(en);let eo=e=>{let{checked:t,className:r,disabled:c,enableLink:l=!1,onClick:n,product:s}=e;if(!s.imageUrl)return null;let o=(0,i.jsx)("p",{className:es().title,children:s.title});return l&&(null==s?void 0:s.url)&&(o=(0,i.jsx)(j.N,{className:es().title,href:s.url,onClick:e=>e.stopPropagation(),children:s.title})),(0,i.jsxs)("button",{className:r,disabled:c,onClick:n,type:"button",children:[(0,i.jsx)("div",{className:es().imageWrapper,children:(0,i.jsx)(y.sv,{height:90,src:s.imageUrl,width:90})}),(0,i.jsxs)("div",{className:es().productInfo,children:[o,(0,i.jsx)(ec,{className:es().price,discountPrice:s.discountPrice,price:s.price||"",theme:"white"})]}),!c&&(0,i.jsx)(et.P,{checked:t,className:es().checkboxIndicator})]})},ed=e=>{var t,r,c,s;let{disable:o,primaryProduct:d,tactic:p}=e,{t:_}=(0,N.B)(),{onSlide:m,sliderState:h}=(0,u.P)(),[v,g]=(0,n.useState)([d.id,...(null==p||null==(t=p.products)?void 0:t.map(e=>e.id))||[]]),x=(0,n.useMemo)(()=>{var e;return null==p||null==(e=p.items)?void 0:e.reduce((e,t)=>{var r;return e||!function(e,t){if(e.length!==t.length)return!1;let r=[...e].sort(),i=[...t].sort();return r.every((e,t)=>e===i[t])}((null==(r=t.offers)?void 0:r.map(e=>e.productID))||[],v)?e:t},void 0)},[v,null==p?void 0:p.items]),y=(0,n.useMemo)(()=>{var e,t,r,i,c,l,n,s;return{id:d.id,imageUrl:null==d||null==(e=d.primaryAsset)?void 0:e.url,title:d.name||"",price:(null==x||null==(i=x.offers)||null==(r=i.find(e=>e.productID===d.id))||null==(t=r.offer.price)?void 0:t.format)||void 0,discountPrice:(null==x||null==(s=x.offers)||null==(n=s.find(e=>e.productID===d.id))||null==(l=n.offer.price)||null==(c=l.discount)?void 0:c.format)||void 0,url:d.url||""}},[null==x?void 0:x.offers,d]),j=(0,n.useMemo)(()=>((null==p?void 0:p.products)||[]).map(e=>{var t,r,i,c,l,n,s,o;return{id:e.id||"",imageUrl:(null==e||null==(t=e.primaryAsset)?void 0:t.url)||"",title:e.name||"",price:(null==x||null==(c=x.offers)||null==(i=c.find(t=>t.productID===e.id))||null==(r=i.offer.price)?void 0:r.format)||void 0,discountPrice:(null==x||null==(o=x.offers)||null==(s=o.find(t=>t.productID===e.id))||null==(n=s.offer.price)||null==(l=n.discount)?void 0:l.format)||void 0,url:e.url||""}}),[null==x?void 0:x.offers,null==p?void 0:p.products]),[P,D]=(0,n.useState)(j.reduce((e,t)=>({...e,[t.id]:!0}),{}));if(!p||"TacticBuildYourDiscount"!==p.__typename)return null;let S=(null==x||null==(r=x.price.discount)?void 0:r.format)||void 0,b=(null==x?void 0:x.price.format)||void 0;return(0,i.jsxs)("div",{className:es().buildYourDiscount,children:[(0,i.jsxs)("div",{className:es().bundleSource,children:[(0,i.jsxs)("div",{className:es().buildYourDiscountHeader,children:[(0,i.jsx)("p",{className:es().header,children:_("common:COMBINE_WITH_LABEL")}),(0,i.jsxs)("div",{className:(0,a.A)(es().prices,"bundle-price"),children:[(S||b)&&(0,i.jsx)("p",{className:(0,a.A)(es().buyTogether,"buy-as-a-bundle"),children:_("products:BUNDLE_DISCOUNT_LABEL")}),(0,i.jsx)(ec,{className:es().price,discountPrice:S,price:b||"",theme:"white"})]}),(0,i.jsx)(J.Z,{className:(0,a.A)(es().buyButton),color:"transparentWhite",disabled:o||!x,innerSpacing:"medium",productID:d.id,products:$()((null==x?void 0:x.offers)||[],e=>+(e.productID!==d.id)).map(e=>({groupIndex:0,productID:e.productID,quantity:1,tactic:(0,el.V)(e.offer)})),sourceID:"build_your_discount",children:(0,i.jsxs)(i.Fragment,{children:[_("cms:ADD_TO_CART"),(null==x?void 0:x.offers)&&(null==x||null==(c=x.offers)?void 0:c.length)>0?" (".concat(null==x||null==(s=x.offers)?void 0:s.length,")"):null]})})]}),(0,i.jsx)(eo,{checked:!0,className:(0,a.A)(es().product,es().primaryProduct),disabled:!0,product:y},"BundleMatchingProducts_primary_".concat(d.id))]}),(0,i.jsxs)("div",{className:es().productsToBuild,children:[(0,i.jsx)(f.A,{className:es().plus}),(0,i.jsxs)("div",{className:es().sliderWrapper,children:[(0,i.jsx)(u.A,{onSlide:m,children:l()(j,e=>(0,i.jsx)(eo,{checked:P[e.id],className:es().product,enableLink:!0,onClick:()=>{let t={...P,[e.id]:!P[e.id]};D(t),g([d.id,...Object.keys(t).filter(e=>t[e])])},product:e}
3,"BundleMatchingProducts_".concat(e.id)))}),(0,i.jsx)(ee.X,{className:es().sliderIndicator,sliderState:h})]})]})]})};var ea=r(26914),eu=r(67308),ep=r(23801),e_=r(25415),em=r(16446),eh=r.n(em);let ev=e=>{var t;let{className:r,product:c,type:l,...s}=e,{storeURL:o}=n.useContext(e_.B);return(0,i.jsx)(j.N,{...s,analytics:{dest_page_type:"product",dest_page_type_id:c.id,source_id:"linked_products_".concat(l)},className:(0,a.A)(eh().item,r),href:o(c.url||""),children:(null==(t=c.primaryAsset)?void 0:t.url)&&(0,i.jsx)(y.sg,{alt:c.name||"",className:eh().image,height:90,objectFit:"contain",src:c.primaryAsset.url,width:70})})},eg=e=>{let{type:t,variant:r}=e,{t:i}=(0,N.B)(),c=r?" - ".concat(r):"";switch(t){case"color":return i("products:WB_CHOOSE_COLOUR")+c;case"size":return i("products:SIZES")+c;case"variation":return i("products:VARIATIONS")+c;default:return t+c}},ex=e=>{let{products:t,type:r}=e,[c,s]=n.useState();if(!t||0===t.length)return null;let o=t[0].name||void 0,d=t.length>4,u=d?3:4;return(0,i.jsxs)("div",{className:eh().wrapper,children:[(0,i.jsx)("div",{className:eh().title,children:(0,i.jsx)(eg,{type:r,variant:c})}),(0,i.jsxs)("div",{className:(0,a.A)(eh().list,d?eh().full:""),children:[l()(t,(e,t)=>(0,i.jsx)(ev,{className:(0,a.A)(t>=u&&eh().hiddenDesktop),onMouseOut:()=>s(void 0),onMouseOver:()=>s(e.name||void 0),product:e,type:r},e.id)),d&&(0,i.jsx)(eu._,{onOpenChange:e=>{e&&ea.m3.promptOpen({source_id:"linked_products_".concat(r)}),s(r=>e&&r!==t[0].name?o:e||void 0===r?r:void 0)},triggerRender:e=>(0,i.jsx)("button",{...e,className:eh().more,type:"button",children:"+".concat(t.length-u)}),children:(0,i.jsxs)(ep.N,{title:(0,i.jsx)(eg,{type:r}),children:[(0,i.jsx)("div",{className:eh().sidepaneTitle,children:(0,i.jsx)(eg,{type:r,variant:c})}),(0,i.jsx)("div",{className:eh().sidepaneProducts,children:l()(t,e=>(0,i.jsx)(ev,{onMouseOut:()=>s(o),onMouseOver:()=>s(e.name||o),product:e,type:r},e.id))})]})})]})]})};var ef=r(87617),ey=r(65614),ej=r.n(ey);let eP=e=>{var t;let{tactic:r}=e,[c,l]=(0,ef.C)([{productID:(null==(t=r.product)?void 0:t.id)||"",quantity:1,...r.offer&&r.offer.price&&{parentIndex:0,tactic:(0,el.V)(r.offer)}}]);return r.product&&r.productID?(0,i.jsxs)("div",{className:ej().productPage,children:[(0,i.jsx)("div",{className:ej().matchingVariantTitle,children:(0,i.jsx)(R.k,{wordbook:r.title})}),(0,i.jsx)(V,{offer:r.offer||void 0,onChange:e=>l(e.target.checked),product:r.product||void 0,productHeader:r.productHeader||void 0,selected:c,size:"large"})]}):null};var eD=r(6424),eS=r(43043),eN=r(57103),eb=r(92658),eT=r.n(eb);let eI=e=>{let{primaryProduct:t,tactic:r}=e,{t:c}=(0,N.B)(),[n,{isLoading:s,prompts:o,reset:d,variables:u}]=(0,eN.A)();return(0,i.jsxs)("div",{className:eT().productQuantityDiscount,children:[(0,i.jsx)("div",{className:eT().title,children:c("common:BUNDLE_OFFER_PRODUCT_TAG")}),(0,i.jsx)("div",{className:eT().quantityDiscountList,children:l()(null==r?void 0:r.relativeDiscounts,e=>{var r,l,n,s,o,d,u;let p=!!(null==(r=e.price)?void 0:r.discount);return(0,i.jsxs)("div",{className:eT().quantityDiscountItem,children:[(0,i.jsx)("div",{className:eT().imageWrapper,children:(0,i.jsx)(y.sv,{src:(null==t||null==(l=t.primaryAsset)?void 0:l.url)||"",width:42})}),(0,i.jsx)("div",{className:eT().name,children:c("products:BUY_X_SAVE_X_LABEL",{count:e.quantity,percentage:e.percentage})}),(0,i.jsxs)("div",{className:eT().priceWrapper,children:[(0,i.jsx)("span",{className:(0,a.A)(eT().price,(null==(n=e.price)?void 0:n.discount)&&eT().discount),children:p?null==(o=e.price)||null==(s=o.discount)?void 0:s.format:null==e||null==(d=e.price)?void 0:d.format}),p&&(0,i.jsx)("span",{className:eT().beforePrice,children:null==e||null==(u=e.price)?void 0:u.format})]}),(0,i.jsx)(J.Z,{className:eT().buyButton,color:"black",fillWidth:!1,productID:t.id,quantity:e.quantity,children:(0,i.jsx)("span",{children:(0,i.jsx)(eD.A,{})})})]},"ProductQuantityDiscount_".concat(e.quantity))})}),o&&0!==o.length&&(0,i.jsx)(eS.X,{isLoading:s,onClose:d,onSubmit:n,prompts:o,promptsOrigin:u})]})};var ek=r(16941),eL=r(70093),eA=r(56224),eB=r(71271),eC=r(94016),eE=r(1961),eO=r(76419);function ew(e,t){var r,i,c;let[l,n]=(0,eO.O)("200px"),{data:s,loading:o}=(0,G.k1T)({context:{domainProxy:!0,userSpecific:!0},fetchPolicy:"cache-first",nextFetchPolicy:"cache-only",variables:{id:e,type:G.g6_.Product},skip:!n});return[l,!n||o,null==(i=(0,eC.$I)((null==s||null==(c=s.page)?void 0:c.fields)||[],"product"))||null==(r=i.tactics)?void 0:r[t]]}let eR=[null,[]];var eU=r(17664),eW=r(98387),eM=r.n(eW);let eY=e=>
3{let{group:t,id:r,productID:c}=e,{storeURL:l}=n.useContext(e_.B),[s,o,d,u]=function(e,t,r){let[i,c,l]=ew(e,t),[s,o]=n.useMemo(()=>{var e;if(c)return eR;let t=null==l?void 0:l.find(e=>"id"in e&&e.id===r);if(!t||!t.recommendations||0===t.recommendations.length)return eR;let i=t.recommendations[0];if(!i||!i.products||0===i.products.length)return eR;let n=(null==i||null==(e=i.products)?void 0:e.map(eE.y_))||[];return[i,n]},[c,l,r]);return[i,c,s,o]}(c,t,r),[p,_]=(0,n.useState)([]),[m,h]=(0,n.useState)(!0),{t:v}=(0,N.B)(),g=(0,i.jsx)(eB.$,{className:(0,a.A)(eM().showMore,(!m||u.length<=18)&&eM().hidden),disabled:o,innerSpacing:"large",onClick:()=>{h(!1),ea.m3.plApplyPage({page:2,source_id:"recommendation_grid_show_more"})},type:"button",children:v("cms:SHOW_MORE_LABEL")});if(o)return(0,i.jsxs)("div",{className:eM().grid,ref:s,children:[(0,i.jsx)("h3",{className:eM().gridHeader,children:(0,i.jsx)(eA.E,{className:eM().skeleton})}),(0,i.jsx)(eL.L,{maxColumns:8,showMore:m,children:(0,i.jsx)(eA.i,{count:25})}),g]});if(!d||0===u.length)return(0,i.jsx)("div",{ref:s});let x="product_page_".concat(d.placement,"_").concat(d.id);return(0,i.jsxs)("div",{className:eM().grid,"data-in-view":x,ref:s,children:[(0,i.jsx)("h3",{className:eM().gridHeader,children:d.title}),(0,i.jsx)(eL.L,{maxColumns:8,showMore:m,children:u.map(e=>(0,i.jsx)(eU.W,{...e,action:(0,i.jsx)(J.Z,{className:(0,a.A)(p.includes(e.id)&&eM().success),color:"black",onSuccess:()=>{_(t=>t.includes(e.id)?t:[...t,e.id])},portal:!0,preventDefault:!0,productID:e.id,products:[{quantity:1,productID:e.id}],sourceID:x,stopPropagation:!0,useCache:!0,children:p.includes(e.id)?(0,i.jsx)(ek.A,{}):(0,i.jsx)(eD.A,{})}),sourceID:x,url:l(e.url||"")},"recommendation_".concat(e.id)))}),g]})},eH=e=>{var t;let{group:r,id:c,productID:l}=e,[n,s,o]=ew(l,r);if(s)return(0,i.jsx)(k.$,{header:" ",loading:s,products:[],wrapperRef:n});let d=null==o?void 0:o.find(e=>"id"in e&&e.id===c),a=null==(t=(null==d?void 0:d.recommendations)||[])?void 0:t[0];if(!(null==a?void 0:a.products)||0===a.products.length)return null;let u="product_page_".concat(a.placement,"_").concat(a.id);return(0,i.jsx)(k.$,{"data-in-view":c,header:a.title,loading:!1,products:E()(a.products,18),sourceID:u,wrapperRef:n})};var eQ=r(58537),eV=r.n(eQ),ez=r(43112),eF=r.n(ez),eq=r(85300),eG=r(36934),eZ=r.n(eG);let eK=e=>{let{buyPersonalizationID:t,items:r,onBuyPersonalizationID:c=eF(),selectedCrossSellIDs:l=[],setSelectedCrossSellIDs:s}=e,{t:o}=(0,N.B)(),d=(0,n.useCallback)(e=>eV()(l,e)>=0,[l]),u=(0,n.useCallback)(e=>{let{currentTarget:{checked:t,value:r}}=e;t?c(r):c(null)},[c]),p=(0,n.useCallback)(e=>{e.stopPropagation(),s&&(e.currentTarget.checked?s([...l,e.currentTarget.value]):s(g()(l,t=>t!==e.currentTarget.value)))},[l,s]);return r&&0!==r.length?(0,i.jsxs)("div",{className:(0,a.A)(eZ().upSells,eZ().productPage),children:[(0,i.jsx)("div",{className:eZ().title,children:o("products:WB_UPGRADE_WITH")}),(0,i.jsx)("div",{className:eZ().wrapper,children:r.map(e=>{if(!e||!e.product)return null;if("giftWrapping"===e.type)return(0,i.jsx)(V,{onChange:p,product:e.product,selected:d(e.product.id),type:"giftWrappings"},"cross_sell_product_".concat(e.product.id));if("personalization"===e.type){var r;return(0,i.jsx)(V,{onChange:u,product:{id:null!=(r=e.product.id)?r:"",masterVariant:e.product.masterVariant,primaryAsset:e.product.primaryAsset,url:null,name:o((0,eq.L)(e.product))},selected:t===e.product.id},"cross_sell_personalizations_".concat(e.product.id))}return(0,i.jsx)(V,{onChange:p,product:e.product||void 0,selected:d(e.product.id)},"cross_sell_product_".concat(e.product.id))})})]}):null};var eX=r(7502),e$=r.n(eX);let eJ=e=>{var t;let{addonsSelected:r=!1,buyPersonalizationID:c,group:a,onBuyPersonalizationID:u,selectedCrossSellIDs:p,setSelectedCrossSellIDs:_,selectedRelatedProductIDs:m=[],setSelectedRelatedProductIDs:v}=e,{t:g}=(0,N.B)(),x=(0,n.useContext)(d.z);if(!x)return null;let f=null==x||null==(t=x.tactics)?void 0:t[a];return f&&0!==f.length?f.map(e=>{var t,n,d,f,y,j;if("TacticAssortmentLadder"===e.__typename)return(0,i.jsx)(q,{tactic:e},"".concat(e.__typename,"_").concat(e.id));if("TacticBlocks"===e.__typename)return(0,i.jsx)(K,{tactic:e},"".concat(e.__typename,"_").concat(e.id));if("TacticBuildYourDiscount"===e.__typename)return(0,i.jsx)(ed,{disable:r,primaryProduct:x,tactic:e},"".concat(e.__typename,"_").concat(e.id));if("TacticBundleInfo"===e.__typename){let t=e.settings||{};return(0,i.jsx)(I,{bundleItems:e.bundleProducts,bundlePrice:e.bundlePrice,disablePrices:!!t.disablePrices,disableProductLinks:!!t.disableProductLinks})}return"TacticComplementaryProducts"===e.__typename?e.products&&0!==e.products.length&&v?(0,i.jsx)(h,{header:g("products:WB_RELATED_PRODUCTS_LABEL"),children:l()(e.products,e=>(0,i.jsx)(V,{id:e.id,onChange:()=>{m.includes(e.id)?v(t=>t.filter(t=>t!==e.id)):v(t=>[...t,e.id])},product:e,selected:m.includes(e.id)},"ComplementaryProduct_".concat(e.id)))},"".concat(e.__typename,"_").concat(e.id)):null:"TacticLinkedProductsColor"===e.__typename?(0,i.jsx)(ex,{products:null==(t=e.color)?void 0:t.products,type:"color"},"".concat(e.__typename,"_").concat(e.id)):"TacticLinkedProductsSizeAndVariation"===e.__typename?(null==(n=e.size)?void 0:n.products)&&0!==e.size.products.length||(null==(d=e.variation)?void 0:d.products)&&0!==e.variation.products.length?(0,i.jsx)(B,{sizes:(null==(f=e.size)?void 0:f.products)||[],variations:(null==(y=e.variation)?void 0:y.products)||[]},"".concat(e.__typename,"_").concat(e.id)):null:"TacticLooks"===e.__typename?e.looks&&0!==e.looks.length?(0,i.jsx)(o.X,{id:e.id||void 0,looks:e.looks,noPadding:!0,settings:e.settings||void 0,title:(null==(j=e.title)?void 0:j.defaults)||void 0},"".concat(e.__typename,"_").concat(e.id)):null:"TacticMatchingVariant"===e.__typename?(0,i.jsx)(eP,{tactic:e},"".concat(e.__typename,"_").concat(e.id)):"TacticOthersBought"===e.__typename?(0,i.jsx)(eH,{group:a,id:e.id||"",productID:x.id},"".concat(e.__typename,"_").concat(e.id)):"TacticOthersBoughtGrid"===e.__typename?(0,i.jsx)(eY,{group:a,id:e.id||"",productID:x.id},"".concat(e.__typename,"_").concat(e.id)):"TacticRecommendedForYou"===e.__typename?(0,i.jsx)(eH,{group:a,id:e.id||"",productID:x.id},"".concat(e.__typename,"_").concat(e.id)):"TacticRelatedProducts"===e.__typename?e.products&&0!==e.products.length?(0,i.jsx)(O,{products:e.products,sourceID:"linked_cross_sales_products"},"".concat(e.__typename,"_").concat(e.id)):null:"TacticRelativeDiscount"===e.__typename?(0,i.jsx)(eI,{primaryProduct:x,tactic:e},"".concat(e.__typename,"_").concat(e.id)):"TacticSimilarProducts"===e.__typename?e.products&&0!==e.products.length?(0,i.jsx)(s.Z,{appearance:{backgroundColor:"var(--green-500)",textColor:"var(--white)"},className:e$().productSlider,common:{position:"left",title:g("products:SIMILAR_PRODUCTS_LABEL"),titleElement:"h2",text:{key:"cms:SIMILAR_PRODUCTS_LABEL",value:{children:[{children:[{text:g("products:OTHER_CUSTOMERS_ALSO_BOUGHT")}],type:"p"}]}}},children:(0,i.jsx)(k.$,{className:e$().slider,products:e.products,sourceID:"house_brand"})},"".concat(e.__typename,"_").concat(e.id)):null:"TacticUpgradeWith"===e.__typename?e.items&&0!==e.items.length&&u&&_?(0,i.jsx)(eK,{buyPersonalizationID:c,items:e.items,onBuyPersonalizationID:u,selectedCrossSellIDs:p,setSelectedCrossSellIDs:_},"".concat(e.__typename,"_").concat(e.id)):null:null}):null}},15056:e=>{e.exports={wrapper:"ProductBundleItem_wrapper__f1caJ",collapsed:"ProductBundleItem_collapsed__y8V9m",item:"ProductBundleItem_item__wI2hQ",image:"ProductBundleItem_image__Psz0i",price:"ProductBundleItem_price__ZcZx5"}},16446:e=>{e.exports={list:"LinkedProducts_list__K6My6",full:"LinkedProducts_full__v3PFI",title:"LinkedProducts_title__j9WLE",more:"LinkedProducts_more__25Pj_",sidepaneTitle:"LinkedProducts_sidepaneTitle__VnCd_",item:"LinkedProducts_item__jl9Fs",image:"LinkedProducts_image__cVbnV",hiddenDesktop:"LinkedProducts_hiddenDesktop__ed8A7",sidepaneProducts:"LinkedProducts_sidepaneProducts__HQ8SQ"}},31958:e=>{e.exports={priceWrapper:"Price_priceWrapper__oKwGA",firstPriceWeighted:"Price_firstPriceWeighted__UOqy1",black_red:"Price_black_red__0xw4C",black:"Price_black__H5Zug",white:"Price_white__MjfVm",additionalPrice
3:"Price_additionalPrice__hAuVA",price:"Price_price__2Ufsb",discounted:"Price_discounted__YQIyn",freePrice:"Price_freePrice__WhViD",discount:"Price_discount__YQJlg",freeDiscount:"Price_freeDiscount__z7Tzu"}},40323:e=>{e.exports={wrapper:"Display_wrapper__E5_9q",content:"Display_content__X1SGs",layout:"Display_layout__vleyZ",slider:"Display_slider___Rcw1",productSliderWrapper:"Display_productSliderWrapper__pSC_a",productSlider:"Display_productSlider__TEVYs",sticky:"Display_sticky__tfwL5",productBreadcrumbs:"Display_productBreadcrumbs__ffgbZ"}},42232:e=>{e.exports={assortmentLadder:"AssortmentLadder_assortmentLadder__W4d0F",title:"AssortmentLadder_title__oHB8y"}},42459:(e,t,r)=>{var i=r(52634),c=r(5465);e.exports=function(e,t,r){return e&&e.length?i(e,0,(t=r||void 0===t?1:c(t))<0?0:t):[]}},43612:e=>{e.exports={tooltip:"UpSellTooltip_tooltip__y9D5f",trigger:"UpSellTooltip_trigger__i9JXk",open:"UpSellTooltip_open__vfO3Q",content:"UpSellTooltip_content__Nulw_"}},52887:e=>{e.exports={complementaryProducts:"ComplementaryProducts_complementaryProducts__gwf1W",slider:"ComplementaryProducts_slider__PhbeQ",range:"ComplementaryProducts_range__Fp9La",fadeIn:"ComplementaryProducts_fadeIn__wJTpg",hidden:"ComplementaryProducts_hidden__I55Fh",complementaryProductsTitle:"ComplementaryProducts_complementaryProductsTitle__cWx73",arrowLeft:"ComplementaryProducts_arrowLeft__YEUl4",arrowRight:"ComplementaryProducts_arrowRight___eL_N"}},60886:e=>{e.exports={product:"BuildYourDiscountTactic_product__Fq_ki",imageWrapper:"BuildYourDiscountTactic_imageWrapper__rnlut",checkboxIndicator:"BuildYourDiscountTactic_checkboxIndicator__bL0WY",buildYourDiscount:"BuildYourDiscountTactic_buildYourDiscount__ieG_X",header:"BuildYourDiscountTactic_header__mVsl1",bundleSource:"BuildYourDiscountTactic_bundleSource___wJRn",buildYourDiscountHeader:"BuildYourDiscountTactic_buildYourDiscountHeader__HYwND",buyButton:"BuildYourDiscountTactic_buyButton__FrEy3",buyTogether:"BuildYourDiscountTactic_buyTogether__8KjoT",prices:"BuildYourDiscountTactic_prices__cdRgC",price:"BuildYourDiscountTactic_price__fnrnK",productsToBuild:"BuildYourDiscountTactic_productsToBuild__69WRe",sliderIndicator:"BuildYourDiscountTactic_sliderIndicator__gt_dh",productInfo:"BuildYourDiscountTactic_productInfo___I5vq",title:"BuildYourDiscountTactic_title__mu4iZ",sliderWrapper:"BuildYourDiscountTactic_sliderWrapper__mm_jx",plus:"BuildYourDiscountTactic_plus__hic61",primaryProduct:"BuildYourDiscountTactic_primaryProduct__Sdz8Q"}},73796:e=>{e.exports={title:"ProductBundle_title__nHeKA",list:"ProductBundle_list__QMIAL",toggle:"ProductBundle_toggle__U3nr6",summary:"ProductBundle_summary__0L2qa"}},84614:e=>{e.exports={item:"UpSellItem_item__oZWas",content:"UpSellItem_content__5UYSR",image:"UpSellItem_image__cf8T8",productHeader:"UpSellItem_productHeader__1q8G9",name:"UpSellItem_name__7QkGx",priceWrapper:"UpSellItem_priceWrapper__mptEg",beforePrice:"UpSellItem_beforePrice__YT3in",price:"UpSellItem_price__94DHb",discount:"UpSellItem_discount__X6m4b",checkbox:"UpSellItem_checkbox___gjh8",checkboxWrapper:"UpSellItem_checkboxWrapper__2gK9z",small:"UpSellItem_small__FhFbp",large:"UpSellItem_large__yLuce"}},87617:(e,t,r)=>{"use strict";r.d(t,{C:()=>p,_:()=>_});var i=r(65744);let c=Object.freeze([]),l=new Map,n=new Map,s=new Set,o=c;function d(e){var t;null==(t=n.get(e))||t.forEach(e=>e())}function a(){(function(){let e=[];
3if(l.forEach(t=>{t.isSelected&&e.push(...t.items)}),e.length===o.length){let t=!0;for(let r=0;r<e.length;r+=1)if(e[r]!==o[r]){t=!1;break}if(t)return!1}return o=e,!0})()&&s.forEach(e=>e())}let u={register(e,t){let r=l.get(e);r?r.items=t:l.set(e,{items:t,isSelected:!1}),a()},unregister(e){l.delete(e)&&a()},isSelected(e){var t,r;return null!=(t=null==(r=l.get(e))?void 0:r.isSelected)&&t},setIsSelected(e,t){let r=l.get(e);r&&r.isSelected!==t&&(r.isSelected=t,d(e),a())},reset(){let e=[];l.forEach((t,r)=>{t.isSelected&&(t.isSelected=!1,e.push(r))}),e.forEach(d),a()},subscribeSelection(e,t){let r=n.get(e);return r||(r=new Set,n.set(e,r)),r.add(t),()=>{r.delete(t),0===r.size&&n.delete(e)}},subscribeSnapshot:e=>(s.add(e),()=>{s.delete(e)}),getSnapshot:()=>o,getServerSnapshot:()=>c};function p(e){let t=i.useId();i.useEffect(()=>{u.register(t,e)},[t,e]),i.useEffect(()=>()=>u.unregister(t),[t]);let r=i.useCallback(e=>u.subscribeSelection(t,e),[t]);return[i.useSyncExternalStore(r,()=>u.isSelected(t),()=>!1),i.useCallback(e=>u.setIsSelected(t,e),[t])]}function _(){return i.useSyncExternalStore(u.subscribeSnapshot,u.getSnapshot,u.getServerSnapshot)}},92658:e=>{e.exports={productQuantityDiscount:"ProductQuantityDiscount_productQuantityDiscount__s1qbP",title:"ProductQuantityDiscount_title__T8v5n",quantityDiscountList:"ProductQuantityDiscount_quantityDiscountList__4Me22",quantityDiscountItem:"ProductQuantityDiscount_quantityDiscountItem__rHK7K",imageWrapper:"ProductQuantityDiscount_imageWrapper__gegyz",name:"ProductQuantityDiscount_name__HlBKn",priceWrapper:"ProductQuantityDiscount_priceWrapper__8OKoT",beforePrice:"ProductQuantityDiscount_beforePrice__LC_s1",price:"ProductQuantityDiscount_price__XAySQ",discount:"ProductQuantityDiscount_discount__cVHVl",buyButton:"ProductQuantityDiscount_buyButton__MUOzx"}},98387:e=>{e.exports={grid:"grid_grid__C1kW_",gridHeader:"grid_gridHeader__ABMDh",skeleton:"grid_skeleton__zVQg5",showMore:"grid_showMore__P8_a3",hidden:"grid_hidden__onx7F"}}}]);
4//# sourceMappingURL=1881-5ef21c6fa2606b55.js.map
5//# debugId=6d7cafb0-104b-5e4a-b87d-44772623cc88

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.