1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[216],{3112:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(2117);const r={class:"icon icon__arrow icon__arrow--down",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},a=[(0,o._)("path",{d:"m12 14-3-3.5h6L12 14Z"},null,-1)],s={};var l=(0,n(6959).Z)(s,[["render",function(e,t){return(0,o.wg)(),(0,o.iD)("svg",r,a)}]])},91:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(2117);const r={class:"icon icon__location icon icon__location",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},a=[(0,o._)("path",{d:"M12 11h.01v.01H12z",stroke:"currentColor","stroke-width":"1.5"},null,-1),(0,o._)("path",{d:"m12 21 5-5a7.071 7.071 0 1 0-10 0l5 5Z",fill:"none",stroke:"currentColor"},null,-1)],s={};var l=(0,n(6959).Z)(s,[["render",function(e,t){return(0,o.wg)(),(0,o.iD)("svg",r,a)}]])},3994:function(e,t,n){n.r(t),n.d(t,{default:function(){return U}});var o=n(2117);const r={class:"promo-banner__container container"},a=["textContent"],s=["innerHTML"],l=["href"],i=["textContent"];var u=n(264),c=n(5916),g=n(91),d=n(4620);const p=["action"],h=(0,o._)("input",{name:"_method",type:"hidden",value:"put"},null,-1),m=["value"],C={class:"multi-store-options__country-container"},y={class:"multi-store-options__selected-country text-other-label-small"},_=["for","textContent"],w=["id"],b=["value","textContent"],f={key:0,class:"multi-store-options__language-container"},v=["for","textContent"],S=["id"],k=["value","textContent"],x=["value"];var L=n(3222),$={name:"MultiStoreOptionsInline",components:{IconArrowDown:n(3112).Z},props:{languageSelector:{type:Boolean,default:!0},namespace:{type:String,default:"",required:!0}},data(){return{currentCountryCode:"",currentLanguageCode:""}},computed:{...(0,c.rn)({current:e=>e["multi-store"].current,selectedStore:e=>e["multi-store"].selectedStore,suggestedStore:e=>e["multi-store"].suggestedStore,supported:e=>e["multi-store"].supported}),action(){return(0,L.Gf)(this.active?.instance)},active(){return this.selectedStore.country?this.selectedStore:this.suggestedStore},countries(){return Object.keys(this.supported).length?Object.values(this.supported).map((e=>e.country)).sort(((e,t)=>e.name.localeCompare(t.name,this.current.language.code.toLowerCase()))):[this.current.country]},displayLabel(){return this.$string("general.multi_store.format.country_inline",{replace:this.replaceStrings({country:this.active.country})})},languages(){return this.supported[this.currentCountryCode]?.languages?.length?this.supported[this.currentCountryCode].languages:[this.current.language]},returnTo(){return(0,L.Lb)(!0)}},watch:{currentCountryCode(e){if(!e)return;const t=this.languages.find((e=>e?.code?.toUpperCase()===this.currentLanguageCode?.toUpperCase()));t||(this.currentLanguageCode=this.languages[0]?.code?.toUpperCase()),this.supported[e]&&this.setSelectedStore({country:this.supported[e].country,instance:this.supported[e].instance,language:t||this.languages[0]})},currentLanguageCode(e){const t=this.languages.find((t=>t?.code?.toUpperCase()===e?.toUpperCase()));this.supported[this.currentCountryCode]&&this.setSelectedStore({country:this.supported[this.currentCountryCode].country,instance:this.supported[this.currentCountryCode].instance,language:t||this.languages[0]})},suggestedStore(){this.setCurrentValues()}},mounted(){this.setCurrentValues()},methods:{...(0,c.nv)({setPreference:"multi-store/setPreference",setSelectedStore:"multi-store/setSelectedStore"}),setCurrentValues(){this.currentCountryCode||this.currentLanguageCode||(this.currentCountryCode=this.current.country?.code||cnvs.store.country,this.currentLanguageCode=this.current.language?.code.toUpperCase()||cnvs.store.language.toUpperCase())},getCountryOption(e){return this.$string("general.multi_store.format.country",{replace:this.replaceStrings({country:e})})},getLanguageOption(e){return this.$string("general.multi_store.format.language",{replace:this.replaceStrings({language:e})})},replaceStrings({country:e,language:t}={}){return(0,L.oX)(e,t)},async handleSelectChange(){await this.$nextTick();const e=this.$refs.form,t=new FormData(e),n={country:t.get("country_code"),language:t.get("language_code")};cnvs.storybook?window.console.log("Submit form",n):(this.setPreference(n),localStorage.setItem("multi-store-dismissed",JSON.stringify(n)),await this.$nextTick(),e.submit())}}},D=n(6959),O=(0,D.Z)($,[["render",function(e,t,n,r,a,s){const l=(0,o.up)("icon-arrow-down");return(0,o.wg)(),(0,o.iD)("form",{ref:"form",class:(0,o.C_)(["multi-store-options multi-store-options--inline",`multi-store-options--${n.namespace}`]),action:s.action,method:"post"},[h,(0,o._)("input",{name:"return_to",type:"hidden",value:s.returnTo},null,8,m),(0,o._)("div",C,[(0,o._)("div",y,[(0,o.Uk)((0,o.zw)(s.displayLabel)+" ",1),(0,o.Wm)(l)]),(0,o._)("label",{class:"form-group__label visually-hidden",for:`${n.namespace}-country-selector`,textContent:(0,o.zw)(e.$string("general.multi_store.options.country"))},null,8,_),(0,o.wy)((0,o._)("select",{id:`${n.namespace}-country-selector`,"onUpdate:modelValue":t[0]||(t[0]=e=>a.currentCountryCode=e),class:"multi-store-options__country text-other-label-small",name:"country_code",onChange:t[1]||(t[1]=(0,o.iM)(((...e)=>s.handleSelectChange&&s.handleSelectChange(...e)),["prevent"]))},[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.countries,(e=>((0,o.wg)(),(0,o.iD)("option",{key:e.code,value:e.code,textContent:(0,o.zw)(s.getCountryOption(e))},null,8,b)))),128))],40,w),[[o.bM,a.currentCountryCode]])]),n.languageSelector?((0,o.wg)(),(0,o.iD)("div",f,[(0,o._)("label",{class:"form-group__label visually-hidden",for:`${n.namespace}-language-selector`,textContent:(0,o.zw)(e.$string("general.multi_store.options.language"))},null,8,v),(0,o.wy)((0,o._)("select",{id:`${n.namespace}-language-selector`,"onUpdate:modelValue":t[2]||(t[2]=e=>a.currentLanguageCode=e),class:"multi-store-options__language text-other-label-small",name:"language_code",onChange:t[3]||(t[3]=(0,o.iM)(((...e)=>s.handleSelectChange&&s.handleSelectChange(...e)),["prevent"]))},[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(s.languages,(e=>((0,o.wg)(),(0,o.iD)("option",{key:e?.code,value:e?.code,textContent:(0,o.zw)(s.getLanguageOption(e))},null,8,k)))),128))],40,S),[[o.bM,a.currentLanguageCode]])])):((0,o.wg)(),(0,o.iD)("input",{key:1,name:"language_code",type:"hidden",value:a.currentLanguageCode},null,8,x))],10,p)}]]),H={name:"PromoBanner",components:{IconLocation:g.Z,MultiStoreOptionsInline:O,Splide:u.tv,SplideSlide:u.jw}
1,props:{autoscroll:{type:Object,default:()=>({enable:!1,timing:5})},blocks:{type:Array,default:()=>[]},liquid:{type:Object,default:()=>({sectionId:"",storeLocator:"",bgColour:"",textColour:""})},geoConfig:{type:Object,default:()=>({geoOnly:!0,fallback:!0})}},data(){return{splideConfig:{arrows:!1,autoWidth:!0,autoplay:this.autoscroll.enable,drag:!1,interval:1e3*this.autoscroll.timing,pagination:!1,speed:1500,type:"loop"}}},computed:{...(0,c.rn)({geolocation:e=>e.geolocation,isMobile:e=>e.index.screen.mobile}),banners(){const e=!this.geoConfig.geoOnly;return this.blocks.filter((t=>t.zipcodes?t.zipcodes.split(",").includes(this.geolocation.postalCode):e&&!t.zipcodes))}},watch:{banners(e,t){t.length!==e.length&&this.updateSiteHeaderHeight()}},mounted(){this.updateSiteHeaderHeight(),this.$refs.banners?.$el.querySelectorAll("a").forEach((e=>{e.addEventListener("click",this.trackUrl)}))},methods:{getBlockText(e){return(this.isMobile?e.mobileTitle:e.title).replaceAll("<a",'<a class="text-other-label-small"').replaceAll("<strong",'<strong class="text-other-label-small"')},async updateSiteHeaderHeight(){await this.$nextTick(),cnvs.EventBus.emit("cnvs:update-site-header-height")},trackUrl(e){const t=e.currentTarget,n=t.closest(".promo-banner__list-item")?.textContent.trim()||"";(0,d.d_)("promo_banner_click",e,{label:n,link_text:n})}}},U=(0,D.Z)(H,[["render",function(e,t,n,u,c,g){const d=(0,o.up)("splide-slide"),p=(0,o.up)("splide"),h=(0,o.up)("icon-location"),m=(0,o.up)("multi-store-options-inline");return g.banners.length?((0,o.wg)(),(0,o.iD)("div",{key:0,class:"promo-banner critical-component-hide",style:(0,o.j5)(`\n --promo-bg-colour: ${n.liquid.bgColour};\n --promo-text-colour: ${n.liquid.textColour};\n `)},[(0,o._)("div",r,[g.banners.length?((0,o.wg)(),(0,o.iD)("span",{key:0,id:"promo-banner-title",class:"visually-hidden",textContent:(0,o.zw)(e.$string("general.site_header.promo_banner"))},null,8,a)):(0,o.kq)("",!0),g.banners.length?((0,o.wg)(),(0,o.j4)(p,{key:1,ref:"banners",class:"promo-banner__list",options:c.splideConfig},{default:(0,o.w5)((()=>[((0,o.wg)(!0),(0,o.iD)(o.HY,null,(0,o.Ko)(g.banners,(e=>((0,o.wg)(),(0,o.j4)(d,{key:e.id,class:"promo-banner__list-item text-other-label-small"},{default:(0,o.w5)((()=>[(0,o._)("span",{innerHTML:g.getBlockText(e)},null,8,s)])),_:2},1024)))),128))])),_:1},8,["options"])):(0,o.kq)("",!0),n.liquid.storeLocator?((0,o.wg)(),(0,o.iD)("a",{key:2,href:n.liquid.storeLocator,class:"promo-banner__store-locator"},[(0,o.Wm)(h),(0,o._)("span",{class:"text-other-label-small",textContent:(0,o.zw)(e.$string("general.site_header.location"))},null,8,i)],8,l)):(0,o.kq)("",!0),(0,o.Wm)(m,{"language-selector":!1,namespace:"header"})])],4)):(0,o.kq)("",!0)}]])}}]); 2//# sourceMappingURL=component.promo-banner.min.js.map?v=1790168230509
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.