1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3595],{3682:e=>{e.exports={overlay:"styles_overlay__oHweX",blueOverlay:"styles_blueOverlay__Ynklc",mobileFullWidth:"styles_mobileFullWidth__DxJbm",overlayDecorations:"styles_overlayDecorations__5qaoR",overlayImage:"styles_overlayImage__ppNmF",title:"styles_title__sulIu",content:"styles_content__Qfzqm",contentWithDecorations:"styles_contentWithDecorations__c6ufj",contentBorder:"styles_contentBorder__6kEE3",outerContainer:"styles_outerContainer__wzB2L",scrollContainer:"styles_scrollContainer__xPztz",withScroll:"styles_withScroll__80giH",imageWrapper:"styles_imageWrapper__w8nUS",imageContainer:"styles_imageContainer__FLsQm",image:"styles_image__0akNG",close:"styles_close__TGjBP",closeInside:"styles_closeInside__wjtAq",closeIcon:"styles_closeIcon__lLbXO",closeText:"styles_closeText__WsQTJ",planet:"styles_planet__BDpD7",unicorn:"styles_unicorn__YQg_E",unicornImage:"styles_unicornImage__yA3uO"}},20032:e=>{e.exports={grid:"styles_grid__T3XuG",indexColumn:"styles_indexColumn__KHrPC",childColumn:"styles_childColumn__HmpKu",childColumnWithImages:"styles_childColumnWithImages__vxjxh",button:"styles_button__9Nq7_",buttonText:"styles_buttonText__OyE4y",isWithImages:"styles_isWithImages__jl_x_",imageWrapper:"styles_imageWrapper__bc0ep",image:"styles_image__iP_0_",color1:"styles_color1__tys5l",color2:"styles_color2__zUWEX",color3:"styles_color3__1UQCP",color4:"styles_color4__stdMN",color5:"styles_color5__87WG3",color6:"styles_color6__lT8gS",color7:"styles_color7__4thaQ",color8:"styles_color8__24B7n",color9:"styles_color9__9KrKs",color10:"styles_color10__0hdpj",color11:"styles_color11__5b43N",color12:"styles_color12__ECEYC",color13:"styles_color13__gA1jy",color14:"styles_color14__N1oCx",color15:"styles_color15__18KxX",categorySelected:"styles_categorySelected__a23Mz"}},23875:e=>{e.exports={whiteTextMode:"styles_whiteTextMode__GMkyR"}},46903:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(95155);r(12115);var l=r(29722),s=r(56916),o=r.n(s);function i(e){let t=e.size??{height:100,width:100};return(0,a.jsx)("svg",{viewBox:`0 0 ${t.height} ${t.width}`,preserveAspectRatio:"none",className:(0,l.A)(e.className,o().border),children:(0,a.jsx)("rect",{vectorEffect:"non-scaling-stroke",x:"0",y:"0",height:t.height,width:t.width,ry:e.radius??24,rx:e.radius??24,stroke:e.stroke??"white",strokeWidth:e.strokeWidth??4,strokeLinecap:e.strokeLinecap??"round",strokeLinejoin:e.strokeLinejoin??"round",strokeDasharray:e.strokeDasharray??"2, 12"})})}},56916:e=>{e.exports={border:"styles_border__q8i7_"}},63595:(e,t,r)=>{Promise.resolve().then(r.bind(r,83822)),Promise.resolve().then(r.bind(r,83143)),Promise.resolve().then(r.bind(r,77930)),Promise.resolve().then(r.bind(r,16931))},70937:e=>{e.exports={wrapper:"styles_wrapper__RkhDh",input:"styles_input__JeRem",label:"styles_label__kta_R",secondaryVariant:"styles_secondaryVariant__tDNRj"}},73021:e=>{e.exports={filterButton:"styles_filterButton__WUrhs",wrapper:"styles_wrapper__Kw7UB"}},77930:(e,t,r)=>{"use strict";r.d(t,{default:()=>ed});var a={};r.r(a),r.d(a,{exclude:()=>j,extract:()=>g,parse:()=>_,parseUrl:()=>v,pick:()=>k,stringify:()=>b,stringifyUrl:()=>x});var l=r(95155),s=r(12115),o=r(73321);let i="%[a-f0-9]{2}",n=RegExp("("+i+")|([^%]+?)","gi"),c=RegExp("("+i+")+","gi");function u(e,t){if("string"!=typeof e||"string"!=typeof t)throw TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];let r=e.indexOf(t);return -1===r?[]:[e.slice(0,r),e.slice(r+t.length)]}let d=Symbol("encodeFragmentIdentifier");function p(e){if("string"!=typeof e||1!==e.length)throw TypeError("arrayFormatSeparator must be single character string")}function m(e,t){return t.encode?t.strict?encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`):encodeURIComponent(e):e}function f(e,t){if(t.decode){if("string"!=typeof e)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{var r=e;let t={"%FE%FF":"��","%FF%FE":"��"},a=c.exec(r);for(;a;){try{t[a[0]]=decodeURIComponent(a[0])}catch{let e=function(e){try{return decodeURIComponent(e)}catch{let t=e.match(n)||[];for(let r=1;r<t.length;r++)t=(e=(function e(t,r){try{return[decodeURIComponent(t.join(""))]}catch{}if(1===t.length)return t;r=r||1;let a=t.slice(0,r),l=t.slice(r);return Array.prototype.concat.call([],e(a),e(l))})(t,r).join("")).match(n)||[];return e}}(a[0]);e!==a[0]&&(t[a[0]]=e)}a=c.exec(r)}for(let e of(t["%C2"]="�",Object.keys(t)))r=r.replace(RegExp(e,"g"),t[e]);return r}}return e}function y(e){let t=e.indexOf("#");return -1!==t&&(e=e.slice(0,t)),e}function h(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function g(e){let t=(e=y(e)).indexOf("?");return -1===t?"":e.slice(t+1)}function _(e,t){p((t={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...t}).arrayFormatSeparator);let r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,a)=>{if(t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),!t){a[e]=r;return}void 0===a[e]&&(a[e]={}),a[e][t[1]]=r};case"bracket":return(e,r,a)=>{if(t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),!t){a[e]=r;return}if(void 0===a[e]){a[e]=[r];return}a[e]=[...a[e],r]};case"colon-list-separator":return(e,r,a)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){a[e]=r;return}if(void 0===a[e]){a[e]=[r];return}a[e]=[...a[e],r]};case"comma":case"separator":return(t,r,a)=>{let l="string"==typeof r&&r.includes(e.arrayFormatSeparator),s="string"==typeof r&&!l&&f(r,e).includes(e.arrayFormatSeparator);r=s?f(r,e):r;let o=l||s?r.split(e.arrayFormatSeparator).map(t=>f(t,e)):null===r?r:f(r,e);a[t]=o};case"bracket-separator":return(t,r,a)=>{let l=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!l){a[t]=r?f(r,e):r;return}let s=null===r?[]:r.split(e.arrayFormatSeparator).map(t=>f(t,e));if(void 0===a[t]){a[t]=s;return}a[t]=[...a[t],...s]};default:return(e,t,r)=>{if(void 0===r[e]){r[e]=t;return}r[e]=[...[r[e]].flat(),t]}}}(t),a=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return a;for(let l of e.split("&")){if(""===l)continue;let e=t.decode?l.replace(/\+/g," "):l,[s,o]=u(e,"=");void 0===s&&(s=e),o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:f(
1o,t),r(f(s,t),o,a)}for(let[e,r]of Object.entries(a))if("object"==typeof r&&null!==r)for(let[e,a]of Object.entries(r))r[e]=h(a,t);else a[e]=h(r,t);return!1===t.sort?a:(!0===t.sort?Object.keys(a).sort():Object.keys(a).sort(t.sort)).reduce((e,t)=>{let r=a[t];return r&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}function b(e,t){if(!e)return"";p((t={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...t}).arrayFormatSeparator);let r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],a=function(e){switch(e.arrayFormat){case"index":return t=>(r,a)=>{let l=r.length;return void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,m(t,e)+"["+l+"]"]:[...r,m(t,e)+"["+m(l,e)+"]="+m(a,e)]};case"bracket":return t=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,m(t,e)+"[]"]:[...r,m(t,e)+"[]="+m(a,e)];case"colon-list-separator":return t=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,m(t,e)+":list="]:[...r,m(t,e)+":list="+m(a,e)];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(a,l)=>void 0===l||e.skipNull&&null===l||e.skipEmptyString&&""===l?a:(l=null===l?"":l,0===a.length)?[[m(r,e),t,m(l,e)].join("")]:[[a,m(l,e)].join(e.arrayFormatSeparator)]}default:return t=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,m(t,e)]:[...r,m(t,e)+"="+m(a,e)]}}(t),l={};for(let[t,a]of Object.entries(e))r(t)||(l[t]=a);let s=Object.keys(l);return!1!==t.sort&&s.sort(t.sort),s.map(r=>{let l=e[r];return void 0===l?"":null===l?m(r,t):Array.isArray(l)?0===l.length&&"bracket-separator"===t.arrayFormat?m(r,t)+"[]":l.reduce(a(r),[]).join("&"):m(r,t)+"="+m(l,t)}).filter(e=>e.length>0).join("&")}function v(e,t){t={decode:!0,...t};let[r,a]=u(e,"#");return void 0===r&&(r=e),{url:r?.split("?")?.[0]??"",query:_(g(e),t),...t&&t.parseFragmentIdentifier&&a?{fragmentIdentifier:f(a,t)}:{}}}function x(e,t){var r;let a,l;t={encode:!0,strict:!0,[d]:!0,...t};let s=y(e.url).split("?")[0]||"",o=b({..._(g(e.url),{sort:!1}),...e.query},t);o&&(o=`?${o}`);let i=(r=e.url,a="",-1!==(l=r.indexOf("#"))&&(a=r.slice(l)),a);if(e.fragmentIdentifier){let r=new URL(s);r.hash=e.fragmentIdentifier,i=t[d]?r.hash:`#${e.fragmentIdentifier}`}return`${s}${o}${i}`}function k(e,t,r){let{url:a,query:l,fragmentIdentifier:s}=v(e,r={parseFragmentIdentifier:!0,[d]:!1,...r});return x({url:a,query:function(e,t){let r={};if(Array.isArray(t))for(let a of t){let t=Object.getOwnPropertyDescriptor(e,a);t?.enumerable&&Object.defineProperty(r,a,t)}else for(let a of Reflect.ownKeys(e)){let l=Object.getOwnPropertyDescriptor(e,a);if(l.enumerable){let s=e[a];t(a,s,e)&&Object.defineProperty(r,a,l)}}return r}(l,t),fragmentIdentifier:s},r)}function j(e,t,r){return k(e,Array.isArray(t)?e=>!t.includes(e):(e,r)=>!t(e,r),r)}var w=r(45911),C=r(98638),O=r(29722),N=r(68246),S=r(68966),A=r(57093),F=r.n(A),R=r(89702),I=r(93221),E=r(99161);function T(e,t){let r=e.map(e=>e.key),a=Object.keys(t).some(e=>r.includes(e));return{nextState:$(e).map(e=>{var r;let l=(r=t[e.key],(0,S.a4)(r)?Array.isArray(r)?r:[r]:[]);return{...e,options:e.options.map(e=>({...e,checked:a&&l.length>0&&l.includes(e.value)}))}}),hasQpFilters:a}}function $(e){return e.map(e=>({...e,options:e.options.map(e=>e)}))}var B=r(93521),W=r.n(B);function D(e){let t=(0,N.ay)(),r=(0,o.usePathname)(),i=s.useRef(null),n=s.useRef(null),c=t=>{let l=e.filterViewState.reduce((e,t)=>((0,S.a4)(e[t.key])||(e[t.key]=t.options.reduce((e,t)=>(t.checked&&e.push(t.value),e),[])),e),{}),s=a.stringify(l,{arrayFormat:"comma"});window.history.pushState({},"",`${r}?${s}`),e.setFilterState(e.filterViewState),(0,S.a4)(e.onApplyFilters)&&e.onApplyFilters(e.filterState,t)};return(0,C.L)(()=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{w.Ay.to(i.current,{innerText:e.filteredItemsCount,duration:.3,snap:{innerText:1},ease:"power4.out",overwrite:"auto"})},100)},[e.filteredItemsCount,e.isOpen,e.setFilterViewState,e.filters,e.filterViewState]),(0,l.jsx)(E.A,{title:t("Filter"),description:"Overview of filter options",isOpen:e.isOpen,noHeading:!0,className:W().modal,showBorder:!1,showDecorations:!1,onOpenChange:t=>{t||e.onClose()},onCloseClick:t=>{t.preventDefault(),e.setFilterViewState($(e.filterState)),e.onClose()},mobileFullWidth:!0,closePositionInside:!0,overlayColor:"blue",withScroll:!0,
1children:(0,l.jsxs)("form",{className:W().form,children:[(0,l.jsx)("h3",{className:(0,O.A)(F().titleH2,W().title),children:t("Filter")}),(0,l.jsx)("div",{className:W().filterOptions,children:e.filters.map(t=>(0,l.jsxs)("fieldset",{className:W().filterGroup,children:[(0,l.jsx)("legend",{className:(0,O.A)(F().titleH4Bold,W().groupTitle),children:t.title}),t.options.map(r=>{let a=e.filterViewState.find(e=>e.key===t.key)?.options.find(e=>e.name===r.name);return(0,l.jsx)(R.A,{checked:a?.checked??!1,name:t.title.replace(" ","-"),id:`${t.title.replace(" ","-")}-${r.value.replace(" ","-")}`,value:r.value,onChange:a=>{e.setFilterViewState(e=>e.map(e=>{var l,s,o;return e.key===t.key&&(l=e.options,s=r.name,o=a.target.checked,e.options=l.map(e=>e.name===s?{...e,checked:o}:{...e})),e})),c()},variant:"secondary",children:r.name},`filter-group-checkbox-${r.value}`)})]},`filter-group-${t.title}`))}),(0,l.jsxs)("div",{className:W().filterActions,children:[(0,l.jsx)(I.$,{type:"submit",className:W().applyButton,onClick:e=>{e.preventDefault(),c(!0)},title:t("Apply filters"),shadow:"blue",children:t("Apply filters")}),(0,l.jsxs)("div",{className:W().counter,children:[t("Results"),"\xa0",(0,l.jsx)("span",{ref:i})]}
1),null!=e.onResetFilters&&(0,l.jsx)("button",{type:"button",onClick:t=>{t.preventDefault();let a=e.filters.map(e=>({...e,options:e.options.map(e=>({...e,checked:!1}))}));e.setFilterViewState($(a)),e.setFilterState($(a)),window.history.pushState({},"",`${r}`),(0,S.a4)(e.onResetFilters)&&e.onResetFilters()},title:t("Reset filters"),className:W().resetButton,children:t("Reset filters")})]})]})})}var P=r(8128),L=r(16469),V=r(88007),K=r(23674),M=r(37206),U=r(29371),G=r(72631),H=r.n(G),q=r(22581),z=r(5772),X=r(26562),Q=r(20032),Y=r.n(Q);function J(e){let{indexes:t,children:r,onIndexClick:a,selectedCategoryId:o}=e;U.gsap.config({nullTargetWarn:!1}),(0,X.p)();let i=(0,s.useRef)(null),{contextSafe:n}=(0,C.L)({scope:i});s.useEffect(()=>{U.gsap.registerPlugin(H())},[]);let c=(0,P.g2)(Y()),u=n(e=>{let t=U.gsap.utils.selector(e.currentTarget);U.gsap.to(t(".js-image"),{scale:1.35,y:-40,ease:"elastic.out(1,0.5)"}),U.gsap.to(e.currentTarget,{scale:.92,ease:"elastic.out(1,0.5)"})}),d=n(e=>{let t=U.gsap.utils.selector(e.currentTarget);U.gsap.to(t(".js-image"),{scale:1,y:0,ease:"elastic.out(1,0.5)"}),U.gsap.to(e.currentTarget,{scale:1,ease:"elastic.out(1,0.5)"})});return(0,l.jsxs)(q.default,{className:Y().grid,ref:i,children:[(0,l.jsx)("div",{className:(0,O.A)(Y().indexColumn,{[Y().isWithImages]:t[0]&&(0,S.a4)(t[0].image)}),children:t.map((e,t)=>(0,l.jsx)("button",{className:(0,O.A)(Y().button,"js-button",c[t%c.length],{[Y().categorySelected]:(0,S.a4)(o)&&o===e.id}),title:e.label,"aria-label":e.label,onMouseEnter:u,onMouseLeave:d,onClick:t=>{let r;(t.preventDefault(),a)?a(e):(r=`#${e.id}`.replace(/[.,&]/g,"").replace(/\//g,"-"),U.gsap.to(window,{duration:1,scrollTo:{y:r,offsetY:50},ease:"power2",onComplete:()=>{let e=`${r}-firstcard`;document.querySelector(e)?.focus({focusVisible:!0})}}))},children:(0,S.a4)(e.image)?(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:Y().imageWrapper,children:(0,l.jsx)(z.default,{className:(0,O.A)(Y().image,"js-image"),src:e.image.asset.url,alt:e.label,fill:!0,style:{objectFit:"contain"},unoptimized:!0})}),(0,l.jsx)("h5",{className:(0,O.A)(Y().buttonText,F().titleH5),children:e.title})]}):(0,l.jsx)("span",{className:Y().buttonText,children:e.title})},`scroll-index-${e.id}`))}),(0,S.a4)(r)&&(0,l.jsx)("div",{className:(0,O.A)(Y().childColumn,{[Y().childColumnWithImages]:t[0]&&(0,S.a4)(t[0].image)}),children:r})]})}var Z=r(88633),ee=r.n(Z);let et=(0,M.default)(async()=>await r.e(708).then(r.bind(r,70708)),{loadableGenerated:{webpack:()=>[70708]}}),er=({scrollIndexes:e,filterButtonRef:t,setFilterOpened:r,t:a,onCategoryClick:s,selectedCategoryId:o})=>(0,l.jsx)(J,{indexes:e,selectedCategoryId:o,onIndexClick:s?e=>s(e.id):void 0,children:(0,l.jsx)(I.$,{type:"button",className:ee().filterButton,variant:"secondary",shadow:"blue",ref:t,icon:et,onClick:e=>{e.preventDefault(),r(!0)},children:a("Show all filters")})});var ea=r(73021),el=r.n(ea);let es=(0,M.default)(async()=>await r.e(708).then(r.bind(r,70708)),{loadableGenerated:{webpack:()=>[70708]}}),eo=({scrollIndexes:e,filterButtonRef:t,setFilterOpened:r,t:a,onCategoryClick:o,selectedCategoryId:i})=>{let n=(0,s.useRef)(null);return(0,C.L)(()=>{let e=w.Ay.timeline({delay:.35});e.set(n.current,{opacity:1}),e.from(".js-button",{scale:0,y:-100,duration:1.5,transformOrigin:"center",ease:"elastic.out(1,0.3)",stagger:{each:.14,from:"start",grid:"auto"}},"in"),e.from(".js-image",{scale:0,duration:1.9,transformOrigin:"center",ease:"elastic.out(1,0.5)",stagger:{each:.14,from:"start",grid:"auto"}},"in")},{scope:n}),(0,l.jsx)("div",{ref:n,className:el().wrapper,children:(0,l.jsx)(J,{indexes:e,selectedCategoryId:i,onIndexClick:o?e=>o(e.id):void 0,children:(0,l.jsx)(I.$,{type:"button",className:el().filterButton,variant:"secondary",shadow:"blue",ref:t,icon:es,onClick:e=>{e.preventDefault(),r(!0)},children:a("Show all filters")})})})};var ei=r(83822),en=r(23875),ec=r.n(en);function eu(e,t){return(0,S.a4)(e.orderRank)&&(0,S.a4)(t.orderRank)?t.orderRank.localeCompare(e.orderRank):0}function ed(e){let t=e.products.filter(e=>!e.hidden),r=(0,X.p)(),i=(0,N.ay)(),n=(0,o.useSearchParams)(),c=(0,ei.P_)(),u=n.get("openFilters"),d=i("Category"),p=s.useRef(null),m=s.useRef(null),f=s.useRef(!1),y=s.useRef(null),h=t.reduce((e,t)=>
1{let r=t.category;return(0,S.a4)(r)&&(0,S.a4)(r.title)&&(e.options.some(e=>!!((0,S.a4)(r)&&(0,S.a4)(r.title))&&e.value===(0,P.OK)(r.title))||e.options.push({name:r.title,value:(0,P.OK)(r.title),checked:!1,orderRank:(0,S.a4)(r.orderRank)?r.orderRank:""})),e},{title:i("Category"),key:d,options:[]});h.options.sort(eu);let g=i("Flavour"),_=t.reduce((e,t)=>{let r=t.flavours;return(0,S.a4)(r)&&r.forEach(t=>{(0,S.a4)(t)&&(0,S.a4)(t.name)&&(e.options.some(e=>!!((0,S.a4)(t)&&(0,S.a4)(t.name))&&e.value===(0,P.OK)(t.name))||e.options.push({name:t.name,value:(0,P.OK)(t.name),checked:!1,orderRank:(0,S.a4)(t.orderRank)?t.orderRank:""}))}),e},{title:i("Flavour"),key:g,options:[]});_.options.sort(eu);let b=i("Other"),v=t.reduce((e,t)=>{let r=t.tags;return(0,S.a4)(r)&&r.forEach(t=>{(0,S.a4)(t)&&(0,S.a4)(t.title)&&(e.options.some(e=>!!((0,S.a4)(t)&&(0,S.a4)(t.title))&&e.value===(0,P.OK)(t.title))||e.options.push({name:t.title,value:(0,P.OK)(t.title),checked:!1,orderRank:(0,S.a4)(t.orderRank)?t.orderRank:""}))}),e},{title:i("Other"),key:b,options:[]});v.options.sort(eu);let{filterOpened:x,filterState:k,setFilterState:j,setFilterOpened:w,initialFilters:C,filterViewState:A,setFilterViewState:F,canFilter:R,setCanFilter:I}=function(e){let t=(0,o.useSearchParams)().toString(),{nextState:r,hasQpFilters:l}=T(e,a.parse(t,{arrayFormat:"comma"})),[i,n]=s.useState(l),[c,u]=s.useState(()=>$(r)),[d,p]=s.useState(()=>$(r)),[m,f]=s.useState(()=>$(r)),[y,h]=s.useState(!1),g=s.useRef(e);return s.useLayoutEffect(()=>{g.current=e}),s.useEffect(()=>{let e=a.parse(t,{arrayFormat:"comma"}),{nextState:r,hasQpFilters:l}=T(g.current,e);n(l);let s=$(r);u(s),p(s),f(s)},[t]),{filterOpened:y,filterState:d,setFilterState:p,setFilterOpened:h,filterViewState:m,setFilterViewState:f,initialFilters:c,canFilter:i,setCanFilter:n}}([h,_,v]),E=r.options.useScrollToOnCategoryFilter??!0,B=s.useMemo(()=>{let e=k.find(e=>e.key===d),t=e?.options.filter(e=>e.checked)??[];return 1===t.length?t[0].value:void 0},[k,d]),W=s.useCallback((e,t)=>e.map(e=>e.key===d?{...e,options:e.options.map(e=>({...e,checked:e.value===t}))}:e),[d]),M=s.useCallback(e=>{y.current=e,I(!0),j(t=>W(t,e)),F(t=>W(t,e))},[I,j,F,W]);s.useLayoutEffect(()=>{if(E)return;let e=y.current;null!==e&&B===e&&(y.current=null,document.getElementById(e.replace(/[,&.]/g,""))?.scrollIntoView({behavior:"smooth",block:"start"}))},[E,B]);let U=s.useMemo(()=>R?t.filter(e=>{let t=k.find(e=>e.key===d&&e.options.some(e=>e.checked));return!(0,S.a4)(t)||!!((0,S.a4)(e.category)&&(0,S.a4)(e.category.title))&&t.options.some(t=>!!((0,S.a4)(e.category)&&(0,S.a4)(e.category.title))&&t.value===(0,P.OK)(e.category.title)&&t.checked)}).filter(e=>{let t=k.find(e=>e.key===g&&e.options.some(e=>e.checked));return!(0,S.a4)(t)||!!(0,S.a4)(e.flavours)&&e.flavours.length>0&&t.options.filter(e=>e.checked).map(e=>e.value).some(t=>(e.flavours??[]).some(e=>(0,S.a4)(e)&&(0,S.a4)(e.name)&&t===(0,P.OK)(e.name)))}).filter(e=>{let t=k.find(e=>e.key===b&&e.options.some(e=>e.checked));return!(0,S.a4)(t)||!!(0,S.a4)(e.tags)&&e.tags.length>0&&t.options.filter(e=>e.checked).map(e=>e.value).every(t=>e.tags&&e.tags.some(e=>(0,S.a4)(e)&&(0,S.a4)(e.title)&&t===(0,P.OK)(e.title)))}):t,[t,R,k,d,g,b]),G=e.siteSettings.productOverviewTitle??i("Products"),H=s.useCallback(e=>e.reduce((e,t)=>{let r=t.category;return(0,S.a4)(r)&&(0,S.a4)(r.title)&&(e.some(e=>e.title===r.title)||e.push(r)),e},[]).sort((e,t)=>(0,S.a4)(e.orderRank)&&(0,S.a4)(t.orderRank)?e.orderRank.localeCompare(t.orderRank):0),[]),q=s.useMemo(()=>H(t),[H,t]),z=s.useMemo(()=>H(U),[U,H]),Q=s.useMemo(()=>{if(!r.options.useProductOverviewCategoryBackgroundColor||!(0,S.a4)(B))return;let e=q.find(e=>(0,P.OK)(e.title??"")===B)?.backgroundColor?.rgb;if((0,S.a4)(e)&&"number"==typeof e.r&&"number"==typeof e.g&&"number"==typeof e.b)return`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a??1})`},[q,B,r.options.useProductOverviewCategoryBackgroundColor]),Y=s.useMemo(()=>{let e=q.find(e=>(0,P.OK)(e.title??"")===B),t=e?.title;return(0,S.a4)(Q)&&(0,S.a4)(t)&&r.options.productOverviewWhiteTextCategories?.includes(t)===!0},[q,Q,B,r.options.productOverviewWhiteTextCategories]),J=(E?z:q).flatMap(e=>{let t=e.image;if(!(0,S.a4)(t))return[];let a=e.title;return(0,S.a4)(a)?[{title:a,id:(0,P.OK)(a),label:a,image:r.options.useProductOverviewImageCategories?t:void 0}]:[]}),Z=z.flatMap((t,r)=>{if(!(0,S.a4)(t)||!(0,S.a4)(t.title))return[];let a=U.filter(e=>(0,S.a4)(e.category)&&(0,S.a4)(e.category.title)&&e.category.title===t.title).flatMap(t=>{let a=(0,L.V)(t,i,e.locale,r);return(0,S.a4)(a)?a:[]});return{title:t.title,products:a}}),ee=()=>{setTimeout(()=>{(0,S.a4)(p.current)&&p.current.focus({focusVisible:!0})},250)};return s.useEffect(()=>{function e(e){"Escape"===e.code&&(w(!1),F($(k)),(0,S.a4)(p.current)&&p.current.focus({focusVisible:!0}))}return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[k,w,F]),s.useEffect(()=>{"true"===u&&w(!0)},[u]),s.useEffect(()=>{R&&!f.current&&(f.current=!0,m.current?.scrollIntoView({behavior:"smooth",block:"start"}))},[]),s.useEffect(()=>(c(Q),()=>c(void 0)),[Q,c]),(0,l.jsxs)("div",{className:(0,O.A)({[ec().whiteTextMode]:Y}),children:[(0,l.jsx)(V.default,{title:G}),r.options.useProductOverviewImageCategories?(0,l.jsx)(eo,{scrollIndexes:J,filterButtonRef:p,setFilterOpened:w,t:i,selectedCategoryId:B,onCategoryClick:E?void 0:M}):(0,l.jsx)(er,{scrollIndexes:J,filterButtonRef:p,setFilterOpened:w,t:i,selectedCategoryId:B,onCategoryClick:E?void 0:M}),(0,l.jsx)(D,{isOpen:x,filters:C,filterState:k,initialState:C,setFilterState:j,filterViewState:A,setFilterViewState:F,filteredItemsCount:U.length,onClose:()=>{w(!1),ee()},onApplyFilters:(e,t)=>{t&&(w(!1),ee()),I(!0),ee()},onResetFilters:()=>{w(!1),I(!1),ee()}}),(0,l.jsx)("div",{ref:m,children:Z.map(e=>(0,l.jsx)(K.A,{products:e.products,title:e.title},`product-grid-${e.title}`))})]})}},81543:(e,t,r)=>{"use strict";r.d(t,{N:()=>a});let a="input, button, a, textarea, select, summary, iframe, area, details"},88633:e=>{e.exports={filterButton:"styles_filterButton__04yCj"}},89702:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(95155);r(12115);var l=r(29722),s=r(70937),o=r.n(s),i=r(68966);function n(e){let{className:t,children:r,variant:s,...n}=e,c=(0,l.A)({[o().wrapper]:!0,[o().secondaryVariant]:(0,i.a4)(s)&&"secondary"===s},e.className);return(0,a.jsxs)("div",{className:c,children:[(0,a.jsx)("input",{...n,type:"checkbox",className:o().input}),(0,a.jsx)("label",{htmlFor:n.id,className:o().label,children:r})]})}},93521:e=>{e.exports={form:"styles_form__HS38W",title:"styles_title__cbX9X",filterOptions:"styles_filterOptions__UIG5D",filterGroup:"styles_filterGroup__LircO",groupTitle:"styles_groupTitle__cjwk3",filterActions:"styles_filterActions__x_nX5",applyButton:"styles_applyButton__H9ZGz",resetButton:"styles_resetButton__rGH0q",modal:"styles_modal__FnI8i",counter:"styles_counter__FjkfR"}},99161:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var a=r(95155),l=r(12115),s=r(37206),o=r(5772),i=r(29722),n=r(25289),c=r(88428),u=r(68246),d=r(68966),p=r(81543),m=r(26562),f=r(46903),y=r(57093),h=r.n(y),g=r(3682),_=r.n(g);let b=(0,s.default)(async()=>await r.e(2652).then(r.bind(r,22652)),{loadableGenerated:{webpack:()=>[22652]},loading:()=>(0,a.jsx)("span",{}),ssr:!1}),v={rounded:(0,s.default)(async()=>await r.e(7472).then(r.bind(r,37472)),{loadableGenerated:{webpack:()=>[37472]},loading:()=>(0,a.jsx)("span",{}),ssr:!1}),pointy:(0,s.default)(async()=>await r.e(7924).then(r.bind(r,67924)),{loadableGenerated:{webpack:()=>[67924]},loading:()=>(0,a.jsx)("span",{}),ssr:!1})};function x(e){let t=(0,u.ay)(),r=(0,m.p)(),s=v[r.options.iconStyle],y=(0,d.a4)(r.theme.classNames.value)?r.theme.classNames.value:"",g=e.showDecorations??!0,x=e.showBorder??!0,k=(0,i.A)(y,e.className,{[_().overlay]:!0,[_().blueOverlay]:(0,d.a4)(e.overlayColor)&&"blue"===e.overlayColor,[_().overlayDecorations]:g,[_().mobileFullWidth]:e.mobileFullWidth,[_().overlayImage]:(0,d.a4)(e.image)}
1),j=(0,i.A)({[_().content]:!0,[_().contentWithDecorations]:g,[_().contentBorder]:x}),w=l.useCallback(e=>{let t=document.body,r=document.querySelectorAll("[data-radix-focus-guard]");if(null!=t){let a="data-original-tabindex",l="data-original-aria-hidden";[...t.querySelectorAll(p.N),...r].forEach(t=>{if(e){let e=t.getAttribute("tabindex");(0,d.a4)(e)&&t.setAttribute(a,e);let r=t.getAttribute("aria-hidden");(0,d.a4)(r)&&t.setAttribute(l,r),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true")}else{let e=t.getAttribute(a);(0,d.a4)(e)?(t.setAttribute("tabindex",e),t.removeAttribute(a)):t.removeAttribute("tabindex");let r=t.getAttribute(l);(0,d.a4)(r)?(t.setAttribute("aria-hidden",r),t.removeAttribute(l)):t.removeAttribute("aria-hidden")}})}},[]);return l.useEffect(()=>(e.isOpen&&w(e.isOpen),()=>{w(!1)}),[e.isOpen,w]),(0,a.jsxs)(n.bL,{defaultOpen:e.defaultOpen??!1,open:e.isOpen,onOpenChange:t=>{null!=e.onOpenChange&&e.onOpenChange(t),w(t)},modal:e.modal,children:[(0,d.a4)(e.trigger)&&e.trigger(),(0,a.jsx)(n.ZL,{children:(0,a.jsxs)(n.hJ,{className:k,children:[(0,a.jsxs)(n.UC,{className:j,children:[(0,d.a4)(e.title)&&(0,a.jsx)(c.bL,{children:(0,a.jsx)(n.hE,{children:e.title})}),(0,a.jsx)("div",{className:_().outerContainer,children:(0,a.jsxs)("div",{className:(0,i.A)({[_().scrollContainer]:!0,[_().withScroll]:((0,d.a4)(e.withScroll)&&e.withScroll)??((0,d.a4)(g)&&g)}),children:[(0,d.a4)(e.title)&&(!1===e.noHeading||void 0===e.noHeading)&&(0,a.jsx)("h2",{className:(0,i.A)(h().titleH4Bold,_().title),children:e.title}),e.children,(0,d.a4)(e.description)&&(0,a.jsx)(c.bL,{children:(0,a.jsx)(n.VY,{children:e.description})})]})}),(!(0,d.a4)(e.modal)||(0,d.a4)(e.modal)&&!e.modal)&&(0,a.jsxs)(n.bm,{className:(0,i.A)({[_().close]:!0,[_().closeInside]:(0,d.a4)(e.closePositionInside)&&e.closePositionInside}),onClick:e.onCloseClick,children:[(0,a.jsx)("span",{className:_().closeText,children:t("Close")}),(0,a.jsx)(s,{className:_().closeIcon,"aria-label":t("Close")})]}),r.options.showModalDecorations&&(0,d.a4)(g)&&g&&(0,a.jsxs)(a.Fragment,{children:[!(0,d.a4)(e.image)&&(0,a.jsx)("div",{className:_().unicorn,children:(0,a.jsx)(b,{})}),(0,a.jsx)("div",{className:_().planet,children:(0,a.jsx)(o.default,{loader:({src:e})=>e,src:"/decorations/mentos/unique/planet.png",alt:"",fill:!0})})]})]}),(0,d.a4)(e.image)&&e.image.url.length>0&&(0,a.jsxs)("div",{className:_().imageWrapper,children:[r.options.showModalDecorations&&(0,a.jsx)("div",{className:_().unicornImage,children:(0,a.jsx)(b,{})}),(0,a.jsx)("div",{className:_().imageContainer,children:(0,a.jsx)(o.default,{loader:({src:e})=>e,src:e.image.url,className:_().image,alt:e.image.alt,height:621,width:437})}),(0,d.a4)(r)&&r.options.showCardFrameOnHover&&(0,a.jsx)(f.A,{strokeWidth:2,strokeDasharray:"4 10",size:{height:621,width:437}})]})]})})]})}}}]);
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.