1import{a as ft}from"./chunk-JQ2PDIBB.js";import{a as ht}from"./chunk-SB2GNIB5.js";import{a as pt}from"./chunk-S5T43WYW.js";import{a as lt,b as ot}from"./chunk-GMBO2UAI.js";import{a as ut,d as ct}from"./chunk-7RSOX5VO.js";import"./chunk-DW3GQEX3.js";import"./chunk-IOT55DZW.js";import{a as gt}from"./chunk-FFLDMBNW.js";import"./chunk-GL347B4E.js";import{a as st}from"./chunk-WPEHSG4I.js";import{a as mt}from"./chunk-JTPO5QM6.js";import{b as dt}from"./chunk-J6KXG7SP.js";import"./chunk-JCATTHRK.js";import{a as rt}from"./chunk-ECIOLQUU.js";import{a as et,f as nt}from"./chunk-XBHK5NHJ.js";import{a as it}from"./chunk-WOTRWZ2T.js";import{a as at}from"./chunk-BZOEQJDB.js";import"./chunk-OQJ6XUSM.js";import{a as tt}from"./chunk-B6VEROVH.js";import{b as X}from"./chunk-XYSXMUYC.js";import"./chunk-I6GGKTS5.js";import{j as J,r as W,u as Y,y as Z}from"./chunk-X5BKIKCV.js";import{n as V,ya as G}from"./chunk-4IY6UPJ2.js";import{$b as $,Ca as O,Hb as x,Hc as K,Ja as j,Lb as d,Qb as w,Uc as Q,Vb as p,Wb as y,Xb as b,cb as F,db as M,ga as f,gc as N,hc as P,jb as l,kb as v,la as D,pd as m,qb as z,sc as U,tc as H,uc as q,va as I,vc as L,wa as T,wb as k,wc as B,xb as R,xc as A}from"./chunk-NZVC6VJI.js";import{a as C,b as E}from"./chunk-USXCYQPF.js";var Pt=["bodyContainer"];function St(r,u){r&1&&b(0,"app-breadcrumb",2)}function xt(r,u){if(r&1){let o=$();p(0,"div",9)(1,"app-dropdown-menu",16),N("optionSelected",function(i){I(o);let t=P();return T(t.selectLanguage(i))}),y()()}if(r&2){let o,e=P(),i=q(14);d("dynamicAttr",(o=e.staticPage())==null||o.$==null?null:o.$.available_languages),l(),d("selectedOption",e.defaultLanguageDropdownOption())("options",e.languageDropdownOptions())("selectedOptionElementPrefix",i)("hideButtonBorder",!0)("fontSize","small")("paddingSize","small")}}function wt(r,u){if(r&1&&b(0,"img",17),r&2){let o=P(2);d("src",o.currentLanguageFlagUrl(),M)}}function Lt(r,u){if(r&1&&x(0,wt,1,1,"img",17),r&2){let o=P();w(o.currentLanguageFlagUrl()?0:-1)}}function Ct(r,u){if(r&1&&(p(0,"div",14),b(1,"app-featured-media",18),y()),r&2){let o,e,i=P();l(),d("dynamicAttr",(o=i.staticPage())==null||o.$==null?null:o.$.featured_media)("featuredMedia",(e=i.staticPage())==null?null:e.featured_media)}}var Zt=(()=>{let u=class u{constructor(e,i,t,s,_,g){this.route=e,this.sanitizer=i,this.router=t,this.ssr=s,this.featureFlagsService=_,this.location=g,this.i18n=f(nt),this.stateKeyPrefix="StaticPageComponent:static_page:",this.cs=f(at),this.scriptService=f(dt),this.ldJsonService=f(mt),this.renderer=f(z),this.destroyRef=f(O),this.response=f(X,{optional:!0}),this.staticPage=k(null),this.isInternationalizationEnabled=k(!1),this.availableLanguages=m(()=>{let n=this.staticPage()?.available_languages;return n||[]}),this.languageDropdownOptions=m(()=>this.availableLanguages().map(n=>({label:n.language_text,value:n.language_value}))),this.defaultLanguageDropdownOption=m(()=>{if(!this.locale)return null;let n=this.availableLanguages().find(a=>a.language_value==this.locale);return n?{label:n.language_text,value:n.language_value}:null}),this.currentLanguageFlagUrl=m(()=>{let n=this.staticPage()?.locale;return n?this.availableLanguages()?.find(c=>c.language_value===n)?.flag?.url:""}),this.updatedDateLabel=m(()=>{let n=this.staticPage()?.settings?.labels?.find(a=>a.label_key==="updated");return n?n.label_text:""}),this.formattedUpdatedDate=m(()=>{let n=this.staticPage()?.updated_date;if(!n)return"";let a=new Date(n);return new Intl.DateTimeFormat(this.staticPage()?.settings?.update_date_language,{month:"long",day:"numeric",year:"numeric"}).format(a)}),this.jumpLinks=m(()=>{let n=this.staticPage()?.body_content??"";return ut({htmlString:n,relativeUrl:`/${this.route.snapshot.url.map(c=>c.path).join("/")}`,anchorIdPrefix:this.staticPage()?.settings.jumplink_prefix,tag:this.staticPage()?.settings?.jumplink_target_tag})}),this.transformedHTMLContent=m(()=>{let n=this.staticPage()?.body_content;if(!n)return"";try{let c=new DOMParser().parseFromString(n,"text/html"),_t=c.getElementsByTagName(this.staticPage()?.settings?.jumplink_target_tag??"h2"),vt=this.jumpLinks();return Array.from(_t).forEach((yt,bt)=>{yt.id=vt[bt].id}),this.sanitizer.bypassSecurityTrustHtml(c.documentElement.outerHTML)}catch{return console.log("DOMParser not available on server side."),this.staticPage()?.body_content}}),this.embeddedVideoUrl=m(()=>{let n=this.staticPage()?.featured_media?.video_link?.href;return n?this.sanitizer.bypassSecurityTrustResourceUrl(n):""}),this.bodyContainerElement=R.required("bodyContainer",{read:j}),this.leadGenForms="";let{locale:h,slug:S}=this.i18n.getLocaleData(this.route);this.locale=h,this.slug=S}onLanguageChanged(e){this.queryContent(e)}ngOnInit(){this.isInternationalizationEnabled.set(this.featureFlagsService.getFeatureFlag(et,!1));let e=this.route.params.subscribe(()=>{this.queryContent()});this.destroyRef.onDestroy(()=>e.unsubscribe()),this.fragmentSub=this.route.fragment.subscribe(i=>{this.handleAnchorNavigation(i)})}ngOnDestroy(){this.fragmentSub&&this.fragmentSub.unsubscribe()}
1queryContent(e){let i=this.route.snapshot.queryParams,t=`/${this.slug}`,s=rt(this.stateKeyPrefix,t,this.locale),_={queryParams:E(C({},i),{key:"url",value:t}),locale:e||this.locale};this.cs.getEntryWithQuery(s,"static_page",_).then(g=>{if(!g||!g[0]||!g[0][0]){let h=ot(this.ssr);if(lt(this.ssr,this.response,h))return;this.router.navigateByUrl(h);return}else this.staticPage.set(g[0][0]);this.leadGenForms=this.staticPage()?.lead_gen_cta_forms??[],this.ldJsonService.addAllTagsAndLdJson(this.staticPage()?.ld_json,this.renderer),this.addHeadTags(t),this.isInternationalizationEnabled()||this.setDocumentLang(this.locale),this.handleInitialAnchorNavigation()})}addHeadTags(e){let i=this.staticPage(),t=i?.seo;t!=null&&this.scriptService.addSeoTags(E(C({},t),{meta_title:t.meta_title||i?.page_title||"Page"}),e,t.meta_title||i?.page_title||"Page")}selectLanguage(e){if(this.locale===e)return;typeof document<"u"&&(document.cookie=ft(e));let i=this.location.path(),t=this.updateLanguageInPath(i,e);window.location.href=t}setDocumentLang(e){if(this.locale!==e)try{typeof document<"u"&&document.documentElement&&(document.documentElement.lang=e)}catch(i){console.warn("Failed to set document language:",i)}}updateLanguageInPath(e,i){let t=e.split("/").filter(s=>s);return this.availableLanguages().some(s=>s.language_value===t[0])?t[0]=i:t.unshift(i),"/"+t.join("/")}handleInitialAnchorNavigation(){let e=this.route.snapshot.fragment;this.handleAnchorNavigation(e)}handleAnchorNavigation(e){let i=this.location.path(!0),t=e||i.split("#")?.[1];!t||!this.staticPage()||setTimeout(()=>{let s=document.getElementById(t);s&&s.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},500)}};u.\u0275fac=function(i){return new(i||u)(v(W),v(J),v(Y),v(tt),v(it),v(V))},u.\u0275cmp=D({type:u,selectors:[["app-static-page"]],viewQuery:function(i,t){i&1&&U(t.bodyContainerElement,Pt,5,j),i&2&&H()},standalone:!0,features:[K],decls:21,vars:13,consts:[["currentLanguageFlag",""],[1,"mx-auto","mb-8","flex","w-full","flex-col","px-7"],[1,"mt-10","md:mt-14"],[1,"flex","w-full","flex-col","justify-center","py-16"],[1,"flex","w-full","items-end","justify-between","md:gap-10"],[1,"flex","flex-col","justify-center","gap-4"],[1,"heading-component",3,"dynamicAttr"],[1,"text-base","leading-snug","tracking-normal","text-grey-dark",3,"dynamicAttr"],[3,"dateTime"],[1,"relative","top-1.5","md:top-0",3,"dynamicAttr"],[1,"body-container","relative","flex","w-full","flex-col","items-start","justify-between","overflow-visible","md:flex-row"],["maxWidth","w-60",3,"dynamicAttr","jumpLinks"],[1,"flex","w-full","flex-col","max-md:max-w-full"],[1,"flex","grow","flex-col","max-md:max-w-full"],[1,"mb-20"],[1,"rte-base-styles","rte-base-colors","[&_*]:break-words","[&_h2]:mb-6","[&_h3]:mb-4","[&_p]:my-4",3,"dynamicAttr","innerHTML"],[3,"optionSelected","selectedOption","options","selectedOptionElementPrefix","hideButtonBorder","fontSize","paddingSize"],["loading","lazy","alt","flag",1,"flag","my-auto","h-4",3,"src"],[3,"dynamicAttr","featuredMedia"]],template:function(i,t){if(i&1&&(p(0,"main",1),x(1,St,1,0,"app-breadcrumb",2),p(2,"header",3)(3,"div",4)(4,"div",5)(5,"h1",6),L(6),y(),p(7,"p",7),L(8),p(9,"time",8)(10,"strong"),L(11),y()()()(),x(12,xt,2,7,"div",9)(13,Lt,1,1,"ng-template",null,0,Q),y()(),p(15,"div",10),b(16,"app-jump-links",11),p(17,"article",12)(18,"div",13),x(19,Ct,2,2,"div",14),b(20,"section",15),y()()()()),i&2){let s,_,g,h,S,n,a,c;l(),w((s=t.staticPage())!=null&&s.is_breadcrumb_enabled?1:-1),l(4),d("dynamicAttr",(_=t.staticPage())==null||_.$==null?null:_.$.page_title),l(),A(" ",(g=t.staticPage())==null?null:g.page_title," "),l(),d("dynamicAttr",(h=t.staticPage())==null||h.$==null?null:h.$.updated_date),l(),A(" ",t.updatedDateLabel()," "),l(),d("dateTime",(S=t.staticPage())==null?null:S.updated_date),l(2),B(t.formattedUpdatedDate()),l(),w(t.languageDropdownOptions()&&t.languageDropdownOptions().length>0&&!t.isInternationalizationEnabled()?12:-1),l(4),d("dynamicAttr",(n=t.staticPage())==null||n.$==null?null:n.$.settings)("jumpLinks",t.jumpLinks()),l(3),w(!((a=t.staticPage())==null||a.featured_media==null||a.featured_media.image==null)&&a.featured_media.image.url||!((a=t.staticPage())==null||a.featured_media==null||a.featured_media.video_link==null)&&a.featured_media.video_link.href?19:-1),l(),d("dynamicAttr",(c=t.staticPage())==null||c.$==null?null:c.$.body_content)("innerHTML",t.transformedHTMLContent(),F)}},dependencies:[Z,G,pt,ht,ct,st,gt],styles:["main[_ngcontent-%COMP%]{max-width:1064px}.margin-media[_ngcontent-%COMP%]{margin-bottom:60px}@media (min-width: 768px){.margin-media[_ngcontent-%COMP%]{margin-bottom:104px}}.article-container[_ngcontent-%COMP%]{width:696px;min-width:240px}.flag[_ngcontent-%COMP%]{width:21px}@media (min-width: 768px){.body-container[_ngcontent-%COMP%]{column-gap:72px}}"]});let r=u;return r})();export{Zt as StaticPageComponent};
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.