1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3748],{66389:(e,t,r)=>{r.d(t,{U:()=>s});var l=r(95155),i=r(92475),o=r(78951),a=r(12115),n=r(49454),d=r(25719);let s=({children:e,dataTestId:t,externalSite:r,sameTabDomain:s,sx:c,url:x})=>{let{externalLinkTranslations:u}=(0,i.N)(),[p,g]=(0,a.useState)(!1);if(!x)return(0,l.jsx)(l.Fragment,{children:e});let{target:f}=(0,o.f)(r,s);return(0,l.jsxs)(d.CostcoBox,{"data-testid":t,onClick:e=>{e.stopPropagation(),e.preventDefault(),p||(r?g(!0):"_self"===f?window.location.href=x:"_blank"===f&&window.open(x,"_blank"))},sx:c,children:[e,r&&x&&(0,l.jsx)(n.N,{href:x,isOpen:p,setOpen:g,onCloseHandler:()=>g(!1),translations:u||void 0})]})}},75294:(e,t,r)=>{r.r(t),r.d(t,{default:()=>n,useRtl:()=>a});var l=r(12115),i=r(95155);let o=l.createContext(),a=()=>l.useContext(o)??!1,n=function({value:e,...t}){return(0,i.jsx)(o.Provider,{value:e??!0,...t})}},96783:(e,t,r)=>{r.d(t,{ProductConciergeUI:()=>N});var l,i=r(95155),o=r(12115),a=r(24880),n=r(40131),d=r(78951),s=r(7457),c=r(51838),x=r(66389),u=r(33423);let p=({analyticsData:e,buttonType:t="secondary",ctaData:r})=>{let{trackEvent:l}=(0,u.z)(),{title:o,url:n,external_site:p,same_tab_domain:g}=r||{};if(!o||!n)return null;let f={espot:e.replace("title",o||"")},h={trackType:c.Re,trackedData:f},{target:v}=(0,d.f)(p,g);return(0,i.jsx)(x.U,{externalSite:p,sameTabDomain:g,url:n,sx:{display:"flex"},children:(0,i.jsx)(s.Button,{"data-testid":"concierge-action-button",href:n,variant:t,sx:{width:"100%",margin:`0 ${a.D3H} ${a.Mzk} ${a.D3H}`},onClick:()=>l(h),target:v,children:o})})};var g=r(90058),f=r(27966),h=r(12158),v=r(2377),m=r(12004),C=r(92475),w=r(98210),k=r(86670),j=r(3187),_=r(25719);let y=(0,k.Ay)(j.Link)({display:"flex",gap:a.m72}),D=(0,k.Ay)(_.CostcoBox,{shouldForwardProp:e=>"headerBackgroundColor"!==e})(({headerBackgroundColor:e})=>({display:"flex",padding:`${a.iAn} ${a.D3H}`,gap:a.iAn,justifyContent:"space-between",alignItems:"flex-start",background:e})),b=(0,k.Ay)(h.Text,{shouldForwardProp:()=>!0})(({headertextcolor:e})=>({color:e})),B=(0,k.Ay)("ul")({display:"flex",flexDirection:"column",gap:a.D3H,flexGrow:1,paddingInlineStart:0,padding:`0 ${a.D3H} 0 ${a.D3H}`,marginTop:`${a.D3H}`,marginBottom:`${a.Mzk}`}),$=(0,k.Ay)("ul")({display:"flex",width:"100%",paddingInlineStart:0,gap:`${a.m72} ${a.iAn}`,marginTop:`${a.D3H}`,marginBottom:`${a.Mzk}`}),T=(0,k.Ay)("li")({display:"flex",alignItems:"center",flexBasis:"50%",gap:`${a.m72} ${a.D3H}`,flex:"1 0 0",flexWrap:"wrap"}),H=(0,k.Ay)("li")({display:"flex",gap:`${a.m72} ${a.D3H}`,flex:"1 0 0",flexWrap:"wrap",width:"100%"}),A=({featureLinkData:e,featureTitleId:t,finalAnalyticsData:r})=>{let{externalLinkProps:l}=(0,C.N)(),{trackEvent:o}=(0,u.z)(),{url:a,title:n,external_site:s,same_tab_domain:c}=e||{};if(!a||!n)return null;let{target:x}=(0,d.f)(s,c),p=t||void 0;return(0,i.jsx)(_.CostcoBox,{children:(0,i.jsxs)(y,{"aria-describedby":p,"data-testid":t,hasExternalLinkWarning:s,href:a,onClick:()=>o(r),target:x,...l??{},children:[(0,i.jsx)(h.Text,{variant:"l1",children:n}),(0,i.jsx)(w.A,{sx:{height:"18px",width:"18px"}})]})})};var J=((l=J||{}).GridView="Grid View",l.ListView="List View",l.BasicView="Basic View",l);let L=e=>null==e?void 0:e.replace(/\s+/g,"-").toLowerCase(),S=({features:e,viewType:t=J.GridView,analyticsData:r})=>{let l=(0,g.A)("(min-width:360px)");if(!(null==e?void 0:e.length))return null;let o=t===J.GridView,n=({feature:e})=>{var t,l;let o=e.feature_title?`product-concierge-feature-title-${L(e.feature_title)}`:void 0,n={espot:r.replace("title",(null==e?void 0:e.feature_title)||"")},d={trackType:c.Re,trackedData:n};return(0,i.jsxs)(_.CostcoBox,{sx:{display:"flex",width:"100%"},children:[(0,i.jsx)(m.default,{brandFolderAssets:e.feature_icon,adobeAssets:e.feature_icon_adobe,sx:{marginRight:a.iAn,maxHeight:"24px",width:"auto",maxWidth:"24px"},imageAltText:(null==e?void 0:e.icon_alt_text)||""}),(0,i.jsxs)(_.CostcoBox,{sx:{display:"flex",flexDirection:"column",gap:a.m72,width:"100%",flexWrap:"wrap"},children:[e.feature_title&&(0,i.jsxs)(_.CostcoBox,{children:[(0,i.jsx)(h.Text,{id:o,variant:"l1",children:e.feature_title}),e.feature_subtitle&&(0,i.jsx)(h.Text,{variant:"l2",sx:{marginTop:a.m72},children:e.feature_subtitle})]}
1),(null==(t=e.feature_link)?void 0:t.title)&&(null==(l=e.feature_link)?void 0:l.url)&&(0,i.jsx)(A,{featureLinkData:e.feature_link,featureTitleId:o,finalAnalyticsData:d})]})]})};if(!o||!l||!(e.length<=4))return(0,i.jsx)(B,{"data-testid":"concierge-feature-items-list-view",children:e.map(e=>(0,i.jsx)(T,{children:(0,i.jsx)(n,{feature:e})},e.feature_title))});{let t=e.slice(0,2),r=e.slice(2);return(0,i.jsx)(_.CostcoBox,{"data-testid":"concierge-feature-items-grid-view",sx:{display:"flex",gap:a.iAn,marginLeft:a.D3H,marginRight:a.D3H},children:(0,i.jsxs)($,{children:[(0,i.jsx)(f.default,{sx:{display:"flex",flexDirection:"column",flex:1,alignItems:"flex-start",gap:a.D3H},children:t.map(e=>(0,i.jsx)(H,{children:(0,i.jsx)(n,{feature:e})},e.feature_title))}),(0,i.jsx)(v.Divider,{orientation:"vertical",sx:{width:"1px",height:"100%",alignSelf:"center"}}),(0,i.jsx)(f.default,{sx:{display:"flex",flexDirection:"column",flex:1,alignItems:"flex-start",gap:a.D3H},children:r.map(e=>(0,i.jsx)(H,{children:(0,i.jsx)(n,{feature:e})},e.feature_title))})]})})}},P=({headerData:e,themeColors:t,analyticsData:r})=>{let{externalLinkProps:l}=(0,C.N)(),{trackEvent:o}=(0,u.z)(),{title:a,subtitle:n,header_link:s}=e||{},{title:x,url:p}=s||{},{target:g}=(0,d.f)(null==s?void 0:s.external_site,null==s?void 0:s.same_tab_domain),{headerBackgroundColor:f,headerTextColor:h}=t||{};if(!a)return null;let v=`product-concierge-header-title-${L(a)}`,m={espot:r.replace("title",a)},k={trackType:c.Re,trackedData:m};return(0,i.jsxs)(D,{headerBackgroundColor:f,children:[(0,i.jsxs)(_.CostcoBox,{children:[(0,i.jsx)(b,{bold:!0,variant:"t4","data-testid":`product-concierge-header-title-${a}`,id:v,headertextcolor:h,children:a}),n&&(0,i.jsx)(b,{headertextcolor:h,variant:"b2",children:n})]}),x&&p&&(0,i.jsx)(_.CostcoBox,{children:(0,i.jsxs)(y,{"aria-describedby":v,"data-testid":"product-concierge-header-link",hasExternalLinkWarning:null==s?void 0:s.external_site,href:p,onClick:()=>{o(k)},target:g,...l??{},children:[(0,i.jsx)(b,{headertextcolor:h,variant:"l1",children:x}),(0,i.jsx)(w.c,{sx:{height:"20px",width:"20px",color:h}})]})})]})};var z=r(84102);let I=a.S6v,V=({markdown:e})=>e&&e.length?(0,i.jsx)(_.CostcoBox,{sx:{margin:a.D3H},"data-testid":"product-concierge-markdown",children:e.map(e=>{var t,r,l,o;if(!e.markdown_text)return null;let n={color:(null==(r=null==(t=null==e?void 0:e.color)?void 0:t.text_color)?void 0:r.hex)||I,backgroundColor:(null==(o=null==(l=null==e?void 0:e.color)?void 0:l.background_color)?void 0:o.hex)||"transparent"};return(0,i.jsx)(z.T,{styles:n,markdown:e.markdown_text,linkColor:a.H4y,overrides:{p:{component:h.Text,props:{variant:"l1",component:"p"}},ul:{component:"ul",props:{style:{marginTop:a.iAn,marginBottom:a.iAn,paddingInlineStart:a.i_v}}}}})})}):null;function N({data:e,containerStyles:t={},pageIndex:r=0}){let l,[d,s]=(0,o.useState)("");if((0,o.useEffect)(()=>{var e;"u">typeof window&&s((null==(e=null==window?void 0:window.digitalData)?void 0:e.pageType)||"")},[]),!e)return null;let{header:c,concierge_feature_view:x,concierge_markdown:u,enable_cta_link:g,cta_label:f,select_theme:h,concierge_body_background_color:v,concierge_small_text:m,select_cta_type:C,concierge_body_display_options:w}=e||{},{markdown:k=[]}=u||{},{title:j}=c||{},{concierge_feature:y,select_feature_display_options:D}=x||{};if(!j||!(null==y?void 0:y.length))return null;let b=(l={headerBackgroundColor:a.DJJ,background:a.DJJ,borderColor:a.DJJ,headerTextColor:a.S6v,contentTextColor:a.S6v},(null==h?void 0:h.toLowerCase())==="blue"&&(l.headerBackgroundColor=a.H4y,l.borderColor=a.H4y,l.background=a.KLo,l.headerTextColor=a.DJJ,l.contentTextColor=a.S6v),(null==h?void 0:h.toLowerCase())==="red"&&(l.headerBackgroundColor=a.wcX,l.borderColor=a.wcX,l.background=a.z9P,l.headerTextColor=a.DJJ,l.contentTextColor=a.S6v),(null==h?void 0:h.toLowerCase())==="green"&&(l.headerBackgroundColor=a.JBU,l.borderColor=a.JBU,l.background=a.z9P,l.headerTextColor=a.DJJ,l.contentTextColor=a.S6v),"grey"===v.toLowerCase()&&(l.background=a.z9P),l),B=`${d} | ${r} | Costco Product Concierge | Product Concierge | title | ${(null==e?void 0:e.title)||""}`;return(0,i.jsx)(_.CostcoBox,{"data-testid":"product-concierge-ui",sx:{...t,background:b.background,borderColor:`1px solid ${b.borderColor}`}
1,children:(0,i.jsxs)(_.CostcoBox,{sx:{border:`2px solid ${null==b?void 0:b.borderColor}`,borderRadius:"4px",display:"flex",flexDirection:"column",paddingBottom:a.D3H},children:[(0,i.jsx)(_.CostcoBox,{children:(0,i.jsx)(P,{headerData:c,themeColors:b,analyticsData:B})}),(null==w?void 0:w.toLowerCase())==="markdown"?(0,i.jsx)(V,{markdown:k}):(0,i.jsx)(S,{features:y,viewType:D,analyticsData:B}),g&&(0,i.jsx)(p,{analyticsData:B,buttonType:C,ctaData:f}),(0,i.jsx)(n.a,{sx:{margin:`0px ${a.D3H} 0px ${a.D3H}`},isMarkdown:!0,variant:"disclaimer_v2",children:m})]})})}N.displayName="ProductConcierge"}}]);
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.