1var I=(e,r,a)=>new Promise((d,n)=>{var i=l=>{try{p(a.next(l))}catch(u){n(u)}},g=l=>{try{p(a.throw(l))}catch(u){n(u)}},p=l=>l.done?d(l.value):Promise.resolve(l.value).then(i,g);p((a=a.apply(e,r)).next())});import{j as t,G as y,c as C,P as v,A as k,B as D,H as B,R as L,O as G}from"./npm.sellpy-design-system.sUaPRvy7.bundle.js";import{r as b}from"./npm.react-hook-form.C-gy3V91.bundle.js";import{m as c,aR as R,aq as A,aB as T,aS as W,b as q,a1 as _,D as S}from"./index.OKbXaoKY.bundle.js";import{h as H,e as Q}from"./npm.apollo-client.D2roezfX.bundle.js";import"./npm.lodash.B-mb_ip_.bundle.js";import{M as O}from"./MetaTagPlacer.DzHyTaDQ.bundle.js";import{g as o,E as U}from"./npm.styled-components.CXmCnM24.bundle.js";import{u as M}from"./npm.react-i18next.DBIOEc1H.bundle.js";import"./npm.react-dom.DRhp71ng.bundle.js";import"./npm.sellpy-commons.CqmbWWp3.bundle.js";import"./npm.immutable.3wsaRX37.bundle.js";import"./npm.luxon.3NOFZn7k.bundle.js";import"./npm.react-router.eGoWS0aR.bundle.js";import"./npm.zod.DEnjmUYT.bundle.js";import"./npm.parse.B9RAjAGR.bundle.js";import"./npm.sentry-react.D1FVWAhI.bundle.js";import"./npm.swr.CGFXCyXz.bundle.js";import"./npm.algolia.BDObKZ-5.bundle.js";import"./npm.i18next.B74d65Th.bundle.js";import"./translations.FODGUIZZ.bundle.js";import"./npm.graphql.ClDiDpi3.bundle.js";import"./utils.ByO6efJv.bundle.js";try{let e=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="f4e017f3-b0fb-4839-a03c-30a4a4697b58",e._sentryDebugIdIdentifier="sentry-dbid-f4e017f3-b0fb-4839-a03c-30a4a4697b58")}catch(e){}{let e=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=Object.assign({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:sellpy-market":!0})}const F=o.div` 2 grid-column: 4 / span 6; 3 text-align: center; 4 ${c.tablet} { 5 grid-column: 2 / span 10; 6 } 7`,z=o.div` 8 background-color: ${({color:e,theme:r})=>e||r.color.blue.default}; 9 padding: 72px 0; 10 ${c.tablet} { 11 padding: 56px 0; 12 } 13`,N=()=>{const{t:e}=M("pressLanding");return t.jsx(z,{children:t.jsx(y,{children:t.jsxs(F,{children:[t.jsx(C,{color:"white",children:e("about.heading")}),t.jsx(v,{design:"body1",color:"white",noMargin:!0,style:{marginBottom:"32px",marginTop:"16px"},children:e("about.description")}),t.jsx(k,{href:"/about",children:t.jsx(D,{variant:"filled",label:e("about.buttonText"),color:"white"})})]})})})},K=o.div` 14 grid-column: 2 / span 10; 15 text-align: center; 16 z-index: 1; 17 margin: 48px 0; 18 ${c.tablet} { 19 grid-column: 1 / span 12; 20 } 21`,X=()=>{const{t:e}=M("pressLanding");return t.jsx("div",{children:t.jsx(y,{children:t.jsxs(K,{children:[t.jsx(C,{children:e("contact.heading")}),t.jsx(v,{noMargin:!0,design:"body1",children:e("contact.subtitle")}),t.jsxs(v,{noMargin:!0,design:"body1",children:[e("contact.contact")," ",t.jsx(k,{href:"mailto:"+e("contact.email"),children:e("contact.email")})]})]})})})};var Y={REGION:"SE"};const f=6,E=(e=!1)=>` 22*[_type == "pressRelease" && ("${Y.REGION}" in regions || allRegions == true) ${e?"&& (publicationDate < $lastPublicationDate || (publicationDate == $lastPublicationDate && _id > $lastId))":""}] | order(publicationDate desc) [0..${(e?f:f*2)-1}] { 23 title, publicationDate, slug, image { asset -> { url } }, regions, introText, _id 24}`,J=E(!1),V=E(!0),h={};function Z({isPreview:e=!1}){var $;const[r,a]=b.useState(null),[d,n]=b.useState(!0),[i,g]=b.useState(null),[p,l]=b.useState(null),[u,x]=b.useState(2);b.useEffect(()=>{const s=J;let P=!1;return s?(I(null,null,function*(){if(!h[s])try{h[s]=yield R({query:s,isPreview:e})}catch(w){if(P)return w;n(!1);return}P||(h[s].length>f?h[s].length>f*2?x(2):x(1):x(0),h[s].length&&(g(h[s][h[s].length-1].publicationDate),l(h[s][h[s].length-1]._id)),a(h[s]),n(!1))}),()=>{P=!0}):void 0},[e,a,n]);const j=()=>I(null,null,function*(){if(u===1)x(0);else return R({query:V,isPreview:e,variables:{$lastPublicationDate:String(i),$lastId:String(p)}}).then(s=>{a(P=>[...P,...s]),n(!1),s!=null&&s.length&&(g(s[s.length-1].publicationDate),l(s[s.length-1]._id)),(s==null?void 0:s.length)<f&&x(1)})});return{data:($=u?r==null?void 0:r.slice(0,((r==null?void 0:r.length)-f<=f?f-1:-f)+1):r)!=null?$:[],loading:d,fetchMore:j,hasMorePages:u}}const ee=U` 25 0% { 26 opacity: 0; 27 } 28 100% { 29 opacity: 1; 30 } 31`,te=o(A)` 32 opacity: 0; 33 animation: ${ee} 0.25s ease-in-out forwards; 34 max-width: 480px; 35 width: 100%; 36 flex-direction: column; 37 margin: 0 auto; 38 height: 100%; 39 &:hover { 40 filter: ${({theme:e})=>`drop-shadow(0px 2px 8px ${e.color.grey.shade6})`}; 41 } 42 transition: filter 0.2s ease-in-out, filter 0.2s ease-in-out; 43`,se=o.div` 44 padding: 16px; 45`,re=o(L)` 46 border-radius: 10px; 47 width: 100%; 48 height: 200px; 49 object-fit: cover; 50`;
50function ne({date:e,title:r,description:a,image:d,ctaUrl:n}){return t.jsx(k,{href:n,style:{textDecoration:"none"},children:t.jsxs(te,{children:[t.jsx(re,{src:d,mobileWidth:"90vw",desktopWidth:"50vw",style:{borderBottomLeftRadius:0,borderBottomRightRadius:0}}),t.jsxs(se,{children:[t.jsx(v,{design:"subtitle",style:{marginBottom:"8px"},children:e}),t.jsx(B,{design:"h4",style:{minHeight:"56px"},children:r}),t.jsx(v,{design:"body1",children:a})]})]})})}const ae=o(y)` 51 margin: 32px 0; 52 grid-row-gap: 24px; 53`,ie=o.div` 54 grid-column: 2 / span 10; 55 ${c.desktop} { 56 grid-column: 1 / span 12; 57 } 58 text-align: left; 59 margin-bottom: 16px; 60 ${c.tablet} { 61 grid-column: 1 / span 12; 62 } 63`,oe=o(C)` 64 grid-column: span 12; 65 grid-row: 1 / span 1; 66 margin-bottom: 48px; 67 padding-top: 56px; 68 ${c.tablet} { 69 margin-bottom: 24px; 70 padding-top: 32px; 71 } 72`,le=o.div` 73 background-color: ${({theme:e})=>e.color.grey.shade9}; 74 padding-bottom: 16px; 75 ${c.tablet} { 76 padding-bottom: 8px; 77 } 78`,de=o(y)` 79 grid-template-columns: repeat(2, minmax(0, 1fr)); 80 grid-row-gap: 24px; 81 82 ${c.largeDesktop} { 83 grid-template-columns: repeat(3, minmax(0, 1fr)); 84 } 85 86 ${c.desktop} { 87 grid-template-columns: repeat(2, minmax(0, 1fr)); 88 } 89 90 ${c.tablet} { 91 grid-template-columns: repeat(1, minmax(0, 1fr)); 92 } 93`,ce=o.div` 94 display: flex; 95 justify-content: center; 96 margin-top: 64px; 97 margin-bottom: 0px; 98`,pe=()=>{const e=T(),{t:r}=M("pressLanding"),{data:a,hasMorePages:d,fetchMore:n}=Z({isPreview:!!e.sanityDraftId});return a.length?t.jsxs(le,{children:[t.jsx(oe,{center:!0,children:r("pressReleases.headline")}),t.jsx(ae,{children:t.jsxs(ie,{children:[t.jsx(de,{children:a.map(i=>t.jsx(ne,{title:i.title,description:i.introText,date:i.publicationDate,image:i.image.asset.url,ctaUrl:`/press/news/${i.slug.current}`},i.title))}),d!==0&&t.jsx(ce,{children:t.jsx(D,{color:"black",size:"medium",variant:"filled",label:r("pressReleases.showMore"),onClickWithLoading:n})})]})})]}):null},ge=o(C)` 99 grid-column: span 12; 100`,ue=o(y)` 101 grid-row-gap: 32px; 102 grid-auto-flow: row; 103`,me=o(y)` 104 grid-column: 2 / span 10; 105 ${c.desktop} { 106 grid-column: 1 / span 12; 107 } 108 margin-bottom: 16px; 109 grid-row-gap: 16px; 110`,he=o.div` 111 grid-column: span 3; 112 ${c.desktop} { 113 grid-column: span 6; 114 } 115`,fe=o(W)` 116 img { 117 background-color: ${({theme:e})=>e.color.grey.shade8}; 118 } 119`,xe=({categoryData:e})=>{const{t:r}=M("pressLanding");return t.jsxs(ue,{children:[t.jsx(ge,{noMargin:!0,center:!0,children:r("imageCategories.heading")}),t.jsx(me,{children:e.map(({label:a,imageUrl:d,imgAlt:n,link:i,originalFilename:g})=>t.jsx(he,{children:t.jsx(fe,{imageUrl:d,imgAlt:n,label:a,to:i,imageOptions:{format:(g==null?void 0:g.split(".").pop())==="png"?"png":"jpg"}})},i))})]})},be=Q` 120 query pressPageQuery($id: ID!) { 121 PressPage(id: $id) { 122 _id 123 headerImage { 124 mobile { 125 asset { 126 url 127 } 128 alt 129 } 130 desktop { 131 asset { 132 url 133 } 134 alt 135 } 136 } 137 campaignImagesCover { 138 asset { 139 url 140 originalFilename 141 } 142 alt 143 } 144 packshotImagesCover { 145 asset { 146 url 147 originalFilename 148 } 149 alt 150 } 151 spokespersonImagesCover { 152 asset { 153 url 154 originalFilename 155 } 156 alt 157 } 158 brandAssetsCover { 159 asset { 160 url 161 originalFilename 162 } 163 alt 164 } 165 } 166 } 167`,Oe=()=>{var l,u,x;const e=T(),{isTablet:r}=q(),{t:a}=M("pressLanding"),d=e==null?void 0:e.sanityDraftId,{data:n}=H(be,{variables:{id:d||"pressPage"},context:{api:"sanity",preview:!!d}}),i=(l=n==null?void 0:n.PressPage)==null?void 0:l.headerImage,g=b.useMemo(()=>["campaignImages","packshotImages","spokespersonImages","brandAssets"].map(j=>{var $,s;const m=(s=($=n==null?void 0:n.PressPage)==null?void 0:$[j+"Cover"])==null?void 0:s.asset;return{label:a(`imageCategories.${j}`),imageUrl:m==null?void 0:m.url,imgAlt:m==null?void 0:m.alt,link:`/press/images/${j}`,originalFilename:m==null?void 0:m.originalFilename}}),[n==null?void 0:n.PressPage,a]),p=r?i==null?void 0:i.mobile:i==null?void 0:i.desktop;return t.jsxs(t.Fragment,{children:[t.jsx(O,{title:a("helmetMetaTags.title",{domain:_}),description:a("helmetMetaTags.description",{domain:_}),url:"/press"}),((u=p==null?void 0:p.asset)==null?void 0:u.url)&&t.jsx(G,{headline:a("headline"),imageUrl:p.asset.url,ratio:r?80:30,alt:(x=p.alt)!=null?x:""}),t.jsx(X,{}),t.jsx(pe,{}),t.jsx(N,{}),t.jsx(S,{}),t.jsx(xe,{categoryData:g}),t.jsx(S,{})]})};export{Oe as default}; 168//# sourceMappingURL=PressLandingPage.B0QuNMaD.bundle.js.map
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.