1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5315,8730],{43360:(l,e,t)=>{t.d(e,{I:()=>a});var i=t(89231);let a=l=>{let{property:e,operator:t,value:a}=l;return(0,i.E)(e)+"_"+(0,i.E)(t)+"_"+(0,i.E)(a)}},93392:(l,e,t)=>{t.d(e,{A:()=>y});var i=t(22155),a=t(46325),n=t(89691),o=t.n(n),u=t(5274),s=t(58730),r=t(64778),d=t(64920),v=t(43607),c=t(65723);let p=o()(()=>Promise.all([t.e(7011),t.e(3613),t.e(6032),t.e(3755)]).then(t.bind(t,13755)),{loadableGenerated:{webpack:()=>[13755]}}),g=(0,a.I)("div")({name:"Container",class:"c1lz6wjg",propsAsIs:!1,vars:{"c1lz6wjg-0":[l=>{let{width:e}=l;return"full width"===e?"100%":"auto"}]}}),f=(0,a.I)("div")({name:"CheckboxContainer",class:"cu6jq4f",propsAsIs:!1}),C=(0,a.I)("div")({name:"ManualContainer",class:"mqdkk43",propsAsIs:!1}),y=l=>{let{onClick:e=()=>{},title:t,selected:a,disabled:n,design:o={},value:y,serializedValue:h,name:b,contentBlock:L,_key:E,width:I={global:"auto"}}=l,A="checkboxStyle"===(null==o?void 0:o.display),_="manual"===(null==o?void 0:o.display),{0:k,1:m}=(0,i.useState)(!1),T=(0,i.useCallback)(()=>{m(!0)},[]),w=(0,i.useCallback)(()=>{m(!1)},[]),F=(0,d.A)(w,k,150),S=(0,i.useCallback)(()=>{R(l=>!l),n||e(y)},[e,n,y]),x=(0,i.useMemo)(()=>{let l=[];return a?l.push(s.FILTER_SELECTED):k?l.push(s.FILTER_HOVER):n&&l.push(s.FILTER_LOADING),l},[a,n,k]),{0:O,1:R}=(0,i.useState)(a),{width:j}=(0,r.A)({width:I});return n||O===a||R(a),(0,c.jsxs)(g,{"data-scroll-id":E,"data-nyla":(0,v.go)("FILTER.ITEM"),width:j,children:[A&&(0,c.jsx)(f,{children:(0,c.jsx)(p,{width:"Auto",checkboxId:{global:b},value:{global:h},disabled:n,"data-nyla":(0,v.go)("FILTER.CHECKBOX_ITEM"),visibility:{global:!0},overrideState:!n,overrideChecked:a,isChecked:O,text:{global:t},onClick:S,style:null==o?void 0:o.styleCheckboxStyle,isLegacyFilterChild:!0})}),_&&(0,c.jsx)(C,{ref:F,"data-nyla":(0,v.go)("FILTER.MANUAL_ITEM"),onClick:S,onMouseEnter:T,onMouseLeave:w,children:(0,c.jsx)(u.A,{contentBlock:L,parentState:x,contentTextAlignment:{global:"left"}})})]})};t(87155)},53688:(l,e,t)=>{t.d(e,{q:()=>i});function i(l,e){return"nyla_filter_"+l.toLowerCase().replace(/ /g,"_")+"_"+(null==e?void 0:e.toLowerCase().replace(/ /g,"_"))}},84119:(l,e,t)=>{t.d(e,{$:()=>i});function i(l,e){var t;let i=null==l||null==(t=l.fixedCollection)||null==(t=t.products)?void 0:t.reduce((l,t)=>{var i;let a=(null==t||null==(i=t.options)||null==(i=i.find(l=>l.name===e))?void 0:i.values)||[];return null==l?void 0:l.concat(a)},[]);return null==i?void 0:i.filter(function(l,e){return(null==i?void 0:i.indexOf(l))==e})}},58730:(l,e,t)=>{t.r(e),t.d(e,{FILTER_HOVER:()=>b,FILTER_LOADING:()=>y,FILTER_SELECTED:()=>h,default:()=>L});var i=t(25564),a=t(22155),n=t(710),o=t(5274),u=t(64778),s=t(94363),r=t(84119),d=t(53688),v=t(58924),c=t(487),p=t(43607),g=t(24856),f=t(65723);let C=["contentBlock","allowApplyFilterOnSelection","allowMoveSelectedFilterFirst","allowMultipleSelection","allowHideFiltersWithoutResults","styleCheckboxStyle","styleProductOption","styleCTA","imageBorderPadding","imageBorderRadius","imageBorderThickness","imageSize","imageSpacing","imageBorderColor","filterBy","display","title","shopifyOption"],y="FILTER_LOADING",h="FILTER_SELECTED",b="FILTER_HOVER",L=l=>{let{contentBlock:e,allowApplyFilterOnSelection:t,allowMoveSelectedFilterFirst:y,allowMultipleSelection:h,allowHideFiltersWithoutResults:b,styleCheckboxStyle:L,styleProductOption:E,styleCTA:I,imageBorderPadding:A,imageBorderRadius:_,imageBorderThickness:k,imageSize:m,imageSpacing:T,imageBorderColor:w,filterBy:F,display:S,title:x,shopifyOption:O="Size"}=l,R=(0,i.A)(l,C),{allowApplyFilterOnSelection:j,allowMoveSelectedFilterFirst:M,allowMultipleSelection:B,allowHideFiltersWithoutResults:N}=(0,u.A)({allowApplyFilterOnSelection:t,allowMoveSelectedFilterFirst:y,allowHideFiltersWithoutResults:b,allowMultipleSelection:h}),D=(0,a.useMemo)(()=>(x||"").toLowerCase(),[x]),H=(0,a.useMemo)(()=>D.replace(/ /g,"_"),[D]),{currentState:P,isDisable:z,dispatch:G,options:q}=(0,s.A)((0,a.useCallback)(l=>{var e,t,i,a;return{currentState:(null==(e=l.state)||null==(e=e.filter)||null==(e=e.filters)?void 0:e[D])||{values:[]},isDisable:null==(t=l.state)||null==(t=t.filter)?void 0:t.isLoading,dispatch:l.dispatch,options:void 0!==(null==(i=l.state)?void 0:i.fixedCollection)?null==(a=(0,r.$)(l.state,O))?void 0:a.filter(e=>{var t;return!(null!=(t=l.state)&&null!=(t=t.filter)&&null!=(t=t.hideMap)&&t[(0,d.q)(D,e)])}):[]}},[D,O])),V=(0,a.useMemo)(()=>"productOptionStyle"===S,[S]),W=(0,a.useMemo)(()=>{var l;return null==P||null==(l=P.values)?void 0:l.map(l=>null==l?void 0:l.value.toLowerCase().replace("nyla_filter_"+H+"_","").replace(/_/g," "))},[null==P?void 0:P.values,H]),$=(0,a.useCallback)(l=>{let e=function(l,e,t,i){var a,n;void 0===i&&(i=!1);let o=(null==t||null==(a=t.value)||null==(n=a.toLowerCase)?void 0:n.call(a))||"",u=(Array.isArray(null==l?void 0:l.values)?l.values:[]).filter(
1Boolean),s=u.map(l=>{var e;return Object.assign(Object.assign({},l),{},{value:(null==(e=l.value)?void 0:e.toLowerCase())||""})}).filter(l=>l.value===o).length>0,r=s?u.filter(l=>{var e;return(null==(e=l.value)?void 0:e.toLowerCase())!==o}):u.concat(t);return{[e]:{values:i?r:s?[]:[t]}}}(P,D,l,B);G({type:g.LM.APPLY_FILTER,payload:{filter:{filters:e,isLoading:!0,enableFetch:j,allowHideWithoutResults:N}}})},[j,N,B,P,G,D]),K=(0,a.useCallback)(l=>{z||$({value:"nyla_filter_"+H+"_"+l.replace(/ /g,"_")})},[H,z,$]),U=(0,a.useMemo)(()=>{var l;let t=M?Object.assign(Object.assign({},e||{}),{},{list:null==e?void 0:e.list.sort(l=>{var e,t,i,a;let n=null!=l&&null!=(e=l.alts)&&null!=(e=e[0])&&e.shopifyTag&&(null==(t=l.alts[0])?void 0:t.shopifyTag)!==""?null==l||null==(i=l.alts)||null==(i=i[0])?void 0:i.shopifyTag:null==l||null==(a=l.alts)||null==(a=a[0])?void 0:a.value;return null!=P&&P.values.map(l=>null==l?void 0:l.value).includes(n)?-1:1}),order:null==e?void 0:e.order}):e;return Object.assign(Object.assign({},t),{},{list:null==t||null==(l=t.list)?void 0:l.filter(l=>(null==l?void 0:l.alts[0].shopifyTag)&&(null==l?void 0:l.alts[0].shopifyTag)!==""||(null==l?void 0:l.alts[0].value)&&(null==l?void 0:l.alts[0].value)!==""||"contentItemGrid"===l._type||"contentItemColumns"===l._type)})},[M,V,P]),X=(0,a.useMemo)(()=>({parentId:D,display:S,onClick:l=>$(l),design:{display:S,styleCheckboxStyle:L,filterBy:F,allowHideWithoutResults:N}}),[N,S,F,D,$,L]);return(0,f.jsx)(c.A.Provider,{value:X,children:(0,f.jsx)(n.A,Object.assign(Object.assign({dataNyla:(0,p.go)("FILTER.FILTER_CONTAINER"),visibility:{global:!0},width:"100%"},R),{},{children:V&&(null==q?void 0:q.length)>0?(0,f.jsx)(v.A,{onClick:K,overrideOptionsSelected:W,optionItemStyle:E,optionName:O,visibility:{global:!0},overrideOptions:q}):(0,f.jsx)(o.A,{contentBlock:U,contentTextAlignment:{global:"left"}})}))})}},15315:(l,e,t)=>{t.r(e),t.d(e,{default:()=>r});var i=t(22155),a=t(93392),n=t(94363),o=t(487),u=t(43360),s=t(65723);let r=l=>{let{title:e,shopifyTag:t,contentBlock:r,property:d,operator:v,value:c,_key:p,filterType:g}=l,f=(0,i.useContext)(o.A),C=(null==f?void 0:f.design)||{},y=(0,i.useCallback)(l=>{var e,i,a,n,o;let{state:s}=l;return{hide:!!((null==s||null==(e=s.filter)?void 0:e.hideMap)||{})[null!=t?t:(0,u.I)({property:d,value:c,operator:v})],isSelected:!!(null!=(i=((null==s||null==(a=s.filter)?void 0:a.filters)||{})[null==f||null==(n=f.parentId)?void 0:n.toLowerCase()])&&null!=(i=i.values)&&i.find(l=>{var e;return(null==l||null==(e=l.value)?void 0:e.toLowerCase())===(null==t?void 0:t.toLowerCase())||(null==l?void 0:l.value)===c})),isDisable:null==s||null==(o=s.filter)?void 0:o.isLoading}},[null==f?void 0:f.parentId,v,d,c,t]),{hide:h,isSelected:b,isDisable:L}=(0,n.A)(y),E=t&&""!==t?{value:t,filterBy:null==C?void 0:C.filterBy}:{value:c,property:d,operator:v,filterBy:null==C?void 0:C.filterBy,filterType:g};return h&&null!=C&&C.allowHideWithoutResults?null:(0,s.jsx)(a.A,{display:null==C?void 0:C.display,selected:b,title:e,design:C,_key:p,onClick:null==f?void 0:f.onClick,name:null==f?void 0:f.parentId,serializedValue:E.value,value:E,disabled:L,contentBlock:r})}},487:(l,e,t)=>{t.d(e,{A:()=>i});let i=t(22155).createContext({design:{}})},94363:(l,e,t)=>{t.d(e,{A:()=>o});var i=t(40180),a=t(10549),n=t(22155);let o=l=>{let e=(0,n.useContext)(a.A);return(0,i.A)(e,l)}}}]);
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.