"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8068],{38068:function(e,i,l){l.r(i);var d={OTHER_VIEW:"otherView",HOME_VIEW:"homeView",CATEGORY_VIEW:"categoryView",DEPARTMENT_VIEW:"departmentView",INTERNAL_SITE_SEARCH_VIEW:"internalSiteSearchView",PRODUCT_VIEW:"productView"},sendEvent=(e,i)=>{var l,d;null===(l=window)||void 0===l||null===(d=l.sendrc)||void 0===d||d.call(l,e,i)};i.default=e=>{switch(e.name){case"page_view":switch(null!==(i=null===(l=g=e.params)||void 0===l?void 0:null===(o=l.page)||void 0===o?void 0:o.type)&&void 0!==i?i:null===(n=g)||void 0===n?void 0:n.type){case"plp":if(!(null!==(t=g)&&void 0!==t&&null!==(a=t.page_location)&&void 0!==a&&a.includes("fuzzy")))break;var i,l,o,n,t,a,r,v,u,s,c,E,m,p,_,I,h,V,f,N,T,b,g,k,w,O,R=null===(r=g)||void 0===r?void 0:null===(v=r.data)||void 0===v?void 0:v.collection,W=null==R?void 0:null===(u=R.breadcrumbList)||void 0===u?void 0:u.itemListElement;W.length>1?sendEvent(d.CATEGORY_VIEW,{departmentName:null===(k=W[0])||void 0===k?void 0:k.name,categoryId:null==R?void 0:R.id,categoryName:null===(w=W[W.length-1])||void 0===w?void 0:w.name}):sendEvent(d.DEPARTMENT_VIEW,{departmentId:null==R?void 0:R.id,departmentName:null===(O=W[0])||void 0===O?void 0:O.name});break;case"pdp":var S=null===(s=g)||void 0===s?void 0:null===(c=s.data)||void 0===c?void 0:c.product,C=null==S?void 0:null===(E=S.breadcrumbList)||void 0===E?void 0:E.itemListElement,y=null==S?void 0:null===(m=S.offers)||void 0===m?void 0:m.offers,A=y.map(e=>e.seller.identifier),P=y.filter(e=>"https://schema.org/OutOfStock"===e.availability);sendEvent(d.PRODUCT_VIEW,{skuStockOutFromProductDetail:P,productId:null==S?void 0:null===(p=S.isVariantOf)||void 0===p?void 0:p.productGroupID,productName:null==S?void 0:null===(_=S.isVariantOf)||void 0===_?void 0:_.name,productBrandName:null==S?void 0:null===(I=S.brand)||void 0===I?void 0:I.name,productDepartmentName:C?null===(h=C[0])||void 0===h?void 0:h.name:"",productCategoryName:C.length>1?null===(V=C[C.length-2])||void 0===V?void 0:V.name:"",productPrice:null===(f=y[0])||void 0===f?void 0:f.price,productListPrice:null===(N=y[0])||void 0===N?void 0:N.listPrice,sellerId:null===(T=y[0])||void 0===T?void 0:null===(b=T.seller)||void 0===b?void 0:b.identifier,sellerIds:A.join(",")});break;case"home":sendEvent(d.HOME_VIEW,{});break;case"search":break;default:sendEvent(d.OTHER_VIEW,{})}break;case"intelligent_search_query":g=e.params,sendEvent(d.INTERNAL_SITE_SEARCH_VIEW,{siteSearchTerm:g.term,siteSearchForm:g.url,siteSearchResults:g.totalCount})}}}}]);