PageSourceSearch

https://www.loegismose.dk/_next/static/chunks/pages/kategorier/[slug]/[categoryId]-bdf9e8d2cbd08c60.js

js loegismose.dk collected 2026-09-26 01:52:36 UTC 9,510 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[444],{56940:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/kategorier/[slug]/[categoryId]",function(){return o(87853)}])},85145:function(e,t,o){"use strict";o.d(t,{n:function(){return HeroCategory}});var r=o(52322),a=o(72779),n=o.n(a),i=o(56475),l=o(40269),c=o.n(l);function HeroCategory(e){let{backgroundImage:t,useDarkFontColor:o,headline:a,description:l}=e;return(0,r.jsxs)("div",{className:c().hero,children:[(0,r.jsx)("div",{className:n()(c().background,o&&c().background_light),children:t&&(0,r.jsx)(i.UiMediaHandler,{containerClassName:c().heroImage,resize:"Landscape",image:t})}),(0,r.jsxs)("div",{className:n()(c().content,"col-xs-10 col-xs-offset-1 col-md-6 col-lg-4 col-md-offset-1",{[c().content_dark]:o}),children:[a&&(0,r.jsx)("h1",{children:a}),l&&(0,r.jsx)("p",{children:l})]})]})}},54272:function(e,t,o){"use strict";o.d(t,{X:function(){return ProductListComponent}});var r=o(52322),a=o(72779),n=o.n(a),i=o(5632),l=o(35669),c=o(2784),s=o(56475),d=o(4427),_=o(42636),u=o(17620),g=o.n(u),y=o(49167),h=o(16802),x=o(12046),v=o(45008),m=o(62362),p=o(9910),f=o.n(p);let b=["/endpoints/loegismose/v1/product/search?type=product-list-component"],ProductListComponent=e=>{let{addToBasket:t,category:o,link:a,limitToDiscountsOnly:u,prefetchedData:p,initialSearchData:N}=e,{t:P}=(0,l.$G)(),{query:S}=(0,i.useRouter)(),{sorting:j}=function(e){let t=(null==e?void 0:e.sorting)||d.FUo.Popularity,o=Array.isArray(e.categoryId)?e.categoryId[0]:e.categoryId,r=Array.isArray(e.contentUrl)?"/".concat(e.contentUrl.join("/"),"/"):"/".concat(e.contentUrl,"/"),a=Array.isArray(e.slug)?e.slug[0]:e.slug,n=Array.isArray(e.page)?e.page[0]:e.page,i=e?g()(e,["page","sorting","categoryId","slug","contentUrl"]):[];return{filters:i,sorting:t,categoryId:o,contentUrl:r,slug:a,page:n}}(S),[k,L]=(0,c.useState)(!1),[C,T]=(0,c.useState)([]),[F,B]=(0,c.useState)(N||null),[w,I]=(0,c.useState)(j),{data:D,error:V,hasNextPage:M,isFetchingNextPage:U,isFetching:E,isLoading:A,fetchNextPage:R}=(0,h.r)({queryKey:b,body:{categoryId:a.categoryId,activeFilters:C,sortingValue:w,initialData:F,limitToDiscountsOnly:u,pageSize:d._Bh}});(0,_.y)({products:null==D?void 0:D.Products,category:null==o?void 0:o.DatalayerViewCategory,isLoading:A}),(0,c.useEffect)(()=>{if(!N){let getData=async()=>{B(await p([null==a?void 0:a.categoryId]))};getData()}},[null==a?void 0:a.categoryId,p,N]);let H=null==D?void 0:D.TotalProductCount,{onRemoveFilter:K,onFilterMultiSelectChange:q,onFilterToggleChange:O,onFilterRangeChange:X}=(0,y.L)({setFilterValues:T,filterValues:C});return(0,r.jsxs)("div",{children:[(0,r.jsx)(v.j,{setFilterVisibility:L,totalProducts:H,data:(null==N?void 0:N.length)>0?N[0]:D,onSortingChange:e=>{I(e.currentTarget.value)},resetFilterValues:()=>T([]),onRemoveFilter:K,filterValues:C,setFilterValues:T,sorting:w,setSortingValue:I,categoryIds:[null==a?void 0:a.categoryId]}),(0,r.jsxs)("div",{className:f().results_mobile,children:[H||0," ",P("Loegismose.Frontend.Search.SearchResults")]}),(0,r.jsxs)("div",{className:n()(f().products,"row"),children:[(0,r.jsxs)("div",{className:n()(f().products_filter,k&&f().products_filter_show),onClick:e=>{e.target===e.currentTarget&&L(!1)},"data-cy":"product-filter-sidebar",children:[(0,r.jsx)("div",{className:f().products_filter_content,children:((null==D?void 0:D.Filters)||[]).map(e=>{var t,o;let a=null==e?void 0:null===(t=e.Options)||void 0===t?void 0:t.filter(e=>e.Selected),n=null==a?void 0:null===(o=a.map(e=>e.Name))||void 0===o?void 0:o.join(", ");return(0,r.jsx)(s.Accordion,{variant:e.FilterType===d.mb$.MultiSelect?"boxed":"boxed-reveal","data-cy":"filter-accordion",summary:{content:e.Name,lightFont:!0,tags:n},smallPadding:!0,borderBottom:!0,children:(0,r.jsx)(x.k,{className:f().products_filter_content_item,filter:e,onFilterMultiSelectChange:q,onFilterRangeChange:X,onFilterToggleChange:O})},e.Key)})}),(0,r.jsx)("div",{className:f().products_filter_footer,children:(0,r.jsx)(s.Button,{onClick:()=>L(!1),children:P("Loegismose.Frontend.Page.Products.ViewResults",{count:H||0})})})]}),(0,r.jsxs)("div",{className:n()(f().products_productsList,f().products_preventContentJump,"col col-md-12 col-xl-9"),children:[V&&(0,r.jsx)("div",{className:f().products_productsList_error,children:V.message}),!E||(null==D?void 0:D.Products)||U?(0,r.jsx)(m.e,{categoryDatalayer:null==o?void 0:o.DatalayerViewCategory,products:null==D?void 0:D.Products,isFetchingNextPage:U,totalProducts:null==D?void 0:D.TotalProductCount,onFetchNextPage:R,hasNextPage:M,handleAddToBasket:t}):(0,r.jsx)("div",{children:P("Loegismose.Frontend.Page.Products.Loading")})]})]})]})}},16802:function(e,t,o){"use strict";o.d(t,{r:function(){return useProducts}});var r=o(5632),a=o(2784),n=o(4427),i=o(65513);let useProducts=e=>{let{queryKey:t,body:o}=e,{categoryId:l,pageSize:c,page:s,activeFilters:d,sortingValue:_,searchText:u,limitToDiscountsOnly:g,initialData:y,productFilterPageValueUid:h}=o,{isAuthenticated:x}=(0,i.aC)(),{isReady:v}
1=(0,r.useRouter)(),{query:m,flattenData:p}=(0,n.oJC)({queryOptions:{enabled:v,queryKey:t,staleTime:1e4,refetchOnWindowFocus:!1},initialData:{pages:y,pageParams:null==y?void 0:y.map((e,t)=>t)},requestBody:{PageNumber:Number.isNaN(Number(s))?n.bLI:Number(s),PageSize:Number.isNaN(Number(c))?n._Bh:Number(c),Sorting:_,LimitToProductFilterPageValueUids:h?[h]:[],SearchText:u||null,CategoryIds:l?[l]:[],LimitToDiscountsOnly:g,Filters:d}});return(0,a.useEffect)(()=>{v&&m.refetch()},[x,_,JSON.stringify(d)]),(0,a.useEffect)(()=>{console.log("isAuthenticated",x)},[x]),(0,a.useEffect)(()=>{console.log("sortingValue",_)},[_]),(0,a.useEffect)(()=>{v&&console.log("activeFilters",JSON.stringify(d))},[d]),{...m,data:p}}},87853:function(e,t,o){"use strict";o.r(t),o.d(t,{__N_SSP:function(){return u},default:function(){return _categoryId_}});var r=o(52322),a=o(6636);o(2784);var n=o(29463),i=o(4427),l=o(85145),c=o(54272),s=o(77572),d=o(39691),_=o.n(d);let Category=e=>{let{categoryId:t,initialData:o,initialProducts:a}=e,{t:d}=(0,n.$)(),{addProductToBasket:u}=(0,s.J)({showAddToBasketModal:!0}),{data:g,error:y,isLoading:h}=(0,i.lzw)(t,{query:{initialData:o}}),x=null==g?void 0:g.Category;return!h&&(h||g)?y?(0,r.jsx)("div",{children:d("Loegismose.Frontend.Page.Category.NotFound")}):(0,r.jsxs)(r.Fragment,{children:[(null==x?void 0:x.Banner)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.n,{backgroundImage:null==x?void 0:x.Banner.BackgroundImage,headline:null==x?void 0:x.Banner.Headline,description:null==x?void 0:x.Banner.Description,useDarkFontColor:null==x?void 0:x.Banner.UseDarkFontColor}),(0,r.jsx)("div",{className:_().spacer})]}),(0,r.jsx)(c.X,{category:x,DiscriminatorValue:null,initialSearchData:a,addToBasket:u,link:{categoryId:t}}),(null==x?void 0:x.Description)&&(0,r.jsx)("div",{className:_().description,children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:x.Description}})})]}):(0,r.jsx)("div",{children:d("Loegismose.Frontend.Global.Loading")})};var u=!0,_categoryId_=e=>{let{categoryId:t,canonical:o,initialData:n,initialProducts:i}=e;return(0,r.jsx)(a.L,{seo:{pageTitle:n.Category.SeoPageTitle,metaDescription:n.Category.SeoMetaDescription,metaKeywords:n.Category.SeoMetaKeywords,canonicalUrl:o},children:(0,r.jsx)(Category,{initialProducts:i,categoryId:t,initialData:n})})}},40269:function(e){e.exports={"text-large":"hero-category_text-large__w_PVM","text-373737":"hero-category_text-373737__ECw27","text-767676":"hero-category_text-767676__nSMot","text-caption":"hero-category_text-caption__LyV7G","text-h1":"hero-category_text-h1__nn5Pm","text-h2":"hero-category_text-h2__bsgQo","text-h3":"hero-category_text-h3__iEQwU","text-body-1":"hero-category_text-body-1__VVGqX","text-body-2":"hero-category_text-body-2__XgtKo","text-headline-1":"hero-category_text-headline-1__9xM3t","text-headline-2":"hero-category_text-headline-2__K_cHb","text-headline-3":"hero-category_text-headline-3___yLU4","font-avenirLTStd-Black":"hero-category_font-avenirLTStd-Black__UPbpQ","font-avenirLTStd-Heavy":"hero-category_font-avenirLTStd-Heavy__PyCyk","font-avenirLTStd-Roman":"hero-category_font-avenirLTStd-Roman__ysoBG","font-bentonModDisp-Bold":"hero-category_font-bentonModDisp-Bold__PWUiQ",hero:"hero-category_hero__97ikt",content:"hero-category_content__5Z_77",content_dark:"hero-category_content_dark__ThcUv",background:"hero-category_background__yLbjw",background_light:"hero-category_background_light__P0KFr",heroImage:"hero-category_heroImage__roXv7"}},39691:function(e){e.exports={"text-large":"category_text-large__igsqF","text-373737":"category_text-373737__0Sa59","text-767676":"category_text-767676__ex4Xy","text-caption":"category_text-caption__lYlju","text-h1":"category_text-h1__dOkai","text-h2":"category_text-h2__GodPA","text-h3":"category_text-h3__MBb_j","text-body-1":"category_text-body-1__KaXvl","text-body-2":"category_text-body-2__Gn_7U","text-headline-1":"category_text-headline-1__5qFKx","text-headline-2":"category_text-headline-2__98VPk","text-headline-3":"category_text-headline-3__ZSbeE","font-avenirLTStd-Black":"category_font-avenirLTStd-Black__7YdwV","font-avenirLTStd-Heavy":"category_font-avenirLTStd-Heavy__I8h8M","font-avenirLTStd-Roman":"category_font-avenirLTStd-Roman__GTN5e","font-bentonModDisp-Bold":"category_font-bentonModDisp-Bold__ZeleE",spacer:"category_spacer__RVr0q",description:"category_description__di3pq",title:"category_title__wPnKc"}}},function(e){e.O(0,[761,682,107,95,636,209,923,774,888,179],function(){return e(e.s=56940)}),_N_E=e.O()}]);

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.