1(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{1076:function(e,t,o){"use strict";o(18);var r=o(5),l=o(154),n=o(745),c=o(56),d=o(15),h={name:"InteriorColor",components:{CommonImageLocal:l.a,CommonColorList:n.a,CommonCartButton:c.a},props:{products:{type:Array,required:!0},mode:{type:String,required:!0}},data(){var e;return{color:[this.$getColorFromTags(null===(e=this.products)||void 0===e?void 0:e[0].tags).hex.slice(1)],touchStart:0,touchEnd:0,scrollX:42,productsInterval:null}},computed:{...Object(r.d)({layout:"layout",customerAccessToken:"customerAccessToken",cart:"cart",customer:"customer"}),selectedProduct(){var e,t;return null===(e=this.products)||void 0===e||null===(t=e.filter((e=>this.$getColorFromTags(null==e?void 0:e.tags).hex==="#"+this.color[0])))||void 0===t?void 0:t[0]},selectedProductName(){var e,t;const o=null===(e=this.selectedProduct)||void 0===e||null===(t=e.title)||void 0===t?void 0:t.split("(");return o&&o.length&&(null==o?void 0:o[0].replace(")",""))||""},selectedVendor(){var e;return this.selectedProduct&&(null===(e=d.m[this.selectedProduct.vendor])||void 0===e?void 0:e.title)||""}},beforeDestroy(){clearInterval(this.productsInterval)},methods:{onColorSelect(e){this.color=e},onTouchStart(e){var t,o;this.touchStart=null===(t=e.changedTouches)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.clientX},onTouchEnd(e){var t,o,r;const l={};if(this.touchEnd=null===(t=e.changedTouches)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.clientX,null===(r=this.products)||void 0===r||r.forEach(((e,t)=>{var o,r;const n=null===(o=this.$getColorFromTags(null==e?void 0:e.tags))||void 0===o||null===(r=o.hex)||void 0===r?void 0:r.replace("#","");n===this.color[0]&&(l.color=n,l.index=t)})),this.touchStart>this.touchEnd&&this.products.length-1>l.index){var n,c,d;const e=null===(n=this.$getColorFromTags(null===(d=this.products[l.index+1])||void 0===d?void 0:d.tags))||void 0===n||null===(c=n.hex)||void 0===c?void 0:c.replace("#","");this.color=[e],l.index+=1,this.$refs.list.$el.scrollTo({left:this.scrollX*l.index,behavior:"smooth"})}if(this.touchStart<this.touchEnd&&0!==l.index){var h,m,v;const e=null===(h=this.$getColorFromTags(null===(v=this.products[l.index-1])||void 0===v?void 0:v.tags))||void 0===h||null===(m=h.hex)||void 0===m?void 0:m.replace("#","");this.color=[e],l.index-=1,this.$refs.list.$el.scrollTo({left:this.scrollX*l.index,behavior:"smooth"})}},onVisible(){this.productsInterval=setInterval((()=>{var e,t;0!==(null===(e=this.productsInterval)||void 0===e?void 0:e.length)&&null!==(t=this.cart)&&void 0!==t&&t.id&&(this.dataLayerSimilarShades(),clearInterval(this.productsInterval))}),100)},dataLayerSimilarShades(){const e={};if("similar-shades"===this.mode){var t,o;e.list=this.products;const r={cart_total:"".concat(null===(t=this.cart)||void 0===t?void 0:t.subtotal),user_properties:this.$dataLayerUserProperties(this.customer,!!this.customerAccessToken),ecommerce:{currencyCode:"USD",impressions:this.$dataLayerImpressions(e,"dl_view_item_list")}};if(0===(null==e||null===(o=e.list)||void 0===o?void 0:o.length))return;this.$pushToDataLayer(r,"dl_view_item_list")}},dataLayer(e){var t,o,r,l,n;this.$dataLayerClearId(null==e?void 0:e.id),null==e||e.title,null==e||e.vendor,"Kit"===(null==e?void 0:e.productType)||null==e||e.productType,null===(t=this.$getColorFromTags(null==e?void 0:e.tags))||void 0===t||t.color,null==e||e.title,null==e||null===(o=e.variants)||void 0===o||null===(r=o.nodes)||void 0===r||null===(l=r[0])||void 0===l||null===(n=l.price)||void 0===n||n.amount,this.mode}}},m=(o(1169),o(8)),component=Object(m.a)(h,(function(){var e,t,o=this,r=o._self._c;return r("section",{directives:[{name:"visible",rawName:"v-visible",value:o.onVisible,expression:"onVisible"}],ref:"self",staticClass:"InteriorColor",class:["mode-"+o.mode]},[r("div",{staticClass:"InteriorColor-image",style:{background:"#"+o.color[0]}},[r("div",{staticClass:"InteriorColor-imageWrapper",on:{touchstart:o.onTouchStart,touchend:o.onTouchEnd}},[r("CommonImageLocal",{attrs:{widths:[540,720,960,1280,1600,1920],"default-width":1280,sizes:"100vw",width:1920,height:1440,"file-name":"/pics/masks/interior-3"}})],1),o._v(" "),o.products?r("CommonColorList",{ref:"list",attrs:{products:o.products,selected:o.color,"multi-select":!1,"empty-select":!1,mode:o.mode},on:{select:o.onColorSelect}}):o._e()],1),o._v(" "),r("div",{staticClass:"InteriorColor-footnote"},[r("div",{staticClass:"InteriorColor-footnoteWrapper"},[o.selectedProduct?r("a",{staticClass:"InteriorColor-footnoteVendor typo-d-body-large typo-m-body-large",attrs:{href:o.$generateUrl("samples",o.selectedProduct.handle)},on:{click:function(e){return o.dataLayer(o.selectedProduct)}}},[r("p",{staticClass:"typo-d-body-large-b typo-m-body-large-b"},[o._v("\n\t\t\t\t\t"+o._s(o.selectedProduct&&o.selectedVendor)+"\n\t\t\t\t")]),o._v(" "),r("p",[o._v(o._s(o.selectedProductName))])]):o._e()]),o._v(" "),o.selectedProduct&&null!==(e=o.selectedProduct.variants)&&void 0!==e&&null!==(t=e.nodes)&&void 0!==t&&t[0]?r("CommonCartButton",{attrs:{location:"similar_shades",data:o.selectedProduct.variants.nodes[0],type:"small",mode:"similar-shades","show-cart-icon":!("similar-shades"===o.mode&&"mobile"===o.layout),text:"Add","product-name":o.selectedProductName}}):o._e()],1)])}),[],!1,null,"3da92772",null);t.a=component.exports},1169:function(e,t,o){"use strict";o(822)},1178:function(e,t,o){"use strict";o(831)},1179:function(e,t,o){"use strict";o(832)},1180:function(e,t,o){"use strict";o(833)},1181:function(e,t,o){"use strict";o(834)},1346:function(e,t,o){"use strict";o.r(t);o(10),o(18),o(153),o(114),o(64),o(65),o(66),o(67),o(68),o(69),o(70),o(71),o(72),o(73),o(74),o(75),o(76),o(77),o(78),o(79),o(688),o(694);var r=o(5),l=o(158),n=o(15),c=o(682),d=o(725),h=o(670),m=o(132),v=o(677),f=o(91),y=o(4),C=o(1076),_=o(1072),w=o(43),S={name:"CommonImageLocal",props:{widths:{type:Array,required:!0},defaultWidth:{type:Number,required:!0},sizes:{type:String,required:!0},fileName:{type:String,required:!0},fileExt:{type:String,default:"png"},alt:{type:String,default:""},hasWebp:{type:Boolean,default:!0},isLazy:{type:Boolean,default:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},data:()=>({currentSrc:""}),mounted(){this.setImageSrc(),window.addEventListener("resize",this.setImageSrc)},beforeDestroy(){window.removeEventListener("resize",this.setImageSrc)},methods:{setImageSrc(){const e=window.innerWidth,t=[{min:0,max:1023,src:"".concat(this.fileName,"@540.").concat(this.fileExt)},{min:1024,max:1300,src:"".concat(this.fileName,"@1200.").concat(this.fileExt)},{min:1301,max:1919,src:"".concat(this.fileName,"@1920.").concat(this.fileExt)},{min:1920,max:1/0,src:"".concat(this.fileName,"@2560.").concat(this.fileExt)}];this.currentSrc=t.find((t=>e>=t.min&&e<=t.max)).src},generateSrcSet(e){return this.widths.map((t=>"".concat(this.fileName,"@").concat(t,".").concat(e," ").concat(t,"w"))).join(", ")}}},T=o(8),P=Object(T.a)(S,(function(){var e=this,t=e._self._c;return t("picture",[t("img",{attrs:{src:e.currentSrc,loading:e.isLazy?"lazy":"eager",alt:e.alt}})])}),[],!1,null,null,null).exports,$={name:"MessageModal",props:{message:{type:String,default:"This is a generic message."},timeToClose:{type:Number,default:3e3}},mounted(){setTimeout((()=>{this.onClose()}),this.timeToClose)},methods:{onClose(){this.$emit("close")}}}
1,O=(o(1178),{name:"IndexPromoBanner",components:{CommonBannerImageLocal:P,MessageModal:Object(T.a)($,(function(){var e=this,t=e._self._c;return t("aside",{staticClass:"MessageModal"},[t("p",{staticClass:"typo-d-body typo-m-body"},[e._v(e._s(e.message))])])}),[],!1,null,null,null).exports},props:{fileName:{type:String,default:""},redirectUrl:{type:String,default:""},hasWebp:{type:Boolean,default:!0},fileExt:{type:String,default:"png"},desktopWidths:{type:Array,default:[]},desktopDefaultWidth:{type:Number,default:1920},desktopWidth:{type:Number,default:1920},desktopHeight:{type:Number,default:620},mobileWidths:{type:Array,default:[]},mobileDefaultWidth:{type:Number,default:720},mobileWidth:{type:Number,default:720},mobileHeight:{type:Number,default:400},alt:{type:String,default:""},messageModal:{type:String,default:""},couponCode:{type:String,default:""},isPlp:{type:Boolean,default:!1}},data:()=>({showModal:!1}),methods:{copyCouponCode(e){navigator.clipboard.writeText(this.couponCode).then((()=>{this.showModal=!0})).catch((e=>{console.warn("Failed to copy coupon code: ",e)}))},async handleClickCopyCouponCode(){this.copyCouponCode&&await this.copyCouponCode()},handleClick(){this.redirectUrl?this.$router.push(this.redirectUrl):!this.redirectUrl&&this.copyCouponCode&&this.handleClickCopyCouponCode()}}}),k=(o(1179),Object(T.a)(O,(function(){var e=this,t=e._self._c;return t("section",{class:["IndexPromoBanner",{"cursor-pointer":e.redirectUrl||e.couponCode}]},[t("div",{class:["IndexPromoBanner desktop",{"home-page":e.redirectUrl}]},[t("div",{on:{click:e.handleClick}},[t("CommonBannerImageLocal",{attrs:{widths:e.desktopWidths,"default-width":e.desktopDefaultWidth,"is-lazy":!1,width:e.desktopWidth,height:e.desktopHeight,sizes:"100%",alt:e.alt,"file-name":e.fileName,"file-ext":e.fileExt,"has-webp":e.hasWebp}})],1)]),e._v(" "),t("div",{class:["IndexPromoBanner mobile",{"home-page":e.redirectUrl}]},[t("div",{on:{click:e.handleClick}},[t("CommonBannerImageLocal",{attrs:{widths:e.mobileWidths,"default-width":e.mobileDefaultWidth,"is-lazy":!1,width:e.mobileDefaultWidth,height:e.mobileHeight,sizes:"100%",alt:e.alt,"file-name":e.fileName,"file-ext":e.fileExt,"has-webp":e.hasWebp}})],1)]),e._v(" "),t("div",{staticClass:"couponCodeDiv"},[e.redirectUrl?t("button",{staticClass:"couponCodeButton",on:{click:e.handleClickCopyCouponCode}},[t("div",{staticClass:"modal-container"},[e.messageModal&&e.showModal&&e.redirectUrl?t("MessageModal",{attrs:{message:e.messageModal,"time-to-close":2e3},on:{close:function(t){e.showModal=!1}}}):e._e()],1)]):e._e()]),e._v(" "),t("div",{staticClass:"modal-container positionWithoutRedirecturl"},[e.messageModal&&e.showModal&&!e.redirectUrl?t("MessageModal",{attrs:{message:e.messageModal,"time-to-close":2e3},on:{close:function(t){e.showModal=!1}}}):e._e()],1)])}),[],!1,null,"2e053460",null).exports),x=o(155),I=o(157),R=o(711);var L={name:"PageCatalogue",components:{LazyHydrate:l.default,InteriorColor:C.a,CommonAlgoliaSearchNewPLP:_.a,CommonSeoPagination:v.a,ErrorPage:w.default,IndexPromoBanner:k,CommonSampleCard:x.a,CommonKitCards:I.a,CommonMoreCollections:R.a},props:{onReady:{type:Function,required:!0},slug:{type:String,default:""},route:{type:String,required:!0},query:{type:Object,default:()=>({})}},data(){return{samplesColors:[],pageInfo:null,searchQuerySamples:null,searchQueryKits:null,promoProducts:null,dataFetched:!1,data:null,q:"",vendor:[],color:[],sortSamples:"best-selling",sortKits:"best-selling",searchTimeout:null,updatePageUrlTimeout:null,updateRouteTimeout:null,showInteriorColor:!1,isSamplesResultsVisible:!0,isKitsResultsVisible:this.$config.BUNDLES_ENABLED,skipUrlQueryWatching:!0,listTypeSamples:"default-list",listTypeKits:"default-list",resizeObserver:null,breakpoints:{tablet:768,desktop:1080,desktopLarge:1200},initialBaseColor:{hex:"F2EEE9",color:"White"},shopifyProducts:[],kitSamples:{},totalProducts:0,isAlgoliaReady:!1,algoliaKey:this.$route.fullPath,moreCollections:[]}},async fetch(){var e,t,o,r,l,h,m,v,f,C,_,w,S,T,P,$;const O=[{endpoint:"storefront:collection",canBeMerged:!0,method:"POST",data:{id:"gid://shopify/Collection/".concat(this.$config.COLLECTION_TRENDING_COLORS_ID)}},{endpoint:"storefront:pages",canBeMerged:!0,method:"POST"},{endpoint:"storefront:products",canBeMerged:!0,method:"POST",data:{first:40,after:"",reverse:!1,query:"product_type:".concat(this.productType," AND available_for_sale:true AND ").concat(n.c),sortKey:"BEST_SELLING"},$config:this.$config}].map((e=>Object(y.a)({url:e.endpoint,method:e.method,canBeMerged:e.canBeMerged,data:e.data,$config:this.$config}))),k={$config:this.$config,filters:Object(c.b)({isLargeSample:this.isLargeSample,isBundle:this.isBundle}),facetFilters:[["product_type:".concat(this.productType)]],page:this.currentPage,hitsPerPage:this.currentPage>1?40:0},[x,I,R,L]=await Promise.all([...O,Object(d.b)(k).catch((e=>(console.error("SAM-1113 paginated algolia query failed:",e),null)))]);this.totalProducts=(null==L?void 0:L.total)||0;const E=this.currentPage>1&&null!=L&&null!==(e=L.hits)&&void 0!==e&&e.length?L.hits:(null==R||null===(t=R.data)||void 0===t?void 0:t.nodes)||[];this.samplesColors=(null==x||null===(o=x.data)||void 0===o||null===(r=o.products)||void 0===r?void 0:r.no
1des)||null;const U=(null==x||null===(l=x.data)||void 0===l||null===(h=l.more_collections)||void 0===h||null===(m=h.references)||void 0===m?void 0:m.edges.map((e=>{var t;return null==e||null===(t=e.node)||void 0===t?void 0:t.fields})))||[],A=(null==x||null===(v=x.data)||void 0===v||null===(f=v.more_collections_bundles)||void 0===f||null===(C=f.references)||void 0===C?void 0:C.edges.map((e=>{var t;return null==e||null===(t=e.node)||void 0===t?void 0:t.fields})))||[],F=null===(_=this.route)||void 0===_?void 0:_.toLowerCase().includes("bundles");if(this.moreCollections=F?A:U,this.pageInfo=null==I||null===(w=I.data)||void 0===w||null===(S=w.nodes)||void 0===S?void 0:S.find((e=>"shop"===e.handle)),this.isLargeSample&&(this.pageInfo=null==I||null===(T=I.data)||void 0===T||null===(P=T.nodes)||void 0===P?void 0:P.find((e=>"15-x-18-extra-large-paint-samples"===e.handle))),!this.pageInfo)return void this.$nuxt.error({statusCode:404,message:"Page not found"});const B=this.$randomProduct(),M=Object(y.a)({url:"storefront:product",canBeMerged:!0,method:"POST",data:{handle:B},$config:this.$config});this.shopifyProducts=E,this.parseQuery(this.$route.query),this.dataFetched=!0,this.makeSearch({skipUrlUpdate:!0,searchSamples:!0,searchKits:!0});const N=await M,j=null==N?void 0:N.data,W=this.$getColorFromTags(null==j?void 0:j.tags).hex.slice(1),K=null==j||null===($=j.tags.find((e=>e.includes("color:"))))||void 0===$?void 0:$.split(":")[1];this.initialBaseColor={hex:W,color:K||"White"}},head(){var e,t,o,r,l,n;const script=[];if(this.$isModalOpened&&!this.$isSidebarOpened)return{};if(this.shopifyProducts){const e=(this.$config.CANONICAL_URL||"").replace(/\/$/,""),path=this.route||this.$route.path,t=this.shopifyProducts.map(((t,o)=>{var r,l,n,c,d,h;const m=null==t||null===(r=t.variants)||void 0===r||null===(l=r.nodes)||void 0===l?void 0:l[0],v=(null==t?void 0:t.availableForSale)||!1,f=(null==m?void 0:m.quantityAvailable)||0,y=v&&f>0?"https://schema.org/InStock":"https://schema.org/OutOfStock",C=(null==m||null===(n=m.price)||void 0===n?void 0:n.amount)||(null==t?void 0:t.price)||null,_=(null==t||null===(c=t.images)||void 0===c||null===(d=c.nodes)||void 0===d||null===(h=d[0])||void 0===h?void 0:h.src)||(null==t?void 0:t.image)||null;return{"@type":"ListItem",position:o+1,item:{"@type":"Product",name:t.title,image:_,url:"".concat(e,"/products/").concat(t.handle),brand:t.vendor,offers:{"@type":"Offer",price:C,priceCurrency:"USD",availability:y}}}}));script.push({type:"application/ld+json",innerHTML:JSON.stringify({"@context":"https://schema.org","@type":"ItemList",url:"".concat(e).concat(path),numberOfItems:this.shopifyProducts.length,itemListElement:t})})}return{...this.$generateMeta({title:(null===(e=this.pageInfo)||void 0===e||null===(t=e.seo)||void 0===t?void 0:t.title)||(null===(o=this.pageInfo)||void 0===o?void 0:o.title),description:(null===(r=this.pageInfo)||void 0===r||null===(l=r.seo)||void 0===l?void 0:l.description)||(null===(n=this.pageInfo)||void 0===n?void 0:n.bodySummary),url:this.canonicalUrl}),script:script,__dangerouslyDisableSanitizers:["script"]}},computed:{...Object(r.d)(["layout","isCatalogueVisibleBundles","country","countriesPrices"]),isSamplesPage(){var e,t;return(null===(e=this.$route.path)||void 0===e?void 0:e.replaceAll("/",""))===(null===(t=this.$generateUrl("catalogue"))||void 0===t?void 0:t.replaceAll("/",""))},isBundlesPage(){var e,t;return(null===(e=this.$route.path)||void 0===e?void 0:e.replaceAll("/",""))===(null===(t=this.$generateUrl("catalogue-bundles"))||void 0===t?void 0:t.replaceAll("/",""))},isCountertop(){var e;return!(null===(e=this.route)||void 0===e||!e.toLowerCase().includes("countertops"))},isLargeSample(){return"/pages/15-x-18-extra-large-paint-samples"===this.route},productType(){var e;return null!==(e=this.route)&&void 0!==e&&e.toLowerCase().includes("bundles")?"Kit":"Sample"},isBundle(){return"Kit"===this.productType},currentPage(){return Math.max(1,Math.trunc(Number(this.$route.query.page))||1)},algoliaPaginationLimit:()=>h.a,perPage:()=>40,lastPage(){return Object(h.b)({currentPage:this.currentPage,totalItems:this.totalProducts,perPage:40,maxItems:h.a}).lastPage},canonicalUrl(){const base=this.$config.CANONICAL_URL;return this.currentPage>this.lastPage?base+this.$route.path:base+this.$route.fullPath}},watch:{$route(e,t){this.route===e.path&&(this.isModalRoute(null==t?void 0:t.path)||(this.algoliaKey=e.fullPath),this.parseQuery(e.query),this.skipUrlQueryWatching||this.makeSearch({ski
1pUrlUpdate:!0})),this.skipUrlQueryWatching=!1},dataFetched:{immediate:!0,handler(e){e&&this.onReady()}}},mounted(){this.primeKitSamples(),this.unregisterRouteGuard=this.$router.beforeEach(((e,t,o)=>{t.path===this.route&&e.path!==this.route&&this.isModalRoute(e.path)&&window.location.pathname===this.route&&this.setPageUrl({route:this.route,fullRoute:this.route+window.location.search}),o()}))},beforeDestroy(){var e;clearTimeout(this.searchTimeout),clearTimeout(this.updatePageUrlTimeout),clearTimeout(this.updateRouteTimeout),null===(e=this.unregisterRouteGuard)||void 0===e||e.call(this)},methods:{...Object(r.c)({setPageUrl:"setPageUrl"}),isModalRoute(path){var e;return!!path&&!(null===(e=Object(f.d)(path))||void 0===e||!e.modal)},parseQuery(e){try{("legacy"===this.$config.SEARCH_URL_FORMAT?["q","pf_rs2_select_a_color","pf_v_filter_by_brand"]:["q","vendor","color"]).forEach((t=>{if(void 0!==e[t]){if("legacy"===this.$config.SEARCH_URL_FORMAT){if("q"===t&&(this.q=e.q),"pf_rs2_select_a_color"===t){const t=e.pf_rs2_select_a_color.split("_"),o=(this.samplesColors||[]).map((e=>this.$getColorFromTags(null==e?void 0:e.tags).hex.slice(1)));this.color=t.map((e=>o[e.split(":")[0]-1])).filter((e=>!!e))}if("pf_v_filter_by_brand"===t){const t=e.pf_v_filter_by_brand.split("_");this.vendor=t.map((e=>{var t;return null===(t=n.m[e])||void 0===t?void 0:t.handle})).filter((e=>!!e))}}else this[t]="q"===t?e[t]:e[t].split("_");this.dataFetched||(this.showInteriorColor=!1)}else"legacy"===this.$config.SEARCH_URL_FORMAT?("q"===t&&(this.q=""),"pf_rs2_select_a_color"===t&&(this.color=[]),"pf_v_filter_by_brand"===t&&(this.vendor=[])):this[t]="q"===t?"":[]}))}catch(e){}},isKit:e=>"Kit"===((null==e?void 0:e.productType)||(null==e?void 0:e.product_type)),async fetchKitSamples(e){const t=[...new Set(e.filter(this.isKit).flatMap(m.a))],o=await Promise.all(t.map((e=>Object(y.a)({url:"storefront:kit-samples-colors",method:"POST",canBeMerged:!0,data:{handle:e},$config:this.$config}))));return Object.fromEntries(t.map(((e,t)=>{var r;return[e,null===(r=o[t])||void 0===r?void 0:r.data]})).filter((e=>{let[,t]=e;return!!t})))},samplesFor(e){const t=Object(m.a)(e);return t.some((e=>this.kitSamples[e]))?t.map((e=>this.kitSamples[e]||{id:e})):[]},primeKitSamples(){Object.entries(this.kitSamples||{}).forEach((e=>{let[t,o]=e;return Object(y.b)("storefront:kit-samples-colors",{handle:t},{data:o})}))},validatePricesByCountry(data){var e,t,o;if(!((null===(e=this.$config.COUNTRY_WHITE_LIST)||void 0===e?void 0:e.split(","))||[]).includes(this.country))return data;const r=(this.countriesPrices[this.country]||{})[(null==data||null===(t=data.productType)||void 0===t?void 0:t.toLowerCase())||""]||null;if(!r)return data;const l=JSON.parse(JSON.stringify(data)),n={...l.variants}||{};return null!=l&&l.price&&(l.price=r),null!=n&&null!==(o=n.nodes[0])&&void 0!==o&&o.price&&(n.nodes[0].price.amount=r),{...l,variants:{...n}}},onSearchChange(e){"q"in e&&(this.q=e.q,e.isInput&&(clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.makeSearch({searchSamples:!0,searchKits:!0})}),1e3))),"vendor"in e&&(this.vendor=e.vendor,this.makeSearch({searchSamples:!0,searchKits:!0})),"color"in e&&(this.color=e.color,this.makeSearch({searchSamples:!0,searchKits:!0}))},onSearchEnterPressed(){this.makeSearch({searchSamples:!0,searchKits:!0})},onSearchClearPressed(){this.makeSearch({searchSamples:!0,searchKits:!0})},makeSearch(e){e.skipUrlUpdate||this.updateQueryUrl(),clearTimeout(this.searchTimeout);const t=[];Object.entries(n.m).forEach((e=>{let[o,r]=e;this.vendor.includes(r.handle)&&t.push(o)}));const o=this.q?'("'.concat(this.q,'" OR tag:"color:').concat(this.q,'")'):"";let r=t.map((e=>'vendor:"'.concat(e,'"'))).join(" OR ");r=r?"(".concat(r,")"):"";let l="",c="";if(this.color.length){const e={F7F4EB:"white",CFC6B7:"beige",F5AFBA:"pink","968DB8":"purple","0274B2":"blue","49B987":"green",FFE16F:"yellow",F4843A:"orange",D03C3A:"red",946645:"brown",939999:"gray","2B2C2E":"black"};l="("+this.color.map((t=>'"'.concat(e[t],'" OR tag:"color:').concat(e[t],'"'))).join(" OR ")+")",c="("+this.color.map((t=>'tag:"color:'.concat(e[t],'"'))).join(" OR ")+")"}this.searchQuerySamples=[o,r,l].filter((e=>!!e)).join(" AND "),this.searchQueryKits=[o,r,c].filter((e=>!!e)).join(" AND "),this.searchQuerySamples&&(this.listTypeSamples="search-list"),this.searchQueryKits&&(this.listTypeKits="search-list")}
1,updateQueryUrl(){clearTimeout(this.updatePageUrlTimeout),clearTimeout(this.updateRouteTimeout);this.updatePageUrlTimeout=setTimeout((()=>{this.$route.path===this.route&&this.setPageUrl({route:this.$route.path,fullRoute:this.$route.fullPath})}),150);const e=Object.fromEntries(Object.entries(n.m).map((e=>{let[t,o]=e;return[o.handle,t]}))),t=(this.samplesColors||[]).map((e=>this.$getColorFromTags(null==e?void 0:e.tags).hex.slice(1))),o=this.$generateQuery("legacy"===this.$config.SEARCH_URL_FORMAT?{q:this.q,pf_rs2_select_a_color:this.color.map((e=>{const o=t.indexOf(e)+1;return"".concat(o,":").concat(o)})),pf_v_filter_by_brand:this.vendor.map((t=>e[t]))}:{q:this.q,color:this.color,vendor:this.vendor},!0),r=["q","color","vendor","pf_rs2_select_a_color","pf_v_filter_by_brand"],l={...Object.fromEntries(Object.entries(this.$route.query).filter((e=>{let[t]=e;return!r.includes(t)}))),...o},c=e=>JSON.stringify(Object.entries(e).sort());c(this.$route.query)!==c(l)&&(this.updateRouteTimeout=setTimeout((()=>{this.skipUrlQueryWatching=!0,this.$router.replace({path:this.$route.path,query:l})}),100))}}},E=L,U=(o(1180),Object(T.a)(E,(function(){var e,t=this,o=t._self._c;return o("div",{ref:"self"},[t.$fetchState.error?o("ErrorPage",{attrs:{"need-modal-manager":!1}}):o("div",{staticClass:"PageCatalogue",class:{showInteriorColor:t.showInteriorColor}},[t.promoProducts&&t.showInteriorColor?o("InteriorColor",{attrs:{products:t.promoProducts,mode:"catalogue-promo"}}):t._e(),t._v(" "),o("div",{staticClass:"container",class:{"countertop-active":t.isCountertop}},[o("div",{directives:[{name:"show",rawName:"v-show",value:!t.isAlgoliaReady,expression:"!isAlgoliaReady"}],staticClass:"PageCatalogue-ssr"},[o("div",{staticClass:"PageCatalogue-header-title"},[o("h2",{staticClass:"typo-d-h1 typo-m-h1"},[t._v("\n "+t._s(t.isBundle?"Bundles":"Paint Samples")+"\n ")]),t._v(" "),t.isBundle?o("div",{staticClass:"PageCatalogue-header-subtitle"},[o("span",[t._v("Save over 20% with a bundle")])]):t._e()]),t._v(" "),o("div",{staticClass:"PageCatalogue-ssrGrid"},t._l(t.shopifyProducts,(function(e,r){var l,n;return o("div",{key:e.id||e.objectID,staticClass:"PageCatalogue-ssrCard"},[t.isKit(e)?o("div",{staticClass:"CommonAlgoliaSearch-kit"},[o("CommonKitCards",{key:(null===(n=e.merchandise)||void 0===n?void 0:n.id)||e.id,attrs:{data:t.validatePricesByCountry(e),samples:t.samplesFor(e),"list-type":"search-list","select-item":!0,"item-list-id":"catalogue_samples","item-list-name":"Bundles",index:r,styles:" width: 100%; height: 100%;","style-title":"height: 40px;"},on:{"on-add-to-cart":function(o){return t.sendEvent("conversion",e,"Purchase With One-Click")}}})],1):o("div",{staticClass:"CommonAlgoliaSearch-sample"},[o("CommonSampleCard",{key:(null===(l=e.merchandise)||void 0===l?void 0:l.id)||e.id,attrs:{location:"algolia_search",index:r,"list-type":"search-list","item-list-id":"catalogue_samples","item-list-name":"Samples","show-price":!0,data:t.validatePricesByCountry(e),"select-item":!0,"full-width":!0},on:{"on-add-to-cart":function(o){return t.sendEvent("conversion",e,"Purchase With One-Click")}}})],1)])})),0),t._v(" "),o("CommonSeoPagination",{attrs:{"current-page":t.currentPage,"total-items":t.totalProducts,"per-page":t.perPage,"base-path":t.$route.path,"max-items":t.algoliaPaginationLimit}})],1),t._v(" "),o("CommonAlgoliaSearchNewPLP",{directives:[{name:"show",rawName:"v-show",value:t.isAlgoliaReady,expression:"isAlgoliaReady"}],key:t.algoliaKey,attrs:{"is-bundle":!(null===(e=t.route)||void 0===e||!e.toLowerCase().includes("bundles")),"is-countertop":t.isCountertop,"search-query":t.searchQuerySamples,"is-large-sample":t.isLargeSample,"more-collections":t.moreCollections},on:{"results-ready":function(e){t.isAlgoliaReady=!0}}})],1)],1)],1)}),[],!1,null,"549cc386",null));t.default=U.exports},1363:function(e,t,o){"use strict";o.r(t);o(10),o(153),o(18),o(114),o(694);var r=o(5),l=o(158),n=o(15),c=o(4),d=o(1076),h=o(710),m=o(735),v=o(43),f={name:"PageSearch",components:{LazyHydrate:l.default,InteriorColor:d.a,CommonAlgoliaSearch:h.a,Reviews:m.a,ErrorPage:v.default},props:{onReady:{type:Function,required:!0},slug:{type:String,default:""},route:{type:String,required:!0},query:{type:Object,default:()=>({})}},data(){return{samplesColors:[],pageInfo:null,searchQuerySamples:null,searchQueryKits:null,promoProducts:null,dataFetched:!1,data:null,q:"",vendor:[],color:[],sortSamples:"best-selling",sortKits:"best-selling",searchTimeout:null,updatePageUrlTimeout:null,updateRouteTimeout:null,showInterior
1Color:!1,isSamplesResultsVisible:!0,isKitsResultsVisible:this.$config.BUNDLES_ENABLED,skipUrlQueryWatching:!0,listTypeSamples:"default-list",listTypeKits:"default-list",resizeObserver:null,breakpoints:{tablet:768,desktop:1080,desktopLarge:1200}}},async fetch(){var e,t,o,r;const l=[{endpoint:"storefront:collection",canBeMerged:!0,method:"POST",data:{id:"gid://shopify/Collection/".concat(this.$config.COLLECTION_TRENDING_COLORS_ID)}},{endpoint:"storefront:pages",canBeMerged:!0,method:"POST"}].map((e=>Object(c.a)({url:e.endpoint,method:e.method,canBeMerged:e.canBeMerged,data:e.data,$config:this.$config}))),[n,d]=await Promise.all(l);this.samplesColors=(null==n||null===(e=n.data)||void 0===e||null===(t=e.products)||void 0===t?void 0:t.nodes)||null,this.pageInfo=null==d||null===(o=d.data)||void 0===o||null===(r=o.nodes)||void 0===r?void 0:r.find((e=>"shop"===e.handle)),this.pageInfo?(this.parseQuery(this.$route.query),this.dataFetched=!0,this.makeSearch({skipUrlUpdate:!0,searchSamples:!0,searchKits:!0})):this.$nuxt.error({statusCode:404,message:"Page not found"})},head(){var e,t,o,r,l,n;return this.$isModalOpened&&!this.$isSidebarOpened?{}:this.$generateMeta({title:(null===(e=this.pageInfo)||void 0===e||null===(t=e.seo)||void 0===t?void 0:t.title)||(null===(o=this.pageInfo)||void 0===o?void 0:o.title),description:(null===(r=this.pageInfo)||void 0===r||null===(l=r.seo)||void 0===l?void 0:l.description)||(null===(n=this.pageInfo)||void 0===n?void 0:n.bodySummary),url:this.$config.CANONICAL_URL+this.$route.fullPath})},computed:{...Object(r.d)(["layout","isCatalogueVisibleBundles"]),isSamplesPage(){var e,t;return(null===(e=this.$route.path)||void 0===e?void 0:e.replaceAll("/",""))===(null===(t=this.$generateUrl("catalogue"))||void 0===t?void 0:t.replaceAll("/",""))},isBundlesPage(){var e,t;return(null===(e=this.$route.path)||void 0===e?void 0:e.replaceAll("/",""))===(null===(t=this.$generateUrl("catalogue-bundles"))||void 0===t?void 0:t.replaceAll("/",""))}},watch:{$route(e,t){var o,r;this.route===e.path?(this.parseQuery(e.query),this.skipUrlQueryWatching||this.makeSearch({skipUrlUpdate:!0})):null!==(o=window)&&void 0!==o&&null!==(r=o.algolia)&&void 0!==r&&r.globalSearch&&window.algolia.globalSearch.setQuery("");this.skipUrlQueryWatching=!1},dataFetched:{immediate:!0,handler(e){e&&this.onReady()}}},beforeDestroy(){clearTimeout(this.searchTimeout),clearTimeout(this.updatePageUrlTimeout),clearTimeout(this.updateRouteTimeout)},methods:{...Object(r.c)({setPageUrl:"setPageUrl"}),onResize(){},parseQuery(e){try{("legacy"===this.$config.SEARCH_URL_FORMAT?["q","pf_rs2_select_a_color","pf_v_filter_by_brand"]:["q","vendor","color"]).forEach((t=>{if(void 0!==e[t]){if("legacy"===this.$config.SEARCH_URL_FORMAT){if("q"===t&&(this.q=e.q),"pf_rs2_select_a_color"===t){const t=e.pf_rs2_select_a_color.split("_"),o=(this.samplesColors||[]).map((e=>this.$getColorFromTags(null==e?void 0:e.tags).hex.slice(1)));this.color=t.map((e=>o[e.split(":")[0]-1])).filter((e=>!!e))}if("pf_v_filter_by_brand"===t){const t=e.pf_v_filter_by_brand.split("_");this.vendor=t.map((e=>{var t;return null===(t=n.m[e])||void 0===t?void 0:t.handle})).filter((e=>!!e))}}else this[t]="q"===t?e[t]:e[t].split("_");this.dataFetched||(this.showInteriorColor=!1)}else"legacy"===this.$config.SEARCH_URL_FORMAT?("q"===t&&(this.q=""),"pf_rs2_select_a_color"===t&&(this.color=[]),"pf_v_filter_by_brand"===t&&(this.vendor=[])):this[t]="q"===t?"":[]}))}catch(e){}},onSearchChange(e){"q"in e&&(this.q=e.q,e.isInput&&(clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.makeSearch({searchSamples:!0,searchKits:!0})}),1e3))),"vendor"in e&&(this.vendor=e.vendor,this.makeSearch({searchSamples:!0,searchKits:!0})),"color"in e&&(this.color=e.color,this.makeSearch({searchSamples:!0,searchKits:!0}))},onSearchEnterPressed(){this.makeSearch({searchSamples:!0,searchKits:!0})},onSearchClearPressed(){this.makeSearch({searchSamples:!0,searchKits:!0})},makeSearch(e){e.skipUrlUpdate||this.updateQueryUrl(),clearTimeout(this.searchTimeout);const t=[];Object.entries(n.m).forEach((e=>{let[o,r]=e;this.vendor.includes(r.handle)&&t.push(o)}));const o=this.q?'("'.concat(this.q,'" OR tag:"color:').concat(this.q,'")'):"";let r=t.map((e=>'vendor:"'.concat(e,'"'))).join(" OR ");r=r?"(".concat(r,")"):"";let l="",c="";if(this.color.length){const e={F7F4EB:"white",CFC6B7:"beige",F5AFBA:"pink","968DB8":"purple","0274B2":"blue","49B987":"green",FFE16F:"yellow",F4843A:"orange",D03C3A:"red",946645:"brown",939999:"gray","2B2C2E":"black"};l="("+this.color.map((t=>'"'.concat(e[t],'" OR tag:"color:').concat(e[t],'"'))).join(" OR ")+")",c="("+this.color.map((t=>'tag:"color:'.concat(e[t],'"'))).join(" OR ")+")"}this.searchQuerySamples=[o,r,l].filter((e=>!!e)).join(" AND "),this.searchQueryKits=[o,r,c].filter((e=>!!e)).join(" AND "),this.searchQuerySamples&&(this.listTypeSamples="search-list"),this.searchQueryKits&&(this.listTypeKits="search-list")}
1,updateQueryUrl(){clearTimeout(this.updatePageUrlTimeout),clearTimeout(this.updateRouteTimeout);this.updatePageUrlTimeout=setTimeout((()=>{this.$route.path===this.route&&this.setPageUrl({route:this.$route.path,fullRoute:this.$route.fullPath})}),150);const e=Object.fromEntries(Object.entries(n.m).map((e=>{let[t,o]=e;return[o.handle,t]}))),t=(this.samplesColors||[]).map((e=>this.$getColorFromTags(null==e?void 0:e.tags).hex.slice(1))),o=this.$generateQuery("legacy"===this.$config.SEARCH_URL_FORMAT?{q:this.q,pf_rs2_select_a_color:this.color.map((e=>{const o=t.indexOf(e)+1;return"".concat(o,":").concat(o)})),pf_v_filter_by_brand:this.vendor.map((t=>e[t]))}:{q:this.q,color:this.color,vendor:this.vendor},!0),r=["q","color","vendor","pf_rs2_select_a_color","pf_v_filter_by_brand"],l={...Object.fromEntries(Object.entries(this.$route.query).filter((e=>{let[t]=e;return!r.includes(t)}))),...o},c=e=>JSON.stringify(Object.entries(e).sort());c(this.$route.query)!==c(l)&&(this.updateRouteTimeout=setTimeout((()=>{this.skipUrlQueryWatching=!0,this.$router.replace({path:this.$route.path,query:l})}),100))}}},y=(o(1181),o(8)),component=Object(y.a)(f,(function(){var e,t=this,o=t._self._c;return o("div",{ref:"self"},[t.$fetchState.error?o("ErrorPage",{attrs:{"need-modal-manager":!1}}):o("div",{staticClass:"PageSearch",class:{showInteriorColor:t.showInteriorColor}},[t.promoProducts&&t.showInteriorColor?o("InteriorColor",{attrs:{products:t.promoProducts,mode:"catalogue-promo"}}):t._e(),t._v(" "),o("div",{staticClass:"container"},[o("CommonAlgoliaSearch",{attrs:{"is-global":!0,"is-bundle":!(null===(e=t.route)||void 0===e||!e.toLowerCase().includes("bundles")),"search-query":t.searchQuerySamples,query:t.query,"is-search":!0}})],1),t._v(" "),o("LazyHydrate",{attrs:{"when-visible":{rootMargin:"100px"}}},[o("Reviews")],1)],1)],1)}),[],!1,null,"1e9bb3ef",null);t.default=component.exports},688:function(e,t,o){o(264)("flatMap")},689:function(e,t,o){e.exports={}},695:function(e,t,o){e.exports={}},722:function(e,t,o){"use strict";o(689)},725:function(e,t,o){"use strict";o.d(t,"b",(function(){return h})),o.d(t,"a",(function(){return m}));o(251),o(252),o(253),o(254),o(255),o(256),o(257),o(258),o(259),o(260),o(261),o(262),o(263),o(10);var r=o(164),l=o.n(r),n=o(15),c=o(682);const d=new Map,h=async e=>{let{$config:t,filters:o,facetFilters:r,page:n,hitsPerPage:c=40}=e;const h=(e=>{const t="1RA522RBLR",o="08700ae3a490a1ffc1ac986b50b09cd5";return d.has(t)||d.set(t,l()(t,o)),d.get(t)})().initIndex("shopify_products"),{hits:m,nbHits:v}=await h.search("",{filters:o,facetFilters:r,page:Math.max(0,Math.trunc(Number(n)||1)-1),hitsPerPage:c});return{hits:m,total:v}},m=async e=>{let{$config:t,slug:o,page:r,hitsPerPage:l}=e;const d=["collections:".concat(o)],m=["variant_title:".concat(c.a)],v=["product_type:-Kit"],f=e=>h({$config:t,filters:n.b,facetFilters:e,page:r,hitsPerPage:l}),y=await f([d,m,v]);return y.total>0?y:f([d,v])}},726:function(e,t,o){"use strict";o(695)},735:function(e,t,o){"use strict";o(55);var r=o(5),l={name:"CommonReviews",data:()=>({timeout:null,windowWidth:1440,itemsToShow:5}),computed:{...Object(r.d)(["layout","reviewsGoogle","reviewsFacebook"]),list(){var e,t,o,r;const l=null===(e=this.reviewsGoogle)||void 0===e||null===(t=e.reviews)||void 0===t?void 0:t.map((e=>({...e,rating:5}))),n=null===(o=this.reviewsFacebook)||void 0===o||null===(r=o.reviews)||void 0===r?void 0:r.map((e=>({...e,rating:5})));return l&&n?this.shuffle(l,n).slice(0,this.itemsToShow):[]}},mounted(){this.itemsToShow=50,this.$refs.wrapper.addEventListener("scroll",this.scrollWrapper),window.addEventListener("resize",this.handleResize),this.handleResize(),this.$refs.slider.addEventListener("wheel",(e=>this.scrollConversion(e)))},beforeDestroy(){this.$refs.wrapper.removeEventListener("scroll",this.scrollWrapper),this.$refs.wrapper.removeEventListener("wheel",this.scrollConversion),window.removeEventListener("resize",this.handleResize)},methods:{handleResize(){this.windowWidth=window.innerWidth,this.scrollWrapper()},shuffle(a,b){return a.length>0?[a[0]].concat(this.shuffle(b,a.slice(1))):b},shortText(text){var e;let t=null==text||null===(e=text.slice(0,"desktop"===this.layout?480:330))||void 0===e?void 0:e.trim();return t.length<text.length&&(t+="..."),t},onScrollToElement(e){e.currentTarget.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},scrollWrapper(){const e=this.$refs.wrapper,t=(null==e?void 0:e.getBoundingClientRect())||{},o=Object.values(this.$refs).filter((t=>t!==e&&t!==this.$refs.slider)),r=o.filter((e=>{var o;const r=(null===(o=e[0])||void 0===o?void 0:o.getBoundingClientRect())||{};return r.left>=(null==t?void 0:t.left)&&r.right<=(null==t?void 0:t.right)}));o.forEach((e=>{var t;const o=null===(t=e[0])||void 0===t?void 0:t.classList;null==o||o.toggle("active",r.includes(e))}))},scrollConversion(e){e.preventDefault();const t=this.$refs.wrapper,o=t.scrollLeft+t.offsetWidth===t.scrollWidth&&e.deltaX>0||0===t.scrollLeft&&e.deltaX<0;
1if(0!==e.deltaY)if(o){const t=document.createElement("div");t.style.width="100%",t.style.height="100vh",t.style.position="absolute",t.style.top="".concat(window.pageYOffset,"px"),t.style.left="".concat(window.pageXOffset,"px"),t.style.overflow="hidden",t.addEventListener("wheel",(e=>{window.scrollBy({top:0,left:e.deltaY,behavior:"smooth"})})),document.body.appendChild(t),t.dispatchEvent(new WheelEvent("wheel",e)),setTimeout((()=>t.remove()),100)}else t.scrollLeft+=e.deltaY;else if(0!==e.deltaX)if(o){const t=document.createElement("div");t.style.width="100vw",t.style.height="100%",t.style.position="absolute",t.style.top="".concat(window.pageYOffset,"px"),t.style.left="".concat(window.pageXOffset,"px"),t.style.overflow="hidden",t.addEventListener("wheel",(e=>{window.scrollBy({top:0,left:e.deltaX,behavior:"smooth"})})),document.body.appendChild(t),t.dispatchEvent(new WheelEvent("wheel",e)),setTimeout((()=>t.remove()),100)}else t.scrollLeft+=e.deltaX}}},n=(o(722),o(8)),component=Object(n.a)(l,(function(){var e,t,o,r,l=this,n=l._self._c;return n("div",{staticClass:"CommonReviews"},[n("h2",{staticClass:"typo-d-h1 typo-m-h1"},[l._v("Real reviews from real people")]),l._v(" "),n("p",{staticClass:"typo-d-lead typo-m-lead"},[l._v("\n\t\tDonât take our word for it. See what our customers have to say about us.\n\t")]),l._v(" "),n("div",{ref:"slider",staticClass:"CommonReviews-slider"},[n("div",{ref:"wrapper",staticClass:"CommonReviews-slider-wrapper"},l._l(l.list,(function(e,t){return n("div",{key:t,ref:"item".concat(t),refInFor:!0,staticClass:"CommonReviews-sliderItem",on:{click:l.onScrollToElement}},[n("h3",{staticClass:"typo-d-body-medium typo-m-body-medium"},[l._v("\n\t\t\t\t\t"+l._s(l.shortText(e.text))+"\n\t\t\t\t")]),l._v(" "),n("div",{staticClass:"CommonReviews-sliderItem-inner"},[n("div",{staticClass:"typo-d-caption typo-m-caption"},[l._v("\n\t\t\t\t\t\t"+l._s(e.authorName)+"\n\t\t\t\t\t")]),l._v(" "),n("div",{staticClass:"typo-d-small-b typo-m-small-b",style:"display: flex; align-items: center;"},[n("span",{staticClass:"CommonReviews-sliderItem-stars",class:["rating-".concat(e.rating)]})])])])})),0)]),l._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"https://www.google.com/maps?cid=9491487426908956776"}},[n("img",{staticClass:"google",attrs:{width:"134",height:"44",src:"/pics/google.png",alt:"Google"}}),l._v(" "),n("span",{staticClass:"typo-d-body-large typo-m-body-large"},[l._v(l._s(null===(e=l.reviewsGoogle)||void 0===e?void 0:e.rating))])]),l._v(" "),n("span",{staticClass:"typo-d-body-large typo-m-body-large"},[l._v("("+l._s(null===(t=l.reviewsGoogle)||void 0===t?void 0:t.reviewsNumber)+" reviews)")])]),l._v(" "),n("li",[n("a",{attrs:{href:"https://www.facebook.com/613267065496659/reviews"}},[n("img",{staticClass:"fb",attrs:{width:"176",height:"34",src:"/pics/fb.png",alt:"Facebook"}}),l._v(" "),n("span",{staticClass:"typo-d-body-large typo-m-body-large"},[l._v(l._s(null===(o=l.reviewsFacebook)||void 0===o?void 0:o.rating))])]),l._v(" "),n("span",{staticClass:"typo-d-body-large typo-m-body-large"},[l._v("("+l._s(null===(r=l.reviewsFacebook)||void 0===r?void 0:r.reviewsNumber)+" reviews)")])])])])}),[],!1,null,"31bc1e04",null);t.a=component.exports},745:function(e,t,o){"use strict";var r=o(5),l={name:"CommonColorList",props:{products:{type:Array,required:!0},selected:{type:Array,required:!0},multiSelect:{type:Boolean,required:!0},emptySelect:{type:Boolean,required:!0},mode:{type:String,required:!0}},data:()=>({wasUserInteraction:!1}),computed:{selectedMap(){var e;const t={};return null!==(e=this.selected)&&void 0!==e&&e.length?(this.selected.forEach((e=>{t[e]=!0})),t):t},...Object(r.d)(["isPageAnimating"])},mounted(){this.$nextTick((()=>{var e;null===(e=this.$refs.progress)||void 0===e||e.forEach(((e,t)=>{e.onanimationiteration=()=>{var e;this.toggle(this.$getColorFromTags(null===(e=this.products[(t+1)%this.products.length])||void 0===e?void 0:e.tags).hex.slice(1),!1)}}))})),this.$nextTick((()=>{var e;"/pages/shop/samples"===(null===(e=this.$route)||void 0===e?void 0:e.path)&&(this.timeoutAnimate=setTimeout((()=>{this.scrollToElement()}),200))}))},beforeDestroy(){clearTimeout(this.timeoutAnimate)},methods:{toggle(e,t,o){e.preventDefault(),e.stopPropagation();let r={...this.selectedMap};this.multiSelect?r[t]?delete r[t]:r[t]=!0:this.emptySelect?r[t]?delete r[t]:r={[t]:!0}:r={[t]:!0},this.$emit("select",Object.keys(r)),o&&(this.wasUserInteraction=!0)},scrollToElement(){var e,t;const o=null===(e=Object.values(this.$refs))||void 0===e||null===(t=e.filter((e=>{var t,o,r;return null==e||null===(t=e[0])||void 0===t||null===(o=t.classList)||void 0===o||null===(r=o.contains)||void 0===r?void 0:r.call(o,"isSelected")})))||void 0===t?void 0:t[0];null==o||o[0].scrollIntoView({block:"end",inline:"center"})}}},n=(o(726),o(8)),component=Object(n.a)(l,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"CommonColorList"},[t("div",{ref:"list",staticClass:"CommonColorList-content",class:["mode-"+e.mode]},e._l(e.products,(function(o,r){return t("a",{key:o.id,ref:"button-".concat(r),refInFor:!0,class:["mode-"+e.mode,{isSelected:!!e.selectedMap[e.$getColorFromTags(null==o?void 0:o.tags).hex.slice(1)]}],attrs:{href:e.$generateUrl("samples",o.handle),"aria-label":o.title,title:o.title},on:{click:t=>e.toggle(t,e.$getColorFromTags(null==o?void 0:o.tags).hex.slice(1),!0)}},[t("span",{style:{background:e.$getColorFromTags(null==o?void 0:o.tags).hex}}),e._v(" "),e.wasUserInteraction||"catalogue-promo"!==e.mode?e._e():t("svg",{directives:[{name:"show",rawName:"v-show",value:!!e.selectedMap[e.$getColorFromTags(null==o?void 0:o.tags).hex.slice(1)],expression:"!!selectedMap[$getColorFromTags(item?.tags).hex.slice(1)]"}],ref:"progress",refInFor:!0,attrs:{viewBox:"0 0 48 48",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[t("circle",{attrs:{r:"23",cx:"24",cy:"24"}})])])})),0)])}),[],!1,null,"d5de11a2",null);t.a=component.exports},822:function(e,t,o){e.exports={}},831:function(e,t,o){e.exports={}},832:function(e,t,o){e.exports={}},833:function(e,t,o){e.exports={}},834:function(e,t,o){e.exports={}}}]);
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.