1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[3283],{47224:(e,t,l)=>{l.r(t),l.d(t,{default:()=>L});var n=l(58168),i=l(10467),o=l(96540),r=l(54625),a=l(5556),c=l.n(a),s=l(59146),u=l(28137),d=l(67234),m=l(54183),v=l(61892),p=l(77182),g=l(85353),h=l(21052),E=l(22254),f=l(55952),_=l(54721),x=l(55170),y=l(46419),A=l(24542),b=l(40541),D=l(21651),P=l(5768),S=l(84819),k=l(87025),C=l(6442),w=l(42759);const H=({suggestedCategories:e,suggestedProducts:t,promoSlot:l,closeAndNavigate:a})=>{var c,H,L,j,z,O;const{id:q}=(0,k.A)(),{buildUrl:I}=(0,_.A)(),T=(0,C.A)(),B=(0,m.A)({base:"none",xl:"flex"}),F=(0,x.HH)(),K=[];t.products=(0,S.uq)(null==t?void 0:t.products,null==t?void 0:t.euProducts,null==t?void 0:t.ukProducts,q),e.categories=(0,S.uq)(null==e?void 0:e.categories,null==e?void 0:e.euCategories,null==e?void 0:e.ukCategories,q),null==t||null===(c=t.products)||void 0===c||c.map((e=>K.push(e)));const N=function(){var e=(0,i.A)((function*({queryKey:e}){const[,t]=e??[],l={ids:K.join(","),allImages:!0,perPricebook:!0};return t&&(l.ck=t),yield F.shopperProducts.getProducts({parameters:l})}));return function(t){return e.apply(this,arguments)}}(),W=(0,E.I)({queryKey:["products",K.join(",")],queryFn:N,refetchOnWindowFocus:!1,staleTime:12e4}),{triggerSelectItem:M}=(0,w.I)({products:null===(H=W.data)||void 0===H?void 0:H.data,data_amplience_component_name:"pre-search",data_amplience_component_schema:"https://content.hasbro.com/models/pre-search",data_amplience_delivery_key:""}),U=a||(0,f.A)(),V=(0,p.o)("Header");return o.createElement(d.s,{flexDirection:{base:"column",xl:"row"},justifyContent:"space-between",mt:{base:8,xl:20},gap:"12"},e&&o.createElement(d.s,{flexDirection:"column"},o.createElement(g.D,(0,n.A)({as:"h6",size:"h7"},V.searchSuggestionHeader,{mb:"6"}),null==e?void 0:e.title),o.createElement(d.s,{flexDirection:"column",gap:"4"},null==e||null===(L=e.categories)||void 0===L?void 0:L.map((e=>o.createElement(u.$,(0,n.A)({onMouseDown:()=>U(`/collections/${e.category.id}`),fontSize:"md",key:e.category.id,variant:"suggested-search-link",size:"auto"},V.searchSuggestionContentButton,{justifyContent:"left",color:"white",_hover:{color:"hasbroShade.200"}}),o.createElement(h.E,V.searchSuggestionContentText,e.category.name)))))),o.createElement(v.E,(0,n.A)({isLoaded:W.isFetched},V.searchPreLoader),!W.isError&&o.createElement(d.s,{flexDirection:"column"},o.createElement(g.D,(0,n.A)({as:"h6",size:"h7"},V.searchSuggestionHeader,{mb:"6"}),null==t?void 0:t.title),o.createElement(d.s,{flexDirection:"column",gap:"4"},null==W||null===(j=W.data)||void 0===j||null===(z=j.data)||void 0===z?void 0:z.map(((e,t)=>{var l,n,i;const a={viewType:"small"};null!=e&&e.variationValues&&(a.selectedVariationAttributes=null==e?void 0:e.variationValues);const c=(0,y.F)(null==e?void 0:e.imageGroups,a);return o.createElement(d.s,{key:null==e?void 0:e.id,gap:"4"},c?o.createElement(d.s,{alignSelf:"flex-start",minWidth:"68px",minHeight:"68px",background:"black",alignItems:"center",justifyContent:"center",borderRadius:"16px"},o.createElement(P.A,{src:null==c||null===(l=c.images[0])||void 0===l?void 0:l.link,srcOptions:{bg:"black",w:"112"},imageProps:{alt:null==c||null===(n=c.images[0])||void 0===n?void 0:n.alt,title:null==c||null===(i=c.images[0])||void 0===i?void 0:i.title,loading:"lazy"},width:"56px",height:"56px"})):o.createElement(s.a,{minWidth:"68px"}),o.createElement(d.s,{flexDirection:"column",fontSize:"14px"},o.createElement(r.Link,{onClick:()=>{M(t)},to:I((0,A.ec)({id:null==e?void 0:e.id,name:null==e?void 0:e.name},T.locale))},o.createElement(h.E,{fontWeight:"700",_hover:{textDecoration:"underline"},color:"white",fontSize:{base:"1.125rem",xl:"1.25rem"}},null==e?void 0:e.name)),e&&o.createElement(D.A,{currency:null==e?void 0:e.currency,prices:{price:(null==e?void 0:e.price)||void 0,priceMax:(null==e?void 0:e.priceMax)||void 0,setPrice:null==e?void 0:e.c_setPrice,salePrice:null==e?void 0:e.c_salePrice,listPrice:null==e?void 0:e.c_listPrice},productType:null==e?void 0:e.type,variant:"search"})))}))))),l&&(null==l?void 0:l.title)&&o.createElement(d.s,{display:B,flexBasis:"40%",flexDirection:"column"},o.createElement(g.D,(0,n.A)({as:"h6",size:"h7"},V.searchSuggestionHeader,{mb:"6"}),null==l?void 0:l.title),(null==l?void 0:l.content)&&o.createElement(b.A,{fetch:[{id:null==l||null===(O=l.content)||void 0===O?void 0:O.id}]})))};H.propTypes={promoSlot:c().object,suggestedCategories:c().object,suggestedProducts:c().object,closeAndNavigate:c().func};const L=H}}]);
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.