import{r as f,u as B,R as e,F as o,j as b,T as d,B as w,L as C,c as P,H as D,a as F,k as G,I as M,d as z,S as K,e as _,l as V,i as Q}from"./index-DnDa_30t.js";import{b as q}from"./index.esm-8eeMStuO.js";import{M as Z,A as $}from"./Metadata-DYqxgzuX.js";import{L as ee}from"./LinkBanner-CwQLG-sL.js";import{F as T,f as L,c as te,p as ne,R as N,I as re,b as le}from"./BlockContainer-CksxSEY6.js";import{A as oe}from"./AdBanner-C9WbQJKV.js";function se(t){const[n,r]=f.useState([]);return[n,()=>{var i,c,p,a,x,h,E,A,y;r([]);const s=[];((c=(i=t==null?void 0:t.tags_group)==null?void 0:i.industry)==null?void 0:c.length)>0&&s.push((p=t==null?void 0:t.tags_group)==null?void 0:p.industry),((x=(a=t==null?void 0:t.tags_group)==null?void 0:a.region)==null?void 0:x.length)>0&&s.push((h=t==null?void 0:t.tags_group)==null?void 0:h.region),((A=(E=t==null?void 0:t.tags_group)==null?void 0:E.subject)==null?void 0:A.length)>0&&s.push((y=t==null?void 0:t.tags_group)==null?void 0:y.subject),r(()=>[...s.flat(1)])}]}function ie({data:t,ct:n,ArticleTitle:r=null}){var h,E,A,y;const[l,s]=se(t),[i,c]=f.useState(),[p]=te(),a=B();f.useEffect(()=>{s(t),c(()=>{var u;return p((u=t==null?void 0:t.article_details)==null?void 0:u.date,"ap")})},[]);const x=u=>{const m=t.tags_group;let g="";const k=n!==b.resourceEntry?"/news":"/resources";Object.keys(m).forEach(S=>{if(m[S].includes(u)){const R="tags",I="n_16_n",U=`${S}=${u}`,X={size:encodeURIComponent(I),"filters[0][field]":encodeURIComponent(R),"filters[0][values][0]":encodeURIComponent(U),"filters[0][type]":encodeURIComponent("all")},H=Object.entries(X).map(([W,J])=>`${W}=${J}`).join("&");g=`${k}?${H}`;return}}),window.location.href=g};return e.createElement(o,{direction:"column",align:"center",mr:"72px",ml:"62px",mt:"48px",mb:"27px"},e.createElement(o,{w:"100%",direction:{base:"column",md:"row"}},e.createElement(o,{flex:1}),e.createElement(o,{flex:1,justify:"center",align:"end"},e.createElement(o,{direction:"column",gap:n===b.newsArticle?"4px":n===b.newsBlurb?"10px":"initial",mt:"4px",mb:{base:"5px",md:"initial"}},e.createElement(o,{flex:1,justify:"center",align:"center"},n!==b.resourceEntry&&e.createElement(d,{color:a.colors.Grey130,fontSize:"0.875rem",fontWeight:"600",letterSpacing:".08em",lineHeight:"1.192rem"},i)),t&&t.tags_group&&((h=t.tags_group.internal_class)==null?void 0:h.includes("analysis"))&&e.createElement(w,{color:`${a.colors.Blue130}`,w:"max-content",textAlign:"center",px:"12px",mt:"8px"},e.createElement(d,{letterSpacing:"3.5%",fontWeight:"600",fontSize:"14px",lineHeight:"1.188rem",fontFamily:"Open Sans, semi-bold"},"ANALYSIS")),e.createElement(o,{flex:1,justify:"center",align:"center"},e.createElement(d,{fontWeight:"700",fontSize:"1rem",lineHeight:"1.362rem",letterSpacing:".045em",color:a.colors.Grey130},(A=(E=t==null?void 0:t.tags_group)==null?void 0:E.sections)==null?void 0:A.map((u,m)=>e.createElement(d,{key:m,textAlign:"center"},u.toUpperCase(),e.createElement("br",null))))))),e.createElement(o,{flex:1,justify:{base:"center",md:"end"},align:"start"},e.createElement(o,{direction:"column",gap:{md:"6px"}},e.createElement(o,{flex:1,justify:"end",align:"center"},n!==b.resourceEntry&&e.createElement(o,{gap:"13px",align:"center",color:a.colors.Green130,fontSize:".875rem",lineHeight:"1.25rem",fontWeight:"600"},e.createElement(C,{href:"/news/subscriptions"},"Subscribe to Newsletters"),e.createElement(T,{icon:L.faArrowRightLong}))),e.createElement(o,{flex:1,justify:"end",align:"center"},n!==b.resourceEntry&&e.createElement(o,{gap:"16px",align:"center",color:a.colors.Green130,fontSize:".875rem",lineHeight:"1.25rem",fontWeight:"600"},e.createElement(C,{href:"https://iapp.org/l/connect/"},"Advertise with the IAPP"),e.createElement(T,{icon:L.faArrowRightLong})))))),e.createElement(o,{gap:"5px",my:n===b.newsBlurb?"16px":"24px",color:a.colors.Grey130,flexWrap:"wrap",align:"center",justify:"center"},l==null?void 0:l.map((u,m)=>e.createElement(P,{onClick:()=>x(u),key:m,size:"md",border:`2px solid ${a.colors.Grey130}`,bg:a.colors.White,fontFamily:"Lato",color:a.colors.Black},u))),n!==b.resourceEntry&&e.createElement(o,{maxW:"912px",textAlign:"center"},e.createElement(D,{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??((y=t.seo)==null?void 0:y.meta_page_title))))}function O(){return O=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var l in r)({}).hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},O.apply(null,arguments)}const ae=({variant:t,fasize:n,...r})=>e.createElement(w,O({className:`${t||"fa-brands"} fa-linkedin ${n}`},r));function Y(){return Y=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var l in r)({}).hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},Y.apply(null,arguments)}const ce=({variant:t,fasize:n,...r})=>e.createElement(w,Y({className:`${t||"fa-brands"} fa-twitter ${n}`},r));function me(){const t=B(),r=`https://iapp.org${F().pathname}`,l=`https://www.linkedin.com/shareArticle?mini=true&url=${r}`,s=`https://www.facebook.com/sharer/sharer.php?u=${r}`,i=`https://twitter.com/intent/tweet?text=${r}`;return e.createElement(o,{direction:{base:"column",md:"row"},gap:{base:"5px",lg:"17px"}},e.createElement(o,{gap:{base:"5px",lg:"17px"},align:{base:"start",lg:"center"},mt:{md:"1rem",lg:"initial"}},e.createElement(C,{href:l,target:"_blank",title:"LinkedIn",isExternal:!0},e.createElement(o,{color:t.colors.White,bg:t.colors.Green130,borderRadius:"50%",h:{base:"25px",md:"30px",lg:"52px"},w:{base:"25px",md:"30px",lg:"52px"},align:"center",justify:"center"},e.createElement(ae,{fasize:"2xl",transform:{base:"scale(.75)",md:"scale(1)",lg:"scale(1.5)"}}))),e.createElement(C,{href:i,target:"_blank",title:"Twitter",isExternal:!0},e.createElement(o,{color:t.colors.White,bg:t.colors.Green130,borderRadius:"50%",h:{base:"25px",md:"30px",lg:"52px"},w:{base:"25px",md:"30px",lg:"52px"},align:"center",justify:"center"},e.createElement(ce,{fasize:"2xl",transform:{base:"scale(.75)",md:"scale(1)",lg:"scale(1.5)"}})))),e.createElement(o,{gap:{base:"5px",lg:"17px"},align:{base:"start",lg:"center"},mt:{md:"1rem",lg:"initial"}},e.createElement(C,{href:s,target:"_blank",title:"Facebook",isExternal:!0},e.createElement(o,{color:t.colors.White,bg:t.colors.Green130,borderRadius:"50%",h:{base:"25px",md:"30px",lg:"52px"},w:{base:"25px",md:"30px",lg:"52px"},align:"center",justify:"center"},e.createElement(G,{faIcon:"fa-square-facebook",variant:"fa-brands",fasize:"2xl",transform:{base:"scale(.75)",md:"scale(1)",lg:"scale(1.5)"}}))),e.createElement(o,{as:"button",onClick:()=>window.print(),color:t.colors.White,bg:t.colors.Green130,borderRadius:"50%",h:{base:"25px",md:"30px",lg:"52px"},w:{base:"25px",md:"30px",lg:"52px"},align:"center",justify:"center","aria-label":"Print"},e.createElement(G,{faIcon:"fa-print",fasize:"2xl","aria-label":"Print",transform:{base:"scale(.75)",md:"scale(1)",lg:"scale(1.5)"}}))))}function pe(){return e.createElement(P,{ml:"19px",size:{base:"small",md:"medium"},variant:"secondarygreen",as:C,href:"https://iapp.org/certify/cpe-submit/",target:"_blank"},"Submit for CPEs")}const ge="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANIAAADSCAMAAAAIR25wAAACalBMVEUAAADf39/X19/b29za2t3c3Nw3YC7////l5ebb29z////a2tzb29vb2905YC7Z2dzo6Og5YCw4YCw1YCvb292ru6Q5YC3b29zb29v///84YC7////b29va2t85YC04YS44YCxui2Xc3Nz///84YC7i4uI4YC01YDA5YDA4YDA5YCvn5+c6YDB+lnk5YC43YC46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NxcGXM6ThA/oY9/jkbj9knfMcKYktdjmulEfN5t8jP9j0Px+SYs4sK4bCUFFH5JabnUj7cKGPiS13GpDUsutbiTDvKMPSS23upEQrOpDUsutbiQEV+JJBhrV29+cIgaqUZIxaltQ4Fw8TUKOCfCPGvtpSSWM4jh+MhkhaKEUJChYiy60c9EiuhQxGVTkJRe6mIULESQUugUeEAcN7Lhq6S4IWkQEM8GAtamoe91U+J6CCqons/n3+Eyfd/Dld4aBR+9ky/uapiCi0eXq9riXI9bkeDgcDvSyOsIKfEjKHG4T5SsNfKeZ6won/QJL3pJ2tknPNpDRLP6YIjbp7wHpFQU/UwU3JRNgL2mH6ERDBtPk6SI2KbNF+j5+pXAqrmhOBltJmTaVNOzjTFRRDGyhdpvSCvZl5EQESbNgDxGl8Ttq0cufEes3U9Rb4XzQRUEZ7KIOmmIMdChpA4B7EqqtwRWlEuDAaAkZwoeSZsCRMX0B0VNDzcngzDotoXkX3IdKhsCpCSqhFZdco6QYuCBOWbRCbXEMksENQ36qoSeiphPgEp+f0prwKCnIBDltqpbRalTRWyfHihBVa69LCfhNpf7I4DpfnIg6e3W05KqVc+PiQsCHL+Kn5+ehvfq1gmYVjBuHA63IwFF0cXiUXuTNu/v33+4+zMFxEp3aXJ5fy5M19w+PVnue2qVjGwBhGAqirtL/eAWUHagt6GxLztzsREONKIn03wYnXaCb/NvhmNdHE6fJInqi2vtrSDVZjannNqoinroWUftAuposjYiIiG4A9GEVs0RLGwAAAABJRU5ErkJggg==";function ue(t){const{ct:n}=t,r=B();return e.createElement(o,{direction:"column",gap:"16px",borderTop:n===b.resourceEntry?"solid #ABABAB 1px":`solid ${r.colors.Black} 1px`,w:"100%",my:"20px",pt:"20px",pb:"4px",px:"4px",textAlign:"center",alignSelf:"center"},e.createElement(o,{direction:{base:"column",lg:"row"},align:{base:"stretch",lg:"center"},justify:{base:"center",lg:"space-between"},w:"100%",bg:r.colors.Grey10,p:"24px",mx:"auto"},e.createElement(o,{align:"center",w:{base:"100%",lg:"auto"},mb:{base:"16px",lg:"0"}},e.createElement(w,{w:"64px",h:"64px",flexShrink:0},e.createElement(M,{src:ge,alt:"CPE credit badge",w:"64px",h:"64px"})),e.createElement(d,{fontSize:{base:"12px",lg:"16px"},color:r.colors.Black,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.")),e.createElement(w,{w:{base:"100%",lg:"auto"},textAlign:"center",mt:{base:"16px",lg:"0"}},e.createElement(pe,null))),n!==b.resourceEntry&&e.createElement(o,{fontSize:".875rem",lineHeight:"1.25rem",fontWeight:"600",color:r.colors.Green130,align:"center",mt:"24px"},e.createElement(C,{href:"/news/write-for-us"},"Interested in writing for us? Visit our Contributor Guidelines"," ",e.createElement(d,{as:"span",whiteSpace:"nowrap"},"Page ",e.createElement(w,{className:"fa-solid fa-arrow-right-long",ml:"16px"})))))}function fe(t){const{data:n,time:r}=t,l=B();return e.createElement(o,{direction:"column"},e.createElement(o,{direction:"column",gap:"16px"},n==null?void 0:n.map((s,i)=>e.createElement(o,{key:i,direction:"column"},s.name&&e.createElement(d,{fontWeight:"700",letterSpacing:"0px",fontSize:{base:"1rem",md:"1.25rem"},lineHeight:{base:"1.531rem",md:"1.875rem"}},s.name),s.contributor_type&&e.createElement(d,{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"}},s.contributor_type),s.designations&&e.createElement(d,{color:l.colors.Grey130,fontWeight:"400",letterSpacing:{base:".03em"},fontSize:{base:".875remrem",md:"1rem"},lineHeight:{base:"1.188rem",md:"1.362rem"}},s.designations.join(", "))))),r&&e.createElement(d,{color:l.colors.Grey130,fontWeight:"400",letterSpacing:{base:".03em"},fontSize:{base:".875rem"},lineHeight:{base:"1.188rem"},mt:{base:"5px",md:"2px"}},`${r} Minute Read`))}function be(t){const[n,r]=f.useState([]),{data:l}=t;f.useEffect(()=>{l.length<5?i():r(l.slice(0,5))},[l]);const s=B();async function i(){const c=5-l.length,p=c>0?await z.getLimitedEntries("news_article",c,"article_details.date"):[],a=c>0?await z.getLimitedEntries("news_blurb",c,"article_details.date"):[],x=p.concat(a);x.sort((E,A)=>new Date(A.article_details.date)-new Date(E.article_details.date));const h=x.slice(0,c);r([...l,...h])}return e.createElement(o,{direction:"column",gap:"16px",mb:{base:"34px",md:"83px",lg:"48px "}},e.createElement(D,{fontSize:{base:"1rem",md:"1.25rem"},lineHeight:"1.2",letterSpacing:"0px",fontWeight:"700"},"Related stories"),e.createElement(o,{direction:"column",gap:{base:"43px",md:"8xp",lg:"45px"}},n.slice(0,5).map((c,p)=>{var a;return e.createElement(C,{key:p,href:c.url},e.createElement(o,{borderLeft:"solid 3px",borderLeftColor:s.colors.Green130,minH:{base:"63px",md:"53px",lg:"63px"}},e.createElement(d,{noOfLines:3,ml:"18px",fontFamily:"Lato",fontSize:{base:"0.875rem",md:"1rem"},fontWeight:"700",lineHeight:"1.2"},(a=c.article_details)==null?void 0:a.headline)))})))}function xe(t){const{data:n,numOfSlots:r}=t,[l,s]=f.useState(),[i,c]=f.useState(),[p,a]=f.useState(),[x,h]=f.useState(),E=B(),A=[l&&m(l),i&&m(i),p&&m(p),x&&m(x)];f.useEffect(()=>{y()},[n]);function y(){u(n==null?void 0:n.slot_1,s),u(n==null?void 0:n.slot_2,c),u(n==null?void 0:n.slot_3,a),u(n==null?void 0:n.slot_4,h)}function u(g,k){var v;const S=[];(v=g==null?void 0:g.advertisement_blocks)==null||v.map(R=>{var I;return((I=R.publish_details)==null?void 0:I.time)&&S.push(R)}),k(S)}function m(g){var k;return(k=g[0])==null?void 0:k.ad[Math.floor(Math.random()*g[0].ad.length)]}return e.createElement(o,{direction:"column",w:"100%",gap:"34px",mb:"34px"},A.slice(0,r).map((g,k)=>{var S;if(g)return e.createElement(C,{key:k,href:g.link,target:"_blank"},e.createElement(o,{direction:"column"},e.createElement(o,{bg:E.colors.Grey30,h:"19px",flex:1,align:"center"},e.createElement(d,{mx:"auto",textAlign:"center",color:E.colors.Grey130,fontWeight:"600",fontSize:".875rem",lineHeight:"1.192rem",letterSpacing:".22em"},"ADVERTISEMENT")," "),e.createElement(o,{h:"250px",w:"100%",align:"start",justify:"start",bgImage:`${(S=g.ad_image)==null?void 0:S.url}?height=250`,bgSize:"contain",bgPos:"top center",bgRepeat:"no-repeat"})))}))}function j(t){var c,p;const{type:n,numOfSlots:r}=t,[l,s]=f.useState();f.useEffect(()=>{i()},[]);async function i(){const a=await z.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");s(a[0])}return n==="banner"?((c=l==null?void 0:l.banners)==null?void 0:c.advertisement_banner.length)>0&&e.createElement(oe,{data:(p=l==null?void 0:l.banners)==null?void 0:p.advertisement_banner}):e.createElement(xe,{numOfSlots:r,data:l==null?void 0:l.block_groups})}function Ee(t){return t.map(r=>{var l,s,i,c,p,a;return((s=(l=r.rte)==null?void 0:l.custom_styles)==null?void 0:s.length)>0?`<div class="${(c=(i=r.rte)==null?void 0:i.custom_styles)==null?void 0:c.join().replaceAll(" ","").replaceAll(","," ")}">${(p=r.rte)==null?void 0:p.rich_text_editor}</div>`:(a=r.rte)==null?void 0:a.rich_text_editor}).join("")}function de(t){const r=[],l=[];let s=0;return Array.isArray(t)?t.forEach(i=>{s<3?r.push(i):l.push(i),i.type==="p"&&s++}):r.push(t),{contentBeforeAd:r,contentAfterAd:l}}const he=t=>{const n=Ee(t),r=ne(n,{trim:!0}),{contentBeforeAd:l,contentAfterAd:s}=de(r);return[l,s]};function Ae({data:t,ct:n}){var a,x,h,E,A,y,u;const[r,l]=f.useState([]),[s,i]=f.useState(),c=B();function p(){var S;const m=(S=document==null?void 0:document.getElementById("article"))==null?void 0:S.innerText,g=m==null?void 0:m.trim().split(" ").length;i(Math.ceil(g/225))}return f.useEffect(()=>p(),[r]),f.useEffect(()=>{if(t.article_body){const m=he(t==null?void 0:t.article_body);l(m)}},[t]),e.createElement("main",{id:"main"},e.createElement(K,null),t&&e.createElement(w,{h:"100%"},e.createElement(Z,{isArticle:!0,data:t.seo,override:t}),e.createElement($,null),e.createElement(ee,{data:n===b.resourceEntry?{title:"All Resources",href:"/resources"}:{title:"All News",href:"/news"}}),e.createElement(w,{maxW:"1440px",mx:"auto",h:"100%"},e.createElement(ie,{data:t,ct:n,ArticleTitle:(a=t.article_details)==null?void 0:a.headline}),n===b.newsArticle&&t.main_image&&e.createElement(o,{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:(x=t.main_image)==null?void 0:x.url,bgPos:"center",bgSize:"cover",bgRepeat:"no-repeat",borderRadius:"15px"}),e.createElement(o,{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:!t.main_image&&{base:"12px",md:"28px",lg:"69px"}},e.createElement(o,{direction:"column",minW:"200px",maxW:"286",flex:1,marginX:"auto"},e.createElement(be,{data:(h=t.related_stories)==null?void 0:h.article}),n===b.newsArticle&&e.createElement(j,{numOfSlots:4,type:"group"}),n===b.newsBlurb&&e.createElement(j,{numOfSlots:1,type:"group"})),e.createElement(o,{h:"100%",maxW:"100%",flex:1,direction:"column"},e.createElement(o,{borderBottom:`solid 1px ${c.colors.Black}`,pb:{base:"29px",md:"17px",lg:"24px"}},n===b.newsArticle&&e.createElement(o,{flex:1},e.createElement(fe,{time:s,data:(E=t.article_details)==null?void 0:E.author})),e.createElement(o,{flex:1,justify:"end"},e.createElement(me,null))),e.createElement(w,{id:"article",className:"Article-Body",mt:"29px"},r&&e.createElement(e.Fragment,null,(A=r[0])==null?void 0:A.map((m,g)=>e.createElement(N,{key:g,data:m,px:"initial"}))),n===_.newsArticle&&e.createElement(w,{my:"30px"},e.createElement(j,{type:"banner"})),r&&e.createElement(e.Fragment,null,(y=r[1])==null?void 0:y.map((m,g)=>{if(m!=="")return e.createElement(N,{key:g,data:m,px:"initial"})}))),t.cpe_eligible&&e.createElement(ue,{data:t,ct:n}),n===_.newsBlurb&&e.createElement(o,{direction:"column",pt:{base:"25px",md:"32px"},pb:{base:"25px",md:"60px"},gap:"11px"},e.createElement(C,{href:(u=t.external_cta)==null?void 0:u.href,color:c.colors.Green130,fontSize:"1.25rem",lineHeight:"1.25rem",fontWeight:"600",target:"_blank"},"Full story"," ",e.createElement(re,{as:q,ml:"14px"})),e.createElement(d,{color:c.colors.Grey130,fontSize:".875rem",fontWeight:"400",lineHeight:"1.188rem",letterSpacing:".03em"},"Source: ",t.source),e.createElement(w,{my:"30px"},e.createElement(j,{type:"banner"})))))),t.components&&e.createElement(le,{data:t.components})))}function Se({contentType:t}){const n=F(),{isLoading:r,data:l,isError:s,failureReason:i}=V(t,n.pathname,"article_details.author,related_stories.article");if(r)return e.createElement(Q,null);if(s)throw new Error("Error loading article: ",(i==null?void 0:i.message)||"unknown reason");return e.createElement(Ae,{data:l[0],ct:t})}const je=Object.freeze(Object.defineProperty({__proto__:null,default:Se},Symbol.toStringTag,{value:"Module"}));export{ie as A,ue as C,me as I,Se as N,je as a};