1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t}from"./vendor-html-parser-DOJ8foyv.js";import{i as n,t as r}from"./vendor-react-BREUBCH4.js";import{a as i}from"./vendor-react-router-C-6Wf3r1.js";import{$ as a,pt as o,zt as s}from"./errorBoundary-DfVczMbW.js";var c=r(),l={CONTENT_PAGE:`Newsletter Subscription from Content Page`,CONTENT_PAGE_RSB:`Newsletter Subscription from Content Page RSB`,HOME_PAGE:`Newsletter Subscription from Home page`,SITE_REGISTRATION:`Newsletter Subscription after Site Registration`,MENU_SECTIONS:`Newsletter subscription from Menu sections`,FOOTER:`Newsletter subscription from Footer`,SUBSCRIPTION_PAGE:`Newsletter subscription from the subscription page`,SUBSCRIPTION_MODULE:`Newsletter subscription from subscription module`},u={HEADER_MEGA_MENU:`Site Registration`,UNPAID_GATED_IIRIS:`Unpaid Gated with IIRIS content via Reg`,UNPAID_GATED_IIRIS_EXTERNAL_FORM:`Unpaid Gated with IIRIS and External form content via Reg`,PAID_GATED:`Site Registration for Paid Content Access`,PAID_PRODUCT_TAXONOMY:`Paid Product via Reg`},d=(e={})=>{let{isGatedContent:t,isGatedAsPaid:n,isExternalFormFlow:r,isPaidProductTaxonomy:i}=e;return n&&!i?u.PAID_GATED:t&&r?u.UNPAID_GATED_IIRIS_EXTERNAL_FORM:t?u.UNPAID_GATED_IIRIS:i?u.PAID_PRODUCT_TAXONOMY:u.HEADER_MEGA_MENU},f={NEWSLETTER_SUBSCRIBE:`NewsletterSubscribeTransaction`,SITE_REGISTRATION:`SiteRegistrationTransaction`,LEAD_GEN:`LeadGenTransaction`},p={transactionInitiated:`success`,formSubmitted:`N/A`,submissionSucceeded:`N/A`,formHTMLName:`N/A`,elnPackageVersion:`N/A`},m=e=>({...p,formInstanceName:e===s.BIO_PROCESS_INTERNATIONAL?`Hubspot`:`Netline`}),h={transactionInitiated:`success`,formSubmitted:`incomplete`,submissionSucceeded:`incomplete`},g={Eloqua:`Lead Gen from Eloqua form`,Hubspot:`Lead Gen from Hubspot form`},_={LIVE_WEBINAR:`Live Webinar`,ON_DEMAND_WEBINAR:`On-Demand Webinar`},v={NewsletterSubscription:`NewsletterSubscription`,SiteRegistration:`IIRIS Site Registration`,LeadGen:g.Eloqua},y={siteRegSource:`IIRIS Passport`,userLoggedIn:`Logged In`,transactionInitiated:`success`,transactionCompletionStatus:`success`,downstreamUpdateStatus:`success`},b={transactionCompletionStatus:`failure`,downstreamUpdateStatus:`incomplete`},x={transactionCompletionStatus:`success`,downstreamUpdateStatus:`failure`},S={[s.AI_BUSINESS]:`Tech`,[s.THE_AESTHETIC_GUIDE]:`Connect`,[s.BATTERY_TECH]:`Markets`,[s.BEEF_MAGAZINE]:`Markets`,[s.BIO_PROCESS_INTERNATIONAL]:`Connect`,bioprocessintl:`Connect`,[s.BIO_XCONOMY]:`Connect`,[s.BIZ_BASH]:`Connect`,[s.CATERSOURCE]:`Connect`,[s.CONNECTING_AFRICA]:`Connect`,[s.CONTENT_MARKETING_INSTITUTE]:`Festivals`,[s.DARK_READING]:`Tech`,[s.DATA_CENTER_KNOWLEDGE]:`Tech`,[s.DESIGN_NEWS]:`Markets`,[s.EV_INFRASTRUCTURE_NEWS]:`Markets`,[s.FARM_PROGRESS]:`Markets`,[s.FEED_STUFFS]:`Markets`,[s.FI_GLOBAL]:`Markets`,[s.FIN_TECH_FUTURES]:`Festivals`,[s.FOOD_SERVICE_DIRECTOR]:`Connect`,[s.GAME_DEVELOPER]:`Tech`,[s.INFORMATION_WEEK]:`Tech`,[s.INSIDE_SELF_STORAGE]:`Markets`,[s.LICENSE_GLOBAL]:`Markets`,[s.LIGHT_READING]:`Tech`,[s.MDDI]:`Markets`,[s.NATIONAL_HOG_FARMER]:`Markets`,[s.NATION_S_RESTAURANT_NEWS]:`Connect`,[s.NEW_HOPE]:`Markets`,[s.NO_JITTER]:`Tech`,[s.ORGANIC_PRODUCE_NETWORK]:`Markets`,[s.PACKAGING_DIGEST]:`Markets`,[s.PLASTICS_TODAY]:`Markets`,[s.POWDER_BULK_SOLIDS]:`Markets`,[s.SEATRADE_CRUISE]:`Markets`,[s.SEATRADE_MARITIME]:`Markets`,[s.SOLAR_POWER_PORTAL]:`Markets`,[s.SUPERMARKET_NEWS]:`Connect`,[s.SUPPLY_SIDE_FBJ]:`Markets`,[s.SUPPLY_SIDE_SJ]:`Markets`,[s.TELECOMS]:`Tech`,[s.TRADE_SHOW_NEWS_NETWORK]:`Connect`,[s.URGENT_COMMS]:`Tech`,[s.VITA_FOODS_INSIGHTS]:`Markets`,[s.WASTE360]:`Markets`,[s.WEALTH_MANAGEMENT]:`Connect`,[s.WORLD_HEALTH_EXHIBITIONS_INSIGHTS]:`Markets`},ee=`/api/track-transaction`,te=e=>{let t=C(e.siteName);return{...e,divisionId:t,...typeof window<`u`&&{origin:window.location.origin,siteUrl:window.location.origin,actionPoint:e.actionPoint||window.location.href}}},C=e=>e&&S[e]||`N/A`,w=()=>({...o()}),T=(e,t)=>{let n=(0,c.c)(4),r=i(),a;return n[0]!==r||n[1]!==t||n[2]!==e?(a=n=>{let i=te({...t,eventType:e,date:new Date().toUTCString(),...n});r.submit(i,{method:`POST`,action:`/api/track-transaction`,encType:`application/json`})},n[0]=r,n[1]=t,n[2]=e,n[3]=a):a=n[3],a},E=e(t()),D=(e,t)=>n=>{let r=te({...t,eventType:e,date:new Date().toUTCString(),...n}),i=new Blob([JSON.stringify(r)],{type:`application/json`});navigator.sendBeacon(ee,i)},O=(e,t,n,r)=>{let i=(0,c.c)(11),a;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={},i[0]=a):a=i[0];let o=(0,E.useRef)(a),s;i[1]!==t||i[2]!==e?(s=D(e,t),i[1]=t,i[2]=e,i[3]=s):s=i[3];let l=s,u;i[4]!==r||i[5]!==n||i[6]!==l?(u=()=>{n().then(e=>{o.current=e});let e=()=>{document.visibilityState===`hidden`&&l({...o.current,...r})};return window.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},i[4]=r,i[5]=n,i[6]=l,i[7]=u):u=i[7];let d;i[8]!==r||i[9]!==n?(d=[n,r],i[8]=r,i[9]=n,i[10]=d):d=i[10],(0,E.useEffect)(u,d)},k=e(n()),A=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};
1function j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var ne={exports:{}},M={},re;function ie(){if(re)return M;re=1;var e=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.fragment`);function n(t,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:i,ref:n===void 0?null:n,props:r}}return M.Fragment=t,M.jsx=n,M.jsxs=n,M}var ae;function oe(){return ae||(ae=1,ne.exports=ie()),ne.exports}var N=oe(),P=(e=>(e.REQUIRED=`IsRequiredCondition`,e.URL=`PreventUrlCondition`,e.XSS=`PreventXSSCondition`,e.LENGTH=`TextLengthCondition`,e.EMAIL=`IsEmailAddressCondition`,e.IFOTHER=`IsIfOtherFieldCondition`,e.NUMBERS_ONLY=`IsNumbersOnlyCondition`,e.ALLOW_EMPTY=`IsAllowedEmptyCondition`,e.CUSTOM_CONDITION=`IsCustomCondition`,e))(P||{}),F=(e=>(e.ELOQUA=`ELOQUA`,e.HUBSPOT=`HUBSPOT`,e))(F||{}),se=(e=>(e.DISPLAY=`DISPLAY`,e))(se||{}),I=(e=>(e.STATE=`state`,e.COUNTRY=`country`,e.CONSENT=`consent`,e.THIRD_PARTY_CONSENT=`thirdPartyConsent`,e.NEWSLETTER_LIST=`newsletterList`,e.EMAIL_ADDRESS=`emailAddress`,e.BUSINESS_EMAIL=`business_email`,e.MARKETO_EMAIL=`Email`,e.MARKETO_COUNTRY=`Country`,e.HUBSPOT_EMAIL=`email`,e))(I||{}),L=(e=>(e[e.COLLAPSED=1]=`COLLAPSED`,e[e.EXPANDED=2]=`EXPANDED`,e[e.STATE=3]=`STATE`,e[e.CONSENT=4]=`CONSENT`,e[e.SUCCESS=5]=`SUCCESS`,e))(L||{}),ce=`contact_url_confirm`,le=`eln-hp-contact`,ue=`[data-eln-honeypot]`,R={position:`absolute`,left:`-9999px`,width:`1px`,height:`1px`,overflow:`hidden`},de={CONTAINER_DIV:`eln-newsletter-success-container`,PLAIN_TEXT:`eln-newsletter-success-paragraph-text`,EMPHASIS_TEXT:`eln-newsletter-success-emphasis-text`,THANKYOU_TITLE:`eln-newsletter-success-title`,BUTTON:`eln-newsletter-success-button`},fe={CONTAINER_DIV:`eln-error-container`,PLAIN_TEXT:`eln-error-paragraph-text`,ERROR_TITLE:`eln-error-title`,BUTTON:`eln-error-button`},z={CONTAINER:`eln-newsletter-formlayout-container`,SUBMIT_CONTAINER:`eln-newsletter-formlayout-submit-container`},pe={CONTAINER:`eln-newsletter-consent-container`,THIRD_PARTY_CONTAINER:`eln-third-party-consent-container`,A:`eln-third-party-consent-a`,P:`eln-third-party-consent-p`},B={CONTAINER:`eln-newsletter-newsletterlist-container`,ITEM:`eln-newsletter-newsletterlist-item`,TITLE:`eln-newsletter-newsletterlist-title`,INPUT_CONTAINER:`eln-newsletter-newsletterlist-input-container`,CONTENT_CONTAINER:`eln-newsletter-newsletterlist-content-container`,FREQUENCY:`eln-newsletter-newsletterlist-frequency`,FREQUENCY_A:`eln-newsletter-newsletterlist-frequency-a`,FREQUENCY_P:`eln-newsletter-newsletterlist-frequency-p`},V={FORM:`eln-newsletter-form`,CONTAINER:`eln-newsletter-form-container`,TEXT_INPUT_FRAGMENT:`eln-newsletter-form-text-input-fragment`,LABEL_FRAGMENT:`eln-newsletter-form-label-fragment`,SELECT_INPUT_FRAGMENT:`eln-newsletter-form-select-input-fragment`,CHECKBOX_INPUT_FRAGMENT:`eln-newsletter-form-checkbox-input-fragment`,SELECT_STATE_PROVINCE_HIDDEN:`eln-newsletter-form-select-state-province-hidden`,SELECT_MULTIPLE:`eln-newsletter-form-select-multiple`,VALIDATION_HEADER:`eln-form-validation-header`,VALIDATION_ERRORED_FIELD:`eln-form-errored-field`,VALIDATION_ERROR_NEWSLETTER:`eln-newsletter-error`,SELECT_ELEMENT:`eln-newsletter-form-select-element`,SELECT_OPTION_ELEMENT:`eln-newsletter-form-select-option-element`,INPUT_ELEMENT:`eln-newsletter-form-input-element`,A:`eln-newsletter-form-a`,P:`eln-newsletter-form-p`,CHECKBOX_CONTAINER:`eln-newsletter-form-checkbox-container`,RADIO_OPTION_ELEMENT:`eln-newsletter-form-radio-option-element`,CAPTCHA:`eln-newsletter-form-captcha`,CAPTCHA_CONTAINER:`eln-newsletter-form-captcha-container`},me={CONTAINER:`eln-ui-spinner-container`,LOADING:`eln-ui-spinner-loading`},H=(e=>(e.ERROR=`ERROR`,e.PENDING=`PENDING`,e.SUCCESS=`SUCCESS`,e.NEW=`NEW`,e))(H||{}),U={CONTAINER:`eln-entitlement-formlayout-container`,TITLE:`eln-entitlement-formlayout-title`,DESCRIPTION:`eln-entitlement-formlayout-description`,HUBSPOT_HELPER_TEXT_WRAPPER:`eln-entitlement-formlayour-helper-text-wrapper`,HUBSPOT_HELPER_TEXT_LINKS:`eln-entitlement-formlayour-helper-text-links`},he=[`company`,`job_title`,`areaResponsibility`,`job_level`,`company_
1size`,`annualSales`,`C_BusPhone`],ge=[`state_or_province`,`state`,`typeConcept`,`type_concept`,`responsibilitiesOther`,`complianceOther`,`technologyRequirementsOther`,`State`],_e={nrn:[`company`,`job_title`,`areaResponsibility`,`job_level`,`company_size`,`annualSales`,`C_BusPhone`]},ve={nrn:[`typeConcept`,`type_concept`],bioprocessintl:[`state_or_province`,`state`,`State`]},ye={foodbeverageinsider:`Food & Beverage Insider`,naturalproductsinsider:`Natural Products Insider`,newhope:`New Hope Network`,licenseglobal:`License Global`,designnews:`Design News`,batterytech:`Battery Tech`,powderbulksolids:`Powder Bulk Solids`,packagingdigest:`Packaging Digest`,plastictoday:`Plastics Today`,mddi:`MDDI`,constructionext:`Construction Next (WOC360, Roofing, PoolSpaPro)`,waste360:`Waste360`,insideselfstorage:`Inside Self Storage`,supermarketnews:`Supermarket News`,organicproducenetwork:`Organic Produce Network`,seatradecruise:`Seatrade Cruise News`,seatrademaritime:`Seatrade Maritime News`,supplysidesj:`SupplySide Supplement Journal`,supplysidefbj:`SupplySide Food & Beverage Journal`,figlobal:`Fi Global Insights`,vitafoodsinsights:`Vitafoods Insights`,specialevents:`Special Events`,catersource:`Catersource`,worldhealthexhibitions:`World Health Expo Insights`,nrn:`Nation's Restaurant News`,wealthmanagement:`Wealth Management`,contentmarketinginstitute:`Content Marketing Institute`,foodservicedirector:`FoodService Director`},be=`Please choose first party consent agreement`,xe=`Please choose consent agreement`,Se={[F.ELOQUA]:{business_email:`business_email`,first_name:`first_name`,last_name:`last_name`,country:`country`,state:`state`,firstPartyConsent:`firstPartyConsent`,thirdPartyConsent:`thirdPartyConsent`},[F.HUBSPOT]:{email:`business_email`,firstname:`first_name`,lastname:`last_name`,country:`country`,state:`state`,first_party_consent:`firstPartyConsent`,third_party_consent:`thirdPartyConsent`}},Ce={wealthmanagement:[`cfpBoardID`,`crd_id`]},we={cfpBoardID:{messageOverride:`Invalid CFP ID entry`,rules:[{type:P.NUMBERS_ONLY,message:`This field requires numberic characters only`},{type:P.ALLOW_EMPTY,message:``}]},crd_id:{messageOverride:`Invalid CRD ID entry`,rules:[{type:P.LENGTH,message:`Invalid number of characters`,minimum:`6`,maximum:`7`},{type:P.NUMBERS_ONLY,message:`This field requires numberic characters only`},{type:P.ALLOW_EMPTY,message:``}]}},Te=[`business_email`],Ee=[`country`],De=`Access granted`,Oe=`Your account gives you access to this content.`,ke=e=>{let t=document.cookie.split(`; `).map(e=>{let[t,n=``]=e.split(/=(.*)/s);return[decodeURIComponent(t),decodeURIComponent(n)]});return Object.fromEntries(t)[e]||null},Ae=()=>{let e=ke(`utm_parameters`);return e?e.split(`,`).map(e=>{let[t,...n]=e.split(`:`);return[t,n.join(`:`)]}).map(([e,t])=>({key:e,value:t})):[]},je=()=>Ae().reduce((e,{key:t,value:n})=>(t&&!(t in e)&&(e[t]=n),e),{}),Me=`0.8.20`,Ne=()=>a.create({headers:{"x-eln-fe-version":Me}}),W=(e,t,n,r,i)=>{let a={data:{type:n,id:r},gatingAction:i},o=[...Ae()];return{data:{id:e,type:`gated-content-form-data`,attributes:{dynamicFields:[],thirdPartyConsent:!1,emailAddress:e},relationships:{gatedContent:a,user:{data:{id:t}},form:{data:{type:`forms`,id:``}}}},meta:{tracking:o}}},Pe=(e,t)=>{if(!t)return e;let n=new URLSearchParams;Object.entries(t).forEach(([e,t])=>{t!=null&&t!==``&&n.set(e,String(t))});let r=n.toString();return r?`${e}?${r}`:e},Fe=e=>Le(e)&&!e.attributes.elements.some(e=>e.fieldName===`is_new_form`),Ie=(e,t)=>t&&e===`wealthmanagement`,Le=e=>e.formType===F.HUBSPOT,Re=(e,t)=>{let n=[`sponsor_name`,`sponsorname`];return e.map(e=>(n.includes((e?.fieldName)?.toLowerCase())&&(e.value=t),e))},ze=e=>!e||Object.keys(e).length===0,Be=(e,t)=>e?.find(e=>e?.fieldName===t)?.value||``,Ve=e=>{let t=_e[e]||[],n=ve[e];return n?[...t,...ge.filter(e=>!n.includes(e))]:[...t,...ge]},He=(e,t)=>({industry:e.industries||e.business_types,job_function:e.job_functions,JF_JobFunction:e.job_functions})[t];function Ue(e){let t=(e||``).toLowerCase();return![`testautomation`,`testautomationuat`].includes(t)}var We=(e,t)=>({wealthmanagement:{primaryBusinessClass:t.primaryBusiness||t.primaryBusinessClass||``,primaryBusiness:t.primaryBusiness||t.primaryBusinessClass||``}})[e]||void 0,Ge=e=>e?.toUpperCase()??F.ELOQUA,Ke=(e,t)=>[`article`].includes(e)&&t,qe=e=>e===I.EMAIL_ADDRESS||e===I.BUSINESS_EMAIL||e===I.MARKETO_EMAIL||e===I.HUBSPOT_EMAIL,Je=({forceThirdPartyConsentAsFalse:e=!1,elements:t})=>e&&!(t!=null&&t.length),Ye=e=>e instanceof Error?e:Error(String(e)),Xe=(e,t)=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n},Ze=e=>typeof e!=`string`||!e?``:e.includes(`-`)?e.split(`-`)[1]??``:e,Qe=class{constructor(e,t,n,r,i,a,o,s){this.getPlatformApiServiceHeaders=()=>{var e;let t={Authorization:this.authorization||`Bearer anonymous`,"Content-Type":`application/json`,"x-site-id":this.siteId.toLowerCase(),"x-product-id":this.productId,...typeof window<`u`&&{"X-Origin-Url":window.location.href}};return(e=this.iirisUserProfile)!=null&&e.id&&(t[`x-iiris-id`]=this.iirisUserProfile.id),this.subBrandId&&(t[`x-sub-brand-id`]=this.subBrandId),t},this.getFormFieldValueByName=(e,t)=>
1{let n=t?.find(t=>t.htmlName===e);return n?n.value:``},this.mapDataAttributes=e=>e.formFields?{emailAddress:this.getFormFieldValueByName(`emailAddress`,e.formFields),firstName:this.getFormFieldValueByName(`firstName`,e.formFields),lastName:this.getFormFieldValueByName(`lastName`,e.formFields),country:this.getFormFieldValueByName(`country`,e.formFields),job:this.getFormFieldValueByName(`job`,e.formFields),company:this.getFormFieldValueByName(`company`,e.formFields),industry:this.getFormFieldValueByName(`industry`,e.formFields),state:this.getFormFieldValueByName(`state`,e.formFields),JF_JobFunction:this.getFormFieldValueByName(`JF_JobFunction`,e.formFields),phone:this.getFormFieldValueByName(`phone`,e.formFields),consent:e.firstPartyConsent}:{},this.buildNewsletterSubscriptionPayload=(e,t,n,r)=>{let i=this.getEmailAddress(e,n),{formFields:a}=e,o=e.newsletterList.map(e=>({data:{type:`newsletters`,id:e}})),s=[];r&&a&&(s=r.filter(e=>e.elementType!==`text`&&e.elementType!==`button`&&a.some(({htmlName:t})=>t===e.fieldName)).map(e=>{let t=a.find(t=>t.htmlName===e.fieldName);return{questionCode:e.fieldName,questionText:e.label,answer:t.value}}));let c=[...Ae()],l=n?{}:this.mapDataAttributes(e),u={data:{id:i,type:`newsletter-subscriptions`,attributes:{dynamicFields:s,...l,...e.honeypot===void 0?{}:{honeypot:e.honeypot}},relationships:{user:n?this.getUserRelationship(n):null,newsletters:o,form:this.getFormRelationship(e.formId),userProfileForm:this.getFormRelationship(e.formId)}},meta:{tracking:c},captchaToken:t,context:this.context};return t&&(u.captchaToken=t),u},this.putNewslettersSubscription=async(e,t,n,r,i)=>{let a=e.emailAddress||this.getEmailAddress(e,n);return Ne().put(`${this.platformServiceBaseUrl}/newsletter-subscriptions/${a}`,{...this.buildNewsletterSubscriptionPayload(e,t,n,r)},{headers:{...this.getPlatformApiServiceHeaders(),"x-reg-event":i||!1}})},this.buildGatedContentPayload=(e,t,n,r,i)=>{let a={data:{type:e.contentType,id:e.contentId},gatingAction:e.gatingAction},o=[];n&&r&&(o=n.filter(e=>e.elementType!==`text`&&e.elementType!==`button`).map(e=>{let t=r.find(t=>t.htmlName===e.fieldName).value;return{questionCode:(e.fieldNamePrefix||``)+e.fieldName,questionText:e.label,answer:t}}));let s=this.getEmailAddress(e,t),c=[...Ae()],l=t?{}:this.mapDataAttributes(e),u={data:{id:s,type:`gated-content-form-data`,attributes:{dynamicFields:o,thirdPartyConsent:e.thirdPartyConsent,...l,emailAddress:s,...e.honeypot===void 0?{}:{honeypot:e.honeypot}},relationships:{gatedContent:a,user:t?this.getUserRelationship(t):null,form:this.getFormRelationship(e.formId)}},captchaToken:i,meta:{tracking:c}};return i&&(u.captchaToken=i),u},this.submitGatedContentFormData=async(e,t,n,r,i)=>Ne().post(`${this.platformServiceBaseUrl}/gated-content-form-data`,{...this.buildGatedContentPayload(e,t,n,r,i)},{headers:{...this.getPlatformApiServiceHeaders()}}),this.getFormById=async(e,t=!1,n)=>Ne().get(`${this.platformServiceBaseUrl}/forms/${e}`,{headers:{...this.getPlatformApiServiceHeaders(),"x-reg-event":t,...n}}).then(e=>e.data.data),this.getNewsletterData=async e=>{let t=Pe(this.platformServiceBaseUrl+`/newsletters`,e.filters),n=(await Ne().get(t,{headers:{...this.getPlatformApiServiceHeaders(),"x-reg-event":e.isRegisterEvent}})).data.data;return Array.isArray(n)&&n.length>0?{form_id:n[0].relationships.form.data.id,form_storage:n[0].relationships.form.data.formStorage,newsletters:n.map(e=>({title:e.title,newsletter_code:e.id,newsletter_description:e.description,frequency_description:e.frequency,sample_url:{title:e.sample?.title,href:e.sample?.link}}))}:{form_id:``,form_storage:``,newsletters:[]}},this.getEntitlementData=async(e,t)=>{let n=await Ne().get(this.platformServiceBaseUrl+`/${e}/${t}`,{headers:{...this.getPlatformApiServiceHeaders()}}),r=n?.data?.data?.attributes||{},i=n?.data?.config;return i.attributes=r,i},this.getEntitlementFormConfiguration=async()=>(await Ne().get(this.platformServiceBaseUrl+`/entitlement-form-configuration`,{headers:{...this.getPlatformApiServiceHeaders()}}))?.data,this.getUserRelationship=e=>({data:{type:`users`,id:e.id}}),this.getFormRelationship=e=>({data:{type:`forms`,id:e}}),this.platformServiceBaseUrl=`${e}/${a||`v1`}`,this.siteId=t,this.authorization=n,this.context=r,this.subBrandId=i,this.iirisUserProfile=o,this.productId=s||``}getEmailAddress(e,t){return t?t.business_email:this.getFormFieldValueByName(`email`,e.formFields)||this.getFormFieldValueByName(`Email`,e.formFields)||this.getFormFieldValueByName(`emailAddress`,e.formFields)||this.getFormFieldValueByName(`business_email`,e.formFields)||this.getFormFieldValueByName(`USER_PROFILE_emailAddress`,e.formFields)||this.getFormFieldValueByName(`USER_PROFILE_business_email`,e.formFields)}},$e=async e=>{var t;let n=new Qe(e.platformServiceBaseUrl,e.clientId,e.authorization,e.context,e.subBrandId,e.version,void 0,e.productId),r={filters:{tag:e.newsletterTag||``,state:e.countryState||``,shouldUseAlternativeForm:e.context?.shouldUseAlternativeForm??!1,...e.newsletterVariant&&{newsletterVariant:e.newsletterVariant}},isRegisterEvent:e.isOpenOnRegister||!1},i=await n.getNewsletterData(r),a;return i.form_id&&!e.iirisUserProfile&&(a=(await n.getFormById(i.form_id,e.isOpenOnRegister,{"x-subscription-event":!0}))?.formType),{...je(),elnPackageVersion:Me,formInstanceName:a,formHTMLName:i?.form_id||``,userLoggedIn:(t=e.iirisUserProfile)!=null&&t.id?`Logged In`:`Anonymous`}},et=async e=>{let t=new Qe(e.platformServiceBaseUrl,e.clientId,e.authorization,void 0,e.subBrandId,e.version,e.iirisUserProfile,e.productId),n=await t.getEntitlementFormConfiguration(),r=e.formId||n?.default_gating_form,i;return r&&(i=(await t.getFormById(r,!1,{"x-content-type":e.contentType}))?.formType),{...je(),elnPackageVersion:Me,formInstanceName:i||`Eloqua`,formHTMLName:r||``,userLoggedIn:e.authorization?`Logged In`:`Anonymous`}},tt=class{constructor(){this.validateFormField=(e,t,n=``)=>{var r;let i=t.validations,a=[];if((r=t.validations)!=null&&r.some(e=>e.type===P.ALLOW_EMPTY)&&!e)return[];i?.forEach(n=>{switch(n.type){case P.REQUIRED:return this.isEmpty(e)?a.push(this.errorMessage(n,t)):null;case P.URL:return this.isUrl(e)?a.push(this.errorMessage(n,t)):null;case P.XSS:return this.isXss(e)?a.push(this.errorMessage(n,t)):null;case P.LENGTH:return this.isInvalidLength(e,n.minimum,n.maximum)?a.push(this.errorMessage(n,t,[{name:`minimum`,value:n.minimum},{name:`maximum`,value:n.maximum}])):null;case P.EMAIL:return!this.isEmpty(e)&&this.isInvalidEmail(e)?a.push(this.errorMessage(n,t)):null;case P.NUMBERS_ONLY:return this.isNumeric(e)?null:a.push(this.errorMessage(n,t));case P.IFOTHER:return this.isOther(e)?a.push(this.errorMessage(n,t)):null;default:return null}});let o=this.getFieldCustomOverrideMessage(t,n);return a.length&&o?o:a}
1,this.errorMessage=(e,t,n)=>({code:e.type,message:e.message,params:n||[],formElement:t}),this.isEmpty=e=>e===``,this.isInvalidEmail=e=>!e.match(/(^[A-Z0-9!#$%&'*+\-/=?^_`{|}~][A-Z0-9!#$%&'*+\-/=?^_`{|}~.]{0,62}@(([A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?)(\.[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?)+)$)/i),this.isUrl=e=>!!e.match(/(telnet|ftp|https|http?):\/\/(?:[a-z0-9][a-z0-9-]{0,61}[a-z0-9]\.|[a-z0-9]\.)+[a-z]{2,63}/i),this.isXss=e=>!!e.match(/(<([^>]+)>)/i),this.isInvalidLength=(e,t,n)=>{let r=t?+t:0,i=n?+n:0;return r>i||r===0&&i===0||e.length<r||e.length>i},this.isOther=e=>!!e.match(/^Other.*/i),this.isNumeric=e=>/^\d+$/.test(e),this.getFieldCustomOverrideMessage=(e,t)=>{var n,r;if(!(!((n=Ce[t])!=null&&n.includes(e.fieldName))&&!((r=we[e.fieldName])!=null&&r.messageOverride)))return[{code:P.CUSTOM_CONDITION,message:we[e.fieldName].messageOverride||``,params:[],formElement:e}]}}},nt={exports:{}},rt;function it(){return rt||(rt=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var a=typeof i;if(a===`string`||a===`number`)e.push(i);else if(Array.isArray(i)){if(i.length){var o=n.apply(null,i);o&&e.push(o)}}else if(a===`object`){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes(`[native code]`)){e.push(i.toString());continue}for(var s in i)t.call(i,s)&&i[s]&&e.push(s)}}}return e.join(` `)}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(nt)),nt.exports}var G=j(it()),at={exports:{}};at.exports;var ot;function st(){return ot||(ot=1,function(e,t){var n=`__lodash_hash_undefined__`,r=9007199254740991,i=`[object Arguments]`,a=`[object Array]`,o=`[object Boolean]`,s=`[object Date]`,c=`[object Error]`,l=`[object Function]`,u=`[object Map]`,d=`[object Number]`,f=`[object Object]`,p=`[object RegExp]`,m=`[object Set]`,h=`[object String]`,g=`[object WeakMap]`,_=`[object ArrayBuffer]`,v=`[object DataView]`,y=`[object Float32Array]`,b=`[object Float64Array]`,x=`[object Int8Array]`,S=`[object Int16Array]`,ee=`[object Int32Array]`,te=`[object Uint8Array]`,C=`[object Uint8ClampedArray]`,w=`[object Uint16Array]`,T=`[object Uint32Array]`,E=/[\\^$.*+?()[\]{}|]/g,D=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,k={};k[y]=k[b]=k[x]=k[S]=k[ee]=k[te]=k[C]=k[w]=k[T]=!0,k[i]=k[a]=k[_]=k[o]=k[v]=k[s]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=!1;var j=typeof A==`object`&&A&&A.Object===Object&&A,ne=typeof self==`object`&&self&&self.Object===Object&&self,M=j||ne||Function(`return this`)(),re=t&&!t.nodeType&&t,ie=re&&e&&!e.nodeType&&e,ae=ie&&ie.exports===re,oe=ae&&j.process,N=function(){try{return ie&&ie.require&&ie.require(`util`).types||oe&&oe.b
1inding&&oe.binding(`util`)}catch{}}(),P=N&&N.isTypedArray;function F(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function se(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function I(e){return function(t){return e(t)}}function L(e,t){return e?.[t]}function ce(e,t){return function(n){return e(t(n))}}var le=Array.prototype,ue=Function.prototype,R=Object.prototype,de=M[`__core-js_shared__`],fe=ue.toString,z=R.hasOwnProperty,pe=function(){var e=/[^.]+$/.exec(de&&de.keys&&de.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),B=R.toString,V=fe.call(Object),me=RegExp(`^`+fe.call(z).replace(E,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),H=ae?M.Buffer:void 0,U=M.Symbol,he=M.Uint8Array;H&&H.allocUnsafe;var ge=ce(Object.getPrototypeOf,Object),_e=Object.create,ve=R.propertyIsEnumerable,ye=le.splice,be=U?U.toStringTag:void 0,xe=function(){try{var e=_t(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),Se=H?H.isBuffer:void 0,Ce=Math.max,we=Date.now,Te=_t(M,`Map`),Ee=_t(Object,`create`),De=function(){function e(){}return function(t){if(!Bt(t))return{};if(_e)return _e(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Oe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ke(){this.__data__=Ee?Ee(null):{},this.size=0}function Ae(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}function je(e){var t=this.__data__;if(Ee){var r=t[e];return r===n?void 0:r}return z.call(t,e)?t[e]:void 0}function Me(e){var t=this.__data__;return Ee?t[e]!==void 0:z.call(t,e)}function Ne(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=Ee&&t===void 0?n:t,this}Oe.prototype.clear=ke,Oe.prototype.delete=Ae,Oe.prototype.get=je,Oe.prototype.has=Me,Oe.prototype.set=Ne;function W(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(){this.__data__=[],this.size=0}function Fe(e){var t=this.__data__,n=et(t,e);return n<0?!1:(n==t.length-1?t.pop():ye.call(t,n,1),--this.size,!0)}function Ie(e){var t=this.__data__,n=et(t,e);return n<0?void 0:t[n][1]}function Le(e){return et(this.__data__,e)>-1}function Re(e,t){var n=this.__data__,r=et(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}W.prototype.clear=Pe,W.prototype.delete=Fe,W.prototype.get=Ie,W.prototype.has=Le,W.prototype.set=Re;function ze(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Be(){this.size=0,this.__data__={hash:new Oe,map:new(Te||W),string:new Oe}}function Ve(e){var t=gt(this,e).delete(e);return this.size-=+!!t,t}function He(e){return gt(this,e).get(e)}function Ue(e){return gt(this,e).has(e)}function We(e,t){var n=gt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}ze.prototype.clear=Be,ze.prototype.delete=Ve,ze.prototype.get=He,ze.prototype.has=Ue,ze.prototype.set=We;function Ge(e){var t=this.__data__=new W(e);this.size=t.size}function Ke(){this.__data__=new W,this.size=0}function qe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Je(e){return this.__data__.get(e)}function Ye(e){return this.__data__.has(e)}function Xe(e,t){var n=this.__data__;if(n instanceof W){var r=n.__data__;if(!Te||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ze(r)}return n.set(e,t),this.size=n.size,this}Ge.prototype.clear=Ke,Ge.prototype.delete=qe,Ge.prototype.get=Je,Ge.prototype.has=Ye,Ge.prototype.set=Xe;function Ze(e,t){var n=Pt(e),r=!n&&Nt(e),i=!n&&!r&&Lt(e),a=!n&&!r&&!i&&Ht(e),o=n||r||i||a,s=o?se(e.length,String):[],c=s.length;for(var l in e)o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||bt(l,c))||s.push(l);return s}function Qe(e,t,n){(n!==void 0&&!Mt(e[t],n)||n===void 0&&!(t in e))&&tt(e,t,n)}function $e(e,t,n){var r=e[t];(!(z.call(e,t)&&Mt(r,n))||n===void 0&&!(t in e))&&tt(e,t,n)}function et(e,t){for(var n=e.length;n--;)if(Mt(e[n][0],t))return n;return-1}function tt(e,t,n){t==`__proto__`&&xe?xe(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var nt=ht();
1function rt(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:be&&be in Object(e)?vt(e):Et(e)}function it(e){return Vt(e)&&rt(e)==i}function G(e){return!Bt(e)||Ct(e)?!1:(Rt(e)?me:D).test(jt(e))}function at(e){return Vt(e)&&zt(e.length)&&!!k[rt(e)]}function ot(e){if(!Bt(e))return Tt(e);var t=wt(e),n=[];for(var r in e)r==`constructor`&&(t||!z.call(e,r))||n.push(r);return n}function st(e,t,n,r,i){e!==t&&nt(t,function(a,o){if(i||=new Ge,Bt(a))ct(e,t,o,n,st,r,i);else{var s=r?r(Ot(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),Qe(e,o,s)}},Wt)}function ct(e,t,n,r,i,a,o){var s=Ot(e,n),c=Ot(t,n),l=o.get(c);if(l){Qe(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=Pt(c),p=!f&&Lt(c),m=!f&&!p&&Ht(c);u=c,f||p||m?Pt(s)?u=s:It(s)?u=ft(s):p?(d=!1,u=q(c)):m?(d=!1,u=dt(c)):u=[]:J(c)||Nt(c)?(u=s,Nt(s)?u=Ut(s):(!Bt(s)||Rt(s))&&(u=yt(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),Qe(e,n,u)}function lt(e,t){return kt(Dt(e,t,qt),e+``)}var K=xe?function(e,t){return xe(e,`toString`,{configurable:!0,enumerable:!1,value:Kt(t),writable:!0})}:qt;function q(e,t){return e.slice()}function ut(e){var t=new e.constructor(e.byteLength);return new he(t).set(new he(e)),t}function dt(e,t){var n=ut(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function ft(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}function pt(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=void 0;c===void 0&&(c=e[s]),i?tt(n,s,c):$e(n,s,c)}return n}function mt(e){return lt(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&xt(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}function ht(e){return function(e,t,n){for(var r=-1,i=Object(e),a=n(e),o=a.length;o--;){var s=a[++r];if(t(i[s],s,i)===!1)break}return e}}function gt(e,t){var n=e.__data__;return St(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function _t(e,t){var n=L(e,t);return G(n)?n:void 0}function vt(e){var t=z.call(e,be),n=e[be];try{e[be]=void 0;var r=!0}catch{}var i=B.call(e);return r&&(t?e[be]=n:delete e[be]),i}function yt(e){return typeof e.constructor==`function`&&!wt(e)?De(ge(e)):{}}function bt(e,t){var n=typeof e;return t??=r,!!t&&(n==`number`||n!=`symbol`&&O.test(e))&&e>-1&&e%1==0&&e<t}function xt(e,t,n){if(!Bt(n))return!1;var r=typeof t;return(r==`number`?Ft(n)&&bt(t,n.length):r==`string`&&t in n)?Mt(n[t],e):!1}function St(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Ct(e){return!!pe&&pe in e}function wt(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||R)}function Tt(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}function Et(e){return B.call(e)}function Dt(e,t,n){return t=Ce(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Ce(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),F(e,this,s)}}function Ot(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}var kt=At(K);function At(e){var t=0,n=0;return function(){var r=we(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function jt(e){if(e!=null){try{return fe.call(e)}catch{}try{return e+``}catch{}}return``}function Mt(e,t){return e===t||e!==e&&t!==t}var Nt=it(function(){return arguments}())?it:function(e){return Vt(e)&&z.call(e,`callee`)&&!ve.call(e,`callee`)},Pt=Array.isArray;function Ft(e){return e!=null&&zt(e.length)&&!Rt(e)}function It(e){return Vt(e)&&Ft(e)}var Lt=Se||Jt;function Rt(e){if(!Bt(e))return!1;var t=rt(e);return t==l||t==`[object GeneratorFunction]`||t==`[object AsyncFunction]`||t==`[object Proxy]`}function zt(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=r}function Bt(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function Vt(e){return typeof e==`object`&&!!e}function J(e){if(!Vt(e)||rt(e)!=f)return!1;var t=ge(e);if(t===null)return!0;var n=z.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&fe.call(n)==V}var Ht=P?I(P):at;function Ut(e){return pt(e,Wt(e))}function Wt(e){return Ft(e)?Ze(e):ot(e)}var Gt=mt(function(e,t,n){st(e,t,n)});function Kt(e){return function(){return e}}function qt(e){return e}function Jt(){return!1}e.exports=Gt}(at,at.exports)),at.exports}var ct=j(st()),lt=(e,t)=>ct({base:{h1:``,p:``,span:``,a:``,button:``,form:``,label:``,input:``,checkbox:``,radio:``,select:``,option:``},formLayout:{container:t===`newsletter`?z.CONTAINER:U.CONTAINER,formContainer:V.CONTAINER,formContainerRow:`row`,formContainerRowWide:``,form:V.FORM,submitContainer:z.SUBMIT_CONTAINER,captchaContainer:V.CAPTCHA_CONTAINER,submit:``,title:t===`entitlement`?U.TITLE:``,unlockedTitle:t===`entitlement`?U.TITLE:``,unlockedDescription:t===`entitlement`?U.DESCRIPTION:``,description:t===`entitlement`?U.DESCRIPTION:``,checkbox:V.CHECKBOX_INPUT_FRAGMENT,select:V.SELECT_INPUT_FRAGMENT,selectLabelSpan:``,selectState:V.SELECT_STATE_PROVINCE_HIDDEN,selectMultiple:V.SELECT_MULTIPLE,label:V.LABEL_FRAGMENT,input:V.SELECT_INPUT_FRAGMENT,textInput:V.TEXT_INPUT_FRAGMENT,textInputLabelSpan:``,validationErroredField:V.VALIDATION_ERRORED_FIELD,validationHeader:V.VALIDATION_HEADER,a:V.A,p:V.P,selectElement:V.SELECT_ELEMENT,selectOptionElement:V.SELECT_OPTION_ELEMENT,radioOptionElement:V.RADIO_OPTION_ELEMENT,inputElement:V.INPUT_ELEMENT,checkboxContainer:V.CHECKBOX_CONTAINER,hubspotHelperTextWrapper:U.HUBSPOT_HELPER_TEXT_WRAPPER,hubspotHelperTextLinks:U.HUBSPOT_HELPER_TEXT_LINKS},consentLayout:{container:pe.CONTAINER,thirdPartyContainer:pe.THIRD_PARTY_CONTAINER,a:pe.A,p:pe.P,input:``,label:``},errorLayout:{container:fe.CONTAINER_DIV,title:fe.ERROR_TITLE,plainText:fe.PLAIN_TEXT,button:fe.BUTTON},newsletterLayout:{container:B.CONTAINER,item:B.ITEM,inputContainer:B.INPUT_CONTAINER,input:``,consentContainer:B.CONTENT_CONTAINER,itemTitle:B.TITLE,itemFrequency:B.FREQUENCY,itemFrequencyA:B.FREQUENCY_A,itemFrequencyP:B.FREQUENCY_P,validationError:V.VALIDATION_ERROR_NEWSLETTER,success:{container:de.CONTAINER_DIV,thankYouTitle:de.THANKYOU_TITLE,plainText:de.PLAIN_TEXT,emphasisText:de.EMPHASIS_TEXT,button:de.BUTTON},captcha:V.CAPTCHA},spinnerLayout:{container:me.CONTAINER,loading:me.LOADING}},e),K=(0,E.createContext)(lt(void 0,`newsletter`)),q=()=>(0,E.useContext)(K),ut=({element:e,align:t=`center`})=>{let{base:n,formLayout:r}=(0,E.useContext)(K),i=e.elementType===`select`?r.selectLabelSpan:r.textInputLabelSpan;return N.jsxs(`label`,{style:{textAlign:t},className:G(n.label,r.label),htmlFor:e.fieldName,children:[e.label,e.isRequired&&N.jsx(`span`,{className:G(n.span,i),children:`*`})]})},dt=({element:e,handleChange:t})=>{let{base:n,formLayout:r}=(0,E.useContext)(K);return N.jsxs(N.Fragment,{children:[N.jsx(ut,{element:e}),N.jsx(`input`,{className:G(n.input,r.input),name:e.fieldName,type:e.inputType,placeholder:e.placeholder,required:e.isRequired,disabled:e.disabled,onInput:t,value:e.value||``,"data-testid":e.fieldName},e.fieldName)]})},ft=({element:e,handleChange:t})=>{let{base:n,formLayout:r}=(0,E.useContext)(K),i=e.inputType===`multiple`;return N.jsxs(N.Fragment,{children:[N.jsx(ut,{element:e}),N.jsx(`select`,{className:G(n.select,r.selectElement,i&&r.selectMultiple),name:e.fieldName,required:e.isRequired,onInput:t,multiple:i,"data-testid":e.fieldName,children:e.optionList?.map((e,t)=>{if(t===0){if(!e.value)return N.jsx(`option`,{className:G(n.option,r.selectOptionElement),value:``,children:e.displayName},t);if(e.value!==``)return N.jsxs(E.Fragment,{children:[!i&&N.jsx(`option`,{className:G(n.option,r.selectOptionElement),value:``,children:`Please select`}),N.jsx(`option`,{className:G(n.option,r.selectOptionElement),value:e.value,children:e.displayName})]},t)}return N.jsx(`option`,{className:G(n.option,r.selectOptionElement),value:e.value,children:e.displayName},t)})})]})},pt=({element:e,handleChange:t})=>
1e.elementType===`checkbox`&&e?.optionList?.length>0?N.jsxs(N.Fragment,{children:[N.jsx(ut,{element:e}),N.jsx(ht,{element:e,handleChange:t})]}):N.jsx(mt,{name:e.fieldName,label:e.label,value:e.value,required:e.isRequired,onChange:t}),mt=({name:e,label:t,value:n,required:r,onChange:i})=>{let{base:a,formLayout:o}=(0,E.useContext)(K);return N.jsxs(`div`,{className:o.checkboxContainer,children:[N.jsx(`input`,{className:G(a.input,a.checkbox),type:`checkbox`,onInput:i,name:e,value:n,required:r}),N.jsx(`label`,{className:a.label,htmlFor:e,dangerouslySetInnerHTML:{__html:t}},e),r&&N.jsx(`span`,{className:G(a.span,o.selectLabelSpan),children:`*`})]})},ht=({element:e,handleChange:t})=>{let{optionList:n}=e,[r,i]=E.useState([]),a=e=>{let{checked:n,value:a}=e.target,o=[];o=n?[...r,a]:r.filter(e=>e!==a),i(o),t(e,o)};return N.jsx(N.Fragment,{children:n?.map(t=>{let n=e.fieldName+`-option-`+t.displayName;return N.jsx(mt,{name:n,label:t.displayName,value:t.value,required:!1,onChange:a})})})},gt=({element:e,handleChange:t})=>{let{formLayout:n,base:r}=(0,E.useContext)(K);return N.jsxs(`div`,{style:{marginTop:5},children:[N.jsx(ut,{element:e,align:`left`}),N.jsx(`div`,{style:{marginTop:15}}),(e?.optionList)?.map((i,a)=>N.jsxs(`div`,{className:n.radioOptionElement,children:[N.jsx(`input`,{id:i.displayName,name:e.fieldName,type:`radio`,className:G(r.option,n.selectOptionElement),value:i.value,onChange:t,"data-testid":e.fieldName},a),N.jsx(`label`,{htmlFor:i.displayName,children:i.displayName})]}))]})},_t=({element:e,handleChange:t})=>e.elementType===`button`||e.isHidden?null:e.elementType===`checkbox`?N.jsx(pt,{element:e,handleChange:t}):e.elementType===`radio`?N.jsx(gt,{element:e,handleChange:t}):e.elementType!==`text`&&e.elementType!==`select`?N.jsx(dt,{element:e,handleChange:t}):e.elementType===`select`?N.jsx(ft,{element:e,handleChange:t}):N.jsx(ut,{element:e}),vt=({element:e,handleChange:t,showErrorMessages:n,showAllViolations:r,wideInputElements:i=[],onFocus:a,className:o})=>{var s;let{base:c,formLayout:l}=(0,E.useContext)(K);if(e.elementType===`button`)return null;let u=e=>N.jsx(`p`,{className:G(c.p,l.p),children:e.message},e.message),d=n&&(r||e.touched)&&!!((s=e?.errors)!=null&&s.length),f=G((i.includes(e.fieldName)?l.formContainerRowWide:l.formContainerRow)||`row`,o,{[l.validationErroredField]:d});return N.jsx(`div`,{className:f,onFocus:a,children:N.jsxs(`div`,{className:G(e.classNames),children:[N.jsx(_t,{element:e,handleChange:t}),d&&(e?.errors)?.map(u)]})})},yt=e=>typeof e==`object`?e:[e],bt=(e,t)=>kt(e,t),xt=(e,t)=>!bt(e,t),St=(e,t)=>e.indexOf(t)>-1,Ct=(e,t)=>!St(e,t),wt=(e,t)=>e<t,Tt=(e,t,n)=>
1t<e&&e<n,Et=(e,t,n)=>!Tt(e,t,n),Dt=(e,t)=>yt(e)?.some(e=>yt(t).indexOf(e)>=0),Ot=(e,t)=>!Dt(e,t),kt=(e,t)=>JSON.stringify([...yt(e)].sort())===JSON.stringify([...yt(t)].sort()),At={EQ:bt,NEQ:xt,CONTAINS:St,DOESNT_CONTAIN:Ct,STR_STARTS_WITH:(e,t)=>e.substring(0,t.length)===t,STR_ENDS_WITH:(e,t)=>e.slice(-t.length)===t,LT:wt,LTE:(e,t)=>e<=t,GT:(e,t)=>e>t,GTE:(e,t)=>e>=t,BETWEEN:Tt,NOT_BETWEEN:Et,WITHIN_TIME_REVERSE:wt,WITHIN_TIME:(e,t)=>t<e&&e<=new Date,SET_ALL:(e,t)=>yt(e)?.every(e=>t.indexOf(e)>=0),SET_ANY:Dt,SET_NOT_ANY:Ot,SET_EQ:kt,SET_NEQ:(e,t)=>!kt(e,t),IS_NOT_EMPTY:e=>e.length===void 0?!!e:!!e.length},jt=(e,t)=>{let n=!0;return t?.forEach(t=>{let r=typeof At[t.operator]==`function`?At[t.operator]:()=>!1;n&&=r(e,t.strValue)||r(e,t.strValues)||r(e,t.numberValue)||r(e,t.numberValue)}),n},Mt=[`SQ_PPC-A01`,`SQ_PPC-A02`,`SQ_PPC-A03`,`SQ_PPC-A04`,`SQ_PPC-A05`,`SQ_PPC-A06`,`SQ_PPC-A07`,`SQ_PPC-A08`,`SQ_PPC-A09`,`SQ_PPC-A10`,`SQ_PPC-A11`,`SQ_PPC-A12`,`SQ_PPC-A13`,`SQ_PPC-A14`,`SQ_PPC-A15`,`SQ_PPC-A16`],Nt=[`PC_LIC-02`,`PC_LIC-08`,`PC_LIC-10`,`PC_LIC-11`,`PC_LIC-12`,`PC_LIC-13`,`PC_LIC-15`,`PC_LIC-16`,`PC_LIC-17`,`PC_LIC-18`,`PC_LIC-19`,`PC_LIC-21`,`PC_LIC-22`,`PC_LIC-25`,`PC_LIC-27`,`PC_LIC-28`,`PC_LIC-30`,`PC_LIC-31`,`PC_LIC-32`,`PC_LIC-33`,`PC_LIC-34`],Pt=(e,t)=>{if(!e||!t)return;let n=t.optionList;e.fieldName===`industry`&&(t.fieldName===`PPC_PropertyCategory`||t.fieldName===`PC_ProductCategory`)&&(e.value===`NOB_LCNSOR`||e.value===`NOB_CSLCSNG`?(n=n.filter(e=>Mt.includes(e.value)),t.optionList=n):(n=n.filter(e=>Nt.includes(e.value)),t.optionList=n))},Ft=new tt,It=({elements:e,showErrorMessages:t,showAllViolations:n,onChange:r,siteId:i,handleCountryChange:a,wideInputElemets:o=[]})=>{let{base:s,formLayout:c}=q(),l=(0,E.useState)(0)[1],u=e=>e.validations?.some(({type:e})=>e===`IsRequiredCondition`),d=e=>{var t;return Ve(i).includes(e.fieldName)&&!((t=e.validations)!=null&&t.some(e=>e.type===`IsRequiredCondition`))},f=e=>({checkbox:[c.checkbox],checkboxes:[c.checkbox],select:[c.select],radio:[s.radio]})[e.elementType]||[c.textInput],p=()=>e.reduce((e,t)=>{var n;let r=e.set(t.fieldName,{...t,isRequired:u(t),classNames:f(t),isHidden:d(t)});if((n=t.dependentElements)!=null&&n.length)for(let{element:n}of t.dependentElements)e.set(n.fieldName,{...n,isRequired:!1,classNames:f(t),isHidden:!0,validations:[]});return r},new Map),m=(0,E.useMemo)(()=>e.map(e=>e.fieldName).sort().join(`,`),[e]),h=(0,E.useMemo)(()=>p(),[m]),g=e=>({...e,classNames:f(e),isHidden:!0,isRequired:!1,value:``,validations:[]}),_=(e,t)=>{let{currentTarget:n}=e,r=``,o=h,s=n.name,c=h.get(s);if(t&&(s=n.name.split(`-option-`)[0],c=h.get(s)),!c)throw Error(`FormBuilder: Element with name ${n.name} not found`);c.elementType!==`radio`&&e.preventDefault(),r=c.elementType===`select`&&c.inputType===`multiple`?Array.from(n?.selectedOptions,e=>e.value).join(`;`):n.value,c.elementType===`select`&&c.fieldName.toLowerCase()===`country`&&a&&a(r),c.elementType===`checkbox`&&(r=``+n?.checked),t&&t.length>0&&(r=t.join(`|`)),t&&!(t!=null&&t.length)&&(r=``),c.elementType===`radio`&&(r=n.value),c.errors=Ft.validateFormField(r,c,i),c.value=r,c.touched=!0,h.set(s,c);let d=c?.dependentElements||[];for(let{element:e}of d){let t=g(e);o.set(e.fieldName,t)}let p=d.filter(({filters:e})=>e.some(({strValues:e})=>e.includes(r)));for(let{formFieldAction:e,element:t,filters:n}of p){let i=g(t);e===se.DISPLAY&&(i.classNames=f(t),i.isHidden=!jt(r,n),i.isRequired=u(t),i.validations=t.validations,Pt(c,i)),o.set(t.fieldName,i)}l(Date.now()),v()},v=()=>{if(!e.length){r([],[]);return}for(let[e,t]of Array.from(h.entries())){let n=Ft.validateFormField(t.value||``,t,i);n.length>0&&h.set(e,{...t,errors:n})}let t=Array.from(h.values()).map(e=>({htmlName:e.fieldName,value:e.value||``,touched:!!e.touched,violations:e.errors?.map(t=>`${e.label}: ${t.message}`)||[]}));l(Date.now()),r(t,Array.from(h.values()))};(0,E.useEffect)(()=>{v()},[m]);let y=Array.from(h);return N.jsxs(`div`,{className:c.formContainer,children:[y.map(([e,r],i)=>!r.isHidden&&r.inputType!==`hidden`&&N.jsx(vt,{showAllViolations:n,element:r,handleChange:_,showErrorMessages:!!t,wideIn
1putElements:o},e||String(i))),y.map(([,e],t)=>e.fieldName===`grab_text_to_display`&&N.jsxs(`div`,{className:c.hubspotHelperTextWrapper,children:[N.jsxs(`p`,{children:[`I can withdraw my consent and unsubscribe at any time by e-mailing`,` `,N.jsxs(`a`,{className:c.hubspotHelperTextLinks,href:`https://mail.google.com/mail/?view=cm&fs=1&[email protected]`,children:[`[email protected].`,` `]}),`I acknowledge`,` `,N.jsxs(`a`,{className:c.hubspotHelperTextLinks,href:`https://www.thermofisher.com/hu/en/home/global/privacy-policy/legal-entities.html`,children:[`Thermo Fisher Scientific`,` `]}),` `,`(including its affiliates) will process my Personal Information according to its`,` `,N.jsx(`a`,{className:c.hubspotHelperTextLinks,href:`https://www.thermofisher.com/hu/en/home/global/privacy-policy.html#tfs_corp`,children:`Privacy policy`}),` `,`, which includes information about my rights.`]}),N.jsxs(`p`,{children:[`By submitting this form, you agree to BioProcess International's`,` `,N.jsx(`a`,{className:c.hubspotHelperTextLinks,href:`https://bioprocessintl.com/privacy-policy/?__hstc=251652889.2210c1268a7583985068da06b0fab63e.1702226753936.1708619750110.1708680249237.10&__hssc=251652889.1.1708680249237&__hsfp=3475455948`,children:`Privacy Policy`})]})]},`fm-`+t))]})},Lt=()=>N.jsxs(`div`,{style:R,"aria-hidden":`true`,children:[N.jsx(`label`,{htmlFor:le,children:`Website`}),N.jsx(`input`,{"data-eln-honeypot":!0,id:le,name:ce,type:`text`,autoComplete:`off`,tabIndex:-1,defaultValue:``})]}),Rt=e=>e.querySelector(ue)?.value??``,zt=(e,t)=>{let n=`{email}`;return t?e&&t?.includes(n)?t?.replace(n,e):t:``};function Bt({email:e,returnFunction:t,successVerbiage:n}){let{base:r,newsletterLayout:{success:i}}=q(),a=zt(e,n?.successPageSummary);return N.jsxs(`div`,{className:i.container,children:[N.jsx(`h1`,{className:G(r.h1,i.thankYouTitle),children:n.successPageTitle}),N.jsx(`p`,{className:G(r.p,i.plainText),children:a}),N.jsx(`button`,{onClick:()=>t(),className:G(r.button,i.button),children:`return to site`})]})}function Vt({newsletters:e=[],changeHandler:t,showInvalidErrorMessage:n=!1}){let{base:r,newsletterLayout:i}=q();return N.jsxs(`div`,{className:i.container,children:[e.map((e,n)=>N.jsxs(`div`,{className:i.item,children:[N.jsx(`div`,{className:i.inputContainer,children:N.jsx(`input`,{className:G(r.input,r.checkbox,i.input),type:`checkbox`,value:e.newsletter_code,name:`newsletterList`,onInput:t,"data-title":e.title})}),N.jsxs(`div`,{className:i.consentContainer,children:[N.jsxs(`p`,{className:r.p,children:[N.jsx(`span`,{className:G(r.span,i.itemTitle),children:e.title}),e.newsletter_description]}),N.jsxs(`div`,{className:i.itemFrequency,children:[N.jsx(`p`,{className:G(r.p,i.itemFrequencyP),children:e.frequency_description}),N.jsx(`a`,{className:G(r.a,i.itemFrequencyA),href:e.sample_url.href,target:`_blank`,rel:`noreferrer`,children:e.sample_url.title})]})]})]},n)),n&&N.jsx(`div`,{className:i.validationError,children:N.jsx(`p`,{className:r.p,children:`Please ensure at least one newsletter is selected and no errors are displayed`})})]})}var J=(e=>(e.categoryA=`A`,e.categoryB=`B`,e.categoryC=`C`,e.categoryD=`D`,e))(J||{}),Ht=class{constructor(){this.countryCodesCategoryA=[`AT`,`BE`,`CY`,`CZ`,`DK`,`DE`,`GR`,`IT`,`LT`,`MT`,`NL`,`NO`,`PL`,`PT`,`RO`,`SK`,`CH`,`ES`,`CA`,`KR`,`BG`],this.countryCodesCategoryB=[`HR`,`FR`,`IE`,`SI`,`JP`],this.countryCodesCategoryC=[`EE`,`FI`,`HU`,`IL`,`LV`,`LU`,`UA`,`SE`,`GB`,`BR`,`MX`,`ZA`],this.getCategoryByCountryCode=e=>{if(e){if(this.countryCodesCategoryA.includes(e))return`A`;if(this.countryCodesCategoryB.includes(e))return`B`;if(this.countryCodesCategoryC.includes(e))return`C`}return`D`},this.getOptOutMessage=({base:e,consentLayout:t},n)=>N.jsxs(N.Fragment,{children:[`You can opt out of receiving these messages `,n===`D`?``:`from Informa`,` at any time by clicking unsubscribe or contacting us. You can find more information in our\xA0`,N.jsx(`a`,{className:G(e.a,t.a),href:`https://www.informa.com/privacy-policy/`,target:`_blank`,rel:`noreferrer`,children:`Privacy Policy`}),`.`]}
1),this.getFirstConsentValue=(e,t,n)=>{if(!e)return!1;switch(this.getCategoryByCountryCode(e)){case`A`:return n&&!t?!0:t===`CR_OPTIN`;case`B`:case`C`:return t!==`CR_OPTOUT`;case`D`:return!0;default:return t===`CR_OPTIN`}},this.getThirdConsentValue=(e,t)=>{if(!e)return!1;switch(this.getCategoryByCountryCode(e)){case`A`:return t!==`CR_OPTOUT`;case`D`:return!0;case`C`:return t!==`CR_OPTOUT`;default:return t===`CR_OPTIN`}}}getValueByElement(e){switch(e.type){case`checkbox`:let t=e.value;return e.checked?t:t===`CR_OPTOUT`?`CR_OPTIN`:`CR_OPTOUT`;case`radio`:return e.value}return``}getFirstPartyTouchedValue(e,t){let n=this.getCategoryByCountryCode(t);return e.type===`checkbox`&&(n===`B`||n===`C`)||e.checked}},Ut=new Ht;function Wt(e){let t=q();if(e!=null&&e.countryCode){let{base:n,consentLayout:r}=t,i=Ut.getCategoryByCountryCode(e.countryCode),a=Ut.getOptOutMessage(t,i);return i===J.categoryA?N.jsxs(`div`,{className:r.container,"data-testid":`first-party-consent`,children:[N.jsx(`p`,{className:G(n.p,r.p),children:`Weâd like to keep in touch to send your news and promotions from Informa about products and services relevant to you. These may include information from our selected partners however, we will not share your details unless you agree to us doing so directly.`}),N.jsxs(`label`,{className:G(n.label,r.label),children:[N.jsx(`input`,{className:G(n.input,n.radio),type:`radio`,value:`CR_OPTIN`,name:`consent`,required:!0,onInput:e.changeHandler,"data-testid":`checkbox-consent`,defaultChecked:e.defaultCheckedYes||!1}),`Yes`]}),N.jsxs(`label`,{className:G(n.label,r.label),children:[N.jsx(`input`,{className:G(n.input,n.radio),type:`radio`,value:`CR_OPTOUT`,name:`consent`,onInput:e.changeHandler}),`No`]}),e.hideConsentContent?N.jsx(N.Fragment,{}):N.jsx(`p`,{className:G(n.p,r.p),children:a}),e.error&&N.jsx(`p`,{className:G(n.p,r.p),children:be})]}):i===J.categoryB||i===J.categoryC?N.jsxs(`div`,{className:r.container,"data-testid":`first-party-consent`,children:[N.jsxs(`label`,{className:G(n.label,r.label),children:[N.jsx(`input`,{className:G(n.input,n.checkbox,r.input),type:`checkbox`,value:`CR_OPTOUT`,name:`consent`,onInput:e.changeHandler,"data-testid":`checkbox-consent`}),N.jsxs(`p`,{className:G(n.p,r.p),children:[`Tick here if you `,N.jsx(`b`,{children:`do not want`}),` news and promotions from Informa about products and services relevant to you. These may include information from our selected partners however, we will not share your details unless you agree to us doing so directly.`]})]}),e.hideConsentContent?N.jsx(N.Fragment,{}):a]}):N.jsxs(`div`,{className:r.container,"data-testid":`first-party-consent`,children:[N.jsx(`p`,{className:G(n.p,r.p),children:`By continuing you agree that Informa may contact you with updates about products and services relevant to you. These may include information from our selected partners.`}),e.hideConsentContent?N.jsx(N.Fragment,{}):N.jsxs(N.Fragment,{children:[N.jsx(`p`,{className:G(n.p,r.p),children:a}),N.jsxs(`label`,{className:G(n.label,r.label),children:[`I agree to the`,` `,N.jsx(`a`,{className:G(n.a,r.a),href:`https://www.informa.com/privacy-policy/`,target:`_blank`,rel:`noreferrer`,children:`Privacy Policy`})]})]})]})}return null}function Gt(){let{spinnerLayout:e}=q();return N.jsx(`div`,{className:e.container,children:N.jsx(`div`,{className:e.loading})})}function Kt({title:e,message:t,returnFunction:n}){let{base:r,errorLayout:i}=q();return N.jsxs(`div`,{className:i.container,children:[N.jsx(`h1`,{className:G(r.h1,i.title),children:e}),N.jsx(`p`,{className:G(r.p,i.plainText),children:t}),N.jsx(`button`,{className:G(r.button,i.button),onClick:()=>n(),children:`return to site`})]})}var qt=(e,...t)=>{console.log(`component message: `,e,t)},Jt=({validationErrors:e=[],otherErrors:t=[]})=>{let{base:n,formLayout:r}=(0,E.useContext)(K),i=[...e,...t];return i.length?N.jsx(`div`,{className:r.validationHeader,"data-testid":`validation-error-box`,children:i.map((e,t)=>N.jsx(`p`,{className:n.p,children:e},t))}):N.jsx(N.Fragment,{})};function Y(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Yt(e,t){return Yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yt(e,t)}function Xt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Yt(e,t)}var Zt=Object.defineProperty,Qt=Object.defineProperties,$t=Object.getOwnPropertyDescriptors,en=Object.getOwnPropertySymbols,tn=Object.prototype.hasOwnProperty,nn=Object.prototype.propertyIsEnumerable,rn=(e,t,n)=>t in e?Zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X=(e,t)=>{for(var n in t||={}
1)tn.call(t,n)&&rn(e,n,t[n]);if(en)for(var n of en(t))nn.call(t,n)&&rn(e,n,t[n]);return e},an=(e,t)=>Qt(e,$t(t)),on=(e,t)=>{var n={};for(var r in e)tn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&en)for(var r of en(e))t.indexOf(r)<0&&nn.call(e,r)&&(n[r]=e[r]);return n},Z=(e,t,n)=>(rn(e,typeof t==`symbol`?t:t+``,n),n),sn=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),cn=`hCaptcha-script`,ln=`hCaptchaOnLoad`,un=`script-error`,dn=`@hCaptcha/loader`;function fn(e){return Object.entries(e).filter(([,e])=>e||e===!1).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(t))}`).join(`&`)}function pn(e){let t=e&&e.ownerDocument||document;return{document:t,window:t.defaultView||t.parentWindow||window}}function mn(e){return e||document.head}function hn(e){e.setTag(`source`,dn),e.setTag(`url`,document.URL),e.setContext(`os`,{UA:navigator.userAgent}),e.setContext(`browser`,X({},gn())),e.setContext(`device`,an(X({},_n()),{screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:screen.orientation?.type||`Unknown`,processor_count:navigator.hardwareConcurrency,platform:navigator.platform}))}function gn(){let e=navigator.userAgent,t,n;return e.indexOf(`Firefox`)===-1?e.indexOf(`Edg`)===-1?e.indexOf(`Chrome`)!==-1&&e.indexOf(`Safari`)!==-1?(t=`Chrome`,
1n=e.match(/Chrome\/([\d.]+)/)?.[1]):e.indexOf(`Safari`)!==-1&&e.indexOf(`Chrome`)===-1?(t=`Safari`,n=e.match(/Version\/([\d.]+)/)?.[1]):e.indexOf(`Opera`)!==-1||e.indexOf(`OPR`)!==-1?(t=`Opera`,n=e.match(/(Opera|OPR)\/([\d.]+)/)?.[2]):e.indexOf(`MSIE`)!==-1||e.indexOf(`Trident`)!==-1?(t=`Internet Explorer`,n=e.match(/(MSIE |rv:)([\d.]+)/)?.[2]):(t=`Unknown`,n=`Unknown`):(t=`Microsoft Edge`,n=e.match(/Edg\/([\d.]+)/)?.[1]):(t=`Firefox`,n=e.match(/Firefox\/([\d.]+)/)?.[1]),{name:t,version:n}}function _n(){let e=navigator.userAgent,t;t=e.indexOf(`Win`)===-1?e.indexOf(`Mac`)===-1?e.indexOf(`Linux`)===-1?e.indexOf(`Android`)===-1?e.indexOf(`like Mac`)!==-1||e.indexOf(`iPhone`)!==-1||e.indexOf(`iPad`)!==-1?`iOS`:`Unknown`:`Android`:`Linux`:`Mac`:`Windows`;let n;return n=/Mobile|iPhone|iPod|Android/i.test(e)?`Mobile`:/Tablet|iPad/i.test(e)?`Tablet`:`Desktop`,{model:t,family:t,device:n}}var vn=class e{constructor(e){Z(this,`_parent`),Z(this,`breadcrumbs`,[]),Z(this,`context`,{}),Z(this,`extra`,{}),Z(this,`tags`,{}),Z(this,`request`),Z(this,`user`),this._parent=e}get parent(){return this._parent}child(){return new e(this)}setRequest(e){return this.request=e,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(e){return typeof e.timestamp>`u`&&(e.timestamp=new Date().toISOString()),this.breadcrumbs.push(e),this}setExtra(e,t){return this.extra[e]=t,this}removeExtra(e){return delete this.extra[e],this}setContext(e,t){return typeof t.type>`u`&&(t.type=e),this.context[e]=t,this}removeContext(e){return delete this.context[e],this}setTags(e){return this.tags=X(X({},this.tags),e),this}setTag(e,t){return this.tags[e]=t,this}removeTag(e){return delete this.tags[e],this}setUser(e){return this.user=e,this}removeUser(){return this.user=void 0,this}toBody(){let e=[],t=this;for(;t;)e.push(t),t=t.parent;return e.reverse().reduce((e,t)=>(e.breadcrumbs=[...e.breadcrumbs??[],...t.breadcrumbs],e.extra=X(X({},e.extra),t.extra),e.contexts=X(X({},e.contexts),t.context),e.tags=X(X({},e.tags),t.tags),t.user&&(e.user=t.user),t.request&&(e.request=t.request),e),{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},yn=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,bn=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,xn=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Sn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,Cn=`?`,wn=`An unknown error occurred`,Tn=`0.0.4`;function En(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function Q(e){return(e+256).toString(16).substring(1)}function Dn(){let e=En(Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,Q(e[0])+Q(e[1])+Q(e[2])+Q(e[3])+`-`+Q(e[4])+Q(e[5])+`-`+Q(e[6])+Q(e[7])+`-`+Q(e[8])+Q(e[9])+`-`+Q(e[10])+Q(e[11])+Q(e[12])+Q(e[13])+Q(e[14])+Q(e[15])}var On=[[yn,`chrome`],[xn,`winjs`],[bn,`gecko`]];function kn(e){var t,n;if(!e.stack)return null;let r=[],i=(t=e.stack).split?.call(t,` 2`)??[];for(let t=0;t<i.length;++t){let a=null,o=null,s=null;for(let[e,n]of On)if(o=e.exec(i[t]),o){s=n;break}if(!(!o||!s)){if(s===`chrome`)a={filename:(n=o[2])!=null&&n.startsWith(`address at `)?o[2].substring(11):o[2],function:o[1]||Cn,lineno:o[3]?+o[3]:null,colno:o[4]?+o[4]:null};else if(s===`winjs`)a={filename:o[2],function:o[1]||Cn,lineno:+o[3],colno:o[4]?+o[4]:null};else if(s===`gecko`)t===0&&!o[5]&&e.columnNumber!==void 0&&r.length>0&&(r[0].column=e.columnNumber+1),a={filename:o[3],function:o[1]||Cn,lineno:o[4]?+o[4]:null,colno:o[5]?+o[5]:null};else continue;!a.function&&a.lineno&&(a.function=Cn),r.push(a)}}return r.length?r.reverse():null}function An(e){let t=kn(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function jn(e){let t=Sn.exec(e),n=t?t.slice(1):[];if(n.length!==6)throw Error(`Invalid DSN`);let r=n[5].split(`/`),i=r.slice(0,-1).join(`/`);
2return n[0]+`://`+n[3]+(n[4]?`:`+n[4]:``)+(i?`/`+i:``)+`/api/`+r.pop()+`/envelope/?sentry_version=7&sentry_key=`+n[1]+(n[2]?`&sentry_secret=`+n[2]:``)}function Mn(e,t,n){let r=X({event_id:Dn().replaceAll(`-`,``),platform:`javascript`,sdk:{name:`@hcaptcha/sentry`,version:Tn},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if(e.type===`exception`){r.message=e.error?.message??`Unknown error`,r.fingerprint=[r.message];let t=[],n=e.error;for(let e=0;e<5&&n&&(t.push(An(n)),!(!n.cause||!(n.cause instanceof Error)));e++)n=n.cause;r.exception={values:t.reverse()}}return e.type===`message`&&(r.message=e.message,r.level=e.level),r}function Nn(e){if(e instanceof Error)return e;if(typeof e==`string`)return Error(e);if(typeof e==`object`&&e&&!Array.isArray(e)){let t=e,{message:n}=t,r=on(t,[`message`]),i=Error(typeof n==`string`?n:wn);return Object.assign(i,r)}let t=Error(wn);return Object.assign(t,{cause:e})}function Pn(e,t,n){return sn(this,null,function*(){try{if(typeof fetch<`u`&&typeof AbortSignal<`u`){let r;if(n){let e=new AbortController;r=e.signal,setTimeout(()=>e.abort(),n)}let i=yield fetch(e,an(X({},t),{signal:r})),a=yield i.text();return{status:i.status,body:a}}return yield new Promise((r,i)=>{let a=new XMLHttpRequest;if(a.open(t?.method??`GET`,e),a.onload=()=>r({status:a.status,body:a.responseText}),a.onerror=()=>i(Error(`XHR Network Error`)),t?.headers)for(let[e,n]of Object.entries(t.headers))a.setRequestHeader(e,n);if(n){let e=setTimeout(()=>{a.abort(),i(Error(`Request timed out`))},n);a.onloadend=()=>{clearTimeout(e)}}a.send((t?.body)?.toString())})}catch(e){return{status:0,body:(e?.toString)?.call(e)??`Unknown error`}}})}var $,Fn=($=class{constructor(e){Z(this,`apiURL`),Z(this,`dsn`),Z(this,`environment`),Z(this,`release`),Z(this,`sampleRate`),Z(this,`debug`),Z(this,`_scope`),Z(this,`shouldBuffer`,!1),Z(this,`bufferlimit`,20),Z(this,`buffer`,[]),this.environment=e.environment,this.release=e.release,this.sampleRate=e.sampleRate??1,this.debug=e.debug??!1,this._scope=e.scope??new vn,this.apiURL=jn(e.dsn),this.dsn=e.dsn,this.shouldBuffer=e.buffer??!1,this.bufferlimit=e.bufferLimit??20}static init(e){$._instance||($._instance=new $(e))}static get instance(){if(!$._instance)throw Error(`Sentry has not been initialized`);return $._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return $.instance.scope}withScope(e){e(this._scope.child())}static withScope(e){$.instance.withScope(e)}captureException(e,t){this.captureEvent({type:`exception`,level:`error`,error:Nn(e),scope:t??this._scope})}static captureException(e,t){$.instance.captureException(e,t)}captureMessage(e,t=`info`,n){this.captureEvent({type:`message`,level:t,message:e,scope:n??this._scope})}static captureMessage(e,t=`info`,n){$.instance.captureMessage(e,t,n)}captureEvent(e){if(Math.random()>=this.sampleRate){this.log(`Dropped event due to sample rate`);return}if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(e)}else this.sendEvent(e)}sendEvent(e,t=5e3){return sn(this,null,function*(){try{this.log(`Sending sentry event`,e);let n=Mn(e,this.environment,this.release),r={event_id:n.event_id,dsn:this.dsn},i=JSON.stringify(r)+` 3`+JSON.stringify({type:`event`})+` 4`+JSON.stringify(n),a=yield Pn(this.apiURL,{method:`POST`,headers:{"Content-Type":`application/x-sentry-envelope`},body:i},t);this.log(`Sentry response`,a.status),a.status!==200&&(console.log(a.body),console.error(`Failed to send event to Sentry`,a))}catch(e){console.error(`Failed to send event`,e)}})}flush(e=5e3){return sn(this,null,function*(){try{this.log(`Flushing sentry events`,this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(t=>this.sendEvent(t,e));yield Promise.all(t),this.log(`Flushed all events`)}catch(e){console.error(`Failed to flush events`,e)}})}static flush(e=5e3){return $.instance.flush(e)}static reset(){$._instance=void 0}},Z($,`_instance`),$),In=`https://[email protected]/6`,Ln=`2.0.0`,Rn=`production`;function zn(e=!0){if(!e)return Bn();Fn.init({dsn:In,release:Ln,environment:Rn});let t=Fn.scope;return hn(t),Bn(t)}function Bn(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>
4{e&&e.setRequest(t)},captureException:t=>{e&&Fn.captureException(t,e)}}}function Vn({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:r,apihost:i=`https://js.hcaptcha.com`,cleanup:a=!0,secureApi:o=!1,scriptSource:s=``}={},c){let l=mn(e),u=pn(l);return new Promise((e,d)=>{let f=u.document.createElement(`script`);f.id=cn,f.src=s?`${s}?onload=${ln}`:o?`${i}/1/secure-api.js?onload=${ln}`:`${i}/1/api.js?onload=${ln}`,f.crossOrigin=r,f.async=n;let p=(e,t)=>{try{!o&&a&&l.removeChild(f),t(e)}catch(e){d(e)}};f.onload=t=>p(t,e),f.onerror=e=>{c&&c(f.src),p(e,d)},f.src+=t===``?``:`&${t}`,l.appendChild(f)})}var Hn=[];function Un(e={cleanup:!0},t){try{t.addBreadcrumb({category:dn,message:`hCaptcha loader params`,data:e});let n=pn(mn(e.scriptLocation)),r=Hn.find(({scope:e})=>e===n.window);if(r)return t.addBreadcrumb({category:dn,message:`hCaptcha already loaded`}),r.promise;let i=new Promise((i,a)=>sn(this,null,function*(){try{n.window[ln]=()=>{t.addBreadcrumb({category:dn,message:`hCaptcha script called onload function`}),i(n.window.hcaptcha)},yield Vn(X({query:fn({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl})},e),e=>{t.captureRequest({url:e,method:`GET`})}),t.addBreadcrumb({category:dn,message:`hCaptcha loaded`,data:r})}catch{t.addBreadcrumb({category:dn,message:`hCaptcha failed to load`});let e=Hn.findIndex(e=>e.scope===n.window);e!==-1&&Hn.splice(e,1),a(Error(un))}}));return Hn.push({promise:i,scope:n.window}),i}catch(e){return t.captureException(e),Promise.reject(Error(un))}}function Wn(e,t,n=0){return sn(this,null,function*(){let r=n<2?`Retry loading hCaptcha Api`:`Exceeded maximum retries`;try{return yield Un(e,t)}catch(i){return t.addBreadcrumb({category:dn,message:r}),n>=2?(t.captureException(i),Promise.reject(i)):(n+=1,Wn(e,t,n))}})}function Gn(){return sn(this,arguments,function*(e={}){return yield Wn(e,zn(e.sentry))})}function Kn(e){var t=e&&e.ownerDocument||document;return{document:t,window:t.defaultView||t.parentWindow||window}}function qn(e){return e||document.head}var Jn=function(e){Xt(t,e);function t(t){var n;return n=e.call(this,t)||this,n._hcaptcha=void 0,n.renderCaptcha=n.renderCaptcha.bind(Y(n)),n.resetCaptcha=n.resetCaptcha.bind(Y(n)),n.removeCaptcha=n.removeCaptcha.bind(Y(n)),n.isReady=n.isReady.bind(Y(n)),n._onReady=null,n.loadCaptcha=n.loadCaptcha.bind(Y(n)),n.handleOnLoad=n.handleOnLoad.bind(Y(n)),n.handleSubmit=n.handleSubmit.bind(Y(n)),n.handleExpire=n.handleExpire.bind(Y(n)),n.handleError=n.handleError.bind(Y(n)),n.handleOpen=n.handleOpen.bind(Y(n)),n.handleClose=n.handleClose.bind(Y(n)),n.handleChallengeExpired=n.handleChallengeExpired.bind(Y(n)),n.ref=E.createRef(),n.apiScriptRequested=!1,n.sentryHub=null,n.captchaId=``,n.state={isApiReady:!1,isRemoved:!1,elementId:t.id},n}var n=t.prototype;return n.componentDidMount=function(){var e=this,t=Kn(qn(this.props.scriptLocation));if(this._hcaptcha=t.window.hcaptcha||void 0,typeof this._hcaptcha<`u`){this.setState({isApiReady:!0},function(){e.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var e=this._hcaptcha,t=this.captchaId;this.isReady()&&(e.reset(t),e.remove(t))},n.shouldComponentUpdate=function(e,t){return this.state.isApiReady===t.isApiReady&&this.state.isRemoved===t.isRemoved},n.componentDidUpdate=function(e){var t=this;[`sitekey`,`size`,`theme`,`tabindex`,`languageOverride`,`endpoint`].every(function(n){return e[n]===t.props[n]})||this.removeCaptcha(function(){t.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var e=this.props,t=e.apihost,n=e.assethost,r=e.endpoint,i=e.host,a=e.imghost,o=e.languageOverride,s=e.reCaptchaCompat,c=e.reportapi,l=e.sentry,u=e.custom,d=e.loadAsync,f=e.scriptLocation,p=e.scriptSource,m=e.secureApi,h=e.cleanup;Gn({render:`explicit`,apihost:t,assethost:n,endpoint:r,hl:o,host:i,imghost:a,recaptchacompat:s===!1?`off`:null,reportapi:c,sentry:l,custom:u,loadAsync:d,scriptLocation:f,scriptSource:p,secureApi:m,cleanup:h===void 0||h}).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(e){var t=this,n=this.props.onReady,r=this.state.isApiReady,i=this.captchaId;
4if(!(!r||i)){var a=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),o=this._hcaptcha.render(this.ref.current,a);this.captchaId=o,this.setState({isRemoved:!1},function(){e&&e(),n&&n(),t._onReady&&t._onReady(o)})}},n.resetCaptcha=function(){var e=this._hcaptcha,t=this.captchaId;this.isReady()&&e.reset(t)},n.removeCaptcha=function(e){var t=this,n=this._hcaptcha,r=this.captchaId;this.isReady()&&this.setState({isRemoved:!0},function(){t.captchaId=``,n.remove(r),e&&e()})},n.handleOnLoad=function(){var e=this;this.setState({isApiReady:!0},function(){e._hcaptcha=Kn(qn(e.props.scriptLocation)).window.hcaptcha,e.renderCaptcha(function(){var t=e.props.onLoad;t&&t()})})},n.handleSubmit=function(e){var t=this.props.onVerify,n=this.state.isRemoved,r=this._hcaptcha,i=this.captchaId;if(!(typeof r>`u`||n)){var a=r.getResponse(i),o=r.getRespKey(i);t&&t(a,o)}},n.handleExpire=function(){var e=this.props.onExpire,t=this._hcaptcha,n=this.captchaId;this.isReady()&&(t.reset(n),e&&e())},n.handleError=function(e){var t=this.props.onError,n=this._hcaptcha,r=this.captchaId;this.isReady()&&n.reset(r),t&&t(e)},n.isReady=function(){var e=this.state,t=e.isApiReady,n=e.isRemoved;return t&&!n},n.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},n.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},n.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},n.execute=function(e){var t=this;e===void 0&&(e=null),e=typeof e==`object`?e:null;try{var n=this._hcaptcha,r=this.captchaId;if(!this.isReady()){var i,a=new Promise(function(n,r){t._onReady=function(i){try{var a=t._hcaptcha;e&&e.async?a.execute(i,e).then(n).catch(r):n(a.execute(i,e))}catch(e){r(e)}}});return(i=e)!=null&&i.async?a:null}return n.execute(r,e)}catch(t){return e&&e.async?Promise.reject(t):null}},n.close=function(){var e=this._hcaptcha,t=this.captchaId;if(this.isReady())return e.close(t)},n.setData=function(e){var t=this._hcaptcha,n=this.captchaId;this.isReady()&&(e&&typeof e!=`object`&&(e=null),t.setData(n,e))},n.getResponse=function(){return this._hcaptcha.getResponse(this.captchaId)},n.getRespKey=function(){return this._hcaptcha.getRespKey(this.captchaId)},n.render=function(){var e=this.state.elementId;return E.createElement(`div`,{ref:this.ref,id:e})},t}(E.Component),Yn=()=>`fa44b35a-449e-425e-9a86-275625a43dc6`,Xn=({className:e,setToken:t,error:n})=>{let r=e=>t(e),{base:i,formLayout:a}=(0,E.useContext)(K),o=()=>t(void 0),s=Yn();return N.jsxs(`div`,{className:e,children:[N.jsx(Jn,{sitekey:s,onVerify:r,onExpire:o}),n&&N.jsx(`p`,{className:G(i.p,a.p),children:`Captcha is invalid!`})]})},Zn=new Ht;function Qn({formId:e,newsletters:t,onCountryStateChanged:n,platformApiService:r,subscriptionState:i,subscriptionStateHandler:a,elements:o,hideFirstPartyConsent:s,hideThirdPartyConsent:c,iirisUserProfile:l,inContextValidationMessage:u,returnButtonFunction:d,sponsorName:f,isOpenOnRegister:p,completionCallback:m,successVerbiage:h}){let{base:g,formLayout:_}=q(),[v,y]=(0,E.useState)(),[b,x]=(0,E.useState)({elements:o,firstPartyConsentOption:``,firstPartyConsentTouched:!1,values:{formId:null,countryCode:``,emailAddress:l?.business_email||``,firstPartyConsent:!1,newsletterList:[],formFields:[]},showAllViolations:!1}),S=!l&&Ue(r.siteId);function ee(e,t){let r=e.find(e=>e.htmlName===I.COUNTRY||e.htmlName===I.MARKETO_COUNTRY)?.value||``,i=b.values.formFields?.find(e=>e.htmlName===I.STATE)?.value||``,a=e.find(e=>e.htmlName===I.STATE)?.value||``;i!==a&&n(a);let o=e.find(e=>e.htmlName===I.EMAIL_ADDRESS||e.htmlName===I.BUSINESS_EMAIL||e.htmlName===I.MARKETO_EMAIL)?.value||``;x(n=>({...n,elements:t,values:{...n.values,emailAddress:o,countryCode:r,formFields:e}}))}function te(){if(!b.values.countryCode||s||c)return!0;switch(Zn.getCategoryByCountryCode(b.values.countryCode)){case J.categoryA:return b.f
4irstPartyConsentTouched;case J.categoryB:return b.firstPartyConsentTouched;case J.categoryC:return b.firstPartyConsentTouched;case J.categoryD:return!0;default:return!0}}let C=async t=>{if(t.preventDefault(),x(e=>({...e,showAllViolations:!0})),!te()||S&&!v)return;let n=Zn.getFirstConsentValue(b.values.countryCode,b.firstPartyConsentOption),{newsletterList:i,formFields:o}=b.values,s=i.length>0,c=o.some(({violations:e})=>e.length);if(!s||c)return;a({isSuccessful:!1,message:`Submitting data...`,status:H.PENDING});let u=l?.business_email||b.values.emailAddress,d=Rt(t.currentTarget);try{(await r.putNewslettersSubscription({emailAddress:u,formFields:o,newsletterList:b.values.newsletterList.map(e=>e.newsletter_code),firstPartyConsent:n,formId:e,honeypot:d},v,l,b.elements,p)).status===200&&(m?.({transactionInitiated:`success`,formSubmitted:`success`,submissionSucceeded:`success`}),a({isSuccessful:!0,message:`SUCCESS`,status:H.SUCCESS}))}catch(e){qt(e),e.response?.status===409?(m?.({transactionInitiated:`success`,formSubmitted:`success`,submissionSucceeded:`failure`}),a({isSuccessful:!1,message:e.response.data,status:H.ERROR})):(m?.({transactionInitiated:`success`,formSubmitted:`failure`,submissionSucceeded:`failure`}),a({isSuccessful:!1,message:`A problem has occurred with processing your request, please wait a few minutes and try again.`,status:H.ERROR}))}},w=e=>{let t=e?.length>0;return x(e=>({...e,inValidNewsletter:!t})),t},T=e=>{let t=Zn.getCategoryByCountryCode(e);return t===J.categoryB||t===J.categoryC},D=e=>{x(t=>({...t,firstPartyConsentOption:``,firstPartyConsentTouched:T(e)}))},O=e=>{let t=e.currentTarget;t.name===I.CONSENT?A(t):t.name===I.NEWSLETTER_LIST&&k(t,e.target.dataset.title)},k=(e,t)=>{let{newsletterList:n}=b.values,r=e.checked?[...n,{newsletter_code:e.value,title:t}]:n.filter(n=>n.newsletter_code!==e.value||n.title!==t);x(e=>({...e,values:{...e.values,newsletterList:r}})),w(r)},A=e=>{let t=Zn.getValueByElement(e),n=Zn.getFirstPartyTouchedValue(e,b.values.countryCode);x(e=>({...e,firstPartyConsentOption:t,firstPartyConsentTouched:n,values:{...e.values}}))},j=e=>{let t=e.find(e=>e.elementType===`button`);return t?t.label:`Submit`},ne=e=>e.includes(`Captcha is invalid!`),M=()=>{let{values:e,showAllViolations:t}=b,n=e.newsletterList.length===0&&t,r=e.formFields.filter(e=>e.touched||t).flatMap(({violations:e})=>e),i=[];return n&&i.push(`Please ensure at least one newsletter is selected and no errors are displayed`),!te()&&t&&i.push(`Please choose consent agreement`),t&&S&&!v&&i.push(`Captcha is invalid!`),{errors:r,otherErrors:i}},re=b.values.newsletterList.length===0&&b.showAllViolations,{errors:ie,otherErrors:ae}=M(),oe=o?j(o):`Subscribe`,P=i&&i.status;return P===H.ERROR?N.jsx(Kt,{title:`A problem has occurred`,message:i.message,returnFunction:d}):P===H.PENDING?N.jsx(Gt,{}):P===H.SUCCESS?N.jsx(Bt,{email:l?.business_email||b.values.emailAddress,successVerbiage:h,returnFunction:d}):t?N.jsx(`div`,{className:_.container,children:N.jsxs(`form`,{noValidate:!0,className:G(g.form,_.form),onSubmit:C,children:[N.jsx(Lt,{}),!u&&N.jsx(Jt,{validationErrors:ie,otherErrors:ae}),N.jsx(Vt,{showInvalidErrorMessage:u&&re,newsletters:t,changeHandler:O}),o&&N.jsx(It,{elements:o,onChange:ee,showAllViolations:b.showAllViolations,showErrorMessages:u,siteId:r.siteId,handleCountryChange:D}),!s&&N.jsx(Wt,{sponsorName:f,countryCode:b.values.countryCode,changeHandler:O,error:u&&b.showAllViolations&&ae.includes(xe)}),N.jsxs(`div`,{className:_.submitContainer,children:[S&&N.jsx(Xn,{className:_.captchaContainer,setToken:y,error:u&&b.showAllViolations&&ne(ae)}),N.jsx(`button`,{className:G(g.button,_.submit),type:`submit`,children:oe})]})]})}):null}var $n=e=>new Promise((t,n)=>{try{let r=document.createElement(`script`);Object.keys(e).forEach(t=>{r[t]=e[t]}),r.addEventListener(`load`,()=>{t({status:!0})}),r.addEventListener(`error`,()=>{n({status:!1,message:`Failed to load the script ${e.src}`})}),document.body.appendChild(r)}catch(e){n(e)}});function er({formId:e,configs:t={},region:n=`eu1`}){return(0,E.useEffect)(()=>{let{portalId:r}=t;$n({src:`//js-${n}.hs-scripts.com/${r}.js`,type:`text/javascript`,id:`hs-script-loader`,async:!0,defer:!0}).then(()=>{$n({src:`//js-${n}
4.hsforms.net/forms/v2.js`,type:`text/javascript`,charset:`utf-8`}).then(()=>{window.hbspt&&window.hbspt.forms.create({region:n,portalId:r,formId:e,target:`#hubspotForm`})})})},[]),N.jsx(`div`,{style:{display:`none`},children:N.jsx(`div`,{id:`hubspotForm`})})}function tr({formResponse:e}){let{formId:t,formType:n,configs:r={}}=e;return n===F.HUBSPOT?N.jsx(er,{configs:r,formId:t}):null}function nr(e){let t=new Qe(e.platformServiceBaseUrl,e.clientId,e.authorization,e.context,e.subBrandId,e.version,void 0,e.productId),[n,r]=(0,E.useState)({}),[i,a]=(0,E.useState)(e.iirisUserProfile?.state||``),[o,s]=(0,E.useState)({isSuccessful:!1,message:`PRE-SUB`,status:H.PENDING}),c=async t=>{a(t);let n={tag:e.newsletterTag||``,state:t};await p({filters:n,isRegisterEvent:e.isOpenOnRegister||!1,...e.newsletterVariant&&{newsletterVariant:e.newsletterVariant}})},l=t=>{s({isSuccessful:t.isSuccessful,message:t.message,status:t.status}),t.isSuccessful&&e.onSuccessSubscribe&&e.onSuccessSubscribe()},u=t=>{var r;let i=t?.contentStackData??n.contentStackData,a=t?.formData??n.formData;return{...je(),elnPackageVersion:Me,formInstanceName:a?.formType||i?.formType,formHTMLName:i?.formId||``,userLoggedIn:(r=e.iirisUserProfile)!=null&&r.id?`Logged In`:`Anonymous`}},d=()=>{e.returnButtonFunction()},f=async(e,n)=>{let i=await t.getFormById(e,n,{"x-subscription-event":!0});s(e=>({...e,status:H.NEW})),r(e=>({...e,formData:i,hideFirstPartyConsent:Fe(i)}))},p=async n=>{let i=await t.getNewsletterData(n);return s(t=>({...t,status:e.iirisUserProfile?H.NEW:t.status})),r(e=>({...e,contentStackData:{formType:i.form_storage,formId:i.form_id,newsletters:i.newsletters}})),i},m=(t,n)=>{var r;(r=e.completionCallback)==null||r.call(e,{...u(n),...t})},h=async t=>{let n;try{let r={filters:{tag:e.newsletterTag||``,state:t,shouldUseAlternativeForm:e.context?.shouldUseAlternativeForm??!1,...e.newsletterVariant&&{newsletterVariant:e.newsletterVariant}},isRegisterEvent:e.isOpenOnRegister||!1};n=await p(r),n.form_id&&!e.iirisUserProfile&&await f(n.form_id,e.isOpenOnRegister)}catch(e){qt(e),m({transactionInitiated:`failure`,formSubmitted:`failure`,submissionSucceeded:`failure`},n?{contentStackData:{formType:n.form_storage,formId:n.form_id}}:void 0),s(e=>({...e,status:H.ERROR,message:`We are having issues responding to your request! Please try again later.`}))}};(0,E.useEffect)(()=>{h(i)},[i]);let g=(0,E.useMemo)(()=>n?.formData||{},[n?.formData]),_=(0,E.useMemo)(()=>g?.attributes?.elements||[],[g?.attributes?.elements]),v=(0,E.useMemo)(()=>Re(_,e.sponsorName||``),[_,e.sponsorName]);return N.jsxs(`div`,{children:[N.jsx(tr,{formResponse:g}),N.jsx(K.Provider,{value:lt(e.classNames,`newsletter`),children:N.jsx(Qn,{newsletters:n?.contentStackData?.newsletters,elements:v,platformApiService:t,subscriptionStateHandler:l,subscriptionState:o,returnButtonFunction:d,iirisUserProfile:e.iirisUserProfile,inContextValidationMessage:e.inContextValidationMessage,formId:n?.contentStackData?.formId,onCountryStateChanged:c,hideFirstPartyConsent:n.hideFirstPartyConsent,hideThirdPartyConsent:n.hideThirdPartyConsent,isOpenOnRegister:e.isOpenOnRegister,completionCallback:m,successVerbiage:e.successVerbiage})})]})}var rr=new Ht,ir={webinar:`attend the webinar`,white_paper:`download the document`,video:`watch the video`,slideshow:`play the slideshow`,article:`read the article`,recipe:`read the recipe`,multi_section_article:`read the multi-section article`,publication_issue:`read the publication issue`,podcast:`listen to the podcast`,enhanced_list_landing_page:`view the Enhanced List`,enhanced_list_child_page:`view the Enhanced List`};function ar({changeHandler:e,contentType:t,countryCode:n,error:r,sponsorName:i=`the Sponsors mentioned above`}){let a=q(),{base:o,consentLayout:s,formLayout:c}=a,l=ir?.[t?.toLowerCase()]||`access this content`,u=rr.getCategoryByCountryCode(n),d=rr.getOptOutMessage(a,u),f=G(s.thirdPartyContainer,{[c.validationErroredField]:r});return n?u===J.categoryA?N.jsxs(`div`,{className:f,"data-testid":`third-party-consent`,children:[N.jsxs(`p`,{className:o.p,children:[`Iâd like to hear from `,i,` about their products and services which are relevant to me.`,` `,d]}),N.jsxs(`div`,{children:[N.jsxs(`label`,{className:o.label,children:[N.jsx(`input`,{className:G(o.input,o.radio),type:`radio`,value:`CR_OPTIN`,name:`thirdPartyConsent`,required:!0,onInput:e,"data-testid":`checkbox-third-party-consent`,defaultChecked:!0}),`Yes`]}),N.jsxs(`label`,{className:o.label,children:[N.jsx(`input`,{className:G(o.input,o.radio),type:`radio`,value:`CR_OPTOUT`,name:`thirdPartyConsent`,onInput:e}),`No`]})]})]}):u===J.categoryB?N.jsx(`div`,{className:f,"data-testid":`third-party-consent`,children:N.jsxs(`label`,{className:G(o.label,`eln-third-party-consent-
4B`),children:[N.jsx(`input`,{className:G(o.input,o.checkbox),type:`checkbox`,value:`CR_OPTIN`,name:`thirdPartyConsent`,onInput:e,"data-testid":`checkbox-third-party-consent`}),N.jsxs(`p`,{className:o.p,children:[`Yes, I'd like to hear from `,i,` about their products and services which are relevant to me.`,` `,d]})]})}):u===J.categoryC?N.jsx(`div`,{className:f,"data-testid":`third-party-consent`,children:N.jsxs(`label`,{className:G(o.label,`eln-third-party-consent-B`),children:[N.jsx(`input`,{className:G(o.input,o.checkbox),type:`checkbox`,value:`CR_OPTOUT`,name:`thirdPartyConsent`,onInput:e,"data-testid":`checkbox-third-party-consent`}),N.jsxs(`p`,{className:o.p,children:[`Tick here if you do not want to hear from `,i,` about their products and services relevant to you.`,` `,d]})]})}):N.jsxs(`div`,{className:f,"data-testid":`third-party-consent`,children:[N.jsxs(`p`,{className:o.p,children:[`By signing up to `,l,` you agree to our terms and conditions and privacy policy. By continuing, you agree that Informa may contact you with updates about our related products and services including those of our carefully selected partners. Also, `,i,` may follow-up and contact you about their products and services. `,d]}),N.jsxs(`label`,{className:o.label,children:[`I agree to the\xA0`,N.jsx(`a`,{className:o.a,href:`https://www.informa.com/privacy-policy/`,target:`_blank`,rel:`noreferrer`,children:`Privacy Policy`})]})]}):null}var or={},sr=JSON.parse(`[["AF","AFG","004","ISO 3166-2:AF"],["AL","ALB","008","ISO 3166-2:AL"],["DZ","DZA","012","ISO 3166-2:DZ"],["AS","ASM","016","ISO 3166-2:AS"],["AD","AND","020","ISO 3166-2:AD"],["AO","AGO","024","ISO 3166-2:AO"],["AI","AIA","660","ISO 3166-2:AI"],["AQ","ATA","010","ISO 3166-2:AQ"],["AG","ATG","028","ISO 3166-2:AG"],["AR","ARG","032","ISO 3166-2:AR"],["AM","ARM","051","ISO 3166-2:AM"],["AW","ABW","533","ISO 3166-2:AW"],["AU","AUS","036","ISO 3166-2:AU"],["AT","AUT","040","ISO 3166-2:AT"],["AZ","AZE","031","ISO 3166-2:AZ"],["BS","BHS","044","ISO 3166-2:BS"],["BH","BHR","048","ISO 3166-2:BH"],["BD","BGD","050","ISO 3166-2:BD"],["BB","BRB","052","ISO 3166-2:BB"],["BY","BLR","112","ISO 3166-2:BY"],["BE","BEL","056","ISO 3166-2:BE"],["BZ","BLZ","084","ISO 3166-2:BZ"],["BJ","BEN","204","ISO 3166-2:BJ"],["BM","BMU","060","ISO 3166-2:BM"],["BT","BTN","064","ISO 3166-2:BT"],["BO","BOL","068","ISO 3166-2:BO"],["BA","BIH","070","ISO 3166-2:BA"],["BW","BWA","072","ISO 3166-2:BW"],["BV","BVT","074","ISO 3166-2:BV"],["BR","BRA","076","ISO 3166-2:BR"],["IO","IOT","086","ISO 3166-2:IO"],["BN","BRN","096","ISO 3166-2:BN"],["BG","BGR","100","ISO 3166-2:BG"],["BF","BFA","854","ISO 3166-2:BF"],["BI","BDI","108","ISO 3166-2:BI"],["KH","KHM","116","ISO 3166-2:KH"],["CM","CMR","120","ISO 3166-2:CM"],["CA","CAN","124","ISO 3166-2:CA"],["CV","CPV","132","ISO 3166-2:CV"],["KY","CYM","136","ISO 3166-2:KY"],["CF","CAF","140","ISO 3166-2:CF"],["TD","TCD","148","ISO 3166-2:TD"],["CL","CHL","152","ISO 3166-2:CL"],["CN","CHN","156","ISO 3166-2:CN"],["CX","CXR","162","ISO 3166-2:CX"],["CC","CCK","166","ISO 3166-2:CC"],["CO","COL","170","ISO 3166-2:CO"],["KM","COM","174","ISO 3166-2:KM"],["CG","COG","178","ISO 3166-2:CG"],["CD","COD","180","ISO 3166-2:CD"],["CK","COK","184","ISO 3166-2:CK"],["CR","CRI","188","ISO 3166-2:CR"],["CI","CIV","384","ISO 3166-2:CI"],["HR","HRV","191","ISO 3166-2:HR"],["CU","CUB","192","ISO 3166-2:CU"],["CY","CYP","196","ISO 3166-2:CY"],["CZ","CZE","203","ISO 3166-2:CZ"],["DK","DNK","208","ISO 3166-2:DK"],["DJ","DJI","262","ISO 3166-2:DJ"],["DM","DMA","212","ISO 3166-2:DM"],["DO","DOM","214","ISO 3166-2:DO"],["EC","ECU","218","ISO 3166-2:EC"],["EG","EGY","818","ISO 3166-2:EG"],["SV","SLV","222","ISO 3166-2:SV"],["GQ","GNQ","226","ISO 3166-2:GQ"],["ER","ERI","232","ISO 3166-2:ER"],["EE","EST","233","ISO 3166-2:EE"],["ET","ETH","231","ISO 3166-2:ET"],["FK","FLK","238","ISO 3166-2:FK"],["FO","FRO","234","ISO 3166-2:FO"],["FJ","FJI","242","ISO 3166-2:FJ"],["FI","FIN","246","ISO 3166-2:FI"],["FR","FRA","250","ISO 3166-2:FR"],["GF","GUF","254","ISO 3166-2:GF"],["PF","PYF","258","ISO 3166-2:PF"],["TF","ATF","260","ISO 3166-2:TF"],["GA","GAB","266","ISO 3166-2:GA"],["GM","GMB","270","ISO 3166-2:GM"],["GE","GEO","268","ISO 3166-2:GE"],["DE","DEU","276","ISO 3166-2:DE"],["GH","GHA","288","ISO 3166-2:GH"],["GI","GIB","292","ISO 3166-2:GI"],["GR","GRC","300","ISO 3166-2:GR"],["GL","GRL","304","ISO 3166-2:GL"],["GD","GRD","308","ISO 3166-2:GD"],["GP","GLP","312","ISO 3166-2:GP"],["GU","GUM","316","ISO 3166-2:GU"],["GT","GTM","320","ISO 3166-2:GT"],["GN","GIN","324","ISO 3166-2:GN"],["GW","GNB","624","ISO 3166-2:GW"],["GY","GUY","328","ISO 3166-2:GY"],["HT","HTI","332","ISO 3166-2:HT"],["HM","HMD","334","ISO 3166-2:HM"],["VA","VAT","336","ISO 3166-2:VA"],["HN","HND","340","ISO 3166-2:HN"],["HK","HKG","344","ISO 3166-2:HK"],["HU","HUN","348","ISO 3166-2:HU"],["IS","ISL","352","ISO 3166-2:IS"],["IN","IND","356","ISO 3166-2:IN"],["ID","IDN","360","ISO 3166-2:ID"],["IR","IRN","364","ISO 3166-2:IR"],["IQ","IRQ","368","ISO 3166-2:IQ"],["IE","IRL","372","ISO 3166-2:IE"],["IL","ISR","376","ISO 3166-2:IL"],["IT","ITA","380","ISO 3166-2:IT"],["JM","JAM","388","ISO 3166-2:JM"],["JP","JPN","392","ISO 3166-2:JP"],["JO","JOR","400","ISO 3166-2:JO"],["KZ","KAZ","398","ISO 3166-2:KZ"],["KE","KEN","404","ISO 3166-2:KE"],["KI","KIR","296","ISO 3166-2:KI"],["KP","PRK","408","ISO 3166-2:KP"],["KR","KOR","410","ISO 3166-2:KR"],["KW","KWT","414","ISO 3166-2:KW"],["KG","KGZ","417","ISO 3166-2:KG"],["LA","LAO","418","ISO 3166-2:LA"],["LV","LVA","428","ISO 3166-2:LV"],["LB","LBN","422","ISO 3166-2:LB"],["LS","LSO","426","ISO 3166-2:LS"],["LR","LBR","430","ISO 3166-2:LR"],["LY","LBY","434","ISO 3166-2:LY"],["LI","LIE","438","ISO 3166-2:LI"],["LT","LTU","440","ISO 3166-2:LT"],["LU","LUX","442","ISO 3166-2:LU"],["MO","MAC","446","ISO 3166-2:MO"],["MG","MDG","450","ISO 3166-2:MG"],["MW","MWI","454","ISO 3166-2:MW"],["MY","MYS","458","ISO 3166-2:MY"],["MV","MDV","462","ISO 3166-2:MV"],["ML","MLI","466","ISO 3166-2:ML"],["MT","MLT","470","ISO 3166-2:MT"],["MH","MHL","584","ISO 3166-2:MH"],["MQ","MTQ","474","ISO 3166-2:MQ"],["MR","MRT","478","ISO 3166-2:MR"],["MU","MUS","480","ISO 3166-2:MU"],["YT","MYT","175","ISO 3166-2:YT"],["MX","MEX","484","ISO 3166-2:MX"],["FM","FSM","583","ISO 3166-2:FM"],["MD","MDA","498","ISO 3166-2:MD"],["MC","MCO","492","ISO 3166-2:MC"],["MN","MNG","496","ISO 3166-2:MN"],["MS","MSR","500","ISO 3166-2:MS"],["MA","MAR","504","ISO 3166-2:MA"],["MZ","MOZ","508","ISO 3166-2:MZ"],["MM","MMR","104","ISO 3166-2:MM"],["NA","NAM","516","ISO 3166-2:NA"],["NR","NRU","520","ISO 3166-2:NR"],["NP","NPL","524","ISO 3166-2:NP"],["NL","NLD","528","ISO 3166-2:NL"],["NC","NCL","540","ISO 3166-2:NC"],["NZ","NZL","554","ISO 3166-2:NZ"],["NI","NIC","558","ISO 3166-2:NI"],["NE","NER","562","ISO 3166-2:NE"],["NG","NGA","566","ISO 3166-2:NG"],["NU","NIU","570","ISO 3166-2:NU"],["NF","NFK","574","ISO 3166-2:NF"],["MP","MNP","580","ISO 3166-2:MP"],["MK","MKD","807","ISO 3166-2:MK"],["NO","NOR","578","ISO 3166-2:NO"],["OM","OMN","512","ISO 3166-2:OM"],["PK","PAK","586","ISO 3166-2:PK"],["PW","PLW","585","ISO 3166-2:PW"],["PS","PSE","275","ISO 3166-2:PS"],["PA","PAN","591","ISO 3166-2:PA"],["PG","PNG","598","ISO 3166-2:PG"],["PY","PRY","600","ISO 3166-2:PY"],["PE","PER","604","ISO 3166-2:PE"],["PH","PHL","608","ISO 3166-2:PH"],["PN","PCN","612","ISO 3166-2:PN"],["PL","POL","616","ISO 3166-2:PL"],["PT","PRT","620","ISO 3166-2:PT"],["PR","PRI","630","ISO 3166-2:PR"],["QA","QAT","634","ISO 3166-2:QA"],["RE","REU","638","ISO 3166-2:RE"],["RO","ROU","642","ISO 3166-2:RO"],["RU","RUS","643","ISO 3166-2:RU"],["RW","RWA","646","ISO 3166-2:RW"],["SH","SHN","654","ISO 3166-2:SH"],["KN","KNA","659","ISO 3166-2:KN"],["LC","LCA","662","ISO 3166-2:LC"],["PM","SPM","666","ISO 3166-2:PM"],["VC","VCT","670","ISO 3166-2:VC"],["WS","WSM","882","ISO 3166-2:WS"],["SM","SMR","674","ISO 3166-2:SM"],["ST","STP","678","ISO 3166-2:ST"],["SA","SAU","682","ISO 3166-2:SA"],["SN","SEN","686","ISO 3166-2:SN"],["SC","SYC","690","ISO 3166-2:SC"],["SL","SLE","694","ISO 3166-2:SL"],["SG","SGP","702","ISO 3166-2:SG"],["SK","SVK","703","ISO 3166-2:SK"],["SI","SVN","705","ISO 3166-2:SI"],["SB","SLB","090","ISO 3166-2:SB"],["SO","SOM","706","ISO 3166-2:SO"],["ZA","ZAF","710","ISO 3166-2:ZA"],["GS","SGS","239","ISO 3166-2:GS"],["ES","ESP","724","ISO 3166-2:ES"],["LK","LKA","144","ISO 3166-2:LK"],["SD","SDN","729","ISO 3166-2:SD"],["SR","SUR","740","ISO 3166-2:SR"],["SJ","SJM","744","ISO 3166-2:SJ"],["SZ","SWZ","748","ISO 3166-2:SZ"],["SE","SWE","752","ISO 3166-2:SE"],["CH","CHE","756","ISO 3166-2:CH"],["SY","SYR","760","ISO 3166-2:SY"],["TW","TW
4N","158","ISO 3166-2:TW"],["TJ","TJK","762","ISO 3166-2:TJ"],["TZ","TZA","834","ISO 3166-2:TZ"],["TH","THA","764","ISO 3166-2:TH"],["TL","TLS","626","ISO 3166-2:TL"],["TG","TGO","768","ISO 3166-2:TG"],["TK","TKL","772","ISO 3166-2:TK"],["TO","TON","776","ISO 3166-2:TO"],["TT","TTO","780","ISO 3166-2:TT"],["TN","TUN","788","ISO 3166-2:TN"],["TR","TUR","792","ISO 3166-2:TR"],["TM","TKM","795","ISO 3166-2:TM"],["TC","TCA","796","ISO 3166-2:TC"],["TV","TUV","798","ISO 3166-2:TV"],["UG","UGA","800","ISO 3166-2:UG"],["UA","UKR","804","ISO 3166-2:UA"],["AE","ARE","784","ISO 3166-2:AE"],["GB","GBR","826","ISO 3166-2:GB"],["US","USA","840","ISO 3166-2:US"],["UM","UMI","581","ISO 3166-2:UM"],["UY","URY","858","ISO 3166-2:UY"],["UZ","UZB","860","ISO 3166-2:UZ"],["VU","VUT","548","ISO 3166-2:VU"],["VE","VEN","862","ISO 3166-2:VE"],["VN","VNM","704","ISO 3166-2:VN"],["VG","VGB","092","ISO 3166-2:VG"],["VI","VIR","850","ISO 3166-2:VI"],["WF","WLF","876","ISO 3166-2:WF"],["EH","ESH","732","ISO 3166-2:EH"],["YE","YEM","887","ISO 3166-2:YE"],["ZM","ZMB","894","ISO 3166-2:ZM"],["ZW","ZWE","716","ISO 3166-2:ZW"],["AX","ALA","248","ISO 3166-2:AX"],["BQ","BES","535","ISO 3166-2:BQ"],["CW","CUW","531","ISO 3166-2:CW"],["GG","GGY","831","ISO 3166-2:GG"],["IM","IMN","833","ISO 3166-2:IM"],["JE","JEY","832","ISO 3166-2:JE"],["ME","MNE","499","ISO 3166-2:ME"],["BL","BLM","652","ISO 3166-2:BL"],["MF","MAF","663","ISO 3166-2:MF"],["RS","SRB","688","ISO 3166-2:RS"],["SX","SXM","534","ISO 3166-2:SX"],["SS","SSD","728","ISO 3166-2:SS"],["XK","XKK","983","ISO 3166-2:XK"]]`),cr=`br.cy.dv.sw.eu.af.am.ha.ku.ml.mt.no.ps.sd.so.sq.ta.tg.tt.ug.ur.vi.ar.az.be.bg.bn.bs.ca.cs.da.de.el.en.es.et.fa.fi.fr.ga.gl.he.hi.hr.hu.hy.id.is.it.ja.ka.kk.km.ko.ky.lt.lv.mk.mn.mr.ms.nb.nl.nn.pl.pt.ro.ru.sk.sl.sr.sv.th.tk.tr.uk.uz.zh`.split(`.`),lr={},ur;function dr(){if(ur)return lr;ur=1,lr.remove=a;for(var e=[{base:` `,chars:`\xA0`},{base:`0`,chars:`ß`},{base:`A`,chars:`â¶ï¼¡ÃÃÃẦẤẪẨÃÄÄáº°áº®áº´áº²È¦Ç ÃÇẢÃ
ǺÇÈÈẠẬẶá¸ÄȺⱯ`},{base:`AA`,chars:`ê²`},{base:`AE`,chars:`ÃǼǢ`},{base:`AO`,chars:`ê´`},{base:`AU`,chars:`ê¶`},{base:`AV`,chars:`ê¸êº`},{base:`AY`,chars:`ê¼`},{base:`B`,chars:`â·ï¼¢á¸á¸á¸ÉÆ`},{base:`C`,chars:`â¸ï¼£ê¾á¸ÄCÄÄÄÃÆÈ»`},{base:`D`,chars:`â¹ï¼¤á¸Äá¸á¸á¸á¸ÄÆÆá´
ê¹`},{base:`Dh`,chars:`Ã`},{base:`DZ`,chars:`DZÇ`},{base:`Dz`,chars:`DzÇ
`},{base:`E`,chars:`Éâºï¼¥ÃÃÃá»áº¾á»á»áº¼Äá¸á¸ÄÄÃẺÄÈÈẸá»È¨á¸Äá¸á¸ÆÆá´`},{base:`F`,chars:`ê¼â»ï¼¦á¸Æê»`},{base:`G`,chars:`â¼ï¼§Ç´ÄḠÄÄ Ç¦Ä¢Ç¤Æê ê½ê¾É¢`},{base:`H`,chars:`â½ï¼¨Ä¤á¸¢á¸¦ÈḤḨḪĦⱧⱵê`},{base:`I`,chars:`â¾ï¼©ÃÃÃĨĪĬİÃḮá»ÇÈÈá»Ä®á¸¬Æ`},{base:`J`,chars:`â¿ï¼ªÄ´ÉÈ·`},{base:`K`,chars:`âKḰǨḲĶḴÆâ±©êêêê¢`},{base:`L`,chars:`âLĿĹĽḶḸĻḼḺÅȽⱢⱠêêê`},{base:`LJ`,chars:`Ç`},{base:`Lj`,chars:`Ç`},{base:`M`,chars:`âï¼á¸¾á¹á¹â±®ÆÏ»`},{base:`N`,chars:`ê¤È âNǸÅÃá¹Åá¹Å
á¹á¹Æêá´`},{base:`NJ`,chars:`Ç`},{base:`Nj`,chars:`Ç`},{base:`O`,chars:`âOÃÃÃá»á»á»á»Ãá¹È¬á¹Åá¹á¹ÅȮȰÃȪá»ÅÇÈÈÆ á»á»á» á»á»¢á»á»ÇªÇ¬ÃÇ¾ÆÆêê`},{base:`OE`,chars:`Å`},{base:`OI`,chars:`Æ¢`},{base:`OO`,chars:`ê`},{base:`OU`,chars:`È¢`},{base:`P`,chars:`â
ï¼°á¹á¹Æ¤â±£êêê`},{base:`Q`,chars:`âï¼±êêÉ`},{base:`R`,chars:`âï¼²Åá¹ÅÈÈá¹á¹Åá¹ÉⱤêê¦ê`},{base:`S`,chars:`âï¼³áºÅṤÅṠŠṦṢṨÈÅâ±¾ê¨ê`},{base:`T`,chars:`âTṪŤṬÈŢṰṮŦƬƮȾê`},{base:`Th`,chars:`Ã`},{base:`TZ`,chars:`ê¨`},{base:`U`,chars:`âï¼µÃÃÃŨṸŪṺŬÃÇÇÇÇỦŮŰÇÈÈÆ¯á»ªá»¨á»®á»¬á»°á»¤á¹²Å²á¹¶á¹´É`},{base:`V`,chars:`âVṼṾƲêÉ
`},{base:`VY`,chars:`ê `},{base:`W`,chars:`âï¼·áºáºÅ´áºáºáºâ±²`},{base:`X`,chars:`âXáºáº`},{base:`Y`,chars:`âYỲÃŶỸȲáºÅ¸á»¶á»´Æ³ÉỾ`},{base:`Z`,chars:`âZŹáºÅ»Å½áºáºÆµÈ¤â±¿â±«ê¢`},{base:`a`,chars:`âï½áºÃ áâầấẫẩãÄÄằắẵẳȧǡäÇảåǻÇÈÈạáºáº·á¸Ä
â±¥ÉÉ`},{base:`aa`,chars:`ê³`},{base:`ae`,chars:`æǽǣ`},{base:`ao`,chars:`êµ`},{base:`au`,chars:`ê·`},{base:`av`,chars:`ê¹ê»`},{base:`ay`,chars:`ê½`},{base:`b`,chars:`âï½á¸á¸
á¸ÆÆÉÆ`},{base:`c`,chars:`ï½âÄÄÄÄÃ§á¸ÆÈ¼ê¿â`}
4,{base:`d`,chars:`âï½á¸Äá¸á¸á¸á¸ÄÆÉÉÆá§Ôêª`},{base:`dh`,chars:`ð`},{base:`dz`,chars:`dzÇ`},{base:`e`,chars:`âï½
èéêá»áº¿á»
á»áº½Äá¸á¸ÄÄëẻÄÈ
Èẹá»È©á¸Äá¸á¸ÉÇ`},{base:`f`,chars:`âï½á¸Æ`},{base:`ff`,chars:`ï¬`},{base:`fi`,chars:`ï¬`},{base:`fl`,chars:`ï¬`},{base:`ffi`,chars:`ï¬`},{base:`ffl`,chars:`ï¬`},{base:`g`,chars:`âï½ÇµÄḡÄÄ¡Ç§Ä£Ç¥É ê¡ê¿áµ¹`},{base:`h`,chars:`âï½Ä¥á¸£á¸§ÈḥḩḫáºÄ§â±¨â±¶É¥`},{base:`hv`,chars:`Æ`},{base:`i`,chars:`âï½Ã¬ÃîĩīÄïḯá»ÇÈÈá»Ä¯á¸É¨Ä±`},{base:`j`,chars:`âï½ÄµÇ°É`},{base:`k`,chars:`âï½á¸±Ç©á¸³Ä·á¸µÆâ±ªêêê
ê£`},{base:`l`,chars:`âï½ÅÄºÄ¾á¸·á¸¹Ä¼á¸½á¸»Å¿ÅÆÉ«â±¡êêêÉ`},{base:`lj`,chars:`Ç`},{base:`m`,chars:`âï½á¸¿á¹á¹É±É¯`},{base:`n`,chars:`âï½Ç¹Åñá¹
Åá¹Åá¹á¹ÆÉ²Åêê¥Ð»Ô`},{base:`nj`,chars:`Ç`},{base:`o`,chars:`âï½Ã²Ã³Ã´á»á»á»á»Ãµá¹Èá¹Åá¹á¹Åȯȱöȫá»ÅÇÈÈÆ¡á»á»á»¡á»á»£á»á»Ç«ÇøǿêêɵÉá´`},{base:`oe`,chars:`Å`},{base:`oi`,chars:`Æ£`},{base:`oo`,chars:`ê`},{base:`ou`,chars:`È£`},{base:`p`,chars:`âï½á¹á¹Æ¥áµ½êêêÏ`},{base:`q`,chars:`â ï½Éêê`},{base:`r`,chars:`â¡ï½Åá¹ÅÈÈá¹á¹Åá¹Éɽêê§ê`},{base:`s`,chars:`â¢ï½Åá¹¥ÅṡšṧṣṩÈÅÈ¿ê©ê
áºÊ`},{base:`ss`,chars:`Ã`},{base:`t`,chars:`â£ï½á¹«áºÅ¥á¹ÈţṱṯŧÆÊⱦê`},{base:`th`,chars:`þ`},{base:`tz`,chars:`ê©`},{base:`u`,chars:`â¤ï½Ã¹ÃºÃ»Å©á¹¹Å«á¹»ÅüÇÇÇÇủůűÇÈÈÆ°á»«á»©á»¯á»á»±á»¥á¹³Å³á¹·á¹µÊ`},{base:`v`,chars:`â¥ï½á¹½á¹¿ÊêÊ`},{base:`vy`,chars:`ê¡`},{base:`w`,chars:`â¦ï½áºáºÅµáºáº
áºáºâ±³`},{base:`x`,chars:`â§ï½áºáº`},{base:`y`,chars:`â¨ï½á»³Ã½Å·á»¹È³áºÃ¿á»·áºá»µÆ´Éỿ`},{base:`z`,chars:`â©ï½ÅºáºÅ¼Å¾áºáºÆ¶È¥Éⱬê£`}],t={},n=0;n<e.length;n+=1)for(var r=e[n].chars,i=0;i<r.length;i+=1)t[r[i]]=e[n].base;
4function a(e){return e.replace(/[^\u0000-\u007e]/g,function(e){return t[e]||e})}return lr.replacementList=e,lr.diacriticsMap=t,lr}var fr;function pr(){return fr||(fr=1,function(e){let t=sr,n=cr,r=dr().remove,i={},a={},o={},s={},c={};t.forEach(function(e){let t=e;a[t[0]]=t[1],o[t[1]]=t[0],s[t[2]]=t[0],c[t[0]]=t[2]});function l(e){return(`000`+(e||``)).slice(-3)}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function d(e,t){return Object.keys(e).reduce(function(n,r){let i=e[r];return n[r]=t(i,r),n},{})}function f(e,t){switch(e){case`official`:return Array.isArray(t)?t[0]:t;case`all`:return typeof t==`string`?[t]:t;case`alias`:return Array.isArray(t)?t[1]||t[0]:t;default:throw TypeError(`LocaleNameType must be one of these: all, official, alias!`)}}e.registerLocale=function(e){if(!e.locale)throw TypeError(`Missing localeData.locale`);if(!e.countries)throw TypeError(`Missing localeData.countries`);i[e.locale]=e.countries};function p(e){return o[e]}e.alpha3ToAlpha2=p;function m(e){return a[e]}e.alpha2ToAlpha3=m;function h(e){return c[p(e)]}e.alpha3ToNumeric=h;function g(e){return c[e]}e.alpha2ToNumeric=g;function _(e){let t=l(e);return m(s[t])}e.numericToAlpha3=_;function v(e){let t=l(e);return s[t]}e.numericToAlpha2=v;function y(e){if(typeof e==`string`){if(/^[0-9]*$/.test(e))return _(e);if(e.length===2)return m(e.toUpperCase());if(e.length===3)return e.toUpperCase()}if(typeof e==`number`)return _(e)}e.toAlpha3=y;function b(e){if(typeof e==`string`){if(/^[0-9]*$/.test(e))return v(e);if(e.length===2)return e.toUpperCase();if(e.length===3)return p(e.toUpperCase())}if(typeof e==`number`)return v(e)}e.toAlpha2=b,e.getName=function(e,t,n={}){`select`in n||(n.select=`official`);try{let r=i[t.toLowerCase()][b(e)];return f(n.select,r)}catch{return}},e.getNames=function(e,t={}){`select`in t||(t.select=`official`);let n=i[e.toLowerCase()];return n===void 0?{}:d(n,function(e){return f(t.select,e)})},e.getAlpha2Code=function(e,t){let n=e=>e.toLowerCase(),r=(e,t)=>n(e)===n(t);try{let n=i[t.toLowerCase()];for(let t in n)if(u(n,t)){if(typeof n[t]==`string`&&r(n[t],e))return t;if(Array.isArray(n[t])){for(let i of n[t])if(r(i,e))return t}}return}catch{return}},e.getSimpleAlpha2Code=function(e,t){let n=e=>r(e.toLowerCase()),a=(e,t)=>n(e)===n(t);try{let n=i[t.toLowerCase()];for(let t in n)if(u(n,t)){if(typeof n[t]==`string`&&a(n[t],e))return t;if(Array.isArray(n[t])){for(let r of n[t])if(a(r,e))return t}}return}catch{return}},e.getAlpha2Codes=function(){return a},e.getAlpha3Code=function(t,n){let r=e.getAlpha2Code(t,n);if(r)return e.toAlpha3(r)},e.getSimpleAlpha3Code=function(t,n){let r=e.getSimpleAlpha2Code(t,n);if(r)return e.toAlpha3(r)},e.getAlpha3Codes=function(){return o},e.getNumericCodes=function(){return s},e.langs=function(){return Object.keys(i)},e.getSupportedLanguages=function(){return n},e.isValid=function(e){if(!e)return!1;let t=e.toString().toUpperCase();return u(o,t)||u(a,t)||u(s,t)}}(or)),or}var mr=j(pr()),hr={locale:`en`,countries:{AF:`Afghanistan`,AL:`Albania`,DZ:`Algeria`,AS:`American Samoa`,AD:`Andorra`,AO:`Angola`,AI:`Anguilla`,AQ:`Antarctica`,AG:`Antigua and Barbuda`,AR:`Argentina`,AM:`Armenia`,AW:`Aruba`,AU:`Australia`,AT:`Austria`,AZ:`Azerbaijan`,BS:`Bahamas`,BH:`Bahrain`,BD:`Bangladesh`,BB:`Barbados`,BY:`Belarus`,BE:`Belgium`,BZ:`Belize`,BJ:`Benin`,BM:`Bermuda`,BT:`Bhutan`,BO:`Bolivia`,BA:`Bosnia and Herzegovina`,BW:`Botswana`,BV:`Bouvet Island`,BR:`Brazil`,IO:`British Indian Ocean Territory`,BN:`Brunei Darussalam`,BG:`Bulgaria`,BF:`Burkina Faso`,BI:`Burundi`,KH:`Cambodia`,CM:`Cameroon`,CA:`Canada`,CV:`Cape Verde`,KY:`Cayman Islands`,CF:`Central African Republic`,TD:`Chad`,CL:`Chile`,CN:[`People's Republic of China`,`China`],CX:`Christmas Island`,CC:`Cocos (Keeling) Islands`,CO:`Colombia`,KM:`Comoros`,CG:[`Republic of the Congo`,`Congo`],CD:[`Democratic Republic of the Congo`,`Congo`],CK:`Cook Islands`,CR:`Costa Rica`,CI:[`Cote d'Ivoire`,`Côte d'Ivoire`,`Ivory Coast`],HR:`Croatia`,CU:`Cuba`,CY:`Cyprus`,CZ:[`Czech Republic`,`Czechia`],DK:`Denmark`,DJ:`Djibouti`,DM:`Dominica`,DO:`Dominican Republic`,EC:`Ecuador`,EG:`Egypt`,SV:`El Salvador`,GQ:`Equatorial Guinea`,ER:`Eritrea`,EE:`Estonia`,ET:`Ethiopia`,FK:`Falkland Islands (Malvinas)`,FO:`Faroe Islands`,FJ:`Fiji`,FI:`Finland`,FR:`France`,GF:`French Guiana`,PF:`French Polynesia`,TF:`French Southern Territories`,GA:`Gabon`,GM:[`Republic of The Gambia`,`The Gambia`,`Gambia`],GE:`Georgia`,DE:`Germany`,GH:`Ghana`,GI:`Gibraltar`,GR:`Greece`,GL:`Greenland`,GD:`Grenada`,GP:`Guadeloupe`,GU:`Guam`,GT:`Guatemala`,GN:`Guinea`,GW:`Guinea-Bissau`,GY:`Guyana`,HT:`Haiti`,HM:`Heard Island and McDonald Islands`,VA:`Holy See (Vatican City State)`,HN:`Honduras`,HK:`Hong Kong`,HU:`Hungary`,IS:`Iceland`,IN:`India`,ID:`Indonesia`,IR:[`Islamic Republic of Iran`,`Iran`],IQ:`Iraq`,IE:`Ireland`,IL:`Israel`,IT:`Italy`,JM:`Jamaica`,JP:`Japan`,JO:`Jordan`,KZ:`K
4azakhstan`,KE:`Kenya`,KI:`Kiribati`,KP:`North Korea`,KR:[`South Korea`,`Korea, Republic of`,`Republic of Korea`],KW:`Kuwait`,KG:`Kyrgyzstan`,LA:`Lao People's Democratic Republic`,LV:`Latvia`,LB:`Lebanon`,LS:`Lesotho`,LR:`Liberia`,LY:`Libya`,LI:`Liechtenstein`,LT:`Lithuania`,LU:`Luxembourg`,MO:`Macao`,MG:`Madagascar`,MW:`Malawi`,MY:`Malaysia`,MV:`Maldives`,ML:`Mali`,MT:`Malta`,MH:`Marshall Islands`,MQ:`Martinique`,MR:`Mauritania`,MU:`Mauritius`,YT:`Mayotte`,MX:`Mexico`,FM:`Micronesia, Federated States of`,MD:`Moldova, Republic of`,MC:`Monaco`,MN:`Mongolia`,MS:`Montserrat`,MA:`Morocco`,MZ:`Mozambique`,MM:`Myanmar`,NA:`Namibia`,NR:`Nauru`,NP:`Nepal`,NL:[`Netherlands`,`The Netherlands`,`Netherlands (Kingdom of the)`],NC:`New Caledonia`,NZ:`New Zealand`,NI:`Nicaragua`,NE:`Niger`,NG:`Nigeria`,NU:`Niue`,NF:`Norfolk Island`,MK:[`The Republic of North Macedonia`,`North Macedonia`],MP:`Northern Mariana Islands`,NO:`Norway`,OM:`Oman`,PK:`Pakistan`,PW:`Palau`,PS:[`State of Palestine`,`Palestine`],PA:`Panama`,PG:`Papua New Guinea`,PY:`Paraguay`,PE:`Peru`,PH:`Philippines`,PN:[`Pitcairn`,`Pitcairn Islands`],PL:`Poland`,PT:`Portugal`,PR:`Puerto Rico`,QA:`Qatar`,RE:`Reunion`,RO:`Romania`,RU:[`Russian Federation`,`Russia`],RW:`Rwanda`,SH:`Saint Helena`,KN:`Saint Kitts and Nevis`,LC:`Saint Lucia`,PM:`Saint Pierre and Miquelon`,VC:`Saint Vincent and the Grenadines`,WS:`Samoa`,SM:`San Marino`,ST:`Sao Tome and Principe`,SA:`Saudi Arabia`,SN:`Senegal`,SC:`Seychelles`,SL:`Sierra Leone`,SG:`Singapore`,SK:`Slovakia`,SI:`Slovenia`,SB:`Solomon Islands`,SO:`Somalia`,ZA:`South Africa`,GS:`South Georgia and the South Sandwich Islands`,ES:`Spain`,LK:`Sri Lanka`,SD:`Sudan`,SR:`Suriname`,SJ:`Svalbard and Jan Mayen`,SZ:`Eswatini`,SE:`Sweden`,CH:`Switzerland`,SY:`Syrian Arab Republic`,TW:[`Taiwan, Province of China`,`Taiwan`],TJ:`Tajikistan`,TZ:[`United Republic of Tanzania`,`Tanzania`],TH:`Thailand`,TL:`Timor-Leste`,TG:`Togo`,TK:`Tokelau`,TO:`Tonga`,TT:`Trinidad and Tobago`,TN:`Tunisia`,TR:[`Türkiye`,`Turkey`],TM:`Turkmenistan`,TC:`Turks and Caicos Islands`,TV:`Tuvalu`,UG:`Uganda`,UA:`Ukraine`,AE:[`United Arab Emirates`,`UAE`],GB:[`United Kingdom`,`UK`,`Great Britain`],US:[`United States of America`,`United States`,`USA`,`U.S.A.`,`US`,`U.S.`],UM:`United States Minor Outlying Islands`,UY:`Uruguay`,UZ:`Uzbekistan`,VU:`Vanuatu`,VE:`Venezuela`,VN:`Vietnam`,VG:`Virgin Islands, British`,VI:`Virgin Islands, U.S.`,WF:`Wallis and Futuna`,EH:`Western Sahara`,YE:`Yemen`,ZM:`Zambia`,ZW:`Zimbabwe`,AX:[`Ã
land Islands`,`Aland Islands`],BQ:`Bonaire, Sint Eustatius and Saba`,CW:`Curaçao`,GG:`Guernsey`,IM:`Isle of Man`,JE:`Jersey`,ME:`Montenegro`,BL:`Saint Barthélemy`,MF:`Saint Martin (French part)`,RS:`Serbia`,SX:`Sint Maarten (Dutch part)`,SS:`South Sudan`,XK:`Kosovo`}},gr=2,_r=new class{constructor(e){this.adapter=e}getCountryCode(e){return this.adapter.getCode(e)}}(new class{constructor(){mr.registerLocale(hr),this.library=mr}getCode(e){return e?.length===gr||!e?e:this.library.getAlpha2Code(e,`en`)||e}}),vr=new Ht,yr=e=>{let t=vr.getCategoryByCountryCode(e);return{thirdPartyConsentTouched:t===J.categoryA,thirdPartyConsentOption:t===J.categoryA?`CR_OPTIN`:``}},br=e=>{let t=vr.getCategoryByCountryCode(e);return{firstPartyConsentTouched:t===J.categoryA,firstPartyConsentOption:t===J.categoryA?`CR_OPTIN`:``}},xr=(e,t,n,r)=>{let i=Se[Ge(r)],a=e.reduce((e,{htmlName:t,value:n})=>(i[t]&&(e[i[t]]=n),e),{}),o=je(),s=_r.getCountryCode(t?.country||a.country),c=Ze(t?.state||a?.state)||``;return{...o,...t,...a,...n,country:s,state:c}};function Sr(e){let t=q(),n=(0,E.useRef)(!1),r=()=>{!n.current&&e.formInteractionCallback&&(n.current=!0,e.formInteractionCallback())},[i,a]=(0,E.useState)({contentType:e.contentType,contentId:e.contentId,thirdPartyConsent:!1,formFields:[],formId:null,countryCode:_r.getCountryCode(e.countryCode),emailAddress:e.iirisUserProfile?.business_email||e.emailAddress||``,firstPartyConsent:!1}),[o,s]=(0,E.useState)({elements:e.elements,showAllViolations:!1,...yr(e.countryCode),firstPartyConsentOption:``,firstPartyConsentTouched:!1}),[c,l]=(0,E.useState)(),u=!e.iirisUserProfile&&Ue(e.platformApiService.siteId);function d(t,n){D&&O&&(t=[{htmlName:O.fieldName,value:e.emailAddress??i.emailAddress,violations:[],touched:!0},...t]);let r=t.find(e=>e.htmlName===I.COUNTRY||e.htmlName===I.MARKETO_COUNTRY)?.value||e.countryCode,o=_r.getCountryCode(r),c=t.find(e=>e.htmlName===I.EMAIL_ADDRESS||e.htmlName===I.BUSINESS_EMAIL||e.htmlName===I.MARKETO_EMAIL)?.value||``;s(e=>({...e,elements:n,...br(o)})),a(e=>
4({...e,emailAddress:c,countryCode:o,formFields:t}))}let f=e=>{let t=e.value;e.type===`checkbox`&&(t=e.checked?e.value:``),e.type===`radio`&&(t=e.value),s(n=>({...n,thirdPartyConsentOption:t,thirdPartyConsentTouched:e.checked}))},p=e=>{s(t=>({...t,firstPartyConsentOption:vr.getValueByElement(e),firstPartyConsentTouched:!0}))},m=e=>{e.preventDefault();let t=e.currentTarget;t.name===I.THIRD_PARTY_CONSENT?f(t):t.name===I.CONSENT&&p(t)},h=(t,n,r)=>r&&r===`wealthmanagement`&&e.hideThirdPartyConsent?!1:vr.getThirdConsentValue(t,n),g=async t=>{var n,r;if((n=e.submissionCallback)==null||n.call(e),s(e=>({...e,showAllViolations:!0})),u&&!c)return;let a=!e.forceThirdPartyConsentAsFalse&&h(i.countryCode,o.thirdPartyConsentOption,e.platformApiService.siteId),{formFields:l}=i,d=e.iirisUserProfile||a?!0:vr.getFirstConsentValue(i.countryCode,o.firstPartyConsentOption,a),f=xr(l,e.iirisUserProfile,{firstPartyConsent:d,thirdPartyConsent:a},e.formStorage);if(l.some(({violations:e})=>e.length))return;let p={formFields:l,emailAddress:e.iirisUserProfile?.business_email||i.emailAddress||e.emailAddress||``,thirdPartyConsent:a,firstPartyConsent:d,contentType:e.contentType,contentId:e.contentId,formId:e.formId||``,gatingAction:e.gatingAction,honeypot:t},m={isSuccessful:!1,message:`Submitting data...`,status:H.PENDING},g=D&&O?[O,...o.elements??[]]:o.elements;e.subscriptionStateHandler(m);try{let t=await e.platformApiService.submitGatedContentFormData(p,e.iirisUserProfile,g,l,c);if(t.status===200){m.isSuccessful=!0,m.message=`SUCCESS`,m.status=H.SUCCESS;let n={...t,data:{...t.data,submissionData:f}};e.completionCallback(n)}}catch(t){qt(t),m.isSuccessful=!1,m.message=`A problem has occurred with processing your request, please wait a few minutes and try again.`,m.status=H.ERROR,e.subscriptionStateHandler(m),(r=e.submissionErrorCallback)==null||r.call(e,t)}},_=async e=>{e.preventDefault(),await g(Rt(e.currentTarget))},v=e=>e.includes(`Captcha is invalid!`),y=()=>{let e=i.formFields.filter(e=>e.touched||o.showAllViolations).flatMap(({violations:e})=>e),t=[];return o.showAllViolations&&u&&!c&&t.push(`Captcha is invalid!`),{errors:e,otherErrors:t}},b=e.subscriptionState&&e.subscriptionState.status,{elements:x=[],inContextValidationMessage:S,iirisUserProfile:ee,hideFirstPartyConsent:te,hideThirdPartyConsent:C}=e,{errors:w,otherErrors:T}=y(),D=Ke(e.contentType,e.isLeadGenPage||!1),O=D?x.find(e=>qe(e.fieldName)):void 0,k=D&&e.emailAddress?x.filter(e=>!qe(e.fieldName)):x,A=Je(e);(0,E.useEffect)(()=>{var t;(t=e.unlockedContentCallback)==null||t.call(e,A)},[A]);let j=A?De:e.title,ne=A?Oe:e.subtitle,M=A&&e.unlockedSubmitButtonText?e.unlockedSubmitButtonText:e.submitButtonText;if(b===H.PENDING)return N.jsx(Gt,{});if(b===H.ERROR)return N.jsx(Kt,{title:`A problem has occurred`,message:`A problem has occurred with processing your request, please wait a few minutes and try again.`,returnFunction:e.completionCallback});{let{base:n,formLayout:a}=t,s=A?G(n.p,a.unlockedTitle):G(n.p,a.title),c=A?G(n.p,a.unlockedDescription):G(n.p,a.description);return N.jsx(`div`,{className:a.container,onFocus:r,children:N.jsxs(`form`,{noValidate:!0,className:G(n.form,a.form),onSubmit:_,children:[N.jsx(Lt,{}),N.jsxs(`div`,{children:[typeof j==`string`?N.jsx(`p`,{className:s,children:j}):j,typeof ne==`string`?N.jsx(`p`,{className:c,children:ne}):ne]}),!S&&N.jsx(Jt,{validationErrors:w,otherErrors:T}),k&&N.jsx(It,{onChange:d,elements:k,showAllViolations:o.showAllViolations,showErrorMessages:S,siteId:e.platformApiService.siteId,wideInputElemets:D?Ee:Te}),!te&&!ee&&N.jsx(Wt,{sponsorName:e.sponsorName,countryCode:_r.getCountryCode(i.countryCode),changeHandler:m,hideConsentContent:!te&&!ee,error:S&&T.includes(be),defaultCheckedYes:h(i.countryCode,o.thirdPartyConsentOption,e.platformApiService.siteId)}),!C&&N.jsx(ar,{contentType:e.contentType,countryCode:_r.getCountryCode(e.countryCode||i.countryCode),changeHandler:m,error:S&&o.showAllViolations,sponsorName:e.sponsorName}),u&&N.jsx(Xn,{className:a.captchaContainer,setToken:l,error:S&&o.showAllViolations&&v(T)}),N.jsx(`button`,{className:G(n.button,a.submit),children:M??`Continue`})]})})}}var Cr=(e,t)=>
4e.length?e.map(e=>(Ce[t]&&Ce[t].includes(e.fieldName)&&(e.validations=[...we[e.fieldName].rules]),e)):[],wr={email:`business_email`,firstname:`first_name`,lastname:`last_name`,address:`BPIADD`,city:`City`,zip:`BPIPCZ`,phone:`BPIPH`,company:`company`,jobtitle:`job_title`},Tr={Email:`business_email`,FirstName:`first_name`,LastName:`last_name`,Title:`job_title`,Company:`company`,businessType:`industry`,jobFunction:`job_function`,Country:`country`,State:`state`,Phone:`phone`,Demo_JobLevel:`job_level`,Demo_FSD_ManagementType:`company_type`,Demo_EmployeeLocation:`job_area`,Demo_FSD_AnnualFBPurchases:`company_revenue`,numberofLocations:`job_area`,fsd_annual_fb_purchases:`company_revenue`,fsd_management_type:`company_type`,company_name:`company`,phone_number:`phone`,nature_of_business:`industry`,employee_location:`job_area`},Er=e=>({foodservicedirector:Tr,bioprocessintl:wr})[e]||{},Dr=(e,t)=>typeof e==`string`&&Object.keys(t).includes(e),Or=[`industry`,`job_function`,`JF_JobFunction`],kr=(e,t,n)=>{let r=ye[n]||``,i=He(e,t);if(!i||i.length===0)return;let a=i.find(e=>e.brand===r||e.brand===n);return a?a.id:i[0]?.id},Ar=({clientId:e,user:t,element:n})=>{let r=Er(e)[n.fieldName]||n.fieldName;if(Dr(r,t)&&t[r])return t[r];if(Or.includes(r))return kr(t,r,e);let i=We(e,t);return i?i[n.fieldName]||``:void 0};function jr(e){let t=new Qe(e.platformServiceBaseUrl,e.clientId,e.authorization,void 0,e.subBrandId,e.version,e.iirisUserProfile,e.productId),[n,r]=(0,E.useState)({forms:{}}),[i,a]=(0,E.useState)({isSuccessful:!1,message:`PRE-SUB`,status:H.PENDING}),o=(0,E.useRef)(null),s=e=>{o.current&&o.current.scrollIntoView({behavior:`smooth`,block:`start`}),a({isSuccessful:e.isSuccessful,message:e.message,status:e.status})},c=(t,n)=>n.reduce((n,r)=>Ar({clientId:e.clientId,user:t,element:r})?n.filter(e=>e.fieldName!==r.fieldName):n,n),l=(t,n)=>{let r=[`business_email`,`email`,`firstname`,`lastname`,`state`,`region`,`country`,`business_email`,`first_name`,`last_name`];return n.reduce((n,i)=>{let a=Ar({clientId:e.clientId,user:t,element:i});return r.includes(i.fieldName)||a!=null&&a!==``?n.filter(e=>e.fieldName!==i.fieldName):n},n)},u=t=>{let n=t.attributes.elements.filter(e=>e.elementType!==`button`).filter(t=>e.clientId!==`nrn`||p(t));return{...t,attributes:{...t.attributes,elements:n}}},d=async()=>{let{default_gating_form:n}=await t.getEntitlementFormConfiguration()||{},i={},o=e.entryData?.gateWithExternalForm,s=!1,d=!1,f=!1,p=e.entryData.sponsors&&e.entryData.sponsors?.length>1?`sponsors mentioned above`:e.entryData.sponsors?.[0]?.title??``;if(e.entryData.sponsorshipGatingExternalFormId){let n=await t.getFormById(e.entryData.sponsorshipGatingExternalFormId,!1,{"x-content-type":e.contentType});d=Ie(e.clientId,e.entryData?.isPaidContent||!1)||n.hideThirdPartyConsent,s=!e.iirisUserProfile,f=n.hideThirdPartyConsent,e.iirisUserProfile&&(n.attributes.elements=c(e.iirisUserProfile,n.attributes.elements)),e.entryData.gateWithSiteReg||(s=!1),i[e.entryData.sponsorshipGatingExternalFormId]=u(n)}else if(n){let r=await t.getFormById(n,!1,{"x-content-type":e.contentType});(!e.entryData.gateWithExternalForm||e.entryData.gateWithExternalForm===`None`)&&(o=r.formType===F.HUBSPOT?F.HUBSPOT:F.ELOQUA),e.iirisUserProfile&&(r.attributes.elements=l(e.iirisUserProfile,r.attributes.elements)),i[n]=u(r)}a(e=>({...e,status:H.NEW})),r(t=>({formId:e.entryData.sponsorshipGatingExternalFormId,formStorage:e.entryData.gateWithExternalForm===`None`?o:e.entryData.gateWithExternalForm,forms:{...t.forms,...i},error:null,hideFirstPartyConsent:s,hideThirdPartyConsent:d,forceThirdPartyConsentAsFalse:f,sponsorName:p||void 0}))},f=async()=>{var t;try{a(e=>({...e,status:H.PENDING})),await d()}catch(n){(t=e.loadErrorCallback)==null||t.call(e,n),qt(n),a(e=>({...e,status:H.ERROR,message:`We are having issues responding to your request! Please try again later.`})),r(e=>({...e,error:!0}))}},p=e=>!he.includes(e.fieldName)||!!e.validations?.some(e=>e.type===`IsRequiredCondition`);(0,E.useEffect)(()=>{var t;(t=e.loadSuccessCallback)==null||t.call(e)},[]),(0,E.useEffect)(()=>{f()},[e.iirisUserProfile]);let m=(0,E.useMemo)(()=>{let t=[];
4return Object.keys(n.forms).forEach(e=>{let r=n.forms[e];t=[...t,...r?.attributes?.elements||[]]}),Cr(t,e.clientId)},[n.forms,e.clientId]),h=(0,E.useMemo)(()=>Re(m,n.sponsorName||``),[m,n.sponsorName]),g=(0,E.useMemo)(()=>Object.keys(n.forms).map(e=>{let t=n.forms[e];return N.jsx(tr,{formResponse:t},e)}),[n.forms]);return N.jsxs(`div`,{ref:o,children:[g,N.jsx(K.Provider,{value:lt(e.classNames,`entitlement`),children:N.jsx(Sr,{platformApiService:t,contentType:e.contentType,contentId:e.contentId,submissionCallback:e.submissionCallback,completionCallback:e.completionCallback,submissionErrorCallback:e.submissionErrorCallback,loadErrorCallback:e.loadErrorCallback,formInteractionCallback:e.formInteractionCallback,countryCode:e.iirisUserProfile?.country,iirisUserProfile:e.iirisUserProfile,elements:h,subscriptionStateHandler:s,subscriptionState:i,inContextValidationMessage:e.inContextValidationMessage,formId:n.formId||``,hideFirstPartyConsent:n.hideFirstPartyConsent,gatingAction:e.gatingAction,hideThirdPartyConsent:n.hideThirdPartyConsent,sponsorName:n.sponsorName,title:e.overrides?.title??`Gain Access`,forceThirdPartyConsentAsFalse:n.forceThirdPartyConsentAsFalse,subtitle:m.length?e.overrides?.subtitle||`Please provide us with a few more details to continue.`:void 0,submitButtonText:e.overrides?.submitButtonText,formStorage:n.formStorage,isLeadGenPage:e.isLeadGenPage,emailAddress:e.emailAddress||``,unlockedSubmitButtonText:e.overrides?.unlockedSubmitButtonText||``,unlockedContentCallback:e.unlockedContentCallback})})]})}var Mr=e=>(t,n)=>{let r=t?`${e}-${t}`:e;return n?`${r} ${r}--${n}`:r},Nr=e=>{var t;return!!((t=e.validations)!=null&&t.some(({type:e})=>e===`IsRequiredCondition`))},Pr=e=>e.filter(e=>e.inputType!==`hidden`||e.elementType===`button`).reduce((e,t)=>{var n;let r=e.set(t.fieldName,{...t,isRequired:Nr(t),isHidden:!1,value:``});if((n=t.dependentElements)!=null&&n.length)for(let{element:n}of t.dependentElements)e.set(n.fieldName,{...n,isRequired:!1,isHidden:!0,validations:[]});return r},new Map),Fr=e=>({...e,isHidden:!0,isRequired:!1,value:``,validations:[]}),Ir=(e,t,n)=>{let[r,i]=(0,E.useState)(!1),[a,o]=(0,E.useState)(new Map),[s,c]=(0,E.useState)(),l=(0,E.useRef)(n?.onLoadError);l.current=n?.onLoadError,(0,E.useEffect)(()=>{(async()=>{var n;if(t){i(!0);try{let n=await e.getFormById(t);o(Pr(n.attributes.elements)),c(n.formType)}catch(e){(n=l.current)==null||n.call(l,e)}finally{i(!1)}}})().then()},[t]);let u=new tt,d=e=>{if(!t)return;e.preventDefault();let{currentTarget:n}=e,r=n.value,i=a.get(n.name);if(!i)throw Error(`use-form: Element with name ${n.name} not found`);i.elementType===`checkbox`&&(r=``+n?.checked),i.errors=u.validateFormField(r,i),i.value=r,i.touched=!0,a.set(n.name,i);let s=i?.dependentElements||[];for(let{element:e}of s){let t=Fr(e);a.set(e.fieldName,t)}let c=s.filter(({filters:e})=>e.some(({strValues:e})=>e.includes(r)));for(let{formFieldAction:e,element:t,filters:n}of c){let i=Fr(t);e===se.DISPLAY&&(i.isHidden=!jt(r,n),i.isRequired=Nr(t),i.validations=t.validations),a.set(t.fieldName,i)}o(new Map(a))},f=e=>{if(!t)return!0;let n=!1;for(let[t,r]of Array.from(a)){if(e&&!e.includes(t))continue;let i=u.validateFormField(r.value,r);i!=null&&i.length&&(r.errors=i,a.set(t,r),n=!0)}return o(new Map(a)),!n},p=Array.from(a.values()).map(e=>e);return{loading:r,fields:p,formType:s,handleChange:d,validate:f,errors:p.filter(e=>e.errors?.length).flatMap(e=>(e?.errors)?.map(t=>`${e.label}: ${t.message}`))}},Lr=new Ht,Rr=(e,t)=>{let[n,r]=(0,E.useState)(!1),[i,a]=(0,E.useState)(``),[o,s]=(0,E.useState)(!1),[c,l]=(0,E.useState)(``),[u,d]=(0,E.useState)([]);(0,E.useEffect)(()=>{if(t){let n=Lr.getCategoryByCountryCode(t);a(n),l(``),s(n===J.categoryB||n===J.categoryC),r(e===`firstParty`?Lr.getFirstConsentValue(t,``):Lr.getThirdConsentValue(t,``))}},[t,e]);let f=n=>{let i=n.currentTarget,a=Lr.getValueByElement(i),o=e===`firstParty`?Lr.getFirstConsentValue(t,a):Lr.getThirdConsentValue(t,a);r(o),l(a),s(!0)},p=()=>{if(!t)return!0;switch(i){case J.categoryA:return o;case J.categoryD:return!0;default:return!0}};return{category:i,value:n,isValid:p(),handleChange:f,validate:()=>{let e=p();return d(e?[]:[`Please choose consent agreement`]),e},errors:u}},zr=e=>new Qe(e.elnUrl,e.brandId,e.authorization,e.context,e.subBrandId,e.elnVersion,e.iirisUserProfile,e.productId),Br={loadFailure:{transactionInitiated:`failure`,formSubmitted:`failure`,submissionSucceeded:`failure`},submitSuccess:{transactionInitiated:`success`,formSubmitted:`success`,submissionSucceeded:`success`},submitConflict:{transactionInitiated:`success`,formSubmitted:`success`,submissionSucceeded:`failure`},submitFailure:{transactionInitiated:`success`,formSubmitted:`failure`,submissionSucceeded:`failure`}},Vr=new Set([`US`,`CA`,`AU`,`BR`,`CN`,`IN`,`MX`]),Hr=`Please select at least one newsletter`,Ur=`We are having issues responding to your request! Please try again later.`,Wr=e=>
4({...e.utmParams,elnPackageVersion:e.packageVersion,formInstanceName:e.formType,formHTMLName:e.formId,userLoggedIn:e.profileId?`Logged In`:`Anonymous`}),Gr=e=>e?.response?.status===409?Br.submitConflict:Br.submitFailure,Kr=e=>{let t=zr({elnUrl:e.platformServiceBaseUrl,elnVersion:e.version,authorization:e.authorization,brandId:e.clientId,subBrandId:e.subBrandId,context:e.context,iirisUserProfile:e.iirisUserProfile,productId:e.productId}),[n,r]=(0,E.useState)(L.COLLAPSED),[i,a]=(0,E.useState)(()=>new Set(e.newsletters?.length===1?[e.newsletters[0].newsletter_code]:[])),[o,s]=(0,E.useState)(new Set),[c,l]=(0,E.useState)(null),[u,d]=(0,E.useState)(null),[f,p]=(0,E.useState)(!1),[m,h]=(0,E.useState)(!1),[g,_]=(0,E.useState)(``),v=e=>{_(e||``)},[y,b]=(0,E.useState)(`idle`),x=(0,E.useRef)([]),S=!ze(e.iirisUserProfile),ee=e.iirisUserProfile?.business_email||``,te=S&&n<L.EXPANDED?L.EXPANDED:n,{loading:C,fields:w,formType:T,handleChange:D,validate:O}=Ir(t,e.formId,{onLoadError:t=>{var n;d(Ur),A(Br.loadFailure),(n=e.onError)==null||n.call(e,Ye(t))}}),k=(0,E.useCallback)(()=>Wr({formId:e.formId,formType:T,profileId:e.iirisUserProfile?.id,utmParams:je(),packageVersion:Me}),[e.formId,e.iirisUserProfile,T]),A=t=>{var n;(n=e.completionCallback)==null||n.call(e,{...k(),...t})},[j,ne]=(0,E.useState)(``),M=j||Be(w,`country`),{category:re,value:ie,isValid:ae,handleChange:oe,validate:N,errors:P}=Rr(`firstParty`,M),F=w.find(e=>e.fieldName.toLowerCase().includes(`email`)),se=w.filter(e=>e!==F),I=S?ee:F?.value||``,ce=S?[]:w,le=(0,E.useRef)(!1),{onLoad:ue}=e;(0,E.useEffect)(()=>{!le.current&&!C&&w.length>0&&(le.current=!0,ue?.(k()))},[C,w.length,ue,k]);let R=t=>{r(n=>{var r;return t>n?((r=e.onStageChange)==null||r.call(e,t),t):n})},de=()=>{R(L.EXPANDED)},fe=e=>{R(L.EXPANDED),a(t=>{let n=Xe(t,e);return l(n.size===0?Hr:null),n})},z=e=>{s(t=>{let n=Xe(t,e);return l(n.size===0?Hr:null),n})},pe=e=>{let t=Vr.has(e);R(t?L.STATE:L.CONSENT)},B=e=>{D(e);let t=e.currentTarget,n=t.name?.toLowerCase()||``;n===`country`?pe(t.value):(n.includes(`state`)||n.includes(`province`))&&R(L.CONSENT)},V=(e,t)=>{x.current=e;for(let t of e){let e=t.htmlName.toLowerCase();if(e.includes(`country`)&&t.value&&(ne(t.value),t.touched)){let e=Vr.has(t.value);R(e?L.STATE:L.CONSENT)}(e.includes(`state`)||e.includes(`province`))&&t.value&&t.touched&&R(L.CONSENT)}},me=()=>x.current.every(e=>{var t;return!((t=e.violations)!=null&&t.length)}),H=()=>{let e=i.size>0;if(e||l(Hr),S)return e;let t=F?.fieldName,n=O(t?[t]:[]),r=me(),a=N();return e&&n&&r&&a&&!!g},U=()=>[{htmlName:F?.fieldName||`emailAddress`,value:I,touched:F?.touched||!1,violations:[]},...x.current],he=t=>({formId:e.formId,countryCode:M,emailAddress:I,firstPartyConsent:ie,newsletterList:t,formFields:U()}),ge=n=>t.putNewslettersSubscription(he(n),g,e.iirisUserProfile,ce),_e=async t=>{var n,r,a;if(t.preventDefault(),(n=e.onSubmit)==null||n.call(e),h(!0),d(null),H())try{p(!0),await ge(Array.from(i)),R(L.SUCCESS),A(Br.submitSuccess),h(!1),(r=e.onSuccess)==null||r.call(e,{})}catch(t){d(Ur),A(Gr(t)),(a=e.onError)==null||a.call(e,Ye(t))}finally{p(!1)}},ve=async()=>{var t,n;let r=Array.from(o);if(h(!0),d(null),r.length===0){l(Hr);return}b(`loading`);try{await ge(r),b(`done`),A(Br.submitSuccess),(t=e.onAddSubscriptionsSuccess)==null||t.call(e,r)}catch(t){d(Ur),b(`idle`),A(Gr(t)),(n=e.onError)==null||n.call(e,Ye(t))}};return{stage:te,isLoggedIn:S,profileEmail:ee,formLoading:C,emailField:F,otherFields:se,formFields:w,countryCode:M,handleFieldChange:B,handleFormFieldChange:D,handleFormBuilderChange:V,handleCountryChange:pe,selectedCodes:i,secondarySelectedCodes:o,handleNewsletterToggle:fe,handleSecondaryToggle:z,consentCategory:re,consentValue:ie,consentIsValid:ae,handleConsentChange:oe,handleEmailFocus:de,handleSubmit:_e,errors:[...c?[c]:[],...P||[]],newsletterError:c,submissionError:u,showAllViolations:m,submitting:f,captchaToken:g,setCaptchaToken:v,addSubscriptionsState:y,handleAddSubscriptions:ve,validate:H}},qr=8,Jr=(e,t)=>{let[n,r]=(0,E.useState)(null);return(0,E.useEffect)(()=>{if(!t){r(null);return}let n=()=>{let t=e.current?.getBoundingClientRect();t&&r({top:t.bottom+qr,left:t.left})};return n(),window.addEventListener(`scroll`,n,!0),window.addEventListener(`resize`,n),()=>{window.removeEventListener(`scroll`,n,!0),window.removeEventListener(`resize`,n)}},[t,e]),n},Yr=Mr(`eln-newsletter-subscription`);function Xr({title:e,description:t,icon:n}){let[r,i]=(0,E.useState)(!1),a=(0,E.useId)(),o=(0,E.useRef)(null),s=Jr(o,r);return N.jsxs(`span`,{className:Yr(`card-info`),children:[N.jsx(`button`,{ref:o,type:`button`,className:Yr(`card-info-button`),"aria-label":`More information about ${e}`,"aria-expanded":r,"aria-controls":a,onClick:()=>i(e=>!e),onBlur:()=>i(!1),onKeyDown:e=>{e.key===`Escape`&&i(!1)},children:N.jsx(`span`,{className:Yr(`card-info-icon`),"aria-hidden":`true`,children:n})}),r&&s?(0,k.createPortal)(N.jsx(`span`,{role:`tooltip`,id:a,className:Yr(`card-tooltip`),style:{position:`fixed`,top:s.top,left
4:s.left},children:t}),document.body):null]})}var Zr=Mr(`eln-newsletter-subscription`);function Qr({newsletter:e,checked:t,onChange:n,cardInfoIcon:r,cardFrequencyIcon:i}){var a,o;let s=()=>{n(e.newsletter_code)};return N.jsxs(`div`,{className:Zr(`card`),onClick:e=>{let t=e.target;t.closest(`label`)||t.closest(`button`)||t.tagName===`A`||s()},children:[N.jsxs(`div`,{className:Zr(`card-header`),children:[N.jsxs(`label`,{className:Zr(`card-label`),children:[N.jsx(`input`,{className:Zr(`card-checkbox`),type:`checkbox`,checked:t,onChange:s,name:`newsletterSubscriptionList`,value:e.newsletter_code}),N.jsx(`span`,{className:Zr(`card-title`),children:e.title})]}),e.description?N.jsx(Xr,{title:e.title,description:e.description,icon:r}):null]}),e.frequency||(a=e.sample_url)!=null&&a.href?N.jsxs(`div`,{className:Zr(`card-meta`),children:[e.frequency?N.jsxs(`span`,{className:Zr(`card-frequency`),children:[i?N.jsx(`span`,{className:Zr(`card-frequency-icon`),"aria-hidden":`true`,children:i}):null,e.frequency]}):null,(o=e.sample_url)!=null&&o.href?N.jsx(`a`,{className:Zr(`card-sample-link`),href:e.sample_url.href,target:`_blank`,rel:`noreferrer`,children:e.sample_url.title}):null]}):null]})}var $r=Mr(`eln-newsletter-subscription`);function ei({newsletters:e,selectedCodes:t,onToggle:n,error:r,cardInfoIcon:i,cardFrequencyIcon:a}){return N.jsxs(`div`,{className:$r(`card-grid`),children:[e.map(e=>N.jsx(Qr,{newsletter:e,checked:t.has(e.newsletter_code),onChange:n,cardInfoIcon:i,cardFrequencyIcon:a},e.newsletter_code)),r?N.jsx(`p`,{className:$r(`card-grid-error`),children:r}):null]})}var ti=Mr(`eln-newsletter-subscription`);function ni({message:e}){return N.jsx(`p`,{className:ti(`submission-error`),role:`alert`,children:e})}var ri=Mr(`eln-newsletter-subscription`),ii=(e,{emailPlaceholder:t,isLoggedIn:n,profileEmail:r})=>e&&{...e,...t?{placeholder:t}:{},...n?{value:r,disabled:!0}:{}};function ai({stage:e,emailField:t,emailPlaceholder:n,isLoggedIn:r,profileEmail:i,otherFields:a,newsletters:o,selectedCodes:s,onNewsletterToggle:c,onEmailFieldChange:l,onEmailFocus:u,onFormChange:d,onConsentChange:f,onSubmit:p,onCountryChange:m,countryCode:h,showAllViolations:g,consentValid:_=!0,inContextValidation:v,siteId:y,hideFirstPartyConsent:b,newsletterError:x,submissionError:S,submitLabel:ee,cardInfoIcon:te,cardFrequencyIcon:C,submitting:w,captchaToken:T,setCaptchaToken:E,shouldShowCaptcha:D}){let O=ii(t,{emailPlaceholder:n,isLoggedIn:r,profileEmail:i}),k=e>=L.EXPANDED,A=!r&&a.length>0,j=!b,ne=k&&D;return N.jsx(`div`,{className:ri(`form`),children:N.jsxs(`form`,{noValidate:!0,onSubmit:p,children:[O?N.jsx(vt,{element:O,handleChange:l,showAllViolations:g,showErrorMessages:v||g,onFocus:u,className:ri(`email-field`)}):null,N.jsx(`div`,{className:ri(`expandable`),"data-expanded":k,inert:!k,children:N.jsxs(`div`,{className:ri(`expandable-content`),children:[N.jsx(ei,{newsletters:o,selectedCodes:s,onToggle:c,error:g?x:null,cardInfoIcon:te,cardFrequencyIcon:C}),A?N.jsx(`div`,{className:ri(`fields`),children:N.jsx(It,{elements:a,onChange:d,showAllViolations:g,showErrorMessages:v||g,siteId:y,handleCountryChange:m})}):null,j?N.jsx(`div`,{className:ri(`consent`),children:N.jsx(Wt,{countryCode:h,changeHandler:f,error:g&&!_})}):null,ne&&E?N.jsx(Xn,{className:ri(`captcha`),setToken:E,error:g&&!T}):null]})}),S?N.jsx(ni,{message:S}):null,t?N.jsx(`button`,{className:ri(`submit`),type:`submit`,disabled:w,children:ee}):null]})})}var oi=Mr(`eln-newsletter-subscription`);function si({email:e,successTitle:t,successMessage:n,secondaryNewsletters:r,onAddSubscriptions:i,addSubscriptionsState:a,successSecondaryTitle:o=`Sign up for additional newsletters`,successSecondarySubtitle:s=`Enhance your experience and get deeper insights by subscribing to additional newsletters.`,successAddSubscriptionsLabel:c=`Add Subscriptions +`,successAddSubscriptionsConfirmation:l=`Additional newsletters have been added to your subscription.`,cardInfoIcon:u,cardFrequencyIcon:d,newsletterError:f,submissionError:p,showAllViolations:m,secondarySelectedCodes:h,onSecondaryToggle:g}){let _=()=>{i?.()},v=zt(e,n);return N.jsxs(`div`,{className:oi(`success`),children:[N.jsx(`h1`,{className:oi(`success-title`),children:t}),N.jsx(`p`,{className:oi(`success-message`),children:v}),r.length>0?N.jsxs(`div`,{className:oi(`success-secondary`),children:[N.jsx(`h2`,{className:oi(`success-secondary-title`),children:o}),N.jsx(`p`,{className:oi(`success-secondary-subtitle`),children:s}),N.jsx(ei,{newsletters:r,selectedCodes:h,onToggle:g,cardInfoIcon:u,cardFrequencyIcon:d,error:m?f:null}),p?N.jsx(ni,{message:p}):null,a===`done`?null:N.jsx(`button`,{className:oi(`success-add-btn`),onClick:_,disabled:a===`loading`,children:c}),a===`done`?N.jsx(`p`,{className:oi(`success-add-confirmation`),children:l}):null]}):null]})}var ci=Mr(`eln-newsletter-subscription`),li=[];function ui(e){let{stage:t,isLoggedIn:n,profileEmail:r,formLoading:i,emailField:a,otherFields:o,handleFormFieldChange:s,handleFormBuilderChange:c,handleCountryChange:l,countryCode:u,selectedCodes:d,secondarySelectedCodes:f,handleNewsletterToggle:p,handleSecondaryToggle:m,consentIsValid:h,handleConsentChange:g,handleEmailFocus:_,handleSubmit:v,newsletterError:y,submissionError:b,showAllViolations:x,submitting:S,captchaToken:ee,setCaptchaToken:te,addSubscriptionsState:C,handleAddSubscriptions:w}=Kr({platformServiceBaseUrl:e.platformServiceBaseUrl,clientId:e.clientId,formId:e.formId,authorization:e.authorization,subBrandId:e.subBrandId,version:e.version,productId:e.productId,newsletters:e.newsletters,secondaryNewsletters:e.secondaryNewsletters,iirisUserProfile:e.iirisUserProfile,context:e.context,onLoad:e.onLoad,onStageChange:e.onStageChange,onSubmit:e.onSubmit,onSuccess:e.onSuccess,onAddSubscriptionsSuccess:e.onAddSubscriptionsSuccess,onError:e.onError,completionCallback:e.completionCallback}),T=lt(e.classNames,`newsletter`);if(i||S||C===`loading`)return N.jsx(Gt,{});let E=t===L.SUCCESS,D=e.secondaryNewsletters||li;return N.jsx(K.Provider,{value:T,children:N.jsxs(`div`,{className:ci(null,`stage-${t}`),children:[e.title?N.jsx(`h2`,{className:ci(`title`),children:e.title}):null,e.subtitle?N.jsx(`p`,{className:ci(`subtitle`),children:e.subt
4itle}):null,E?N.jsx(si,{email:a?.value||``,successTitle:e.successTitle,successMessage:e.successMessage,secondaryNewsletters:D,onAddSubscriptions:w,addSubscriptionsState:C,successSecondaryTitle:e.successSecondaryTitle,successSecondarySubtitle:e.successSecondarySubtitle,successAddSubscriptionsLabel:e.successAddSubscriptionsLabel,successAddSubscriptionsConfirmation:e.successAddSubscriptionsConfirmation,cardInfoIcon:e.cardInfoIcon,cardFrequencyIcon:e.cardFrequencyIcon,newsletterError:y,submissionError:b,showAllViolations:x,secondarySelectedCodes:f,onSecondaryToggle:m}):N.jsx(ai,{stage:t,emailField:a,emailPlaceholder:e.emailPlaceholder,isLoggedIn:n,profileEmail:r,otherFields:o,newsletters:e.newsletters,selectedCodes:d,onNewsletterToggle:p,onEmailFieldChange:s,onEmailFocus:_,onFormChange:c,onConsentChange:g,onSubmit:v,onCountryChange:l,countryCode:u,showAllViolations:x,consentValid:h,inContextValidation:e.inContextValidation||!1,siteId:e.clientId,hideFirstPartyConsent:n,newsletterError:y,submissionError:b,submitLabel:e.submitLabel||`Subscribe`,cardInfoIcon:e.cardInfoIcon,cardFrequencyIcon:e.cardFrequencyIcon,submitting:S,captchaToken:ee,setCaptchaToken:te,shouldShowCaptcha:!e.iirisUserProfile&&Ue(e.clientId)})]})})}export{d as C,m as S,_,nr as a,v as b,D as c,w as d,h as f,b as g,x as h,$e as i,O as l,l as m,L as n,et as o,S as p,jr as r,W as s,ui as t,T as u,g as v,f as x,y}; 5//# sourceMappingURL=index.es-CsC_O2B4.js.map
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.