PageSourceSearch

https://www.gp.se/_next/static/chunks/242-b4ed79ca6571678e.js

js gp.se collected 2026-10-01 10:12:53 UTC 9,970 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[242],{10413:(e,t,r)=>{r.d(t,{k:()=>n,y:()=>i});let i=20,n=9999},48054:(e,t,r)=>{r.d(t,{D:()=>l});var i=r(35456),n=r(14531),o=r(89381),a=r(54020);let l=(0,r(11730).Ay)(i.N9).withConfig({componentId:"sc-a67d8faf-0"})(["background-color:none;width:100%;@media ","{max-width:25rem;}.Toastify__toast{",";width:100%;border-radius:4px;background-color:var(--corp-background-color-lighten);box-shadow:0px 4px 8px 0px rgba(0,0,0,0.15);+ .Toastify__toast{",";}}&,.Toastify__toast-body{",";}"],n.j.sm,(0,a.xe)({p:o.B.Spacing12,m:"auto"}),(0,a.xe)({mt:o.B.Spacing4}),(0,a.xe)({p:0}))},50197:(e,t,r)=>{r.d(t,{a:()=>$});var i,n,o=r(94513),a=r(10485),l=r(45537),s=r(94285),c=r(91544),d=r(3197),p=function(){return(p=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},h=(i=d.Ay,n=function(e){return function(t,r,i){return i.revalidateOnFocus=!1,i.revalidateIfStale=!1,i.revalidateOnReconnect=!1,e(t,r,i)}},function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o="function"==typeof(e=t)[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],a=o[0],l=o[1],s=o[2],c=(s.use||[]).concat(n);return i(a,l,p(p({},s),{use:c}))});let x=async({uuids:e,limit:t=10})=>{if(0===e.length)return null;let r=`/api/queryArticle/filter_by_ids?uuids=${encodeURIComponent(e.join(","))}&limit=${t}`;return(await fetch(r,{method:"GET"})).json()};var u=r(54020),g=r(60930),m=r(57005),f=r(11730),b=r(45873),y=r(13964),v=r(76663),j=r(4252);let w=()=>{let{brandShortName:e}=(0,m.Pj)(),t=(0,m.rH)()?.mypages?.readLater,r={pageText:t.landingPageText,image:{show:t.showProductImage,render:()=>(0,o.jsx)(k,{brandShortName:e})}};return(0,o.jsx)(v.n,{...r})},k=({brandShortName:e})=>(0,o.jsxs)(A,{children:[(0,o.jsxs)(C,{children:[(0,o.jsx)(I,{children:(0,o.jsx)(y.A,{shortname:e,className:e.toLowerCase(),preserveAspectRatio:"xMinYMid meet"})}),(0,o.jsx)(S,{children:(0,o.jsx)(b.A,{optimize:!1,src:"/images/slm/articles/article-card.png",alt:"Placeholder artikel"})})]}),(0,o.jsx)(N,{children:(0,o.jsxs)(M,{children:[(0,o.jsx)(_,{href:"#icon-bookmark",className:"c-icon c-icon--secondary c-icon--24"}),"Spara"]})})]}),A=f.Ay.div.withConfig({componentId:"sc-75917b15-0"})(["position:relative;width:322px;min-height:200px;",";"],(0,u.xe)({mx:"auto"})),C=f.Ay.div.withConfig({componentId:"sc-75917b15-1"})(["border-radius:6px;border:1px solid var(--border-color,#dce1e1);background:var(--Web-Background,#f3f3f3);box-shadow:0px 3px 3px 0px rgba(0,0,0,0.25);overflow:hidden;min-height:200px;"]),I=f.Ay.div.withConfig({componentId:"sc-75917b15-2"})(["background:#fff;"," svg{height:19px;fill:var(--corp-logo-color);}"],(0,u.xe)({pt:"6px",pb:"3px",px:"12px"})),S=f.Ay.div.withConfig({componentId:"sc-75917b15-3"})(["",""],(0,u.xe)({p:"12px"})),N=f.Ay.div.withConfig({componentId:"sc-75917b15-4"})(["height:80px;width:80px;border-radius:50%;border:0.824px solid var(--gray-500);position:absolute;bottom:-12px;left:50%;transform:translateX(-50%);background:var(--white);"]),M=f.Ay.div.withConfig({componentId:"sc-75917b15-5"})(["color:var(--corp-color-darken);height:80px;width:80px;display:flex;align-items:center;justify-content:center;"," ",";"],(0,u.xe)({ml:"-2px"}),(0,g.I)({fontFamily:"var(--font-family-sans-serif)",fontSize:"0.902rem",fontWeight:600})),_=(0,f.Ay)(j.A).withConfig({componentId:"sc-75917b15-6"})(["",""],(0,u.xe)({mr:"2px"}));var P=r(38255),z=r(10288),B=r(89381),F=r(96075),O=r(75011),R=r(84848),T=r(96703),E=r(83941);let H=({articles:e,totalArticles:t,loading:r,pageSize:i,hideTitle:n=!1})=>{let{isFirstPage:l,isLastPage:s,page:c,setPage:d}=(0,F.P)({totalCount:t,pageSize:i});return(0,o.jsxs)(o.Fragment,{children:[!n&&(0,o.jsx)(q,{children:"Sparade artiklar"}),r?(0,o.jsx)(D,{children:(0,o.jsx)(a.r,{children:(0,o.jsx)(a.y,{"data-testid":"spinner",role:"alert","aria-busy":"true"})})}):(0,o.jsxs)(P.m,{withMinHeight:!0,variant:"fluid",children:[!n&&(0,o.jsx)(z.h,{value:{mobile:B.B.Spacing16,desktop:B.B.Spacing24}}),(0,o.jsx)(T.jH,{children:e.map(e=>(0,o.jsx)(O.Z,{children:(0,o.jsx)(R.A,{article:e,withUndoSnackBar:!0})},e.uuid))})]}),!r&&t>i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(z.h,{value:{mobile:B.B.Spacing16,desktop:B.B.Spacing24}}),(0,o.jsx)(E.A,{totalCount:t,currentPage:c,isFirstPage:l,isLastPage:s,pageSize:i,setPage:d})]})]})},q=f.Ay.h2.withConfig({componentId:"sc-cad3501b-0"})(["",""],(0,g.I)({fontSize:"1.5rem"})),D=f.Ay.div.withConfig({componentId:"sc-cad3501b-1"})(["min-height:50vh;"]),$=({hideTitle:e})=>{let{readLaterItems:t,loading:r}=(0,l.e)(),{articles:i,initialized:n}=(({pageSize:e})=>{let{uuids:t,currentPage:r}=(({pageSize:e})=>{let t=(0,c.useRouter)().query.page??1,r=(Number(t)-1)*e,i=Number(t)*e,{readLaterItems:n}=(0,l.e)();return(0,s.useMemo)(()=>({uuids:n?n.length<=e?n.map(e=>e.articleId):n.map(e=>e.articleId).slice(r,i):[],currentPage:t}),[t,r,e,n,i])})({pageSize:e}),{mutate:i}=(0,d.iX)(),{data:n,isValidating:o}=h(`articleResult-${r}`,()=>x({uuids:t}));return(0,s.useEffect)(()=>{t.length>=0&&i(`articleResult-${r}`)},[r,i,t]),{articles:n?n.articles:[],initialized:!!n||!o}})({pageSize:9});if(r||void 0===t)return(0,o.jsx)(a.r,{children:(0,o.jsx)(a.y,{"data-testid":"spinner",role:"alert","aria-busy":"true"})});let p=t.length;return 0===p?(0,o.jsx)(w,{}):(0,o.jsx)(H,{articles:i,totalArticles:p,loading:!n,pageSize:9,hideTitle:e})}},83941:(e,t,r)=>{r.d(t,{A:()=>k});var i=r(94513),n=r(94285),o=r(5305),a=r(10413),l=r(40188),s=r(14531),c=r(54020),d=r(60930),p=r(11730),h=r(34697);let x=(0,p.Ay)(({direction:e,onClick:t,className:r,disabled:n})=>(0,i.jsxs)("div",{className:r,children:["next"===e&&(0,i.jsx)("button",{disabled:n,className:"labelbutton",onClick:t,children:"N\xe4sta"}),(0,i.jsx)(v,{arrowDirection:"next",onClick:t,disabled:n,children:(0,i.jsx)(l.t,{href:"next"===e?"icon-chevron-right":"icon-chevron-left"})}),"prev"===e&&(0,i.jsx)("button",{disabled:n,className:"labelbutton",onClick:t,children:"F\xf6reg\xe5ende"})]})).withConfig({componentId:"sc-d13f1a00-0"})(["align-items:center;display:flex;button.labelbutton{background:transparent;display:none;"," ",";@media ","{display:block;}@media ","{","}}",""],(0,d.I)({fontSize:"14px"}),(0,c.xe)({px:2}),s.j.sm,s.j.md,(0,d.I)({fontSize:"0.875rem"}),({disabled:e})=>e&&(0,p.AH)(["span{opacity:0.4;}
1pointer-events:none;","{background-color:var(--bg-color-gray);border:var(--bg-color-gray);}"],v)),u=p.Ay.div.withConfig({componentId:"sc-d13f1a00-1"})(["background-color:#fff;bottom:0;border-bottom:2px solid rgba(0,0,0,0.1);box-shadow:rgba(99,99,99,0.2) 0px 2px 8px 0px;position:sticky;",";@media ","{",";}",""],(0,c.xe)({mx:-3}),s.j.md,(0,c.xe)({mx:"auto"}),c.xe),g=p.Ay.div.withConfig({componentId:"sc-d13f1a00-2"})(["display:flex;justify-content:center;width:100%;button{border:0;margin:0;cursor:pointer;","}",";"],(0,c.xe)({p:0}),(0,c.xe)({py:2,px:"16px"})),m=p.Ay.ul.withConfig({componentId:"sc-d13f1a00-3"})(["display:flex;flex-wrap:wrap;justify-content:center;width:100%;",";@media ","{width:auto;}@media ","{",";}"],(0,c.xe)({my:0,mx:2,p:0}),s.j.sm,s.j.lg,(0,c.xe)({mx:4})),f=p.Ay.li.withConfig({componentId:"sc-d13f1a00-4"})(["list-style:none;",";@media ","{",";}",""],(0,c.xe)({mx:"0.375rem"}),s.j.lg,(0,c.xe)({mx:2}),({active:e})=>e&&(0,p.AH)(["","{border:1px solid var(--corp-color-darken);border-radius:50%;color:var(--corp-color-darken);width:2rem;","}"],b,(0,d.I)({fontWeight:900}))),b=p.Ay.button.withConfig({componentId:"sc-d13f1a00-5"})(["background:transparent;color:var(--corp-color-lighten);height:2rem;",""],(0,d.I)({fontSize:"0.875rem"})),y=p.Ay.span.withConfig({componentId:"sc-d13f1a00-6"})(["position:relative;&:before{background-color:var(--gray-300);content:'';height:2rem;position:absolute;width:1px;}"]),v=(0,p.Ay)(h.CQ).withConfig({componentId:"sc-d13f1a00-7"})(["--rounded-icon-color:var(--white);align-items:center;background-color:var(--corp-color-darken);display:flex;justify-content:center;height:2rem;width:2rem;.c-icon,svg{fill:var(--white);}"]),j="separator",w=(e,t)=>Array.from({length:t-e+1},(t,r)=>r+e),k=({totalCount:e,pageSize:t=a.y,currentPage:r,setPage:l,isFirstPage:s,isLastPage:c,...d})=>{let{isMobile:p}=(0,o.al)(),h=(0,n.useMemo)(()=>(({totalCount:e,pageSize:t,siblingCount:r,currentPage:i})=>{let n=isNaN(i)?1:i,o=Math.ceil(e/t);if(r+5>=o)return w(1,o);let a=Math.max(n-r,1),l=Math.min(n+r,o),s=a>2,c=l<=o-2;return!s&&c?[...w(1,3+r),j,o]:s&&!c?[1,j,...w(o-(3+r)+1,o)]:s&&c?[1,j,...w(a,l),j,o]:w(1,o)})({currentPage:r,totalCount:e,pageSize:t,siblingCount:p?1:3}),[r,p,t,e]);return 0===e?null:(0,i.jsx)(u,{"data-testid":"pagination_sticky-wrapper",...d,children:(0,i.jsxs)(g,{children:[(0,i.jsx)(x,{direction:"prev",onClick:()=>l(r-1),disabled:s}),(0,i.jsx)(m,{children:h.map((e,t)=>(0,i.jsx)(f,{active:e===r,"aria-current":e===r?"page":void 0,children:e===j?(0,i.jsx)(y,{}):(0,i.jsx)(b,{onClick:()=>l(e),children:e})},t))}),(0,i.jsx)(x,{direction:"next",onClick:()=>l(r+1),disabled:c})]})})}},96075:(e,t,r)=>{r.d(t,{P:()=>l});var i=r(94285),n=r(91544),o=r(53327),a=r(10413);function l({totalCount:e,pageSize:t=a.y,scrollOnPageChange:r=!0}){let l=(0,n.useRouter)(),[s,c]=(0,o.ZA)("page",o.GJ.withDefault(1).withOptions({shallow:!1,clearOnDefault:!1,scroll:r})),d=Math.ceil(e/t),p=(0,i.useCallback)(()=>{c(1)},[c]),{sanitizedPage:h,isFirstPage:x,isLastPage:u}=(0,i.useMemo)(()=>{var e,t;let r,i=d<=0?1:(e=function e(t){if(void 0===t||""===t||0===t)return 1;if(Array.isArray(t))return e(t[0]);if("number"==typeof t)return t;let r=t.replace(/[^0-9.]/g,"");if(!r)return 1;let i=Number(r);return isNaN(i)?1:i}(s),t=d,(r=Math.min(r=Math.floor(r=e<0?Math.abs(e):e),a.k))<1?1:r>t?t:r),n=i===d;return{sanitizedPage:i,isFirstPage:1===i,isLastPage:n}},[d,s]);return(0,i.useEffect)(()=>{let e=l.query?.page;(s!==h||e&&Number(e)!==h)&&c(h)},[h,s,c,l.query?.page]),{page:h,setPage:c,resetPage:p,isFirstPage:x,isLastPage:u}}}}]);

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.