var _e=e=>{throw TypeError(e)};var ae=(e,t,r)=>t.has(e)||_e("Cannot "+r);var i=(e,t,r)=>(ae(e,t,"read from private field"),r?r.call(e):t.get(e)),A=(e,t,r)=>t.has(e)?_e("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),E=(e,t,r,n)=>(ae(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),S=(e,t,r)=>(ae(e,t,"access private method"),r);import{f as Qe,p as we,g as H,s as le,h as se,n as Ge,i as oe,j as Se,t as Ue,k as $e,l as Ne,m as ve,o as Be,r as y,q as qe,b as ie,R as s,F as c,T as O,B as j,L,c as ze,H as De,v as Re,I as Ve,A as ne,S as Ke,w as Ae,d as Ce,x as ke,u as Xe,y as Ye}from"./index-DgY5Jiz8.js";import{a as Je}from"./index.esm-CqgmUNlE.js";import{M as Ze}from"./index-C9ws7fpb.js";import{A as et}from"./index-CINc0KOo.js";import{A as tt,L as rt}from"./index-DSTLbREw.js";import{F as Ie,f as Oe,c as st,p as nt,R as Te,I as it,b as at}from"./index-BxDETT50.js";var I,h,J,k,U,q,D,P,Z,V,K,$,N,W,X,g,Y,ce,ue,me,he,pe,fe,ge,We,Le,lt=(Le=class extends Qe{constructor(t,r){super();A(this,g);A(this,I);A(this,h);A(this,J);A(this,k);A(this,U);A(this,q);A(this,D);A(this,P);A(this,Z);A(this,V);A(this,K);A(this,$);A(this,N);A(this,W);A(this,X,new Set);this.options=r,E(this,I,t),E(this,P,null),E(this,D,we()),this.options.experimental_prefetchInRender||i(this,D).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,h).addObserver(this),Fe(i(this,h),this.options)?S(this,g,Y).call(this):this.updateResult(),S(this,g,he).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return de(i(this,h),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return de(i(this,h),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,S(this,g,pe).call(this),S(this,g,fe).call(this),i(this,h).removeObserver(this)}setOptions(t,r){const n=this.options,l=i(this,h);if(this.options=i(this,I).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof H(this.options.enabled,i(this,h))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");S(this,g,ge).call(this),i(this,h).setOptions(this.options),n._defaulted&&!le(this.options,n)&&i(this,I).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,h),observer:this});const a=this.hasListeners();a&&je(i(this,h),l,this.options,n)&&S(this,g,Y).call(this),this.updateResult(r),a&&(i(this,h)!==l||H(this.options.enabled,i(this,h))!==H(n.enabled,i(this,h))||se(this.options.staleTime,i(this,h))!==se(n.staleTime,i(this,h)))&&S(this,g,ce).call(this);const o=S(this,g,ue).call(this);a&&(i(this,h)!==l||H(this.options.enabled,i(this,h))!==H(n.enabled,i(this,h))||o!==i(this,W))&&S(this,g,me).call(this,o)}getOptimisticResult(t){const r=i(this,I).getQueryCache().build(i(this,I),t),n=this.createResult(r,t);return ct(this,n)&&(E(this,k,n),E(this,q,this.options),E(this,U,i(this,h).state)),n}getCurrentResult(){return i(this,k)}trackResult(t,r){const n={};return Object.keys(t).forEach(l=>{Object.defineProperty(n,l,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(l),r==null||r(l),t[l])})}),n}trackProp(t){i(this,X).add(t)}getCurrentQuery(){return i(this,h)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=i(this,I).defaultQueryOptions(t),n=i(this,I).getQueryCache().build(i(this,I),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return S(this,g,Y).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,k)))}createResult(t,r){var ee;const n=i(this,h),l=this.options,a=i(this,k),o=i(this,U),f=i(this,q),b=t!==n?t.state:i(this,J),{state:_}=t;let m={..._},v=!1,x;if(r._optimisticResults){const R=this.hasListeners(),B=!R&&Fe(t,r),z=R&&je(t,n,r,l);(B||z)&&(m={...m,...Ne(_.data,t.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:p,errorUpdatedAt:d,status:w}=m;if(r.select&&m.data!==void 0)if(a&&m.data===(o==null?void 0:o.data)&&r.select===i(this,Z))x=i(this,V);else try{E(this,Z,r.select),x=r.select(m.data),x=ve(a==null?void 0:a.data,x,r),E(this,V,x),E(this,P,null)}catch(R){E(this,P,R)}else x=m.data;if(r.placeholderData!==void 0&&x===void 0&&w==="pending"){let R;if(a!=null&&a.isPlaceholderData&&r.placeholderData===(f==null?void 0:f.placeholderData))R=a.data;else if(R=typeof r.placeholderData=="function"?r.placeholderData((ee=i(this,K))==null?void 0:ee.state.data,i(this,K)):r.placeholderData,r.select&&R!==void 0)try{R=r.select(R),E(this,P,null)}catch(B){E(this,P,B)}R!==void 0&&(w="success",x=ve(a==null?void 0:a.data,R,r),v=!0)}i(this,P)&&(p=i(this,P),x=i(this,V),d=Date.now(),w="error");const C=m.fetchStatus==="fetching",T=w==="pending",M=w==="error",Q=T&&C,G=x!==void 0,F={status:w,fetchStatus:m.fetchStatus,isPending:T,isSuccess:w==="success",isError:M,isInitialLoading:Q,isLoading:Q,data:x,dataUpdatedAt:m.dataUpdatedAt,error:p,errorUpdatedAt:d,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>b.dataUpdateCount||m.errorUpdateCount>b.errorUpdateCount,isFetching:C,isRefetching:C&&!T,isLoadingError:M&&!G,isPaused:m.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:M&&G,isStale:Ee(t,r),refetch:this.refetch,promise:i(this,D)};if(this.options.experimental_prefetchInRender){const R=te=>{F.status==="error"?te.reject(F.error):F.data!==void 0&&te.resolve(F.data)},B=()=>{const te=E(this,D,F.promise=we());R(te)},z=i(this,D);switch(z.status){case"pending":t.queryHash===n.queryHash&&R(z);break;case"fulfilled":(F.status==="error"||F.data!==z.value)&&B();break;case"rejected":(F.status!=="error"||F.error!==z.reason)&&B();break}}return F}updateResult(t){const r=i(this,k),n=this.createResult(i(this,h),this.options);if(E(this,U,i(this,h).state),E(this,q,this.options),i(this,U).data!==void 0&&E(this,K,i(this,h)),le(n,r))return;E(this,k,n);const l={},a=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,f=typeof o=="function"?o():o;if(f==="all"||!f&&!i(this,X).size)return!0;const u=new Set(f??i(this,X));return this.options.throwOnError&&u.add("error"),Object.keys(i(this,k)).some(b=>{const _=b;return i(this,k)[_]!==r[_]&&u.has(_)})};(t==null?void 0:t.listeners)!==!1&&a()&&(l.listeners=!0),S(this,g,We).call(this,{...l,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&S(this,g,he).call(this)}},I=new WeakMap,h=new WeakMap,J=new WeakMap,k=new WeakMap,U=new WeakMap,q=new WeakMap,D=new WeakMap,P=new WeakMap,Z=new WeakMap,V=new WeakMap,K=new WeakMap,$=new WeakMap,N=new WeakMap,W=new WeakMap,X=new WeakMap,g=new WeakSet,Y=function(t){S(this,g,ge).call(this);let r=i(this,h).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Ge)),r},ce=function(){S(this,g,pe).call(this);const t=se(this.options.staleTime,i(this,h));if(oe||i(this,k).isStale||!Se(t))return;const n=Ue(i(this,k).dataUpdatedAt,t)+1;E(this,$,setTimeout(()=>{i(this,k).isStale||this.updateResult()},n))},ue=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,h)):this.options.refetchInterval)??!1},me=function(t){S(this,g,fe).call(this),E(this,W,t),!(oe||H(this.options.enabled,i(this,h))===!1||!Se(i(this,W))||i(this,W)===0)&&E(this,N,setInterval(()=>{(this.options.refetchIntervalInBackground||$e.isFocused())&&S(this,g,Y).call(this)},i(this,W)))},he=function(){S(this,g,ce).call(this),S(this,g,me).call(this,S(this,g,ue).call(this))},pe=function(){i(this,$)&&(clearTimeout(i(this,$)),E(this,$,void 0))},fe=function(){i(this,N)&&(clearInterval(i(this,N)),E(this,N,void 0))},ge=function(){const t=i(this,I).getQueryCache().build(i(this,I),this.options);if(t===i(this,h))return;const r=i(this,h);E(this,h,t),E(this,J,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},We=function(t){Be.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(i(this,k))}),i(this,I).getQueryCache().notify({query:i(this,h),type:"observerResultsUpdated"})})},Le);function ot(e,t){return H(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Fe(e,t){return ot(e,t)||e.state.data!==void 0&&de(e,t,t.refetchOnMount)}function de(e,t,r){if(H(t.enabled,e)!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ee(e,t)}return!1}function je(e,t,r,n){return(e!==t||H(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ee(e,r)}function Ee(e,t){return H(t.enabled,e)!==!1&&e.isStaleByTime(se(t.staleTime,e))}function ct(e,t){return!le(e.getCurrentResult(),t)}var Me=y.createContext(!1),ut=()=>y.useContext(Me);Me.Provider;function mt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ht=y.createContext(mt()),pt=()=>y.useContext(ht);function ft(e,t){return typeof e=="function"?e(...t):!!e}function Pe(){}var gt=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},dt=e=>{y.useEffect(()=>{e.clearReset()},[e])},bt=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&ft(r,[e.error,n]),xt=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Et=(e,t)=>e.isLoading&&e.isFetching&&!t,yt=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,He=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function _t(e,t,r){var _,m,v,x,p;const n=qe(),l=ut(),a=pt(),o=n.defaultQueryOptions(e);(m=(_=n.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||m.call(_,o),o._optimisticResults=l?"isRestoring":"optimistic",xt(o),gt(o,a),dt(a);const f=!n.getQueryCache().get(o.queryHash),[u]=y.useState(()=>new t(n,o)),b=u.getOptimisticResult(o);if(y.useSyncExternalStore(y.useCallback(d=>{const w=l?Pe:u.subscribe(Be.batchCalls(d));return u.updateResult(),w},[u,l]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),y.useEffect(()=>{u.setOptions(o,{listeners:!1})},[o,u]),yt(o,b))throw He(o,u,a);if(bt({result:b,errorResetBoundary:a,throwOnError:o.throwOnError,query:n.getQueryCache().get(o.queryHash)}))throw b.error;if((x=(v=n.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||x.call(v,o,b),o.experimental_prefetchInRender&&!oe&&Et(b,l)){const d=f?He(o,u,a):(p=n.getQueryCache().get(o.queryHash))==null?void 0:p.promise;d==null||d.catch(Pe).finally(()=>{u.updateResult()})}return o.notifyOnChangeProps?b:u.trackResult(b)}function wt(e,t){return _t(e,lt)}function St(e){const[t,r]=y.useState([]);return[t,()=>{var a,o,f,u,b,_,m,v,x;r([]);const l=[];((o=(a=e==null?void 0:e.tags_group)==null?void 0:a.industry)==null?void 0:o.length)>0&&l.push((f=e==null?void 0:e.tags_group)==null?void 0:f.industry),((b=(u=e==null?void 0:e.tags_group)==null?void 0:u.region)==null?void 0:b.length)>0&&l.push((_=e==null?void 0:e.tags_group)==null?void 0:_.region),((v=(m=e==null?void 0:e.tags_group)==null?void 0:m.subject)==null?void 0:v.length)>0&&l.push((x=e==null?void 0:e.tags_group)==null?void 0:x.subject),r(()=>[...l.flat(1)])}]}function vt({data:e,ct:t,ArticleTitle:r=null}){var _,m,v,x;const[n,l]=St(e),[a,o]=y.useState(),[f]=st(),u=ie();y.useEffect(()=>{l(e),o(()=>{var p;return f((p=e==null?void 0:e.article_details)==null?void 0:p.date,"ap")})},[]);const b=p=>{const d=e.tags_group;let w="";const C=t!=="resource_entry"?"/news":"/resources";Object.keys(d).forEach(T=>{if(d[T].includes(p)){const Q="tags",G="n_16_n",ye=`${T}=${p}`,ee={size:encodeURIComponent(G),"filters[0][field]":encodeURIComponent(Q),"filters[0][values][0]":encodeURIComponent(ye),"filters[0][type]":encodeURIComponent("all")},R=Object.entries(ee).map(([B,z])=>`${B}=${z}`).join("&");w=`${C}?${R}`;return}}),window.location.href=w};return s.createElement(c,{direction:"column",align:"center",mr:"72px",ml:"62px",mt:"48px",mb:"27px"},s.createElement(c,{w:"100%",direction:{base:"column",md:"row"}},s.createElement(c,{flex:1}),s.createElement(c,{flex:1,justify:"center",align:"end"},s.createElement(c,{direction:"column",gap:t==="news_article"?"4px":t==="news_blurb"?"10px":"initial",mt:"4px",mb:{base:"5px",md:"initial"}},s.createElement(c,{flex:1,justify:"center",align:"center"},t!=="resource_entry"&&s.createElement(O,{color:u.colors.Grey1,fontSize:"0.875rem",fontWeight:"600",letterSpacing:".08em",lineHeight:"1.192rem"},a)),e&&e.tags_group&&((_=e.tags_group.internal_class)==null?void 0:_.includes("analysis"))&&s.createElement(j,{color:`${u.colors.DarkBlue}`,w:"max-content",textAlign:"center",px:"12px",mt:"8px"},s.createElement(O,{letterSpacing:"3.5%",fontWeight:"600",fontSize:"14px",lineHeight:"1.188rem",fontFamily:"Open Sans, semi-bold"},"ANALYSIS")),s.createElement(c,{flex:1,justify:"center",align:"center"},s.createElement(O,{fontWeight:"700",fontSize:"1rem",lineHeight:"1.362rem",letterSpacing:".045em",color:u.colors.Grey1},(v=(m=e==null?void 0:e.tags_group)==null?void 0:m.sections)==null?void 0:v.map((p,d)=>s.createElement(O,{key:d,textAlign:"center"},p.toUpperCase(),s.createElement("br",null))))))),s.createElement(c,{flex:1,justify:{base:"center",md:"end"},align:"start"},s.createElement(c,{direction:"column",gap:{md:"6px"}},s.createElement(c,{flex:1,justify:"end",align:"center"},t!=="resource_entry"&&s.createElement(c,{gap:"13px",align:"center",color:"DarkGreen",fontSize:".875rem",lineHeight:"1.25rem",fontWeight:"600"},s.createElement(L,{href:"/news/subscriptions"},"Subscribe to Newsletters"),s.createElement(Ie,{icon:Oe.faArrowRightLong}))),s.createElement(c,{flex:1,justify:"end",align:"center"},t!=="resource_entry"&&s.createElement(c,{gap:"16px",align:"center",color:"DarkGreen",fontSize:".875rem",lineHeight:"1.25rem",fontWeight:"600"},s.createElement(L,{href:"https://iapp.org/l/connect/"},"Advertise with the IAPP"),s.createElement(Ie,{icon:Oe.faArrowRightLong})))))),s.createElement(c,{gap:"5px",my:t==="news_blurb"?"16px":"24px",color:u.colors.Grey1,flexWrap:"wrap",align:"center",justify:"center"},n==null?void 0:n.map((p,d)=>s.createElement(ze,{onClick:()=>b(p),key:d,size:"md",border:`2px solid ${u.colors.Grey1}`,bg:u.colors.White,fontFamily:"Lato"},p))),t!=="resource_entry"&&s.createElement(c,{maxW:"912px",textAlign:"center"},s.createElement(De,{as:"h1",fontSize:{base:"1.25rem",md:"1.875rem",lg:"2.5rem"},fontFamily:"Lato",fontWeight:"800",lineHeight:{base:"1.5rem",md:"2.25rem",lg:"3rem"},letterSpacing:".015em"},r??((x=e.seo)==null?void 0:x.meta_page_title))))}function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},be.apply(null,arguments)}const Rt=({variant:e,fasize:t,...r})=>s.createElement(j,be({className:`${e||"fa-brands"} fa-linkedin ${t}`},r));function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xe.apply(null,arguments)}const At=({variant:e,fasize:t,...r})=>s.createElement(j,xe({className:`${e||"fa-brands"} fa-twitter ${t}`},r));function Ct(){return s.createElement(c,{direction:{base:"column",md:"row"},gap:{base:"5px",lg:"17px"}},s.createElement(c,{gap:{base:"5px",lg:"17px"},align:{base:"start",lg:"center"},mt:{md:"1rem",lg:"initial"}},s.createElement(L,{href:"https://www.linkedin.com/shareArticle?mini=true&url=@linkedURL&title=@Model.Title&summary=@Model.Summary",target:"_blank",title:"LinkedIn",isExternal:!0},s.createElement(c,{color:"white",bg:"DarkGreen",borderRadius:"4000px",h:{base:"25px",md:"30px",lg:"52px"},w:{base:"25px",md:"30px",lg:"52px"},align:"center",justify:"center"},s.createElement(Rt,{fasize:"2xl",transform:{base:"scale(.75)",md:"scale(1)",lg:"scale(1.5)"}}))),s.createElement(L,{href:"https://twitter.com/intent/tweet?text=@twitterText",target:"_blank",title:"Twitter",isExternal:!0},s.createElement(c,{color:"white",bg:"DarkGreen",borderRadius:"4000px",h:{base:"25px",md:"30px",lg:"52px"},w:{base:"25px",md:"30px",lg:"52px"},align:"center",justify:"center"},s.createElement(At,{fasize:"2xl",transform:{base:"scale(.75)",md:"scale(1)",lg:"scale(1.5)"}})))),s.createElement(c,{gap:{base:"5px",lg:"17px"},align:{base:"start",lg:"center"},mt:{md:"1rem",lg:"initial"}},s.createElement(L,{href:"https://www.facebook.com/sharer/sharer.php",target:"_blank",title:"Facebook",isExternal:!0},s.createElement(c,{color:"white",bg:"DarkGreen",borderRadius:"4000px",h:{base:"25px",md:"30px",lg:"52px"},w:{base:"25px",md:"30px",lg:"52px"},align:"center",justify:"center"},s.createElement(Re,{faIcon:"fa-square-facebook",variant:"fa-brands",fasize:"2xl",transform:{base:"scale(.75)",md:"scale(1)",lg:"scale(1.5)"}}))),s.createElement(c,{as:"button",onClick:()=>window.print(),color:"white",bg:"DarkGreen",borderRadius:"4000px",h:{base:"25px",md:"30px",lg:"52px"},w:{base:"25px",md:"30px",lg:"52px"},align:"center",justify:"center","aria-label":"Print"},s.createElement(Re,{faIcon:"fa-print",fasize:"2xl","aria-label":"Print",transform:{base:"scale(.75)",md:"scale(1)",lg:"scale(1.5)"}}))))}function kt(){return s.createElement(ze,{ml:"19px",size:{base:"small",md:"medium"},variant:"secondarygreen",as:L,href:"https://iapp.org/certify/cpe-submit/",target:"_blank"},"Submit for CPEs")}const It="/assets/CPE_eligible-Cq5MUkz4.png";function Ot(e){const{ct:t}=e;return s.createElement(c,{direction:"column",gap:"16px",borderTop:t==="resource_entry"?"solid #ABABAB 1px":"solid black 1px",w:"100%",my:"20px",pt:"20px",pb:"4px",px:"4px",textAlign:"center",alignSelf:"center"},s.createElement(c,{direction:{base:"column",lg:"row"},align:{base:"stretch",lg:"center"},justify:{base:"center",lg:"space-between"},w:"100%",bg:"#F4F4F4",p:"24px",mx:"auto"},s.createElement(c,{align:"center",w:{base:"100%",lg:"auto"},mb:{base:"16px",lg:"0"}},s.createElement(j,{w:"64px",h:"64px",flexShrink:0},s.createElement(Ve,{src:It,alt:"CPE credit badge",w:"64px",h:"64px"})),s.createElement(O,{fontSize:{base:"12px",lg:"16px"},color:"#1E1E1E",fontStyle:"italic",textAlign:{base:"left",lg:"left"},ml:{base:"16px",lg:"24px"},flex:{base:"1 1 auto",lg:"1 1 auto"}},"This article is eligible for Continuing Professional Education credits. Please self-submit according to CPE policy guidelines.")),s.createElement(j,{w:{base:"100%",lg:"auto"},textAlign:"center",mt:{base:"16px",lg:"0"}},s.createElement(kt,null))),t!=="resource_entry"&&s.createElement(c,{fontSize:".875rem",lineHeight:"1.25rem",fontWeight:"600",color:"DarkGreen",align:"center",mt:"24px"},s.createElement(L,{href:"/news/write-for-us"},"Interested in writing for us? Visit our Contributor Guidelines"," ",s.createElement(O,{as:"span",whiteSpace:"nowrap"},"Page ",s.createElement(j,{className:"fa-solid fa-arrow-right-long",ml:"16px"})))))}function Tt(e){const{data:t,time:r}=e,n=ie();return s.createElement(c,{direction:"column"},s.createElement(c,{direction:"column",gap:"16px"},t==null?void 0:t.map((l,a)=>s.createElement(c,{key:a,direction:"column"},l.name&&s.createElement(O,{fontWeight:"700",letterSpacing:"0px",fontSize:{base:"1rem",md:"1.25rem"},lineHeight:{base:"1.531rem",md:"1.875rem"}},l.name),l.contributor_type&&s.createElement(O,{fontWeight:"400",letterSpacing:"0px",fontSize:{base:".875rem",md:"1rem"},lineHeight:{base:"1.188rem",md:"1.563rem"},mt:{base:"2px",md:"5px"},mb:{base:"5px",md:"initial"}},l.contributor_type),l.designations&&s.createElement(O,{color:n.colors.Grey1,fontWeight:"400",letterSpacing:{base:".03em"},fontSize:{base:".875remrem",md:"1rem"},lineHeight:{base:"1.188rem",md:"1.362rem"}},l.designations.join(", "))))),r&&s.createElement(O,{color:n.colors.Grey1,fontWeight:"400",letterSpacing:{base:".03em"},fontSize:{base:".875rem"},lineHeight:{base:"1.188rem"},mt:{base:"5px",md:"2px"}},`${r} Minute Read`))}function Ft(e){const[t,r]=y.useState([]),{data:n}=e;y.useEffect(()=>{n.length<5?l():r(n.slice(0,5))},[n]);async function l(){const a=5-n.length,o=a>0?await ne.getLimitedEntries("news_article",a,"article_details.date"):[],f=a>0?await ne.getLimitedEntries("news_blurb",a,"article_details.date"):[],u=o.concat(f);u.sort((_,m)=>new Date(m.article_details.date)-new Date(_.article_details.date));const b=u.slice(0,a);r([...n,...b])}return s.createElement(c,{direction:"column",gap:"16px",mb:{base:"34px",md:"83px",lg:"48px "}},s.createElement(De,{fontSize:{base:"1rem",md:"1.25rem"},lineHeight:"1.2",letterSpacing:"0px",fontWeight:"700"},"Related stories"),s.createElement(c,{direction:"column",gap:{base:"43px",md:"8xp",lg:"45px"}},t.slice(0,5).map((a,o)=>{var f;return s.createElement(L,{key:o,href:a.url},s.createElement(c,{borderLeft:"solid 3px",borderLeftColor:"PrimaryGreen",minH:{base:"63px",md:"53px",lg:"63px"}},s.createElement(O,{noOfLines:3,ml:"18px",fontFamily:"Lato",fontSize:{base:"0.875rem",md:"1rem"},fontWeight:"700",lineHeight:"1.2"},(f=a.article_details)==null?void 0:f.headline)))})))}function jt(e){const{data:t,numOfSlots:r}=e,[n,l]=y.useState(),[a,o]=y.useState(),[f,u]=y.useState(),[b,_]=y.useState(),m=ie(),v=[n&&d(n),a&&d(a),f&&d(f),b&&d(b)];y.useEffect(()=>{x()},[t]);function x(){p(t==null?void 0:t.slot_1,l),p(t==null?void 0:t.slot_2,o),p(t==null?void 0:t.slot_3,u),p(t==null?void 0:t.slot_4,_)}function p(w,C){var M;const T=[];(M=w==null?void 0:w.advertisement_blocks)==null||M.map(Q=>{var G;return((G=Q.publish_details)==null?void 0:G.time)&&T.push(Q)}),C(T)}function d(w){var C;return(C=w[0])==null?void 0:C.ad[Math.floor(Math.random()*w[0].ad.length)]}return s.createElement(c,{direction:"column",w:"100%",gap:"34px",mb:"34px"},v.slice(0,r).map((w,C)=>{var T;if(w)return s.createElement(L,{key:C,href:w.link,target:"_blank"},s.createElement(c,{direction:"column"},s.createElement(c,{bg:m.colors.Grey4,h:"19px",flex:1,align:"center"},s.createElement(O,{mx:"auto",textAlign:"center",color:m.colors.Grey1,fontWeight:"600",fontSize:".875rem",lineHeight:"1.192rem",letterSpacing:".22em"},"ADVERTISEMENT")," "),s.createElement(c,{h:"250px",w:"100%",align:"start",justify:"start",bgImage:`${(T=w.ad_image)==null?void 0:T.url}?height=250`,bgSize:"contain",bgPos:"top center",bgRepeat:"no-repeat"})))}))}function re(e){var o,f;const{type:t,numOfSlots:r}=e,[n,l]=y.useState();y.useEffect(()=>{a()},[]);async function a(){const u=await ne.getAllEntriesWithRef("advertisement_group","block_groups.advertisement_blocks,banners.advertisement_banner,block_groups.slot_1.advertisement_blocks,block_groups.slot_2.advertisement_blocks,block_groups.slot_3.advertisement_blocks,block_groups.slot_4.advertisement_blocks");l(u[0])}return t==="banner"?((o=n==null?void 0:n.banners)==null?void 0:o.advertisement_banner.length)>0&&s.createElement(tt,{data:(f=n==null?void 0:n.banners)==null?void 0:f.advertisement_banner}):s.createElement(jt,{numOfSlots:r,data:n==null?void 0:n.block_groups})}function Pt(e){return e.map(r=>{var n,l,a,o,f,u;return((l=(n=r.rte)==null?void 0:n.custom_styles)==null?void 0:l.length)>0?`<div class="${(o=(a=r.rte)==null?void 0:a.custom_styles)==null?void 0:o.join().replaceAll(" ","").replaceAll(","," ")}">${(f=r.rte)==null?void 0:f.rich_text_editor}</div>`:(u=r.rte)==null?void 0:u.rich_text_editor}).join("")}function Ht(e){const r=[],n=[];let l=0;return Array.isArray(e)?e.forEach(a=>{l<3?r.push(a):n.push(a),a.type==="p"&&l++}):r.push(e),{contentBeforeAd:r,contentAfterAd:n}}const Lt=e=>{const t=Pt(e),r=nt(t,{trim:!0}),{contentBeforeAd:n,contentAfterAd:l}=Ht(r);return[n,l]};function Bt({data:e,ct:t}){var u,b,_,m,v,x;const[r,n]=y.useState([]),[l,a]=y.useState(),o=ie();function f(){var C;const p=(C=document==null?void 0:document.getElementById("article"))==null?void 0:C.innerText,d=p==null?void 0:p.trim().split(" ").length;a(Math.ceil(d/225))}return y.useEffect(()=>f(),[r]),y.useEffect(()=>{if(e.article_body){const p=Lt(e.article_body);n(p)}},[e]),s.createElement("main",{id:"main"},s.createElement(Ke,null),s.createElement(j,{h:"100%"},e.seo&&s.createElement(Ze,{isArticle:!0,data:e.seo,override:e}),s.createElement(et,null),s.createElement(rt,{data:t==="resource_entry"?{title:"All Resources",href:"/resources"}:{title:"All News",href:"/news"}}),s.createElement(j,{maxW:"1440px",mx:"auto",h:"100%"},s.createElement(vt,{data:e,ct:t,ArticleTitle:(u=e.article_details)==null?void 0:u.headline}),t==="news_article"&&e.main_image&&s.createElement(c,{align:"center",justify:"center",ml:{base:"35px",md:"50px",lg:"62px"},mr:{base:"35px",md:"50px",lg:"76px"},mb:{base:"12px",md:"28px",lg:"35px"},h:{base:"124px",md:"384px",lg:"626px"},bgImage:e.main_image.url,bgPos:"center",bgSize:"cover",bgRepeat:"no-repeat",borderRadius:"15px"}),s.createElement(c,{gap:{base:"5%",lg:"6%"},h:"100%",ml:{base:"35px",md:"50px",lg:"62px"},mr:{base:"35px",md:"50px",lg:"76px"},direction:{base:"column-reverse",md:"row"},mt:!e.main_image&&{base:"12px",md:"28px",lg:"69px"}},s.createElement(c,{direction:"column",minW:"200px",maxW:"286",flex:1},s.createElement(Ft,{data:(b=e.related_stories)==null?void 0:b.article}),t==="news_article"&&s.createElement(Ae,{below:"md"},s.createElement(re,{numOfSlots:4,type:"group"})),t==="news_blurb"&&s.createElement(Ae,{below:"md"},s.createElement(re,{numOfSlots:1,type:"group"}))),s.createElement(c,{h:"100%",maxW:"100%",flex:1,direction:"column"},s.createElement(c,{borderBottom:`solid 1px ${o.colors.Black}`,pb:{base:"29px",md:"17px",lg:"24px"}},s.createElement(c,{flex:1},t==="news_article"&&s.createElement(Tt,{time:l,data:(_=e.article_details)==null?void 0:_.author})),s.createElement(c,{flex:1,justify:"end"},s.createElement(Ct,null))),s.createElement(j,{id:"article",className:"Article-Body",mt:"29px"},r&&s.createElement(s.Fragment,null,(m=r[0])==null?void 0:m.map((p,d)=>s.createElement(Te,{key:d,data:p,px:"initial"}))),t===Ce.newsArticle&&s.createElement(j,{my:"30px"},s.createElement(ke,{above:"md"},s.createElement(re,{type:"banner"}))),r&&s.createElement(s.Fragment,null,(v=r[1])==null?void 0:v.map((p,d)=>{if(p!=="")return s.createElement(Te,{key:d,data:p,px:"initial"})}))),e.cpe_eligible&&s.createElement(Ot,{data:e,ct:t}),t===Ce.newsBlurb&&s.createElement(c,{direction:"column",pt:{base:"25px",md:"32px"},pb:{base:"25px",md:"60px"},gap:"11px"},s.createElement(L,{href:(x=e.external_cta)==null?void 0:x.href,color:"DarkGreen",fontSize:"1.25rem",lineHeight:"1.25rem",fontWeight:"600",target:"_blank"},"Full story"," ",s.createElement(it,{as:Je,ml:"14px"})),s.createElement(O,{color:o.colors.Grey1,fontSize:".875rem",fontWeight:"400",lineHeight:"1.188rem",letterSpacing:".03em"},"Source: ",e.source),s.createElement(j,{my:"30px"},s.createElement(ke,{above:"md"},s.createElement(re,{type:"banner"}))))))),e.components&&s.createElement(at,{data:e.components})))}const zt=(e,t,r,n)=>wt({queryKey:["article",t],queryFn:()=>ne.getArticle(e,t,r,n),retry:!1,enabled:!!e&&!!t&&!!n});function Dt({contentType:e}){const t=Xe(),{isLoading:r,data:n,isError:l,failureReason:a}=zt(e,t.pathname,"en-us","article_details.author,related_stories.article");if(r)return s.createElement(Ye,null);if(l)throw new Error("Error loading article: ",(a==null?void 0:a.message)||"unknown reason");return s.createElement(Bt,{data:n[0],ct:e})}const qt=Object.freeze(Object.defineProperty({__proto__:null,default:Dt},Symbol.toStringTag,{value:"Module"}));export{vt as A,Ot as C,Ct as I,Dt as N,qt as a};