import{P as Ae,r as F,c as K,j as e,f as Be,w as Re,u as ve,a as Pe,b as Ge,e as Le}from"./index-DNie78qZ.js";import{s as D,aY as O,r as ne,c as Ie,L as se,d as ie,A as w,C as we,g as De,u as ke,aZ as Ne,a_ as Fe}from"./_-B5YbPdf4.js";import{E as Ga}from"./_-B5YbPdf4.js";import{u as We}from"./hooks-DAmUEBdF.js";import{b as le,p as de,E as Y,c as _e,G as Oe,d as qe}from"./ecomGtm-CzghpNiz.js";import{a as Me,I as Ue}from"./iirisRecommendation-CE_EEKny.js";import{d as Z,u as Q,A as ue,F as me,j as He,G as ge,g as q,a as pe,b as X,C as ee,L as te,i as ae,e as P,k as ze,s as he,l as $e,m as Ve,n as Je,o as Ke,H as Ye,p as Ze,B as Qe,h as J,E as Xe,q as et,r as tt,t as at,v as nt,w as st,x as it,y as ot}from"./articleMultiSection-Cvxgt6Nd.js";import{B as M}from"./button-BnTPVJo0.js";import{u as xe}from"./useButtonResponsiveSize-DJx3-IEP.js";import{a as rt,O as ct}from"./twoColumnGridLayout-C9yv6v5s.js";import{e as lt}from"./contentDomain.generated-VwaSR_jC.js";import{T as dt}from"./topicList-B_Dv-ssx.js";import{F as ut}from"./featureImageHeader-hEP0WN_m.js";import{M as mt}from"./sidebar-CrUmIzsR.js";import{G as gt}from"./contentCardSpotlight-jaYKhe97.js";import{u as pt}from"./useBridgedMedia-jtoW90PF.js";import{u as ht}from"./useWeatherWidget-M5Gk8jl5.js";import{u as xt}from"./useMeta-t4dauh5D.js";import{c as H}from"./string-cekqOW6E.js";import{b as St,o as bt,P as oe,d as ft}from"./meta-CMRaCy7h.js";import"./socialShare-tNYGHIiy.js";import"./provider-NXUlq-mW.js";import"./index.es-BmErqTE7.js";import"./contributorSummary-BnIe4INk.js";import"./keyword-XLImNlTb.js";import"./programHeader-BrG8y2RE.js";import"./categoryHeader-DxP6y9Go.js";import"./redirection-Dohc6MQT.js";import"./eventList-BBts8_2C.js";import"./eventInternalBanner-B-3D-vcw.js";import"./index-toO0zGtn.js";import"./_baseForOwn-BnJORSo7.js";import"./newsletterSignupPromo-CTZZxXuP.js";import"./resources-BQAcpsVr.js";import"./constants-B39MWsB8.js";import"./formComponent-D5zULC3G.js";import"./form-XDr10Ydb.js";import"./loadingIndicator-D63vEsbS.js";import"./useGetDynamicDataModule-C_9KnLb-.js";import"./debounce-BwWk7nOZ.js";import"./toNumber-Boxq0LOA.js";import"./breadcrumb-BzhBqATX.js";import"./listContent-DkQgfMG7.js";import"./utils-Bn24zYNJ.js";import"./pagination-Dm8WaFPQ.js";import"./commodityPrices-RymAgRJA.js";import"./contentPreview-Blvr3M_f.js";import"./contentCards-Bq8M7T3M.js";import"./contentList-W65ONCva.js";const z=(t,s,o)=>{const a=document.createElement(t);o&&Object.entries(o).forEach(([n,l])=>a.setAttribute(n,l)),document[s]?.appendChild(a)},Tt=t=>({consent:s})=>{(s?.confirmed||s?.purposes?.Advertising)&&t(O("confirmed")&&O("personalized"))},yt=(t,s)=>{const{nextgenATEnabled:o}=D.useFeatureToggles(),a=Ae(),[n,l]=F.useState(O("confirmed")&&O("personalized"));return F.useEffect(()=>{if(o&&n){const{domainUrl:r}=a[0].data;z("script","head",{type:"module",src:`${r}/next-gen/at/tt-at/tt-nextgen-at.esm.js`,class:"nextgenat-script"}),z("script","head",{nomodule:"true",src:`${r}/next-gen/at/tt-AT/tt-nextgen-AT.esm.js`,class:"nextgenat-script"})}return()=>{document.querySelectorAll(".nextgenat-script").forEach(r=>r.remove())}},[n]),F.useEffect(()=>(document.querySelectorAll(".nextgenat-script").length&&z("tt-nextgen-at","body",{"site-name":t,"content-key":s??""}),()=>{document.querySelectorAll("tt-nextgen-at").forEach(r=>r.remove())}),[n,s]),{setReload:l}},Et={buy:"PURCHASE TO READ",register:"REGISTER TO READ",access:"READ NOW"},$={paid:{accessRequired:{title:"Want to read this premium content?",description:"Purchase required for full access."},consentRequired:{title:"Premium Content Purchased",description:"Complete activation for full access."}},unpaid:{accessRequired:{title:"Want to continue reading?",description:"Register for full access."},consentRequired:{title:"Want to continue reading?",description:"Complete activation for full access."}}},jt=t=>{const{sponsored:s,uid:o,isUserEntitled:a=!1,errorModal:n,isGatedAsPaid:l=!1,title:r,paidGating:m,additionalGatingSettings:d,siteSettings:j}=t,{brand:g}=D.useAuth(),{pathname:x}=K(),T={...$,paid:{accessRequired:Z(g,$.paid.accessRequired),consentRequired:$.paid.consentRequired}},{iirisAuthentication:c}=D.useFeatureToggles(),{isBodyGated:y,gatingState:b,displayedText:u,sectionText:S,isGatedFormShown:C,isButtonDisabled:i,loginButtonDescription:A,handleGatingButtonClick:f,handleLoginButtonClick:B,handleExternalFormSuccess:E,handleExternalFormClose:R}=Q({paidGating:m,gatingButtonText:Et,gatingSectionText:T,sponsored:s,uid:o,isUserEntitled:a,errorOccurred:n.showErrorModal,isGatedAsPaid:l,additionalGatingSettings:d,siteSettings:j,contentType:P.ARTICLE,onClick:()=>{de({data:{action:"Read Article Intent",name:t.title||"",url:""},event:Y.ARTICLE,_clear:!0})},onAddToCart:()=>{le({pathname:x,title:r,paidGating:m})}}),v=xe();return e.jsx(ue,{...t,articleBodySection:e.jsx(He,{...t,gatingState:b,isBodyGated:y,gatingSection:e.jsxs(ge,{className:q("Margins"),children:[e.jsxs(pe,{children:[e.jsx(X,{gatingTitle:S.title,gatingDescription:S.description}),e.jsxs(ee,{children:[e.jsx("div",{className:q("GatingButton"),children:e.jsx(M,{automationId:"gatedEcomButton",size:v,variant:"primary-filled",disabled:i,onClick:f,children:u})}),(s?.gateWithSiteReg||m?.isPaidContent)&&c&&e.jsx(te,{onClick:B,description:A})]})]}),C?e.jsx(ae,{onSuccess:E,onClose:R,contentType:P.ARTICLE,contentUid:o}):null]})}),featuredMedia:e.jsx(me,{...t.featuredImage})})},Ct={buy:"PURCHASE TO DOWNLOAD",register:"REGISTER TO DOWNLOAD",access:"DOWNLOAD NOW"},W={title:"Download Ready",description:"Click below to begin your download."},_={paid:{accessRequired:{title:"Want to view this premium content?",description:"Purchase required for full access."},consentRequired:W,unblocked:W},unpaid:{accessRequired:{title:"Want to continue viewing?",description:"Register for full access."},consentRequired:W,unblocked:W}},At={subtitle:"Please provide your details to access the content",submitButtonText:"Submit"},Bt={accessStart:"Download Started",authStart:"Register to Download",externalFormStart:"Download Intent"},Rt=t=>{const{title:s,paidGating:o,sponsored:a,uid:n,isGatedAsPaid:l=!1,isUserEntitled:r=!1,errorModal:m,document:d,additionalGatingSettings:j,siteSettings:g,pageDisplaySelection:{displayOptions:x,bannerImage:T}={},socialShare:c}=t,{brand:y}=D.useAuth(),b=ze(),{iirisAuthentication:u}=D.useFeatureToggles(),S=d?.materialUrl||d?.materialResource,C={..._,paid:{accessRequired:Z(y,_.paid.accessRequired),consentRequired:_.paid.consentRequired,unblocked:_.paid.unblocked}},i=_e({title:s,paidGating:o,event:Y.DOCUMENT,actions:Bt,gateWithSiteReg:a?.gateWithSiteReg}),{displayedText:A,sectionText:f,isGatedFormShown:B,gatingState:E,isButtonDisabled:R,loginButtonDescription:v,handleGatingButtonClick:k,handleLoginButtonClick:N,handleExternalFormSuccess:G,handleExternalFormClose:L}=Q({paidGating:o,gatingButtonText:Ct,gatingSectionText:C,sponsored:a,uid:n,isUserEntitled:r,errorOccurred:m.showErrorModal,isGatedAsPaid:l,additionalGatingSettings:j,siteSettings:g,contentType:P.WHITE_PAPER,onAddToCart:i.handleAddToCart,onAuthStart:i.handleAuthStart,onExternalFormStart:i.handleExternalFormStart,onExternalFormSuccess:()=>{i.handleExternalFormSuccess(),S&&(i.handleAccessStart(),window.open(S,"_blank"))},onUnblockedContentClick:i.handleAccessStart}),U=xe(),I=p=>e.jsx("div",{className:q("GatingButton"),children:e.jsx(M,{automationId:"gatedEcomButton",size:U,variant:p.variant,leftIcon:p.leftIcon,disabled:R,onClick:k,buttonLikeAnchor:E===J.UNBLOCKED,url:S,target:"_blank",children:A})});return he(t)?e.jsx(rt,{isSidebarOnTopOnMobile:x===lt.LandingPageFormFirstOnMobile,renderBanner:({className:p})=>e.jsx(Qe,{className:p,bannerImage:T}),renderHeader:({className:p})=>e.jsx(Ze,{largeTitle:ne(t.title),mobileTitle:ne(t.mobileHeadline),className:p}),renderSummary:({className:p})=>e.jsx(Ye,{className:p,summary:t.summary}),renderContent:({className:p})=>e.jsx(Ke,{className:p,bodyJson:t.bodyJson,atAGlance:t.atAGlance,sponsored:t.sponsored,searchParams:t.searchParams}),renderSidebar:({className:p})=>e.jsx($e,{className:p,gatingState:E,uid:n,contentType:P.WHITE_PAPER,onSuccess:G,onFormLoad:i.handleExternalFormStart,overrides:At,unblockedContentSidebar:e.jsxs(e.Fragment,{children:[e.jsx(Ve,{title:"Download Ready",description:"Click below to begin download",children:I({variant:"dark-outlined",leftIcon:"Download"})}),e.jsx(Je,{socialShare:c,description:"Invite your colleagues to download this document."})]})})}):e.jsx(ue,{...t,featuredMedia:e.jsx(me,{...t.featuredImage}),downloadSection:e.jsxs(ge,{children:[e.jsx(X,{gatingTitle:f.title,gatingDescription:f.description}),e.jsxs(ee,{children:[I({variant:"primary-filled"}),(a?.gateWithSiteReg||o?.isPaidContent)&&u&&e.jsx(te,{onClick:N,description:v})]})]}),buttonSection:I({variant:"primary-filled"}),modalSection:B?e.jsx(ae,{onSuccess:G,onClose:L,onSubmit:i.handleExternalFormSubmission,onSubmissionError:i.handleExternalFormSubmissionError,onLoadError:i.handleExternalFormLoadError,contentType:P.WHITE_PAPER,contentUid:n}):null,useSimplified:b})},h=Ie.cn("EnhancedListChildPage"),re=t=>`Pagination-ArrowIcon${t?" Pagination-ArrowIcon_disabled":""}`,ce=(t,s)=>t?`Cannot go to the ${s} page`:`Go to the ${s} page`,vt=({rank:t,commonRank:s,nextPageUrl:o,prevPageUrl:a})=>{const n=t<=1,l=t>=s;return e.jsxs("div",{className:h("RankBlock"),children:[e.jsx(se,{to:a,"aria-label":ce(n,"previous"),className:h("ChevronIconWrapper",{disabled:n}),children:e.jsx(ie,{icon:"ChevronLeft",className:re(n)})}),e.jsxs("span",{className:h("RankInfo"),children:[t,"  of  ",s]}),e.jsx(se,{to:o,"aria-label":ce(l,"next"),className:h("ChevronIconWrapper",{disabled:l}),children:e.jsx(ie,{icon:"ChevronRight",className:re(l)})})]})},Pt={buy:"PURCHASE TO VIEW",register:"REGISTER TO VIEW",access:"VIEW NOW"},V={paid:{accessRequired:{title:"Want to view this premium content?",description:"Purchase required for full access."},consentRequired:{title:"Premium Content Purchased",description:"Complete activation for full access."}},unpaid:{accessRequired:{title:"Want to view this content?",description:"Register for full access."},consentRequired:{title:"Want to view this content?",description:"Complete activation for full access."}}},Gt=({title:t,uid:s,mobileTitle:o,parentPage:a,rank:n,commonRank:l,nextPageUrl:r,prevPageUrl:m,featuredImage:d,socialShare:j,socialVariant:g,sponsored:x,summary:T,tableData:c,footnote:y,paidGating:b,isUserEntitled:u=!1,isGatedAsPaid:S=!1,errorModal:C,additionalGatingSettings:i})=>{const{brand:A}=D.useAuth(),{pathname:f,key:B}=K(),E=Be(),[R,v]=F.useState(""),k={...V,paid:{accessRequired:Z(A,V.paid.accessRequired),consentRequired:V.paid.consentRequired}};F.useEffect(()=>{v(window.location.href)},[f]);const N=e.jsx(vt,{rank:n,commonRank:l,prevPageUrl:m,nextPageUrl:r}),G=c.filter(Ce=>Ce.type==="table"),{gatingState:L,displayedText:U,sectionText:I,isGatedFormShown:p,isButtonDisabled:be,loginButtonDescription:fe,handleLoginButtonClick:Te,handleGatingButtonClick:ye,handleExternalFormSuccess:Ee,handleExternalFormClose:je}=Q({paidGating:b,gatingButtonText:Pt,gatingSectionText:k,sponsored:x,uid:s,isUserEntitled:u,errorOccurred:!1,isGatedAsPaid:S,additionalGatingSettings:i,contentType:P.ENHANCED_LIST_CHILD_PAGE,onClick:()=>{de({data:{action:"View Intent",name:t||"",url:""},event:Y.ENHANCED_LIST_CHILD_PAGE,_clear:!0})},onAddToCart:()=>{le({pathname:f,title:t,paidGating:b})}});return e.jsxs("div",{"data-template":"enhanced-list-child-page",className:h(),children:[e.jsx(w.Slot,{className:h("TopAd"),pos:"728_1v"}),e.jsx(w.Slot,{pos:"wallpaper_v"}),e.jsx(w.Slot,{pos:"oop_v"}),e.jsx(w.Slot,{pos:"floor_v"}),e.jsx(ct,{body:e.jsx(e.Fragment,{children:e.jsxs("div",{className:h("Wrapper"),children:[e.jsx(ut,{title:t,mobileTitle:o,additionalInfo:N,featuredImage:d,socialShare:j,socialVariant:g,sponsored:x,categoryTag:a.title,categoryTagUrl:a.link,isOnTopOfPage:!0,gatingLabel:e.jsx(gt,{isPaidContent:b?.isPaidContent,isSponsored:x?.isSponsored,gateWithSiteReg:x?.gateWithSiteReg})}),T.length>0&&e.jsx("p",{className:h("Summary"),"data-testid":"article-summary",children:T}),e.jsxs("div",{className:h("TableSection"),children:[L===J.UNBLOCKED&&e.jsxs(e.Fragment,{children:[e.jsx(we,{content:G,layoutNoSidebar:!0}),y&&e.jsx("p",{className:h("Footnote"),children:y})]}),e.jsx("div",{className:h("ButtonWrapper"),children:e.jsx(M,{size:"large",variant:"primary-filled",className:h("Button"),url:a.link,buttonLikeAnchor:!0,target:"_self",children:"Full list"})})]}),e.jsx("div",{children:e.jsx(Me,{itemUrl:R})})]})})}),L!==J.UNBLOCKED&&e.jsx(mt,{onClose:()=>E(a.link),children:e.jsxs(pe,{children:[e.jsx(X,{gatingTitle:I.title,gatingDescription:I.description}),e.jsxs(ee,{children:[e.jsx("div",{className:q("GatingButton"),children:e.jsx(M,{automationId:"gatedEcomButton",size:"medium",variant:"primary-filled",disabled:be,onClick:ye,children:U})}),e.jsx(te,{onClick:Te,description:fe})]})]})}),p&&e.jsx(ae,{onSuccess:Ee,onClose:je,contentType:P.ENHANCED_LIST_CHILD_PAGE,contentUid:s}),e.jsx(Xe,{...C},B),e.jsx(w.Slot,{pos:"728_2v"}),e.jsx(w.Slot,{pos:"adhesion_v"})]})},Lt=["slideshow","article","document","webinar","journal","recipe","multi_section_article","enhanced_list_child_page"],Se=({data:t})=>{if(!t)return[];const s=t.metadata?.type==="topic",o=Lt.includes(t.metadata?.type);let a=s?t.template?.contents?.[0]?.thumbnail?.src:t.template?.featuredImage?.src;!a&&o&&(a=t.siteSetting?.placeholderImages.brand||"");const n=!s&&t.metadata?.type!=="slideshow",l=a?De({urls:[a],...n&&{options:{width:1280,format:"jpg"}}}):[],r=t.template?.pagination;if(r?.currentPage&&r?.currentPage>1)return St({seo:t.seo,paginationPageData:{entryTitle:t.template?.title,pagination:r},schema:t.schema,imagesToPreload:l});const m=t.seo?.metaDescription||bt(t),d=t.metadata?.type==="topic"?oe.WEBSITE:oe.ARTICLE;return ft({seo:{...t.seo,metaDescription:m},contentType:d,schema:t.schema,imagesToPreload:l,...t.template.title==="Cash Grain Bids"&&{pageName:"cashGrainBids"}})},Ba={getMeta:Se},Ra=Re(function(){const s=ve(),o=pt("topic.slug",s);xt(s.ruid,Se({data:s}),o);const{metadata:a,template:n,iirisRecommendationConfig:l,gtm:r,isRequestedByGoogleBot:m,isUserEntitled:d,isBridgedMediaEnabled:j,siteSetting:g}=s,{authenticationStatus:x}=Pe(),{pathname:T}=K(),c=Ge(),[y]=Le(),b=y.get("hideAds"),{subBrand:u,hideAdsForSimplifiedPage:S,brand:C}=ke(Ne),i=n;ht({modules:i?.sidebarModules||[]});const A=!!n?.sponsored?.isSponsored,f=i?.seriesTaxonomy&&i.seriesTaxonomy.length>0?H(i.seriesTaxonomy[0].title):"",B=i?.programTaxonomy&&i.programTaxonomy.length>0?H(i.programTaxonomy[0].programName):"",E=S&&b==="true"&&(a.type==="document"||a.type==="webinar")||he(n),R=a.type,v={type:"topic-slug",topic:a.type==="topic"?c.topic:(i.topicSelector?.mainTopic.url||"/").replace(/^\//,""),slug:c.slug,contentId:a.uid,aid:a.aid,contentType:R,isSponsored:A,pterm:a.pterm,contentFormat:a.contentFormat,buyersJourney:a.buyersJourney,contributor:a.contributor,gatedWithExternalForm:a.gatedWithExternalForm,gatedWithSiteReg:a.gatedWithSiteReg,paidGating:a.paidGating,sponsorName:a.sponsorName,seriesName:f,programName:B,reg:x,kw:(i?.keywords??[]).map(L=>H(L.title)),hideAds:E},k={type:"enhanced-list-child-page",topic:c.topic,reg:x},{adUnitPathCode:N}=We(a.type==="enhanced_list_child_page"?k:v);Oe.useLoadEvent({...r.loadEvent,pageInfo:{...r.loadEvent.pageInfo,adUnitPathCode:N}},()=>{qe({paidGating:i.paidGating,isUserEntitled:d,pathname:T,title:i.title})});const{setReload:G}=yt(C,a?.uid);return Fe.push(Tt(G)),a?e.jsxs(Ue,{config:l,children:[a.type==="article"&&e.jsx(jt,{...n,subBrand:u?n.subBrand:null,isRequestedByGoogleBot:m,isUserEntitled:d,isBridgedMediaEnabled:j,siteSettings:g},c.slug),a.type==="journal"&&e.jsx(et,{...n,subBrand:u?n.subBrand:null,isRequestedByGoogleBot:m,siteSettings:g},c.slug),a.type==="recipe"&&e.jsx(tt,{...n,subBrand:u?n.subBrand:null,isRequestedByGoogleBot:m},c.slug),a.type==="document"&&e.jsx(Rt,{...n,subBrand:u?n.subBrand:null,isUserEntitled:d,siteSettings:g},c.slug),a.type==="podcast"&&e.jsx(at,{...n,subBrand:u?n.subBrand:null,isUserEntitled:d,siteSettings:g},c.slug),a.type==="slideshow"&&e.jsx(nt,{...n,subBrand:u?n.subBrand:null,isUserEntitled:d,siteSettings:g},c.slug),a.type==="video"&&e.jsx(st,{...n,subBrand:u?n.subBrand:null,isUserEntitled:d,siteSettings:g},c.slug),a.type==="webinar"&&e.jsx(it,{...n,subBrand:u?n.subBrand:null,isUserEntitled:d,siteSettings:g},c.slug),a.type==="multi_section_article"&&e.jsx(ot,{...n,subBrand:u?n.subBrand:null,isRequestedByGoogleBot:m,isUserEntitled:d,siteSettings:g},c.slug),a.type==="topic"&&e.jsx(dt,{...n}),a.type==="enhanced_list_child_page"&&e.jsx(Gt,{...n},c.slug)]}):e.jsx("div",{children:"Live preview init..."})});export{Ga as ErrorBoundary,Ra as default,Ba as handle,Se as meta}; //# sourceMappingURL=_topic._slug._index-YXwAxQUp.js.map