PageSourceSearch

https://www.highcoastwhisky.se/_next/static/chunks/4573-d77d286135756d71.js

js highcoastwhisky.se collected 2026-09-26 00:08:32 UTC 15,362 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4573],{8349:function(e,t,l){var s=l(5893),r=l(5675),a=l.n(r),n=l(1163),c=l(8050),i=l(2907),o=l(8155),u=l(7743),d=l(504),m=l(4126),h=l(2198),x=l(8049);let p=e=>{let{fullSlug:t,name:l,image:r,imageSizes:p,imageCover:f,character:j,bottled:b,price:g,pricePerCl:v,showPricePerCl:y}=e,{locale:N}=(0,n.useRouter)(),{t:w}=(0,o.$)(),k="flex flex-col items-center mx-4 md:mx-8 text-12 md:text-14 leading-110 text-center",_="type-listing-label text-haze-dark mb-2 md:mb-4",Z=(0,x.cU)(N),R="",q="";return b&&(R=new Intl.DateTimeFormat(Z,{month:"long",year:"numeric"}).format((0,h.Z)(b)),q=new Intl.DateTimeFormat(Z,{month:"short",year:"numeric"}).format((0,h.Z)(b)).replace(".","")),(0,s.jsx)("article",{children:(0,s.jsxs)(c.Z,{href:(0,m.Q2)(t,N),className:"relative flex flex-col items-stretch w-full group",children:[(0,s.jsx)("div",{className:(0,u.Z)("relative aspect-3/4 overflow-hidden bg-haze group-hover:opacity-90 transition-fade",!f&&"p-20 md:p-32"),children:(0,s.jsx)("div",{className:(0,u.Z)("relative w-full h-full"),children:(null==r?void 0:r.filename)&&(0,s.jsx)(a(),{src:r.filename,loader:i.XI,alt:r.alt,fill:!0,sizes:p,className:(0,u.Z)("transition-scale",f?"object-cover":"object-contain mix-blend-multiply")})})}),(0,s.jsxs)("div",{className:"text-center",children:[l&&(0,s.jsx)("h3",{className:"mt-12 mb-8 type-heading-listing-lg",children:l}),(0,s.jsxs)("ul",{className:"flex justify-center flex-nowrap",children:[j&&(0,s.jsxs)("li",{className:k,children:[(0,s.jsx)("span",{className:_,children:w("character")}),(e=>{let t={Rökig:"character-peated",Lättrökt:"character-lightly-peated",Orökt:"character-unpeated"}[e];return t?w(t):e})(j)]}),b&&(0,s.jsxs)("li",{className:k,children:[(0,s.jsx)("span",{className:_,children:w("bottled")}),(0,s.jsx)("span",{className:"capitalize hidden md:inline-block",children:R}),(0,s.jsx)("span",{className:"capitalize md:hidden",children:q})]}),(g||y||v)&&(0,s.jsxs)("li",{className:k,children:[(0,s.jsx)("span",{className:_,children:w("price")}),y?v?(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"whitespace-nowrap",children:(0,d._)(v)})," ",(0,s.jsx)("span",{className:"type-currency",children:"sek/1.5cl"})]}):(0,s.jsx)("span",{children:w("sold-out")}):(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"whitespace-nowrap",children:(0,d._)(g)})," ",(0,s.jsx)("span",{className:"type-currency",children:"sek"})]})]})]})]})]})})};t.Z=p},4573:function(e,t,l){l.d(t,{Z:function(){return P}});var s=l(5893),r=l(1163),a=l(7294),n=l(621),c=l(4593),i=l(108),o=l(8349),u=l(2248),d=l(8211),m=l(7743);let h=e=>{let{className:t,chevron:l,open:r,children:a}=e;return(0,s.jsxs)("div",{className:"flex flex-row justify-between items-center gap-8 bg-haze py-10 px-16 font-sans text-14 font-medium ".concat(t),children:[a,l&&(0,s.jsx)(d.Z,{icon:u.Z,className:(0,m.Z)("w-10",r&&"rotate-180")})]})};var x=l(3220);let p=e=>{let{...t}=e,l=t.checked,r=t.id,a=t.label,n=t.onChange;return(0,s.jsxs)("label",{htmlFor:r,className:"flex items-center flex-row gap-x-10 py-10 px-16",children:[l?(0,s.jsx)(d.Z,{icon:x.Z,className:"w-12"}):(0,s.jsx)("span",{className:"rounded-full w-10 h-10 mx-1 border-baltic/50 border-[1px]"}),(0,s.jsx)("span",{children:a}),(0,s.jsx)("input",{checked:l,onChange:n,id:r,type:"checkbox",className:"hidden"})]})},f=e=>{let{label:t,urlParam:l}=e,n=(0,r.useRouter)(),[c,i]=(0,a.useState)(!1),o=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(o.current)return;let e=n.query[l];e&&(i("true"===e),o.current=!0)},[n.query,l]);let u=e=>{i(e.target.checked),n.replace({query:{...n.query,[l]:e.target.checked||void 0}},void 0,{shallow:!0})},d=encodeURI(t);return(0,s.jsx)(h,{className:"!p-0",children:(0,s.jsx)(p,{id:d,onChange:u,label:t,checked:c})})};var j=l(4857);let b=e=>{let{label:t,filters:l,urlParam:n}=e,c=(0,r.useRouter)(),[i,o]=(0,a.useState)([]),u=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(u.current)return;let e=c.query[n];if(e){let t=e.split(",").map(e=>l.find(t=>t.value===e));o(t),u.current=!0}},[l,c.query,n]);let p=e=>{o(e),c.replace({query:{...c.query,[n]:e.map(e=>e.value).join(",")||void 0}},void 0,{shallow:!0})};return(0,s.jsx)("div",{className:"relative",children:(0,s.jsx)(j.R,{value:i,onChange:p,multiple:!0,children:e=>{let{open:r}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j.R.Button,{className:"w-full",children:(0,s.jsx)(h,{chevron:!0,open:r,children:i.length?i.map(e=>null==e?void 0:e.key).join(", "):t})}),(0,s.jsx)(j.R.Options,{className:"absolute top-[calc(100%+1rem)] left-0 z-10 p-8 min-w-[220px] bg-haze text-14 font-medium",children:l.map(e=>(0,s.jsx)(j.R.Option,{value:e,as:a.Fragment,children:t=>{let{active:l,selected:r}=t;return(0,s.jsxs)("li",{className:(0,m.Z)("flex items-center cursor-pointer hover:bg-haze-dark/20 px-16 py-8",r&&"text-copper",(l||r)&&"bg-haze-dark/20"),children:[r?(0,s.jsx)(d.Z,{icon:x.Z,className:"w-10 mr-16"}):(0,s.jsx)("span",{className:"rounded-full w-10 h-10 border-baltic/50 border-[1px] mr-16"}),(0,s.jsx)("span",{children:e.key})]})}},e.key))})]})}})})};var g=l(6215),v=l(8155),y=l(1936);let N=e=>{let{defaultValue:t,onChange:l,steps:r,suffix:n}=e,{t:c}=(0,v.$)(),i=r.length-1,[o,u]=(0,a.useState)(0),[d,m]=(0,a.useState)(i),h=(0,a.useRef)(0),x=(0,a.useRef)(i),p=(0,a.useRef)(null),f=(0,a.useCallback)(e=>Math.round((e-0)/(i-0)*100),[0,i]);(0,a.useEffect)(()=>{t&&(u(r.indexOf(t.min)),m(r.indexOf(t.max)))},[t,r]),(0,a.useEffect)(()=>{let e=f(o),t=f(x.current);p.current&&(p.current.style.left="".concat(e,"%"),p.current.style.width="".concat(t-e,"%"))},[o,f]),(0,a.useEffect)(()=>{let e=f(h.current),t=f(d);p.current&&(p.current.style.width="".concat(t-e,"%"))},[d,f]);let j=()=>
1{l({min:r[o],max:r[d]})};return(0,s.jsxs)("div",{className:"flex flex-col justify-center",children:[(0,s.jsxs)("div",{className:"flex flex-col mb-12",children:[(0,s.jsx)("input",{type:"range",min:0,max:i,value:o,onChange:e=>{let t=Math.min(Number(e.target.value),d-1);u(t),h.current=t},className:"thumb thumb--left",style:{zIndex:o>i-100?"5":void 0}}),(0,s.jsx)("input",{type:"range",min:0,max:i,value:d,onChange:e=>{let t=Math.max(Number(e.target.value),o+1);m(t),x.current=t},className:"thumb thumb--right"}),(0,s.jsxs)("div",{className:"slider",children:[(0,s.jsx)("div",{className:"slider__track bg-haze-dark"}),(0,s.jsx)("div",{ref:p,className:"slider__range bg-copper"})]})]}),(0,s.jsxs)("div",{className:"flex flex-row justify-between text-12 font-bold mt-4 mb-12",children:[(0,s.jsxs)("div",{className:"",children:[r[o],null!=n?n:""]}),(0,s.jsxs)("div",{className:"",children:[r[d],null!=n?n:""]})]}),(0,s.jsx)(y.Z,{onClick:j,children:c("apply")})]})},w=e=>{let{label:t,steps:l,urlParam:n,suffix:c}=e,i=(0,r.useRouter)(),[o,u]=(0,a.useState)(),d=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(d.current)return;let e=i.query[n];if(e){let t=e.split(",");u({min:t[0],max:t[1]}),d.current=!0}},[i.query,n]);let m=e=>{u(e),i.replace({query:{...i.query,[n]:"".concat(e.min,",").concat(e.max)||void 0}},void 0,{shallow:!0})};return(0,s.jsx)("div",{children:(0,s.jsx)(g.J,{className:"relative",children:e=>{let{open:r}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g.J.Button,{className:"w-full",children:(0,s.jsxs)(h,{chevron:!0,open:r,children:[d.current&&(0,s.jsx)("span",{className:"w-8 h-8 -mr-2 rounded-full bg-copper"}),t]})}),(0,s.jsx)(g.J.Panel,{className:"absolute top-[calc(100%+1rem)] left-0 z-10 min-w-[220px] bg-haze p-20 pt-24",children:(0,s.jsx)(N,{suffix:c,steps:l,defaultValue:o,onChange:m})})]})}})})},k=e=>{let{defaultSortOrder:t="desc"}=e,[l,n]=(0,a.useState)(["bottled",t]),{t:c}=(0,v.$)(),i=(0,r.useRouter)();(0,a.useEffect)(()=>{if(i.query.product_sort_field){var e;n([i.query.product_sort_field,null!==(e=i.query.product_sort_order)&&void 0!==e?e:"asc"])}},[i.query.product_sort_field,i.query.product_sort_order]);let o=e=>{n(e),i.replace({query:{...i.query,product_sort_field:e[0],product_sort_order:e[1]}},void 0,{shallow:!0})};return(0,s.jsxs)("div",{className:"flex flex-col items-start md:items-end col-span-full md:col-span-3 mb-16 relative",children:[(0,s.jsx)("h3",{className:"hidden sm:block text-17 font-medium text-copper mb-16",children:c("sort")}),(0,s.jsx)(j.R,{value:l,onChange:o,children:e=>{let{open:t}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j.R.Button,{className:"w-full",children:(0,s.jsxs)(h,{chevron:!0,open:t,children:[c("bottling-date")," (",c("desc"===l[1]?"newest-first":"oldest-first"),")"]})}),(0,s.jsx)(j.R.Options,{className:"absolute top-[calc(100%)] left-0 z-10 p-8 min-w-[220px] bg-haze text-14 font-medium",children:[["bottled","desc"],["bottled","asc"]].map(e=>(0,s.jsx)(j.R.Option,{value:e,as:a.Fragment,children:t=>{let{active:l,selected:r}=t;return(0,s.jsxs)("li",{className:(0,m.Z)("flex items-center cursor-pointer hover:bg-haze-dark/20 px-16 py-8",r&&"text-copper",(l||r)&&"bg-haze-dark/20"),children:[c("bottling-date")," (",c("desc"===e[1]?"newest-first":"oldest-first"),")"]})}},e[1]))})]})}})]})};var _=l(3579),Z=l(4126);function R(e){let t=new Date().getFullYear()+1,l=t-e,s=[];for(let e=l;e<=t;e++)s.push(String(e));return s}var q=l(8049),C=l(3483);let z=e=>{let{title:t,editable:l={},productsListData:u,showPricePerCl:d,productsSlugPrefix:m,showAvailabilityFilter:h}=e,{t:x}=(0,v.$)(),p=(0,a.useRef)(null),j=(0,n.Z)(p,{root:null,rootMargin:"0px",threshold:1}),g=(0,a.useRef)(!0),y=(0,a.useRef)(!1),{locale:N}=(0,r.useRouter)(),z=(e,t)=>{let l=new URLSearchParams(window.location.search),s=Object.fromEntries(l.entries());for(let e in s)s[e]=decodeURIComponent(s[e]);let{filters:r,sort:a}=(0,Z.Vn)(s,u.filterOptions.collection?"asc":"desc"),n=new URLSearchParams((0,Z.g8)(r,a)).toString();if(t&&!t.length)return y.current=!0,null;let c=(0,Z.hY)(N);return"/api/products?page=".concat(e+1).concat(u.filterOptions.collection?"&collection="+u.filterOptions.collection:"").concat(n?"&"+n:"").concat(c?"&locale="+c:"")},{data:P,size:S,setSize:O,isLoading:F}=(0,c.ZP)(z,_.Z,{fallbackData:[u.products]});return(0,a.useEffect)(()=>{g.current&&(null==j?void 0:j.isIntersecting)&&!y.current?(g.current=!1,O(S+1)):(null==j?void 0:j.isIntersecting)||(g.current=!0)},[j,O,S,P]),(0,s.jsxs)("section",{className:"py-32 md:py-48",...l,children:[t&&(0,s.jsx)(i.Z,{children:(0,s.jsx)("div",{className:"col-span-full mb-20",children:(0,s.jsx)("h2",{className:"type-heading-lg",children:t})})}),(0,s.jsxs)(i.Z,{as:"section",className:"mb-16",children:[(0,s.jsxs)("div",{className:"col-span-full md:col-span-9 mb-16",children:[(0,s.jsxs)("div",{className:"hidden sm:block",children:[(0,s.jsx)("h3",{className:"text-17 font-medium text-copper mb-16",children:x("filter")}),(0,s.jsxs)("div",{className:"flex flex-row flex-wrap gap-8 lg:gap-20 w-full",children:[(0,s.jsx)(b,{label:x("character"),urlParam:"character",filters:u.filterOptions.character}),(0,s.jsx)(b,{label:x("keg"),urlParam:"keg",filters:u.filterOptions.keg}
1),(0,s.jsx)(w,{label:x("launch-date"),steps:R(10),urlParam:"bottled"}),(0,s.jsx)(w,{suffix:"%",label:x("alcohol-level"),steps:Array(101).fill(null).map((e,t)=>t.toString()),urlParam:"alcohol_level"}),(0,s.jsx)(w,{suffix:" ".concat(x("pc")),label:x("number-of-bottles"),steps:["0","300","600","900","1200","2000","3000","5000","10000"],urlParam:"bottles"}),(0,s.jsx)(f,{urlParam:"instore",label:x("available-at-systembolaget")}),h&&(0,s.jsx)(f,{urlParam:"only_available",label:x("availability-filter")})]})]}),(0,s.jsx)("div",{className:"sm:hidden",children:(0,s.jsx)(C.Z,{title:x("filter"),titleTag:"h3",titleClassName:"text-17 font-medium text-copper",className:"border-haze border-b",children:(0,s.jsxs)("div",{className:"flex flex-col gap-8 w-full mb-80",children:[(0,s.jsx)(b,{label:x("character"),urlParam:"character",filters:u.filterOptions.character}),(0,s.jsx)(b,{label:x("keg"),urlParam:"keg",filters:u.filterOptions.keg}),(0,s.jsx)(w,{label:x("launch-date"),steps:R(10),urlParam:"bottled"}),(0,s.jsx)(w,{suffix:"%",label:x("alcohol-level"),steps:["0","50","100"],urlParam:"alcohol_level"}),(0,s.jsx)(w,{suffix:" ".concat(x("pc")),label:x("number-of-bottles"),steps:["0","300","600","900","1200","2000","3000","5000","10000"],urlParam:"bottles"}),(0,s.jsx)(f,{urlParam:"instore",label:x("available-at-systembolaget")})]})})})]}),(0,s.jsx)(k,{defaultSortOrder:u.filterOptions.collection?"asc":"desc"})]}),(0,s.jsxs)(i.Z,{className:"relative px-8 gap-x-8 md:gap-x-20 ".concat(F?"opacity-30":""),children:[null==P?void 0:P.flat(1).map((e,t)=>{let l=e.story.content.hide_in_locale;return(0,q.cc)(l,N||"sv")?null:(0,s.jsx)("div",{className:"col-span-full xs:col-span-6 sm:col-span-4 lg:col-span-3 mb-12 sm:mb-32 lg:mb-40",children:(0,s.jsx)(o.Z,{fullSlug:m?"".concat(m,"/").concat(e.story.slug):e.story.full_slug,name:e.story.name,image:e.story.content.product_image,imageCover:e.story.content.product_image_cover,character:e.story.content.character,bottled:e.story.content.bottled,price:!d&&e.story.content.price,pricePerCl:d&&e.story.content.price_per_cl,showPricePerCl:d,imageSizes:" (max-width: 640px) 60vw, (max-width: 840px) 40vw, (max-width: 1200px) 24vw, (max-width: 1440px) 17vw, 241px "})},t)}),(0,s.jsx)("div",{ref:p,className:"absolute bottom-[100vh] left-0 pointer-events-none"})]})]})};var P=z},3220:function(e,t,l){var s=l(5893);let r=e=>{let{...t}=e;return(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t,children:(0,s.jsx)("path",{d:"M24 5.95 8.85 21 0 12.22l2.97-2.96 5.88 5.83L21.03 3 24 5.95Z"})})};t.Z=r},3483:function(e,t,l){var s=l(5893),r=l(7294),a=l(8368),n=l(4080),c=l(7743),i=l(8211),o=l(2248);let u=e=>{let{title:t,titleTag:l="h3",titleClassName:u,largeTitle:d,defaultOpen:m=!1,children:h,...x}=e,p=(0,r.useRef)(null);if(!t)return null;let f=()=>{let e=p.current;if(!e)return;let{width:t}=getComputedStyle(e);e.style.width=t,e.style.position="absolute",e.style.visibility="hidden",e.style.height="auto";let{height:l}=getComputedStyle(e);e.style.width="",e.style.position="",e.style.visibility="",e.style.height="0",getComputedStyle(e).height,requestAnimationFrame(()=>{e.style.height=l})},j=()=>{p.current&&(p.current.style.height="auto")},b=()=>{let e=p.current;if(!e)return;let{height:t}=getComputedStyle(e);e.style.height=t,getComputedStyle(e).height,requestAnimationFrame(()=>{e.style.height="0"})};return(0,s.jsx)(a.p,{as:"article",defaultOpen:m,className:(0,c.Z)("",x.className),...x,children:e=>{let{open:r}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(a.p.Button,{className:"flex items-center justify-between w-full py-10 text-left",children:[(0,s.jsx)(l,{className:(0,c.Z)(d?"type-heading-xl":"text-24 font-medium leading-120",u),children:t}),(0,s.jsx)(i.Z,{icon:o.Z,className:(0,c.Z)("transition-transform duration-500 ease-in-out-quart",d?"w-20":"w-12",r&&"-rotate-180")})]}),(0,s.jsx)(n.u,{enter:"transition-opacity duration-200 ease-linear delay-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity duration-500 ease-linear",leaveFrom:"opacity-100",leaveTo:"opacity-0",beforeEnter:f,afterEnter:j,beforeLeave:b,children:(0,s.jsx)(a.p.Panel,{ref:p,className:"overflow-hidden",style:{transition:"height 0.5s cubic-bezier(0.77, 0, 0.175, 1)"},children:(0,s.jsx)("div",{className:"py-10",children:h})})})]})}})};t.Z=u},504:function(e,t,l){l.d(t,{_:function(){return s}});let s=e=>e.toString().replace(/\B(?=(\d{3})+(?!\d))/g," ")},3579:function(e,t){let l=e=>fetch(e).then(e=>e.json());t.Z=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.