1var _=Object.defineProperty,q=Object.defineProperties;var Q=Object.getOwnPropertyDescriptors;var W=Object.getOwnPropertySymbols;var X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var U=(e,n,c)=>n in e?_(e,n,{enumerable:!0,configurable:!0,writable:!0,value:c}):e[n]=c,T=(e,n)=>{for(var c in n||(n={}))X.call(n,c)&&U(e,c,n[c]);if(W)for(var c of W(n))Y.call(n,c)&&U(e,c,n[c]);return e},R=(e,n)=>q(e,Q(n));import{r as l,j as t}from"./vendor-CdyVhcFp.js";import{B as Z}from"./BreadcrumbAndIteratorLinks-BfQrcPH7.js";import{J as p,A as ee,a as te,b as ae,c as se,d as ne,R as ie}from"./ArticleVerdict-CEGkPkdp.js";import{I as k}from"./InlineMessageHorizontal-C5_P-t5n.js";import{M as re}from"./MeetTheTeam-CM0jfGxq.js";import{S as le}from"./ScrollToTop-CUrKW34w.js";import{u as ce}from"./useArticle-DlmQkLMM.js";import{i as oe,U as de,u as me,E as ue,a6 as ge,$ as he}from"./main-g-ZnRNk3.js";import{g as fe,F as xe,I as je,G as Ie}from"./GalleryActions-Bmf2I0JE.js";import{C as ve}from"./Carousel-C1T03WLE.js";import{G as z}from"./GalleryAction-DwoXwS2l.js";import{KD as ye,KE as Te,KF as V,KG as Ne,KH as be,KI as Ce,KJ as Se,KK as we,KL as Ae,KM as De,KN as Ke,KO as He,KP as Re,KQ as Ee,KR as Ge,KS as B,KT as Pe,KU as $,KV as Le,KW as Fe,KX as Me,KY as L,KZ as F,K_ as J,K$ as We,L0 as Ue,L1 as ke,L2 as ze,L3 as Ve,L4 as Be,L5 as $e,L6 as Je,L7 as Oe}from"./cssModules-BUIZcazZ.js";import{G as _e,P as qe}from"./PhotoSwipeGallery-C4zTX3hr.js";import{G as Qe}from"./GallerySingleLineHeader-C3Torgoq.js";import{u as Xe}from"./useIsDesktopHD-CnINCGcP.js";import"./BreadCrumbBackLink-C8UcG7tN.js";import"./chevron-left-blue-breadcrumb-XpRLom3Q.js";import"./Toast-hz-Trfeo.js";import"./ImageContainerWithSourceSet-BCFnm6hh.js";import"./MultipleCardWrapper-D9ZCxfJ4.js";import"./NewsCard-CNMVYv4M.js";import"./Label-C21UvAzZ.js";import"./FilterTag-CrcQCxDE.js";import"./check-DjEBwTiF.js";const Ye=e=>{const n=oe(e.images)?0:e.images.length,c=l.useRef(null),[d,m]=l.useState(null),[o,h]=l.useState(e.imageIndex),[x,j]=l.useState(null),[N,b]=l.useState(!1),I=l.useRef(!1),[D,E]=l.useState(new Set),[C,y]=l.useState(new Set),[K,S]=l.useState(!1),H=e.transitionType||"crossfade",w=e.transitionDuration||600;l.useEffect(()=>{if(e.images&&e.images.length>0){const s=e.imageIndex===0?n-1:e.imageIndex-1,i=e.imageIndex===n-1?0:e.imageIndex+1;[e.imageIndex,s,i].forEach(g=>{if(!D.has(g)&&e.images[g]){const u=new Image;u.src=e.images[g].url,u.onload=()=>{E(v=>new Set(v).add(g)),y(v=>new Set(v).add(g))}}})}},[e.imageIndex,e.images,n,D]),l.useEffect(()=>{b(!0);const s=setTimeout(()=>{I.current=!0},50);return()=>clearTimeout(s)},[]),l.useEffect(()=>{if(e.imageIndex!==o){if(!I.current||!N){h(e.imageIndex);return}if(H==="none"){h(e.imageIndex);return}const i=(j(o),h(e.imageIndex),S(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{S(!0)})}),setTimeout(()=>{j(null),S(!1)},w));return()=>clearTimeout(i)}},[e.imageIndex,o,w,N,H]),l.useEffect(()=>{const s=()=>
1{if(c.current){const f=c.current.offsetHeight;f>0&&m(f)}};s();const i=()=>{m(null),setTimeout(()=>{s()},0)};return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[]);const G=()=>t.jsx("div",{className:Se,children:t.jsxs(z,{size:"small",children:[e.imageIndex+1," / ",n]})}),P=()=>t.jsx("button",{type:"button",className:we,onClick:s=>{s.stopPropagation(),e.viewGrid&&e.viewGrid()},children:t.jsx(z,{size:"small",icon:t.jsx("img",{src:fe,alt:"Photo grid",height:"14",width:"14"}),iconPosition:"after",children:"View grid"})}),A=()=>{if(!e.showCarousel||n<=1)return null;const s=e.images.map(i=>({imageUrl:i.thumbnailUrl,altTag:i.altTag,id:i.id}));return t.jsx(t.Fragment,{children:t.jsx(ve,{images:s,selectedImage:e.imageIndex,select:i=>e.viewImage(i),previous:e.previous,next:e.next,enterPressed:()=>e.forwardDirection?e.next():e.previous()})})},a=x!==null,r=l.useMemo(()=>{const s=new Set;s.add(o),a&&x!==null&&s.add(x);const i=o===0?n-1:o-1,f=o===n-1?0:o+1;return s.add(i),s.add(f),s},[o,x,a,n]);return t.jsxs("div",{tabIndex:0,ref:c,className:ye,onClick:s=>{var i;(s.target===s.currentTarget||s.target.closest(`.${V}`))&&((i=e.viewImage)==null||i.call(e,e.imageIndex))},style:e.containerHeight?{height:e.containerHeight,minHeight:e.containerHeight}:d?{minHeight:`${d}px`}:void 0,children:[t.jsx("div",{className:Te,children:t.jsx("div",{className:V,suppressHydrationWarning:!0,children:e.images.map((s,i)=>{if(!r.has(i))return null;const g=i===o,u=a&&i===x,v=g||u,M=C.has(i);return t.jsxs("div",{style:{position:g&&!a?"relative":"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:u?2:g?1:0,opacity:v?u&&K?0:1:0,pointerEvents:v?"auto":"none",transition:u?`opacity ${w/1e3}s ease-in-out`:"none",willChange:u?"opacity":"auto"},children:[v&&!M&&t.jsx("span",{className:Ne,children:t.jsx(de,{color:"blue"})}),t.jsx("img",{src:s.url,alt:s.altTag,style:{opacity:M?1:0},loading:"eager",className:be,onLoad:()=>y(O=>new Set(O).add(i))})]},s.id)})})}),t.jsxs("div",{className:Ce,children:[e.children,n>1&&e.showCounter&&G(),n>1&&P()]}),n>1&&e.showCarousel&&A()]})};function Ze(e){const[n,c]=l.useState(!1);return l.useEffect(()=>{const d=e.current;if(!d)return null;const m=new window.IntersectionObserver(o=>{o.forEach(h=>{c(h.isIntersecting&&h.intersectionRatio===1)})},{threshold:1});return m.observe(d),()=>{m.disconnect()}},[e]),n}const pe=e=>{const[n,c]=l.useState(!0),[d,m]=l.useState(0),[o,h]=l.useState(0),x=me()==="Desktop",j=l.useRef(void 0),N=Ze(j),b=e.galleryImages.map(a=>({id:a.imageId,url:a.imageUrl,thumbnailUrl:a.thumbnailImageUrl,altTag:a.altTag,fullscreenUrl:a.originalImageUrl})),I=b.length,D=b.map(a=>({src:a.fullscreenUrl})),E=d===1||d===2;l.useEffect(()=>{N&&j.current&&j.current.focus()},[N,d]);const C=(a,r)=>{const s=a;s-1<0?r(I-1):(r(s-1),c(!1))},y=(a,r)=>{const s=a;s+1>I-1?r(0):(r(s+1),c(!0))},K=(a,r,s,i,f,g)=>{let u=!1;return a==="ArrowLeft"&&(r===2||r===0)?(C(s,i),u=!0):a==="ArrowRight"&&(r===2||r===0)?(y(s,i),u=!0):a==="Enter"&&r===0?(f(s),u=!0):a==="Escape"&&(r===2||r===1)&&(g(),u=!0),u},S=(a,r)=>t.jsx(_e,{onPrev:()=>C(a,r),onNext:()=>y(a,r),zIndex:1}),H=new Set,w=(a,r,s,i)=>t.jsx(Ye,{images:b,showCounter:I>1,showCarousel:!1,imageIndex:a,forwardDirection:n,next:()=>y(a,r),previous:()=>C(a,r),changeIndex:r,viewImage:s,viewGrid:i,containerHeight:e.containerHeight,size:e.size,loadedImages:H,transitionType:"none",transitionDuration:600,children:I>1&&S(a,r)}),G=(a,r,s,i)=>t.jsx(qe,{items:D,disableSidebarClass:!0,index:a,onClose:f=>{r(f),s()},header:t.jsx(Qe,{title:e.fullscreenTitle}),footer:t.jsx(Ie,{photogridClick:i}),isDesktop:x}),P=()=>d===1?t.jsx(je,{images:e.galleryImages,imageClick:A}):d===2?G(o,a=>h(a),()=>m(0),()=>m(1)):null,A=a=>{h(a),m(2)};return t.jsxs("div",{tabIndex:0,className:Ae,ref:a=>j.current=a,onKeyDown:a=>{d!==2&&K&&K(a.key,d,o,r=>h(r),A,()=>m(0))&&(a.preventDefault(),a.stopPropagation())},children:[w(o,a=>h(a),A,()=>m(1)),E&&t.jsx(xe,{close:()=>m(0),header:t.jsx("span",{className:De,children:e.fullscreenTitle}),clickHeaderToClose:d!==2,children:P()})]})},St=e=>{var o;const n=ue.getInstance(),c=he(),d=Xe()?"600px":"500px";l.useEffect(()=>{n!=null&&n.logViewArticle&&n.logViewArticle()},[]);const m=l.useRef(null);return ce(m,Ke,e.body,c),t.jsxs("div",{className:He,children:[t.jsx("div",{className:Re,children:t.jsx(Z,{backToResultsUrl:e.backToArticlesUrl,breadcrumbModel:e.breadcrumb})}),t.jsxs("article",{role:"article","aria-labelledby":"article-title",children:[t.jsx("div",{className:Ee,children:t.jsxs("div",{className:Ge,children:[e.isDraft&&t.jsx("div",{className:B,children:t.jsx(k,{title:"THIS IS A DRAFT"})}),!e.isActive&&t.jsx("div",{className:B,children:t.jsx(k,{title:"THIS ARTICLE IS INACTIVE"})}),t.jsxs("div",{className:Pe,children:[t.jsx("div",{className:$,children:t.jsx("h1",{className:Le,id:"article-title",itemProp:"headline",children:e.title})}),t.jsx("div",{className:$,children:t.jsx("p",{className:Fe,children:e.synopsis})}),t.jsxs("div",{className:Me,children:[t.jsx(p,T({},e.journalistInfo)),t.jsx("span",{className:L}),t.jsx("span",{className:F,children:t.jsx(ee,{publicationDate:e.publicationDate,formattedPublicationDate:e.formattedPublicationDate})}),e.articleCategory&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:L}),t.jsx("span",{className:F,children:t.jsx("span",{className:J,children:e.articleCategory})})]}),e.estimatedReadingTime&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:L}),t.jsx("span",{className:F,children:t.jsxs("span",{className:J,children:[e.estimatedReadingTime," min read"]})})]})]}),t.jsx(te,{items:((o=e.socialMedia)==null?void 0:o.items)||[]})]})]})}),e.hasImages&&t.jsx("div",{className:We,children:t.jsx("div",{className:Ue,children:t.jsx(pe,R(T({},e.gallery),{containerHeight:d}))})}),t.jsx("div",{className:ke,children:t.jsx("div",{className:ze,children:t.jsxs("div",{className:Ve,children:[t.jsx("div",{className:Be,ref:m,dangerouslySetInnerHTML:{__html:e.body}}),t.jsx(ae,{articleType:e.articleType,makeModel:e.makeModel,searchUrl:e.searchUrl}),e.journalistInfo&&e.journalistInfo.isActive&&t.jsx(se,{model:e.journalistInfo,showFullBio:!0}),t.jsx(ne,T({},e.articleCategories))]})})})]}),e.relatedArticles&&e.relatedArticles.shouldDisplay&&t.jsx("div",{className:$e,children:t.jsx(ie,R(T({title:"Related articles"},e.relatedArticles),{restrictMaxWidth:!0}))}),e.journalists&&e.journalists.length>0&&t.jsx(re,{journalists:e.journalists,meetTheTeamUrl:e.meetTheTeamUrl}),t.jsx("div",{className:Je,children:t.jsx("div",{className:Oe,children:t.jsx(ge,R(T({},e.adSlot),{roundedCorners:!0}))})}),t.jsx(le,{})]})};export{St as Article};
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.