1"use strict";(self.webpackChunkJomashop=self.webpackChunkJomashop||[]).push([[1443],{31443:(e,a,t)=>{t.r(a),t.d(a,{BrandsMenu:()=>BrandsMenu,default:()=>o}) 2var l=t(16522),n=t(96540),s=t(61526),r=t(46133),c=t(32485),d=t(74848) 3const CategoryList=({data:e,handleCategoryChange:a,selectedCategoryVal:t})=>e?.map(({id:e,url_key:l,name:n})=>(0,d.jsx)("li",{className:c({selected:t===l}),children:(0,d.jsx)("a",{href:"#",onClick:e=>{e.preventDefault(),a(l)},children:n})},e)),BrandList=e=>{const a=(0,l.c)(11),{selectedAlphabet:t,brands:n,isVisible:r}=e,c=r?s.N_:"a",i=r?"to":"href",o="#"===t?"\\d":t 4let m 5if(a[0]!==n||a[1]!==o){const e=new RegExp("^"+o) 6m=n.filter(a=>{const{brand_name:t}=a 7return null!==t.toLowerCase().match(e)}).sort(_temp),a[0]=n,a[1]=o,a[2]=m}else m=a[2] 8const h=m 9let b,u 10if(a[3]!==c||a[4]!==h||a[5]!==i){u=Symbol.for("react.early_return_sentinel") 11e:{let e 12a[8]!==h?(e=(e,a,t)=>{const l=Math.floor(t/11) 13return e[l]=e[l]||[],e[l].push(h[t]),e},a[8]=h,a[9]=e):e=a[9] 14const t=h.reduce(e,[]) 15if(!h.length){let e 16a[10]===Symbol.for("react.memo_cache_sentinel")?(e=(0,d.jsx)("li",{className:"no-data",children:"No data available"}),a[10]=e):e=a[10],u=e 17break e}b=t?.map((e,a)=>(0,d.jsx)("ul",{className:"shop-by-brand-column",children:e.map(e=>{const{brand_id:a,brand_name:t,featured:l,url_path:n}=e 18return(0,d.jsx)("li",{children:(0,d.jsx)(c,{"aria-label":t,className:1===l?"featured":"",[i]:`${n}`,children:t})},a)})},a))}a[3]=c,a[4]=h,a[5]=i,a[6]=b,a[7]=u}else b=a[6],u=a[7] 19return u!==Symbol.for("react.early_return_sentinel")?u:b} 20function _temp(e,a){return e.brand_name.toLowerCase()>a.brand_name.toLowerCase()?1:-1}const i=(0,n.lazy)(()=>t.e(1630).then(t.bind(t,41630))),BrandsMenu=e=>{const a=(0,l.c)(36),{isVisible:t,brandsFilterRef:c}
20=e,[o,m]=(0,n.useState)("watches") 21let h 22a[0]!==o?(h={identifier:"shop_by_brands_nav_menu",selectedCategoryVal:o},a[0]=o,a[1]=h):h=a[1] 23const{categories:b,brands:u,selectedAlphabet:_,selectedCategory:p,changeAlphabetSelection:f}=(0,r.W)(h) 24let y 25a[2]!==b?(y=b.sort(BrandsMenu_temp),a[2]=b,a[3]=y):y=a[3] 26const g=y 27let x 28a[4]===Symbol.for("react.memo_cache_sentinel")?(x=e=>m(e),a[4]=x):x=a[4] 29const j=x 30let v 31a[5]!==u?(v=u.map(_temp2),a[5]=u,a[6]=v):v=a[6] 32const N=v 33let C,w,S,k,A,B,V,L,M,P,R 34return a[7]===Symbol.for("react.memo_cache_sentinel")?(C=(0,d.jsx)("div",{className:"accordion-head",children:"Brands By Category"}),a[7]=C):C=a[7],a[8]!==b.length||a[9]!==o||a[10]!==g?(w=b.length>0?(0,d.jsx)(CategoryList,{data:g,handleCategoryChange:j,selectedCategoryVal:o}):(0,d.jsx)("div",{children:"No Data found"}),a[8]=b.length,a[9]=o,a[10]=g,a[11]=w):w=a[11],a[12]!==c||a[13]!==w?(S=(0,d.jsx)("ul",{className:"item-sub-cat brands-filter",ref:c,children:w}),a[12]=c,a[13]=w,a[14]=S):S=a[14],a[15]===Symbol.for("react.memo_cache_sentinel")?(k=(0,d.jsx)("div",{className:"view-section",children:(0,d.jsx)(s.N_,{className:"view-all",to:"/brands.html","aria-label":"View All Brands",children:"View All Brands"})}),a[15]=k):k=a[15],a[16]!==S?(A=(0,d.jsxs)("div",{className:"brand-col first-col featured-brands",children:[C,S,k]}),a[16]=S,a[17]=A):A=a[17],a[18]===Symbol.for("react.memo_cache_sentinel")?(B=(0,d.jsx)("div",{className:"accordion-head",children:"Brands A - Z"}),a[18]=B):B=a[18],a[19]!==f||a[20]!==N||a[21]!==_?(V=(0,d.jsx)(i,{data:N,handleAlphabetChange:f,selectedLetter:_}),a[19]=f,a[20]=N,a[21]=_,a[22]=V):V=a[22],a[23]!==p?(L=!!p?.url_key&&(0,d.jsx)("div",{className:"view-section",children:(0,d.jsxs)(s.N_,{className:"view-all",to:`/brands/${p.url_key}`,children:["View All ",p.name," Brands"]})}),a[23]=p,a[24]=L):L=a[24],a[25]!==V||a[26]!==L?(M=(0,d.jsxs)("div",{className:"brand-col sec-col",children:[B,V,L]}),a[25]=V,a[26]=L,a[27]=M):M=a[27],a[28]!==u||a[29]!==t||a[30]!==_?(P=u.length>0&&(0,d.jsx)("div",{className:"brand-col third-col",children:(0,d.jsx)("div",{children:(0,d.jsx)("ul",{className:"filtered-items",children:(0,d.jsx)(BrandList,{brands:u,selectedAlphabet:_,isVisible:t})})})}),a[28]=u,a[29]=t,a[30]=_,a[31]=P):P=a[31],a[32]!==M||a[33]!==P||a[34]!==A?(R=(0,d.jsxs)("div",{className:"brand-wrapper accordion-item",children:[A,M,P]}),a[32]=M,a[33]=P,a[34]=A,a[35]=R):R=a[35],R},o=BrandsMenu 35function BrandsMenu_temp(e,a){return e.name.localeCompare(a.name)}function _temp2(e){return{...e,skipNoSalableProducts:!e.has_salable_products}}},46133:(e,a,t)=>{t.d(a,{W:()=>useShopByBrand}) 36var l=t(16522),n=t(96540),s=t(42952),r=t(32452) 37const c=t.e(8410).then(t.bind(t,68410)).then(({default:e})=>e),useShopByBrand=e=>{const a=(0,l.c)(20),{identifier:t,selectedCategoryVal:d}=e,{whiteListPagesUrls:i}
37=(0,r.p)(),[o,m]=(0,n.useState)(""),{menus:h,brands:b}=(0,n.use)(c) 38let u 39a[0]!==t||a[1]!==h?(u=h.find(e=>e.identifier===t)?.departments||[],a[0]=t,a[1]=h,a[2]=u):u=a[2] 40const _=u,p=d??"watches" 41let f 42if(a[3]!==b||a[4]!==p||a[5]!==i){e:{if(!b?.length||!p){let e 43a[7]===Symbol.for("react.memo_cache_sentinel")?(e=[[],void 0],a[7]=e):e=a[7],f=e 44break e}let e 45a[8]!==p?(e=e=>{const{department:a}=e 46return a.url_key===p},a[8]=p,a[9]=e):e=a[9] 47const t=b.find(e) 48if(!t?.department||!t?.brands?.length){let e 49a[10]===Symbol.for("react.memo_cache_sentinel")?(e=[[],void 0],a[10]=e):e=a[10],f=e 50break e}const{department:l,brands:n}=t,{filter_map:r,...c}=l,d=new Map(r),{isSpecialPage:o,categoryPathname:m}=(0,s.Wi)(i,`/${l.url_key}.html`),h=n.map(e=>{const{hasCount:a,label:t,value:n}=e 51return{brand_id:n,brand_name:t,has_salable_products:a,url_path:d.get(n)||(0,s.vz)(m,o,l.name,new URLSearchParams([["manufacturer",t]]),!1)}}) 52let u 53a[11]!==h||a[12]!==c?(u=[h,c],a[11]=h,a[12]=c,a[13]=u):u=a[13],f=u}a[3]=b,a[4]=p,a[5]=i,a[6]=f}else f=a[6] 54const[y,g]=f 55let x 56return a[14]!==b||a[15]!==y||a[16]!==_||a[17]!==o||a[18]!==g?(x={brands:y,allBrands:b,categories:_,selectedCategory:g,selectedAlphabet:o,changeAlphabetSelection:m},a[14]=b,a[15]=y,a[16]=_,a[17]=o,a[18]=g,a[19]=x):x=a[19],x}}}])
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.