1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6605],{3215:()=>{},12741:(e,t,r)=>{"use strict";let n;r.d(t,{v:()=>s});var i=r(85574),o=r.n(i),a=r(16842);let l={appVersion:a._.appVersion},s=(({options:e={},destination:t})=>(n||(n=o()({level:e?.level??a._.logLevel??"info",...e},t).child(l)),n))({options:{browser:{asObject:!0}}})},16842:(e,t,r)=>{"use strict";r.d(t,{_:()=>l});var n,i,o,a=r(40459);let l={appVersion:a.env.NEXT_PUBLIC_APP_VERSION||a.env.HEADLESS_METADATA_COMMIT_SHA||"local",strictValidation:"true"===a.env.STRICT_API_VALIDATION,isDebugAllowed:!1,newRelicEnabled:"false"!==a.env.NEW_RELIC_ENABLED&&!!a.env.NEW_RELIC_LICENSE_KEY,tenantsApiUrl:"https://tenants.api.highereducation.com",logoVariant:(n=a.env.LOGO_VARIANT,n?.trim()==="v2"?"v2":void 0),forceTenant:a.env.FORCE_TENANT||"",tenantResolution:a.env.TENANT_RESOLUTION||"path",isProd:"prd"===a.env.ENVIRONMENT,isDev:"prd"!==a.env.ENVIRONMENT,environment:a.env.ENVIRONMENT||"development",sitemapEnvironment:(i=a.env.SITEMAP_ENVIRONMENT,o="prd"===a.env.ENVIRONMENT,i&&["local","dev","prod"].includes(i)?i:o?"prod":"dev"),cmsUrlOverride:a.env.CMS_URL_OVERRIDE||"",logLevel:"info",prettyPrintLogs:"true"===a.env.PRETTY_PRINT_LOGS,redirectServiceApi:a.env.REDIRECT_SERVICE_API||("prd"===a.env.ENVIRONMENT?"https://redirects.api.highereducation.com":"https://redirects.int.api.highereducation.com"),learnersHubUclWebComponentDe:!0,dynamicFlowApiUrl:"https://dynamic-flows.api.highereducation.com",dynamicExperienceEnvironment:"prod",offeringsServiceUrl:a.env.OFFERINGS_SERVICE_URL||("prd"===a.env.ENVIRONMENT?"https://offerings.api.highereducation.com":"https://offerings.dev.api.highereducation.com"),campaignManagementUrl:a.env.CAMPAIGN_MANAGEMENT_API_BASE_URL||("prd"===a.env.ENVIRONMENT?"https://campaign-management.api.highereducation.com":"https://campaign-management.int.api.highereducation.com"),deliverySystemUrl:a.env.DELIVERY_SYSTEM_API_BASE_URL||("prd"===a.env.ENVIRONMENT?"https://delivery-system.rveducation.io":"https://delivery-system.staging.rveducation.io"),eduAuthServiceEnabled:"true"===a.env.EDU_AUTH_SERVICE_ENABLED,learnersHubUclAdapterSrc:"https://web-component-bundle.api.highereducation.com/latest/ucl.adapter.js",landingPageProxyDomain:a.env.LANDING_PAGE_PROXY_DOMAIN||"",tipApiBaseUrl:a.env.TIP_API_BASE_URL||"https://tip.cohesionapps.com/api/v1/lookup",tipApiToken:a.env.TIP_API_TOKEN||"",iterableApiKey:a.env.ITERABLE_API_KEY||"",iterableListId:a.env.ITERABLE_LIST_ID||""}},28645:()=>{},33108:(e,t,r)=>{"use strict";r.d(t,{a:()=>i});var n=r(12741);let i=void 0!==window.newrelic?window.newrelic:new Proxy({},{get:(e,t)=>(...e)=>{n.v.warn(`window.newrelic.${String(t)}(${e.join(", ")})`)}})},38892:()=>{},39382:(e,t,r)=>{"use strict";r.d(t,{mH4:()=>pW,JdN:()=>r$});var n,i,o,a,l,s,c,d,u,p,f,m,h,g,y,b=r(95155),v=r(12115),x=r(19627),w=r(24770),S=r.n(w);let I=["article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","ul","a","b","br","cite","code","em","i","img","mark","small","span","strong","sub","sup","time","caption","table","tbody","td","tfoot","th","thead","tr"],C={allowedTags:[...I],allowedAttributes:{a:["href","title","target","rel"],img:["src","alt","width","height"],td:["colspan","rowspan"],th:["colspan","rowspan"]},allowedSchemes:["http","https","mailto"],allowProtocolRelative:!1,transformTags:{a:(e,t)=>{let r;return{tagName:"a",attribs:(r={},"string"==typeof t.href&&t.href.length>0&&(r.href=t.href),"string"==typeof t.title&&t.title.length>0&&(r.title=t.title),"string"==typeof t.target&&t.target.length>0&&(r.target=t.target),"_blank"===t.target&&(r.rel="noopener noreferrer"),r)}}}};function j(e){return S()(e.replace(/(\r\n|\n|\r|\t)/g," ").replace(/\s+/g," ").trim(),C)}let k=e=>{if(!e)return null;let t=(0,x.Ay)(j(e),{replace:e=>{if(e instanceof x.Hg&&!(!(e instanceof x.Hg)||I.includes(e.name)))return v.createElement(v.Fragment)}});return Array.isArray(t),t},E=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)});var A=((n={}).STUDY_MATCH="STUDY_MATCH",n.HLF="HLF",n.QUALIFIED_RESULTS_PAGE="QUALIFIED_RESULTS_PAGE",n.CUSTOM_RESULTS_PAGE="CUSTOM_RESULTS_PAGE",n.OFFERINGS="OFFERINGS",n.DASHBOARD="DASHBOARD",n),N=((i={}).TEXT="TEXT",i.SELECT="SELECT",i.MULTIPLE_CHOICE="MULTIPLE_CHOICE",i.SINGLE_CHOICE="SINGLE_CHOICE",i.RADIO_CHOICE="RADIO_CHOICE",i.CHECKBOX="CHECKBOX",i.TOGGLE="TOGGLE",i.DYNAMIC_SINGLE_CHOICE="DYNAMIC_SINGLE_CHOICE",i.DYNAMIC_MULTIPLE_CHOICE="DYNAMIC_MULTIPLE_CHOICE",i),T=((o={}).ROW="ROW",o.COLUMN="COLUMN",o),O=((a={}).QUESTION="QUESTION",a.COMPONENT="COMPONENT",a.EXTERNAL_LINK="EXTERNAL_LINK",a.MULTI_QUESTION="MULTI_QUESTION",a.DCS="DCS",a.RESULT="RESULT",a.BANNER_CTA="BANNER_CTA",a),P=((l={}).EQUALS="EQUALS",l.NOT_EQUALS="NOT_EQUALS",l.CONTAINS="CONTAINS",l.CONTAINS_ANY="CONTAINS_ANY",l.NOT_CONTAINS_ANY="NOT_CONTAINS_ANY",l.GREATER_THAN="GREATER_THAN",l.LESS_THAN="LESS_THAN",l),M=((s={}).DEFAULT="DEFAULT",s.GROUP_SELECTED="GROUP_SELECTED",s.OPTION_SELECTED="OPTION_SELECTED",s.COMBINATION_SELECTED="COMBINATION_SELECTED",s),R=((c={}).NEXT_STEP="NEXT_STEP",c.RESULT="RESULT",c),L=((d={}).CAPPEX="CAPPEX",d.SALARY_CALCULATOR="SALARY_CALCULATOR",d.DUAL_CTA_EL_MARKETPLACE="DUAL_CTA_EL_MARKETPLACE",d.EDITORIAL_LISTINGS="EDITORIAL_LISTINGS",d.CAREER_PATHWAY="CAREER_PATHWAY",d.DEGREE_LENGTH="DEGREE_LENGTH",d.BANNER_CTA="BANNER_CTA",d),F=((u={}).SET_STEPS="SET_STEPS",u.SET_CURRENT_STEP="SET_CURRENT_STEP",u.SET_CURRENT_STEP_INDEX="SET_CURRENT_STEP_INDEX",u.SET_NAVIGATION_HISTORY="SET_NAVIGATION_HISTORY",u.ADD_TO_NAVIGATION_HISTORY="ADD_TO_NAVIGATION_HISTORY",u.GO_BACK_IN_HISTORY="GO_BACK_IN_HISTORY",u.UPDATE_FLOW_STATE="UPDATE_FLOW_STATE",u.SET_FLOW_STATE="SET_FLOW_STATE",u.SET_OPEN_MODAL="SET_OPEN_MODAL",u.SET_ACCEPT_TCPA="SET_ACCEPT_TCPA",u.SET_VALIDATION_ERRORS="SET_VALIDATION_ERRORS",u.CLEAR_VALIDATION_ERRORS="CLEAR_VALIDATION_ERRORS",u.SET_FORM_STARTED_FIRED="SET_FORM_STARTED_FIRED",u.JUMP_TO_STEP="JUMP_TO_STEP",u.SET_IS_SUBMITTING="SET_IS_SUBMITTING",u.SET_SUBMISSION_ERROR="SET_SUBMISSION_ERROR",u.SET_POPUP_BLOCKED="SET_POPUP_BLOCKED",u.RESET_FLOW="RESET_FLOW",u),U=((p={}).EMBEDDED_RECOMMENDER="dexp-embedded-recommender",p.POPUP="dexp-pop-up-recommender",p.PAGE="dexp-results-page",p.UNDERGRAD_THANK_YOU_PAGE="dexp-undergrad-thank-you-page",p.RECOMMENDER_GRAD_THANK_YOU_PAGE="dexp-recommender-grad-thank-you-page",p.READY_TO_GO_THANK_YOU_PAGE="dexp-ready-to-go-thank-you-page",p.THANK_YOU_PAGE="dexp-thank-you-page",p.SPOTLIGHT_POPUP="dexp-spotlight-popup",p.CONVERSION_DRAWER="dexp-conversion-drawer",p.PAGE_POPUP="dexp-results-page-pop-up",p),$=((f={}).ALGOLIA="algolia",f),_=r(40459);let D={...{dynamicFlowUrl:"https://dynamic-flows.api.highereducation.com",audienceIntentApiUrl:void 0!==_&&_.env?.AUDIENCE_INTENT_API?_.env.AUDIENCE_INTENT_API:"https://audience-intent.api.highereducation.com",mobiusApiUrl:"https://api.mobius.highereducation.com",organizationApiUrl:"https://organizations.api.highereducation.com",campaignManagementApiUrl:void 0!==_&&_.env?.CAMPAIGN_MANAGEMENT_API_BASE_URL?_.env.CAMPAIGN_MANAGEMENT_API_BASE_URL:"https://campaign-management.api.highereducation.com",deliverySystemApiUrl:void 0!==_&&_.env?.DELIVERY_SYSTEM_API_BASE_URL?_.env.DELIVERY_SYSTEM_API_BASE_URL:"https://delivery-system.staging.rveducation.io",offeringsSearchApiUrl:void 0!==_&&_.env?.OFFERING_SERVICE_BASE_URL?_.env?.OFFERING_SERVICE_BASE_URL:"https://offerings.int.api.highereducation.com",offeringsServiceBaseUrl:void 0!==_&&_.env?.OFFERINGS_SERVICE_BASE_URL?_.env.OFFERINGS_SERVICE_BASE_URL:"https://offerings-service.int.api.highereducation.com",sitePublishingBaseUrl:void 0!==_&&_.env?.NEXT_PUBLIC_SITE_PUBLISHING_BASE_URL?_.env?.NEXT_PUBLIC_SITE_PUBLISHING_BASE_URL:"",prospectServiceApiUrl:void 0!==_&&_.env?.NEXT_PUBLIC_PROSPECT_SERVICE_BASE_URL?_.env.NEXT_PUBLIC_PROSPECT_SERVICE_BASE_URL:void 0!==_&&_.env?.PROSPECT_SERVICE_BASE_URL?_.env.PROSPECT_SERVICE_BASE_URL:"",leadApiBaseUrl:void 0!==_&&_.env?.NEXT_PUBLIC_LEAD_API_BASE_URL?_.env.NEXT_PUBLIC_LEAD_API_BASE_URL:"",locationInferenceApiUrl:void 0!==_&&_.env?.NEXT_PUBLIC_LOCATION_INFERENCE_API_URL?_.env.NEXT_PUBLIC_LOCATION_INFERENCE_API_URL:""}};function Y(){return{...D}}var B=r(51985);let z=B.Ik({optionId:B.Yj(),text:B.Yj(),group:B.Yj().optional(),value:B.KC([B.Yj(),B.zM(),B.ch()]).optional(),nextQuestionId:B.Yj().optional(),questionId:B.Yj().optional(),leadFieldAssociated:B.Yj().optional(),isPreSelected:B.zM().optional(),isArray:B.zM().optional(),icon:B.Yj().optional(),subtext:B.Yj().optional()}),V=B.Ik({description:B.Yj(),key:B.Yj(),defaultValue:B.Yj().optional()}),H=B.Ik({type:B.Yj(),nextId:B.Yj(),condition:B.Ik({type:B.Yj(),operator:B.Yj().optional(),optionId:B.Yj().optional(),value:B.Yj().optional(),group:B.Yj().optional(),combination:B.YO(B.Yj()).optional(),optionIds:B.YO(B.Yj()).optional()})}),q=B.Ik({customField:B.Yj().optional(),flowId:B.Yj().optional(),isEntry:B.zM().optional(),id:B.Yj().optional(),type:B.Yj(),title:B.Yj().optional(),subtitle:B.Yj().optional(),preSubHeading:B.Yj().optional(),leadFieldAssociated:B.Yj().optional(),branchingLogic:B.YO(H).optional(),placeholders:B.YO(V).optional(),tooltip:B.Yj().optional(),modal:B.Ik({title:B.Yj().optional(),content:B.Yj().optional(),buttonText:B.Yj().optional(),enable:B.zM().optional()}).optional(),isTerminal:B.zM().optional(),required:B.zM().optional(),stepName:B.Yj().optional(),nextButtonText:B.Yj().optional(),options:B.YO(z).optional(),questionType:B.Yj().optional(),orientation:B.Yj().optional(),sideRailConfigs:B.YO(B.bz()).optional(),tcpaText:B.Yj().optional(),automaticNext:B.zM().optional(),maxSelection:B.ai().optional()}).passthrough(),G=B.YO(q),W=B.Ik({id:B.Yj(),title:B.Yj().optional(),type:B.Yj(),content:B.Yj().optional(),subtitle:B.Yj().optional(),options:B.YO(z).optional(),placeholders:B.YO(V).optional(),questionType:B.Yj().optional()}),Q=B.k5(["draft","published"]),K=B.k5(["entry","result"]),J=B.k5(["tenant","global"]),X=B.Ik({tenantId:B.Yj().optional(),configId:B.Yj(),name:B.Yj(),status:Q.or(B.Yj()),type:K.or(B.Yj()),version:B.ai(),data:B.g1(B.L5()),componentCount:B.ai().optional(),createdAt:B.Yj().optional(),updatedAt:B.Yj().optional(),createdBy:B.Yj().optional(),publishedBy:B.Yj().optional(),origin:J.or(B.Yj()).optional()}).passthrough(),Z=B.YO(X);class ee{constructor(e){this.cache=new Map;const t={baseUrl:"",defaultHeaders:{},cache:new Map,newRelic:{noticeError:(e,t)=>
1{console.error("Error in DynamicFlowsApiClient: noticeError",e,t)}},strictValidation:!1};this.config={...t,...e}}getApiName(){return"dynamic-flows"}async get(e,t={cacheEnabled:!1}){let r=`${this.config.baseUrl}${e}`;if(t.bustCache&&this.bustCache(r),this.shouldUseCache(r,t)){let e=this.cache.get(r);if(e)return e.clone()}let n=await fetch(`${this.config.baseUrl}${e}`,{method:"GET",...t});return t.cacheEnabled&&n.ok&&this.cache.set(r,n.clone()),n}bustCache(e){this.cache.delete(e)}shouldUseCache(e,t){return!!t.cacheEnabled&&this.cache.has(e)}hasError(e){return e.status>=400}async toJson(e,t){let r=await e.json(),n=t.safeParse(r);if(!n.success){let e=Error(`Invalid response for ${this.getApiName()}`);if(console.error(e),console.log(this.buildErrorMessage(n.error.errors)),this.config.strictValidation)throw e;return r}return n.data}buildErrorMessage(e){return e.map(e=>`Path: ${e.path.join(".")}, Message: ${e.message}`)}async getFlow(e,t,r={},n={cacheEnabled:!1}){let i=`/v1/tenants/${encodeURIComponent(e)}/flows/${encodeURIComponent(t)}`,o=await this.get(i,{...n,headers:{...this.config.defaultHeaders,...r}});if(this.hasError(o))throw console.error(`Failed to get flow for tenantId: ${e}, flowId: ${t}`),Error(`Failed to get flow: ${o.status} ${o.statusText}`);return await this.toJson(o,G)}async listDslConfigs(e,t={},r={},n={cacheEnabled:!1}){let i=new URLSearchParams;t.type&&i.set("type",t.type),t.status&&i.set("status",t.status);let o=i.toString(),a=`/v1/tenants/${encodeURIComponent(e)}/dsl-configs${o?`?${o}`:""}`,l=await this.get(a,{...n,headers:{...this.config.defaultHeaders,...r}});if(this.hasError(l))throw console.error(`Failed to list DSL configs for tenantId: ${e}`),Error(`Failed to list DSL configs: ${l.status} ${l.statusText}`);return this.toJson(l,Z)}async getDslConfig(e,t,r={},n={cacheEnabled:!1}){let i=`/v1/tenants/${encodeURIComponent(e)}/dsl-configs/${encodeURIComponent(t)}`,o=await this.get(i,{...n,headers:{...this.config.defaultHeaders,...r}});if(this.hasError(o))throw console.error(`Failed to get DSL config for tenantId: ${e}, configId: ${t}`),Error(`Failed to get DSL config: ${o.status} ${o.statusText}`);return this.toJson(o,X)}async getQuestion(e,t,r={},n={cacheEnabled:!1}){let i=`/v1/tenants/${encodeURIComponent(e)}/questions/${encodeURIComponent(t)}`,o=await this.get(i,{...n,headers:{...this.config.defaultHeaders,...r}});if(this.hasError(o))return console.error(`Error fetching question ${t}:`,o.statusText),null;let a=await this.toJson(o,W);return{id:a.id,type:a.type,title:a.content,subtitle:a.subtitle,options:a.options?.map(e=>e.text),placeholders:a.placeholders,questionType:a.questionType}}}let et=new Map,er=new Set(Object.values(O));async function en(e,t,r={},n={cacheEnabled:!1}){let i,o,a=(i=Y().dynamicFlowUrl,(o=et.get(i))||(o=new ee({baseUrl:i}),et.set(i,o)),o);try{var l;let i,o,s,c;return{data:(l=(await a.getFlow(e,t,r,n)).filter(e=>er.has(e.type)),i=[],o=function(e){let t=new Set;for(let r of e)if(r.type===O.MULTI_QUESTION&&Array.isArray(r.questions))for(let e of r.questions)t.add(e.questionId);return t}(l),s=e=>{if(!(null!=e.id&&o.has(e.id)))switch(e.type){case O.MULTI_QUESTION:let t,r;i.push((t=[],e&&Array.isArray(e.questions)&&e.questions.forEach(e=>{let r=l.find(t=>t.id===e.questionId);r&&t.push({...r,orientation:e.orientation})}),r=function(e,t=3){let r=[],n={questions:[],indices:[]};return e.forEach((e,i)=>{let o=(e.orientation??T.COLUMN)===T.ROW,a=0===n.questions.length,l=n.questions.length>=t;o||a||l?(n.questions.length>0&&r.push(n),n={questions:[e],indices:[i]}):(n.questions.push(e),n.indices.push(i))}),n.questions.length>0&&r.push(n),r}(t),{...e,stepQuestions:t,groupedQuestions:r}));break;case O.QUESTION:case O.DCS:case O.COMPONENT:case O.RESULT:case O.BANNER_CTA:case O.EXTERNAL_LINK:i.push(e)}},(c=l.find(e=>!0===e.isEntry))?(s(c),l.forEach(e=>{e.id!==c.id&&s(e)})):l.forEach(s),i),error:null}}catch(e){return{data:null,error:e instanceof Error?e.message:"Failed to fetch flow"}}}let ei="/v1/contact",eo=B.Ik({postalCode:B.Yj(),country:B.Yj(),ipInferredPostalCode:B.Yj()}),ea=B.Ik({lastName:B.Yj().optional(),email:B.Yj().optional(),phoneNumber:B.Yj().optional(),location:eo.optional(),hsGradYear:B.ai().optional(),levelOfEducation:B.Yj().optional(),militaryStatus:B.zM().optional(),startDate:B.Yj().optional(),tcpaText:B.Yj().optional(),thirdPartyLeadId:B.Yj().optional(),currentLicense:B.Yj().nullable().optional(),hasGivenTCPAConsent:B.zM().optional(),hasGivenThirdPartySharingConsent:B.zM().optional(),hasGivenProspectSharingConsent:B.zM().optional(),currentPermanentResidenceCountry:B.Yj().optional(),leadSource:B.Yj().nullable().optional(),category:B.Yj().nullable().optional(),degree:B.Yj().nullable().optional(),subject:B.Yj().nullable().optional()}).strict();B.Ik({contact:B.Ik({firstName:B.Yj(),lastName:B.Yj(),email:B.Yj(),phoneNumber:B.Yj(),zip:B.Yj(),details:ea.optional(),trackingContext:B.g1(B.L5()).optional()})});let el=B.Ik({data:B.Ik({contactId:B.Yj(),transactionId:B.ai(),retrievalUrl:B.Yj()})});class es{constructor(e){this.config=e,this.config={baseUrl:"",defaultHeaders:{"Content-Type":"application/json"},newRelic:{noticeError:(e,t)=>
1{console.error("Error in ProspectApiClient: noticeError",e,t)}},strictValidation:!1,...e},this.cache=e.cache??new Map}getApiName(){return"prospect-api-client"}async get(e,t={cacheEnabled:!1}){let r=`${this.config.baseUrl}${e}`;if(t.bustCache&&this.bustCache(r),this.shouldUseCache(r,t))return this.cache.get(r).clone();let n=await fetch(`${this.config.baseUrl}${e}`,{...t,headers:{...this.config.defaultHeaders,...t.headers}});return t.cacheEnabled&&n.ok&&this.cache.set(r,n.clone()),n}async post(e,t,r={cacheEnabled:!1}){return await fetch(`${this.config.baseUrl}${e}`,{method:"POST",...r,headers:{...this.config.defaultHeaders,...r.headers},body:JSON.stringify(t)})}bustCache(e){this.cache.delete(e)}shouldUseCache(e,t){return!!t.cacheEnabled&&this.cache.has(e)}hasError(e){return e.status>=400}async toJson(e,t){let r=await e.json(),n=t.safeParse(r);if(!n.success){let e=Error(`Invalid response for ${this.getApiName()}`);if(console.error(e),console.log(this.buildErrorMessage(n.error.errors)),this.config.strictValidation)throw e;return r}return n.data}reportError(e,t){this.config.newRelic?.noticeError&&this.config.newRelic.noticeError(e,t||{})}buildErrorMessage(e){return e.map(e=>`Path: ${e.path.join(".")}, Message: ${e.message}`)}async postContact(e){let t=await this.post(ei,e);if(this.hasError(t))throw Error(`HTTP ${t.status}: ${t.statusText}`);return this.toJson(t,el)}}let ec=new Map;async function ed(e){let t,r;return(t=Y().prospectServiceApiUrl??"",!(r=ec.get(t))&&(ec.clear(),r=new es({baseUrl:t,defaultHeaders:{"Content-Type":"application/json"}}),ec.set(t,r)),r).postContact(e)}let eu=async()=>{let e=Y().locationInferenceApiUrl??"";try{let t=await fetch(`${e}/api/v1/locate/`,{method:"GET",headers:{Accept:"application/json"}});if(!t.ok)return null;return await t.json()}catch{return null}},ep="_bind.",ef="_action.",em="_meta.",eh="formKey",eg=["onChange","onSelect"],ey="optionLabelField",eb="optionValueField",ev="tagKeys",ex="defaultTagKeys",ew="statLabelField",eS="statValueField",eI="statTooltipField",eC="badgeField",ej=["onSourceChange"],ek=e=>{for(let t=0;t<ej.length;t++)if(ej[t]===e)return!0;return!1},eE=[ep,ef,em],eA=e=>{if(e===eh)return!0;for(let t of eE)if(e.startsWith(t))return!0;return!1};function eN(e){let t={},r={};return eT(e,(e,n)=>{if(t[e]){r[e]||(r[e]=!0,console.warn(`[ConfigurableStep] Multiple components share formKey "${e}"; using the first match.`));return}t[e]=eP(e,n)}),t}function eT(e,t){if(Array.isArray(e)){for(let r of e)eT(r,t);return}if(!eO(e))return;let r=e.props??{},n=r[eh];for(let e of("string"==typeof n&&n.length>0&&t(n,r),Object.values(r)))(Array.isArray(e)||eO(e))&&eT(e,t)}function eO(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&"string"==typeof e.type}function eP(e,t){var r;let n,i=t[`${ep}${ey}`],o=t[`${ep}${eb}`],a=t[`${em}leadFieldAssociated`],l=t[`${em}customField`],s=t[`${em}isArray`],c=(n=eM((r=t)[`${ep}options`]))||eM(r[`${ep}value`]);return{formKey:e,source:c?.source,optionsPath:c?.path,optionLabelField:"string"==typeof i?i:void 0,optionValueField:"string"==typeof o?o:void 0,leadFieldAssociated:"string"==typeof a?a:void 0,customField:"string"==typeof l?l:void 0,isArray:!0===s||void 0}}function eM(e){if("object"==typeof e&&null!==e&&"string"==typeof e.source)return{source:e.source,path:"str
1ing"==typeof e.path&&e.path.length>0?e.path:void 0}}let eR=(e,t,r)=>{for(let r of e){for(let e of r.stepQuestions??[])if(e.customField===t&&e.id)return{id:e.id,options:e.options};if(r.customField===t&&r.id)return{id:r.id,options:r.options}}for(let n of e){if(!n.id)continue;let e=n.dslConfig,i=e?.data?.content;if(!i)continue;let o=r.get(n);if(o||(o=eN(i),r.set(n,o)),Object.values(o).some(e=>e.customField===t))return{id:n.id,optionCustomField:t}}},eL=(e,t,r)=>{if(e.optionCustomField)return{optionId:t,text:r,value:r,customField:e.optionCustomField};let n=e.options??[],i=n.find(e=>null!=e.slug&&String(e.slug)===r)??n.find(e=>null!=e.value&&String(e.value)===r)??n.find(e=>String(e.optionId)===r);return i?{...i}:{optionId:r,text:r,value:r}},eF=(e,t,r)=>{let n=e[t];if(!n){e[t]={option:r};return}let i=n.option;if(!i){e[t]={...n,option:r};return}if(Array.isArray(i)){let o=i.findIndex(e=>e.optionId===r.optionId||e.customField===r.optionId);if(o>=0){let a=[...i];a[o]=r,e[t]={...n,option:a}}else e[t]={...n,option:[...i,r]};return}if(i.optionId===r.optionId){e[t]={...n,option:r};return}e[t]={...n,option:[i,r]}},eU=(e,t)=>{let r={};if(t.dcs&&Object.values(t.dcs).some(Boolean)){let n=Object.keys(t.dcs).filter(e=>!!t.dcs[e]).map(e=>{let r=t.dcs[e],n=t.dcsTranslate?t.dcsTranslate(e,r):r;return{optionId:e,text:n,value:r,leadFieldAssociated:e}}),i=e.find(e=>!0===e.isEntry)??e[0],o=t.entryStepId||i?.id||"dcs";r[o]={option:n},t.jumpToStepId&&t.jumpToStepId!==o&&(r[t.jumpToStepId]={option:[...n]})}if(t.forwardedContext){let n=new Map;for(let[i,o]of Object.entries(t.forwardedContext)){if(!i||"string"!=typeof o||!o.trim())continue;let t=eR(e,i,n);t&&eF(r,t.id,eL(t,i,o))}}let n=e=>{let n;if("string"!=typeof e.leadFieldAssociated)return;let i=e.leadFieldAssociated;if(("zip"===i||"zipCode"===i)&&(t.zipCode||t.location?.zipCode)&&(n=t.zipCode||t.location?.zipCode),n){let t={optionId:`${e.leadFieldAssociated}-auto-input`,text:n,value:n,group:`${e.leadFieldAssociated}-auto-input`};r[e.id||""]={option:t,leadFieldAssociated:e.leadFieldAssociated}}};if(e.forEach(e=>{n(e),(e.stepQuestions??[]).forEach(e=>n(e))}),t.location){let{state:e,zipCode:n,countryCode:i}=t.location;r.location={state:e?.toUpperCase()||"",ipInferredPostalCode:n||"",countryCode:i?.toUpperCase()||""}}return r},e$=(e,t,r)=>{if(!e.options||0===e.options.length)return;let n=e.options.filter(e=>e.isPreSelected);if(n.length>0){let i=["MULTIPLE_CHOICE","SELECT_ALL"].includes(e.questionType);if(!e.id)return;t[e.id]={option:i?n:n[0],leadFieldAssociated:r??e.leadFieldAssociated}}},e_=B.Ik({id:B.ai().optional(),name:B.Yj(),slug:B.Yj().optional()}),eD=B.Ik({id:B.ai().optional(),name:B.Yj(),slug:B.Yj().optional()}),eY=B.Ik({id:B.ai().optional(),name:B.Yj(),slug:B.Yj().optional()}),eB=B.Ik({url:B.Yj(),helid:B.Yj().optional()}),ez=B.Ik({allowedIn:B.YO(B.Yj()),blockedIn:B.YO(B.Yj())}),eV=B.Ik({sdbSchoolId:B.Yj().optional()}),eH=B.Ik({id:B.Yj(),source:B.Yj(),sourceId:B.ai(),name:B.Yj(),slug:B.Yj(),description:B.Yj().optional(),meta:eV.optional()}),eq=B.Ik({label:B.Yj(),url:B.Yj()}),eG=B.Ik({applicationCta:eq,providerId:B.ai(),providerName:B.Yj(),sdbProgramId:B.Yj(),preferred:B.zM(),degree:e_,category:eD,subject:eY,bonsaiERPIState:B.g1(B.Yj(),B.ai()),audience:B.Yj().optional(),capId:B.ai()}),eW=B.Ik({id:B.KC([B.ai(),B.Yj()]),name:B.Yj(),source:B.Yj(),type:B.Yj(),subType:B.Yj(),sourceUrl:B.Yj(),slug:B.Yj(),description:B.Yj(),shortDescription:B.Yj().optional(),overview:B.Yj().optional(),snippet:B.Yj(),attributes:B.YO(B.Yj()).optional(),occupationCodes:B.YO(B.Yj()).optional(),imageUrl:B.Yj().optional(),destination:eB,createdAt:B.Yj().optional(),updatedAt:B.Yj().optional(),hash:B.Yj().optional(),locationRestrictions:B.YO(ez).optional(),organization:eH,subjects:B.YO(B.Yj()).optional(),skills:B.YO(B.Yj()).optional(),level:B.Yj().optional(),flexibility:B.Yj().optional(),weeksToComplete:B.ai().optional(),weeksToCompleteMin:B.ai().optional(),weeksToCompleteMax:B.ai().optional(),minHoursEffortPerWeek:B.ai().optional(),courseCount:B.ai().nullable().optional(),position:B.ai().optional(),meta:eG}),eQ=B.Ik({exact:B.YO(eW),related:B.YO(eW),recommended:B.YO(eW),spotlight:
1B.YO(eW)}),eK=B.Ik({data:eQ,tracking:B.Ik({sortingReferenceId:B.Yj()}).optional()}),eJ=B.Ik({data:B.YO(eW)}),eX=B.Ik({total:B.ai(),limit:B.ai(),offset:B.ai()}),eZ=B.Ik({data:B.YO(eW),pagination:eX}),e0=B.Ik({audience:B.Yj(),schoolIds:B.YO(B.ai())});B.Ik({degree:B.Yj().optional(),category:B.Yj().optional(),subject:B.Yj().optional(),unqualified:B.YO(B.Yj()).optional(),qualified:B.YO(B.Yj()).optional(),startDate:B.Yj().optional(),state:B.Yj().optional(),country:B.Yj().optional(),channel:B.Yj().optional(),media:B.Yj().optional(),experience:B.Yj().optional(),presentationUrl:B.Yj().optional(),limit:B.ai().optional(),offset:B.ai().optional(),programIds:B.YO(B.ai()).optional(),excludeProgramIds:B.YO(B.ai()).optional(),schoolIds:B.YO(B.ai()).optional(),providers:B.YO(B.Yj()).optional(),excludeProviders:B.YO(B.Yj()).optional(),forceAudience:e0.optional()}),B.Ik({degree:B.Yj().optional(),category:B.Yj().optional(),subject:B.Yj().optional(),state:B.Yj().optional(),country:B.Yj().optional(),channel:B.Yj().optional(),experience:B.Yj().optional(),presentationUrl:B.Yj().optional(),limit:B.ai().optional(),offset:B.ai().optional(),excludeSchoolIds:B.YO(B.ai()).optional(),excludeProgramIds:B.YO(B.ai()).optional(),excludeProviders:B.YO(B.Yj()).optional()}),B.Ik({data:B.YO(eW),tracking:B.Ik({sortingReferenceId:B.Yj().optional()}).optional()}),B.Ik({query:B.Yj().optional(),subjects:B.YO(B.Yj()).optional(),skills:B.YO(B.Yj()).optional(),level:B.Yj().optional(),flexibility:B.Yj().optional(),type:B.Yj().optional(),subType:B.Yj().optional(),limit:B.ai().optional(),offset:B.ai().optional(),uuids:B.YO(B.Yj()).optional(),excludeProviders:B.YO(B.Yj()).optional()});let e1=B.Ik({types:B.g1(B.Yj(),B.ai()),subjects:B.g1(B.Yj(),B.ai()),subTypes:B.g1(B.Yj(),B.ai()),skills:B.g1(B.Yj(),B.ai()).optional()}),e2=B.Ik({optionId:B.Yj(),text:B.Yj(),value:B.KC([B.Yj(),B.ai(),B.zM(),B.ch()]).optional(),leadFieldAssociated:B.Yj().optional()}),e4=B.Ik({options:B.YO(e2),questionType:B.eu("SELECT"),id:B.Yj(),type:B.eu("QUESTION"),title:B.Yj().optional()}),e3=B.g1(B.Yj(),B.Ik({question:e4})),e5=B.g1(B.Yj(),B.Ik({courses:B.YO(eW)})),e6=B.Ik({key:B.Yj().optional(),label:B.Yj().optional()}).passthrough(),e8=B.Ik({nodes:B.YO(e6).optional()}).passthrough(),e9=B.Ik({dimensions:B.g1(B.Yj(),e8).optional()});class e7{constructor(e){this.config=e,this.cache=new Map;const t={baseUrl:"",defaultHeaders:{},cache:new Map,newRelic:{noticeError:(e,t)=>{console.error("Error in OfferingsServiceApiClient: noticeError",e,t)}},strictValidation:!1};this.config={...t,...e},this.cache=this.config.cache??new Map}getApiName(){return"offerings-service"}async get(e,t={cacheEnabled:!1}){let r=`${this.config.baseUrl}${e}`;if(t.bustCache&&this.bustCache(r),this.shouldUseCache(r,t))return this.cache.get(r).clone();let n=await fetch(`${this.config.baseUrl}${e}`,{...t,headers:{...this.config.defaultHeaders,...t.headers}});return t.cacheEnabled&&n.ok&&this.cache.set(r,n.clone()),n}async post(e,t,r={cacheEnabled:!1}){let n=JSON.stringify(t),i=`${this.config.baseUrl}${e}:${n}`;if(r.bustCache&&this.bustCache(i),this.shouldUseCache(i,r))return this.cache.get(i).clone();let o=await fetch(`${this.config.baseUrl}${e}`,{method:"POST",body:n,...r,headers:{"Content-Type":"application/json",...this.config.defaultHeaders,...r.headers}});return r.cacheEnabled&&o.ok&&this.cache.set(i,o.clone()),o}bustCache(e){this.cache.delete(e)}shouldUseCache(e,t){return!!t.cacheEnabled&&this.cache.has(e)}hasError(e){return e.status>=400}async toJson(e,t){let r=await e.json(),n=t.safeParse(r);if(!n.success){let e=Error(`Invalid response for ${this.getApiName()}`);if(console.error(e),console.log(this.buildErrorMessage(n.error.errors)),this.config.strictValidation)throw e;return r}return n.data}reportError(e,t){this.config.newRelic?.noticeError&&this.config.newRelic.noticeError(e,t||{})}buildErrorMessage(e){return e.map(e=>`Path: ${e.path.join(".")}, Message: ${e.message}`)}async getQualifiedOfferings(e,t,r={}){let n={};t&&(n["x-forwarded-for"]=t);let i=await this.post("/v1/offerings/qualified",e,{...r,headers:{...r.headers,...n}});
1return this.hasError(i)&&console.error("Failed to get qualified offerings"),await this.toJson(i,eK)}async getFilters(e={},t={}){let r=new URLSearchParams;e.type&&r.append("type",e.type),e.subject&&r.append("subject",e.subject);let n=r.toString(),i=n?`/v1/filters?${n}`:"/v1/filters",o=await this.get(i,t);return this.hasError(o)?(console.error("Failed to get offerings filters"),null):await this.toJson(o,e1)}async getQualifiedExactOfferings(e,t,r={}){let n={};t&&(n["x-forwarded-for"]=t);let i=await this.post("/v1/offerings/qualified/exact",e,{...r,headers:{...r.headers,...n}});return this.hasError(i)&&console.error("Failed to get qualified exact offerings"),await this.toJson(i,eJ)}async getProgramFieldsConfiguration(e,t,r={}){let n={};t&&(n["x-forwarded-for"]=t);let i=await this.get(`/v1/degree-fields/${e.degreeId}`,{...r,headers:{...r.headers,...n}});return this.hasError(i)?(console.error(`Failed to get program fields configuration for degree ${e.degreeId}`),null):await this.toJson(i,e3)}async getRecommendations(e,t={}){let r={courses:[{sourceId:"95f61afe-f3d7-4782-8210-618e9080bada",subjects:e.subjects}]},n=await this.post("/v1/recommendations",r,t);return this.hasError(n)&&console.error("Failed to get recommendations"),await this.toJson(n,e5)}async getDimensions(e={}){let t=await this.get("/v1/offerings/dimensions",e);return this.hasError(t)?(console.error("Failed to get offerings dimensions"),null):this.toJson(t,e9)}async getSearchOfferings(e,t={}){let r=await this.post("/v1/search",e,t);return this.hasError(r)&&console.error("Failed to search offerings"),await this.toJson(r,eZ)}}let te={degree:"degree_level",category:"academic_subject_category",subject:"academic_subject"},tt=Object.values(te),tr=(e,t)=>`${e}:${t}`;async function tn(e,t){let{scope:r="all",...n}=t??{};try{let t=new e7({baseUrl:e.replace(/\/+$/,"")}),i=await t.getDimensions(n);if(!i)return[];let o=function(e,t){let r=new Map;for(let[n,i]of Object.entries(e?.dimensions??{}))if(!t||t.has(n))for(let e of i?.nodes??[]){let t="string"==typeof e.key?e.key:void 0,i="string"==typeof e.label?e.label:void 0;t&&i&&r.set(tr(n,t),i)}return r}(i,function(e){if("all"!==e)return new Set("dcs"===e?tt:e)}(r));return Array.from(o.entries())}catch{return[]}}let ti={ready:!1,translate:e=>e,translateDcsValue:(e,t)=>t},to=(0,v.createContext)(ti),ta=({children:e,seed:t})=>{let r=(0,v.useMemo)(()=>{if(!(t instanceof Map?t.size>0:Array.isArray(t)&&t.length>0))return ti;let e=t instanceof Map?t:new Map(t),r=(t,r)=>e.get(tr(r,t))??t;return{ready:!0,translate:r,translateDcsValue:(e,t)=>r(t,te[e])}},[t]);return(0,b.jsx)(to.Provider,{value:r,children:e})};function tl(){return(0,v.useContext)(to)}function ts(e,t){switch(t.type){case F.SET_STEPS:return{...e,steps:t.payload};case F.SET_CURRENT_STEP:return{...e,currentStep:t.payload,currentStepType:t.payload?.type};case F.SET_CURRENT_STEP_INDEX:return{...e,currentStepIndex:t.payload};case F.SET_NAVIGATION_HISTORY:return{...e,navigationHistory:t.payload};case F.ADD_TO_NAVIGATION_HISTORY:return{...e,navigationHistory:[...e.navigationHistory,t.payload]};case F.GO_BACK_IN_HISTORY:{let t=[...e.navigationHistory];t.pop();let r=t[t.length-1];return{...e,navigationHistory:t,currentStep:r,currentStepType:r?.type,currentStepIndex:e.currentStepIndex-1,acceptTCPA:!1}}case F.UPDATE_FLOW_STATE:return{...e,flowState:{...e.flowState,[t.payload.stepId]:t.payload.data}};case F.SET_FLOW_STATE:return{...e,flowState:t.payload};case F.SET_OPEN_MODAL:return{...e,openModal:t.payload};case F.SET_ACCEPT_TCPA:return{...e,acceptTCPA:t.payload};case F.SET_VALIDATION_ERRORS:return{...e,validationErrors:t.payload};case F.CLEAR_VALIDATION_ERRORS:return{...e,validationErrors:[]};case F.SET_FORM_STARTED_FIRED:return{...e,formStartedFired:t.payload};case F.JUMP_TO_STEP:return{...e,currentStep:t.payload.step,currentStepIndex:t.payload.index,navigationHistory:[t.payload.step],acceptTCPA:!1};case F.SET_IS_SUBMITTING:return{...e,isSubmitting:t.payload};case F.SET_SUBMISSION_ERROR:return{...e,submissionError:t.payload};case F.SET_POPUP_BLOCKED:return{...e,popupBlockedUrl:t.payload};case F.RESET_FLOW:return{...e,flowState:{},currentStep:t.payload.entryStep,currentStepIndex:t.payload.entryStepIndex,currentStepType:t.payload.entryStep?.type,navigationHistory:[t.payload.entryStep],validationErrors:[],openM
1odal:!1,acceptTCPA:!1,isSubmitting:!1,submissionError:null,popupBlockedUrl:null};default:return e}}let tc=e=>({type:F.SET_CURRENT_STEP,payload:e}),td=e=>({type:F.SET_CURRENT_STEP_INDEX,payload:e}),tu=e=>({type:F.ADD_TO_NAVIGATION_HISTORY,payload:e}),tp=(e,t)=>({type:F.UPDATE_FLOW_STATE,payload:{stepId:e,data:t}}),tf=e=>({type:F.SET_OPEN_MODAL,payload:e}),tm=e=>({type:F.SET_VALIDATION_ERRORS,payload:e}),th=e=>({type:F.SET_IS_SUBMITTING,payload:e}),tg=e=>({type:F.SET_SUBMISSION_ERROR,payload:e}),ty=e=>({type:F.SET_POPUP_BLOCKED,payload:e}),tb={ProductClicked:"redventures.ecommerce.v1.ProductClicked",ProductLoaded:"redventures.ecommerce.v1.ProductLoaded",ProductViewed:"redventures.ecommerce.v1.ProductViewed",ElementClicked:"redventures.usertracking.v3.ElementClicked",ElementViewed:"redventures.usertracking.v3.ElementViewed",FieldViewed:"core.fieldViewed.v1",FieldSelected:"redventures.usertracking.v3.FieldSelected",FieldInputted:"redventures.usertracking.v3.FieldInputted",FormContinued:"redventures.usertracking.v3.FormContinued",FormSubmitted:"redventures.usertracking.v3.FormSubmitted",FormStarted:"redventures.usertracking.v3.FormStarted",FormViewed:"redventures.usertracking.v3.FormViewed",ConversionTracked:"core.conversions.ConversionTracked.v2",ElementLoaded:"core.ElementLoaded.v1",ServiceRequestTracked:"highereducation.ServiceRequestTracked.v2",ServiceResponseTracked:"highereducation.ServiceResponseTracked.v2",Identify:"core.Identify.v1"},tv=e=>({"X-Powered-By":"Dynamic-Experiences-V2","X-RVEDU-Request-Chain-Id":e,"X-RVEDU-Original-Emitter":"Dynamic-Experiences-App","X-RVEDU-Session-ID":window?.tagular?.("getAliasSet")?.sessionId||"","X-RVEDU-Anonymous-ID":window?.tagular?.("getAliasSet")?.anonymousId||"","X-RVEDU-Referer":window.location.href||""}),tx=B.Ik({address:B.Yj().optional(),address2:B.Yj().optional(),city:B.Yj().optional(),state:B.Yj().optional(),stateAbbr:B.Yj().optional(),postalCode:B.Yj().nullable().optional(),country:B.Yj().nullable().optional(),ipInferredPostalCode:B.Yj().optional()}),tw=B.k5(["highschool","ged","associates","bachelors","masters","doctorate"]),tS=B.k5(["bsn","bsw","mba","msw","law-degree","teaching-certificate","bachelors-speech-pathology","bachelors-behavioral-science"]),tI=B.k5(["nursing","no-license","in-progress","licensed"]),tC=B.k5(["us"]),tj=B.k5(["k-12-teacher","k-12-admin","higher-education","private-sector","government-non-profit","other"]),tk=B.k5(["Architecture","Behavioral Science","Biology","Chemistry","Chemical Engineering","Engineering and Engineering Technology","Humanities, Social Sciences and Education","Management","Interior Design","Studio Arts","Science and Technology Management","Digital Media Design","Business","Computer Engineering","Computer Science","Economics","Education","Electrical Engineering","Engineering","English","Government","History","Information Technology","Mathematics","Mechanical Engineering","Other","Other Engineering","Other Sciences","Non-Science","Physical Science","Physics","Statistics","Teaching","Writing"]),tE=B.k5(["structured","self-paced"]),tA=B.k5(["us","other"]),tN=B.k5(["family-nursing","nurse-midwifery","womens-health","adult-gerontology-acute-care-nurse-practitioner","applied-behavior-analysis","psychology","licensed-marriage-and-family-therapist","licensed-professional-counselor","master-of-arts-in-counseling","master-of-science-in-marriage-and-family-therapy","mse-in-educational-leadership","mse-in-educational-leadership-with-principle-licensure","preparation-principal-licensure-preparation-only","master-of-arts-in-teaching","master-of-arts-in-teaching-tesol","MSN","Post-MSN to DNP","Post-BSN - FNP","Post-BSN - AG-ACNP","Post-BSN - MWH","Post-BSN - WHNP","Post-Master's"]),tT=B.Ik({firstName:B.Yj(),lastName:B.Yj(),email:B.Yj(),startDate:B.Yj().nullable().optional(),ipAddress:B.Yj().optional(),phoneNumber:B.Yj().nullable().optional(),location:tx.nullable().optional(),hsGradYear:B.ai().nullable().optional(),levelOfEducation:tw.nullable().optional(),inProgressLevelOfEducation:tw.nullable().optional(),militaryStatus:B.zM().nullable().optional(),gpa:B.ai().nullable().optional(),tcpaText:B.Yj().nullable().optional(),transferCredits:B.ai().nullable().optional(),yearsOfWorkExperience:B.ai().nullable().optional(),yearsOfProgramRelatedExperience:B.ai().nullable().optional(),currentAcademicAward:tS.nullable().optional(),inProgressAcademicAward:tS.nullable().optional(),currentLicense:tI.nullable().optional(),inProgressLicense:tI.nullable().optional(),currentCitizenship:tC.nullable().optional(),workExperienceField:tj.nullable().optional(),hasGivenTCPAConsent:B.zM().nullable().optional(),undergraduateMajor:tk.nullable().optional(),inProgressUndergraduateMajor:tk.nullable().optional(),learningPace:tE.nullable().optional(),currentPermanentResidenceCountry:tA.nullable().optional(),programTrack:tN.nullable().optional(),hasGivenThirdPartySharingConsent:B.zM().nullable().optional(),hasGivenProspectSharingConsent:B.zM().nullable().optional(),isInARelatedRole:B.zM().optional(),leadSource:B.Yj().nullable().optional(),is18YearsOrOlder:B.zM().optional(),someCollege:B.zM().optional(),lastAttendanceYear:B.ai().nullable().optional(),tcpaEABConsentGiven:B.zM().nullable().optional(),tcpaEMCCConsentGiven:B.zM().nullable().optional(),hasCompleted30SemesterHours:B.zM().nullable().optional(),thirdPartyLeadId:B.Yj().optional()}),tO=B.Ik({correlationId:B.Yj().optional(),publisher:B.Yj().optional(),trafficSource:B.Yj().optional(),heclid:B.Yj().optional(),anonymousId:B.Yj().nullable().optional(),url:B.Yj().optional(),experience:B.Yj().optional(),publisherType:B.Yj().optional()}),tP=B.Ik({id:B.ai(),name:B.Yj().optional(),slug:B.Yj().optional(),campus:B.Ik({id:B.ai().optional(),name:B.Yj().optional(),isOnline:B.zM().optional()}).optional()}),tM=B.Ik({providerProgramId:B.ai().nullable().optional(),program:B.Yj().optional(),degree:B.Ik({name:B.Yj().optional(),slug:B.Yj().optional(),id:B.ai().optional()}).optional(),category:B.Ik({name:B.Yj().optional(),slug:B.Yj().optional(),id:B.ai().optional()}).optional(),subject:B.Ik({name:B.Yj().optional(),slug:B.Yj().optional(),id:B.ai().optional()}).optional(),cap:B.Ik({id:B.ai().optional()}).optional()}),tR=B.Ik({contactId:B.Yj().optional()}),tL=B.Ik({timestamp:B.ai(),guid:B.Yj(),isSync:B.zM()}),tF=B.Ik({isSync:B.zM().optional(),isTest:B.zM().optional()});B.Ik({lead:tT,trackingContext:tO.nullable().optional()}),B.Ik({lead:tT,trackingContext:tO,schoolContext:tP,programContext:tM,contactContext:tR.optional(),messageContext:tL.optional()}),B.Ik({organizationId:B.Yj(),slug:B.Yj(),offeringUuid:B.Yj().optional(),conversionId:B.Yj().optional(),lead:tT.passthrough(),trackingContext:tO.catchall(B.L5()).optional(),messageContext:tF.optional()}),B.Ik({phoneNumber:B.Yj()});let tU=B.Ik({validPhoneNumber:B.eu(!1)}),t$=B.Ik({phoneNumber:B.Yj(),nationalFormat:B.Yj(),validPhoneNumber:B.zM(),lineTypeIntelligence:B.Ik({carrier_name:B.Yj().nullable()}).nullable()}),t_=B.KC([tU,t$]);B.Ik({zip:B.Yj()});let tD=B.Ik({validZip:B.eu(!1)}),tY=B.Ik({city:B.Yj(),zipcode:B.Yj(),state:B.Yj(),stateAbbr:B.Yj(),country:B.Yj().optional()}),tB=B.KC([tD,tY]);B.Ik({lead:tT});let tz=B.Ik({required:B.YO(B.Yj()).optional(),properties:B.g1(B.L5()).optional(),additionalProperties:B.zM().optional()}),tV=B.Ik({required:B.YO(B.Yj()),properties:B.g1(tz),additionalProperties:B.zM()}),tH=B.Ik({organizationId:B.Yj().optional(),offeringUuid:B.Yj().nullable().optional(),diff
1y:tV}),tq=B.Ik({id:B.Yj(),name:B.Yj(),description:B.Yj(),fields:B.YO(B.Yj())}),tG=B.Ik({qualified:B.YO(tq),unqualified:B.YO(tq),unknownQualifications:B.YO(tq)}),tW=B.Ik({studentId:B.Yj().optional(),referenceId:B.Yj().optional()}),tQ=B.Ik({organizationId:B.Yj().optional(),offeringUuid:B.Yj().nullable().optional(),leadSubmitted:B.zM(),PK:B.Yj(),SK:B.Yj(),referenceId:B.Yj().optional(),partnerIdentifiers:tW.optional()}),tK=B.Ik({type:B.Yj().optional(),enum:B.YO(B.L5()).optional(),default:B.L5().optional(),description:B.Yj().optional(),required:B.YO(B.Yj()).optional(),properties:B.g1(B.RZ(()=>tK)).optional()}).passthrough(),tJ=B.Ik({$schema:B.Yj().optional(),type:B.Yj().optional(),required:B.YO(B.Yj()).optional(),properties:B.g1(tK).optional(),additionalProperties:B.zM().optional()}).passthrough(),tX=B.Ik({organizationId:B.Yj(),offeringUuid:B.Yj().nullable(),schema:tJ});class tZ{constructor(e){this.config=e;const t={baseUrl:"",defaultHeaders:{"Content-Type":"application/json","x-api-key":"voyager"},cache:new Map,newRelic:{noticeError:(e,t)=>{console.error("Error in DeliverySystemApiClient: noticeError",e,t)}},strictValidation:!1},r={...t,...e};this.config={...r,defaultHeaders:{...t.defaultHeaders,...r.defaultHeaders??{}}},this.cache=this.config.cache??new Map}getApiName(){return"delivery-system"}async get(e,t={cacheEnabled:!1}){let r=`${this.config.baseUrl}${e}`;if(t.bustCache&&this.bustCache(r),this.shouldUseCache(r,t))return this.cache.get(r).clone();let n=await fetch(`${this.config.baseUrl}${e}`,{...t,headers:{...this.config.defaultHeaders,...t.headers}});return t.cacheEnabled&&n.ok&&this.cache.set(r,n.clone()),n}async post(e,t,r={cacheEnabled:!1}){let n=`${this.config.baseUrl}${e}`;if(r.bustCache&&this.bustCache(n),this.shouldUseCache(n,r))return this.cache.get(n).clone();let i=t instanceof URLSearchParams?t:JSON.stringify(t),o=await fetch(`${this.config.baseUrl}${e}`,{method:"POST",body:i,...r,headers:{...this.config.defaultHeaders,...r.headers}});return r.cacheEnabled&&o.ok&&this.cache.set(n,o.clone()),o}bustCache(e){this.cache.delete(e)}shouldUseCache(e,t){return!!t.cacheEnabled&&this.cache.has(e)}hasError(e){return e.status>=400}async toJson(e,t){let r=await e.json(),n=t.safeParse(r);if(!n.success){let e=Error(`Invalid response for ${this.getApiName()}`);if(console.error(e),console.log(this.buildErrorMessage(n.error.errors)),this.config.strictValidation)throw e;return r}return n.data}reportError(e,t){this.config.newRelic?.noticeError&&this.config.newRelic.noticeError(e,t||{})}buildErrorMessage(e){return e.map(e=>`Path: ${e.path.join(".")}, Message: ${e.message}`)}async getLeadSchema(e,t={}){let r=await this.get(`/v3/schema/${e.schoolId}/${e.programId}`,t);return this.hasError(r)&&console.error("Failed to get lead schema"),await this.toJson(r,tJ)}async getLeadSchemaV4(e,t={}){let r=this.buildLeadSchemaV4Path(e),n=await this.get(r,t);if(this.hasError(n))throw console.error("Failed to get v4 lead schema"),Error(await this.buildHttpErrorMessage(n,"Error getting v4 lead schema"));return(await this.toJson(n,tX)).schema}async postLeadSchema(e,t,r={}){let n=await this.post(`/v3/schema/${e.schoolId}/${e.programId}`,t,r);return this.hasError(n)&&console.error("Failed to post lead schema"),await this.toJson(n,tJ)}async postLeadQualify(e,t,r={}){let n=await this.post("/v4/request/qualify",e,{...r,headers:{...r.headers,...t}});return this.hasError(n)&&console.error("Failed to qualify lead"),await this.toJson(n,tG)}async postLeadQualifications(e,t,r={}){let n=await this.post("/v3/lead/qualify",e,{...r,headers:{...r.headers,...t}});return this.hasError(n)&&console.error("Failed to get lead qualifications"),await this.toJson(n,tG)}async submitLead(e,t={}){let r=await this.post("/v3/lead",e,t);return this.hasError(r)&&console.error("Failed to submit lead"),await this.toJson(r,tQ)}async submitLeadV4(e,t={}){let r=await this.post("/v4/lead",e,t);if(this.hasError(r))throw console.error("Failed to submit v4 lead"),Error(await this.buildHttpErrorMessage(r,"Error submitting v4 lead"));return await this.toJson(r,tQ)}async getDiffyV4(e,t,r={}){let n=await this.post(this.buildDiffyV4Path(t),e,r);if(this.hasError(n))throw console.error("Failed to get v4 diffy"),Error(await this.buildHttpErrorMessage(n,"Error getting v4 diffy"));return await this.toJson(n,tH)}async validatePhone(e,t={}){let r=await this.post("/v2/validate/phone",e,t);return this.hasError(r)&&console.error("Failed to validate phone"),await this.toJson(r,t_)}async validateZip(e,t={}){let r=await this.post("/v2/validate/zip",e,t);return this.hasError(r)&&console.error("Failed to validate zip"),await this.toJson(r,tB)}async getDiffy(e,t,r={}){let n=await this.post(`/v3/diffy/${t.schoolId}/${t.programId}`,e,r);return this.hasError(n)&&console.error("Failed to get diffy"),await this.toJson(n,tH)}buildLeadSchemaV4Path(e){return this.buildOrganizationScopedV4Path("/v4/schema",e)}buildDiffyV4Path(e){return this.buildOrganizationScopedV4Path("/v4/diffy",e)}async buildHttpErrorMessage(e,t){let r=await e.json().catch(()=>({})),n="string"==typeof r.error?r.error:"string"==typeof r.message?r.message:`${t}: ${e.status}`,i={...r};if(delete i.error,delete i.message,Object.keys(i).length>0)try{return`${n}: ${JSON.stringify(i)}`}catch{}return n}buildOrganizationScopedV4Path(e,t){let r=`${e}/${encodeURIComponent(t.organizationId)}`;return t.offeringUuid?`${r}/${encodeURIComponent(t.offeringUuid)}`:r}}let t0=()=>new tZ({baseUrl:Y().deliverySystemApiUrl??"",defaultHeaders:tv(E())}),t1=async e=>{try{let t=t0();return await t.validatePhone({phoneNumber:e})}
1catch(e){return console.error("Could not validate phone",e),{validPhoneNumber:!1,error:e}}},t2=async e=>{try{let t=t0(),r=await t.validateZip({zip:e});if("validZip"in r&&!1===r.validZip)return{validZip:!1,error:r};if("stateAbbr"in r)return{validZip:!0,...r};return{validZip:!1,error:"Invalid response format"}}catch(e){return console.error("Could not validate zip",e),{validZip:!1,error:e}}},t4=e=>{let t=!1,r=!1,n=!1;if(e.type===O.MULTI_QUESTION){let i=e.stepQuestions||[];t=i.some(e=>"phoneNumber"===e.leadFieldAssociated),r=i.some(e=>"zip"===e.leadFieldAssociated),n=i.some(e=>"email"===e.leadFieldAssociated)}else t="phoneNumber"===e.leadFieldAssociated,r="zip"===e.leadFieldAssociated,n="email"===e.leadFieldAssociated;return{needsPhone:t,needsZip:r,needsEmail:n}},t3=async(e,t)=>{let r,n=[];if("phoneNumber"===t)if(0===e.trim().length)n.push({field:t,message:"Please enter a phone number"});else{let r=await t1(e);r?.validPhoneNumber||n.push({field:t,message:"Please enter a valid phone number"})}if("zip"===t){0===e.trim().length&&n.push({field:t,message:"Please enter a ZIP code"});let i=await t2(e);i?.validZip?"stateAbbr"in i&&(r={stateAbbr:i.stateAbbr,state:i.state,city:i.city}):n.push({field:t,message:"Please enter a valid ZIP code"})}if("email"===t)if(0===e.trim().length)n.push({field:t,message:"Please enter an email address"});else/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e)||n.push({field:t,message:"Please enter a valid email address"});return{errors:n,resolvedZipData:r}},t5=async(e,t)=>{let r,n=[],i=t[e.id||""],o=t4(e);if(!o.needsPhone&&!o.needsZip&&!o.needsEmail)return{isValid:!0,errors:[]};if(!i?.option){let t=e.title?.toString().toLowerCase().includes("phone")?"phone number":e.title?.toString().toLowerCase().includes("zip")?"ZIP code":e.title?.toString().toLowerCase().includes("email")?"email address":"field";return{isValid:!1,errors:[{field:e.leadFieldAssociated||e.id||"unknown",message:`Please enter a ${t}`}]}}if(e.type===O.MULTI_QUESTION){let i=e.stepQuestions||[];for(let e=0;e<i.length;e++){let o=i[e],a=t[o.id||""],l="phoneNumber"===o.leadFieldAssociated,s="zip"===o.leadFieldAssociated,c="email"===o.leadFieldAssociated;if((l||s||c)&&!a?.option){let e=l?"phone number":s?"ZIP code":"email address";
1n.push({field:o.leadFieldAssociated||o.id||"unknown",message:`Please enter a ${e}`})}if(a?.option)for(let e of Array.isArray(a.option)?a.option:[a.option]){let t=e.value?.toString()||"",i=await t3(t,o.leadFieldAssociated);i.errors&&n.push(...i.errors),i.resolvedZipData&&(r=i.resolvedZipData)}}}else for(let e of Array.isArray(i.option)?i.option:[i.option]){let t=e.value?.toString()||"",o=i?.leadFieldAssociated,a=await t3(t,o);a.errors&&n.push(...a.errors),a.resolvedZipData&&(r=a.resolvedZipData)}return{isValid:0===n.length,errors:n,resolvedZipData:r}},t6={dynamicFlowUrl:"dynamic-flows",organizationApiUrl:"organizations",organizationServiceBaseUrl:"organizations",campaignManagementApiUrl:"campaign-management",offeringsSearchApiUrl:"offerings",offeringsServiceBaseUrl:"offerings-service",deliverySystemApiUrl:"delivery-system",deliverySystemBaseUrl:"delivery-system",audienceIntentApiUrl:"audience-intent",prospectServiceApiUrl:"prospect"},t8={prod:{dynamicFlowUrl:"https://dynamic-flows.api.highereducation.com",audienceIntentApiUrl:"https://audience-intent.api.highereducation.com",offeringsSearchApiUrl:"https://offerings.api.highereducation.com",offeringsServiceBaseUrl:"https://offerings-service.api.highereducation.com",mobiusApiUrl:"https://api.mobius.highereducation.com",deliverySystemApiUrl:"https://delivery-system.rveducation.io",organizationApiUrl:"https://organizations.api.highereducation.com",campaignManagementApiUrl:"https://campaign-management.api.highereducation.com",prospectServiceApiUrl:"https://prospect.api.highereducation.com",leadApiBaseUrl:"",locationInferenceApiUrl:"",externalLinkOrigins:[]},beta:{dynamicFlowUrl:"https://dynamic-flows.beta.api.highereducation.com",audienceIntentApiUrl:"https://audience-intent.beta.api.highereducation.com",offeringsSearchApiUrl:"https://offerings.beta.api.highereducation.com",offeringsServiceBaseUrl:"https://offerings-service.beta.api.highereducation.com",mobiusApiUrl:"https://api.beta.mobius.highereducation.com",deliverySystemApiUrl:"https://delivery-system.beta.rveducation.io",organizationApiUrl:"https://organizations.beta.api.highereducation.com",campaignManagementApiUrl:"https://campaign-management.beta.api.highereducation.com",prospectServiceApiUrl:"https://prospect.beta.api.highereducation.com",leadApiBaseUrl:"",locationInferenceApiUrl:"",externalLinkOrigins:[]},int:{dynamicFlowUrl:"https://dynamic-flows.int.api.highereducation.com",audienceIntentApiUrl:"https://audience-intent.int.api.highereducation.com",offeringsSearchApiUrl:"https://offerings.int.api.highereducation.com",offeringsServiceBaseUrl:"https://offerings-service.int.api.highereducation.com",mobiusApiUrl:"https://api.staging.mobius.highereducation.com",deliverySystemApiUrl:"https://delivery-system.staging.rveducation.io",organizationApiUrl:"https://organizations.int.api.highereducation.com",campaignManagementApiUrl:"https://campaign-management.int.api.highereducation.com",prospectServiceApiUrl:"https://prospect.int.api.highereducation.com",leadApiBaseUrl:"",locationInferenceApiUrl:"",externalLinkOrigins:[]},dev:{dynamicFlowUrl:"https://dynamic-flows.dev.api.highereducation.com",audienceIntentApiUrl:"https://audience-intent.dev.api.highereducation.com",offeringsSearchApiUrl:"https://offerings.int.api.highereducation.com",offeringsServiceBaseUrl:"https://offerings-service.dev.api.highereducation.com",mobiusApiUrl:"https://api.staging.mobius.highereducation.com",deliverySystemApiUrl:"https://delivery-system.staging.rveducation.io",organizationApiUrl:"https://organizations.dev.api.highereducation.com",campaignManagementApiUrl:"https://campaign-management.int.api.highereducation.com",prospectServiceApiUrl:"https://prospect.dev.api.highereducation.com",leadApiBaseUrl:"",locationInferenceApiUrl:"",externalLinkOrigins:[]}},t9={prod:"https://www.highereducation.com",beta:"https://dev.highereducation.com",int:"https://dev.highereducation.com",dev:"https://dev.highereducation.com"};function t7(e,t){return t?t9["local"===e?re:e]:""}let re="int";function rt(e,t){return"local"===e?function({localPrefix:e="",localOverrides:t={}}={}){let r={...t8[re]},n=e.trim();if(n)for(let[e,t]of Object.entries(t6))r[e]=`https://local${n}-${t}.local.api.highereducation.com`;for(let[e,n]of Object.entries(t)){if("string"==typeof n){let t=n.trim();t&&(r[e]=t);continue}Array.isArray(n)&&(r.externalLinkOrigins=n)}return r}(t):t8[e]}let rr=(0,v.createContext)(null),rn=({children:e,config:t})=>{(0,v.useMemo)(()=>{var e;t.api&&(e=t.api,D={...D,...e})},[t.api]);let r=(0,v.useMemo)(()=>t,[t]);return(0,b.jsx)(rr.Provider,{value:r,children:e})};function ri(){let e=(0,v.useContext)(rr);return e||(console.warn("useExperienceConfig must be used within an ExperienceConfigProvider"),function(e="prod"){return{api:rt(e),tracking:{dynamicFlowEventFlag:!1}}}())}function ro(){return ri().site}let ra="_meta.leadFieldAssociated",rl="_meta.customField",rs=(e,t)=>t.find(t=>
1t.id===e.nextId)||null,rc=e=>"string"==typeof e.leadFieldAssociated&&e.leadFieldAssociated.length>0?e.leadFieldAssociated:"string"==typeof e.customField&&e.customField.length>0?e.customField:void 0,rd=(e,t)=>{if("string"==typeof t){let r=t.trim();r.length>0&&e.add(r)}},ru=(e,t)=>{if(!e||"object"!=typeof e)return;if(Array.isArray(e)){for(let r of e)ru(r,t);return}rd(t,e[ra]),rd(t,e[rl]);let r=e.props;for(let n of(r&&"object"==typeof r&&!Array.isArray(r)&&(rd(t,r[ra]),rd(t,r[rl])),Object.values(e)))n&&"object"==typeof n&&ru(n,t)},rp=e=>{if(!e)return[];let t=new Set;if(rd(t,e.leadFieldAssociated),rd(t,e.customField),Array.isArray(e.stepQuestions))for(let r of e.stepQuestions)for(let e of(rd(t,r.leadFieldAssociated),rd(t,r.customField),r.options||[]))rd(t,e.leadFieldAssociated),rd(t,e.customField);if(Array.isArray(e.groupedQuestions))for(let r of e.groupedQuestions)for(let e of r.questions||[])for(let r of(rd(t,e.leadFieldAssociated),rd(t,e.customField),e.options||[]))rd(t,r.leadFieldAssociated),rd(t,r.customField);if(Array.isArray(e.options))for(let r of e.options)rd(t,r.leadFieldAssociated),rd(t,r.customField);let r=e.dslConfig?.data;return void 0!==r&&ru(r,t),Array.from(t)},rf=(e,t,r=[])=>{let n=e.map(e=>void 0!==e.value&&null!==e.value&&String(e.value).length>0||"string"==typeof e.slug&&e.slug.length>0?e:{...e,value:""});if(!(Array.isArray(t)&&t.some(e=>""===e)))return n;let i=new Set(n.map(rc).filter(e=>"string"==typeof e));for(let e of r)i.has(e)||n.push({optionId:e,text:"",value:"",leadFieldAssociated:e});return n},rm=(e,t,r,n,i)=>{let{condition:o}=e;if(o.type===M.DEFAULT)return!0;if(o.type!==M.OPTION_SELECTED&&o.type!==M.GROUP_SELECTED&&o.type!==M.COMBINATION_SELECTED)return!1;let a=t.option;if(!a||!r)return!1;let l=Array.isArray(a),s=l?a[0]:a,c=l?a:[a];switch(o.type){case M.GROUP_SELECTED:switch(o.operator){case P.CONTAINS_ANY:return r.some(e=>e.group===o.group);case P.CONTAINS:return l?c.every(e=>e.group===o.group):s?.group===o.group;case P.EQUALS:return s?.group===o.group;case P.NOT_EQUALS:return s?.group!==o.group;default:return!1}case M.COMBINATION_SELECTED:{let e=i??rp(n),t=rf(r,o.combination,e),a=rf(c,o.combination,e),l=e=>{let t=[];return void 0!==e.value&&null!==e.value&&t.push(String(e.value)),"string"==typeof e.slug&&e.slug.length>0&&t.push(e.slug),t},s=Array.isArray(o.combination)&&o.combination.length>0;switch(o.operator){case P.CONTAINS_ANY:{let e=!!s&&o.combination.every(e=>t.some(t=>l(t).includes(e))),n=!o.optionIds||!(o.optionIds.length>0)||o.optionIds.every(e=>r.some(t=>t.optionId===e));return e&&n}case P.CONTAINS:return a.some(e=>l(e).some(e=>o.combination?.includes(e)??!1));case P.EQUALS:{let e=(o.combination||[]).slice().sort(),t=t=>JSON.stringify(t.slice().sort())===JSON.stringify(e);if(a.every(e=>void 0!==e.value&&null!==e.value)&&t(a.map(e=>String(e.value))))return!0;if(a.every(e=>!!e.slug))return t(a.map(e=>String(e.slug)));return!1}case P.NOT_EQUALS:return!a.some(e=>l(e).some(e=>o.combination?.includes(e)??!1));default:return!1}}case M.OPTION_SELECTED:switch(o.operator){case P.CONTAINS_ANY:return r.some(e=>e.optionId===o.optionId&&e.value===o.value);case P.EQUALS:return c.some(e=>e.optionId===o.optionId||e.value===o.value);case P.NOT_EQUALS:return!r.some(e=>e.optionId===o.optionId||e.value===o.value);case P.GREATER_THAN:return c.some(e=>Number(e.value)>Number(o.value));case P.LESS_THAN:return c.some(e=>Number(e.value)<Number(o.value));case P.CONTAINS:return c.some(e=>{let t=!o.optionId||e.optionId===o.optionId,r=!o.value||String(e.value).includes(String(o.value));return t&&r});default:return!1}default:return!1}},rh=(e,t,r)=>{let n=e.toLowerCase();return!!(n.includes("firstname")||n.includes("lastname")||n.includes("email")||n.includes("phonenumber")||n.includes("address")||t?.title?.includes("Name")||t?.title?.includes("Email")||t?.title?.includes("Phone")||t?.title?.includes("Contact")||t?.title?.includes("Address")||r?.toLowerCase().includes("name")||r?.toLowerCase().includes("email")||r?.toLowerCase().includes("phone")||r?.toLowerCase().includes("contact")||r?.toLowerCase().includes("address"))},rg=e=>Object.values(e).flatMap(e=>e?.option?(Array.isArray(e.option)?e.option:[e.option]).map(t=>({...t,leadFieldAssociated:t.leadFieldAssociated||e.leadFieldAssociated||""})):[]),ry=(e,t)=>
1{let r,n=(r=new Set,e.forEach(e=>{e.leadFieldAssociated&&r.add(e.leadFieldAssociated),e.type===O.MULTI_QUESTION&&(e.stepQuestions||[]).forEach(e=>{e.leadFieldAssociated&&r.add(e.leadFieldAssociated)})}),Array.from(r)),i={};for(let e of n)try{let r=rv(e,t);r&&""!==r&&(i[e]=r)}catch(t){console.warn(`Failed to get data for field: ${e}`,t)}return i},rb=["firstName","lastName","email","phoneNumber","zip","zipCode"],rv=(e,t)=>{let r=rg(t).find(t=>t.leadFieldAssociated===e);return rb.includes(e)?r?.value?.toString():r?.text?.toString()},rx=(e,t)=>rg(t).find(t=>t.leadFieldAssociated===e)||{optionId:"",text:"",value:"",leadFieldAssociated:""},rw=(e,t)=>Object.entries(e).filter(([e,r])=>{let n=t.find(t=>t.id===e);return"TCPA"!==e&&(r?.option||"location"===e)&&n?.type!==O.MULTI_QUESTION}).flatMap(([r,n])=>{if("location"===r){let e=[];return n.state&&e.push({fieldName:"location",fieldValue:n.state}),n.ipInferredPostalCode&&e.push({fieldName:"location",fieldValue:n.ipInferredPostalCode}),e}let i=t.find(e=>e.id===r);return i?.type===O.DCS?[{fieldName:"degree",fieldValue:rx("degree",e)?.value||""},{fieldName:"category",fieldValue:rx("category",e)?.value||""},{fieldName:"subject",fieldValue:rx("subject",e)?.value||""}]:(Array.isArray(n?.option)?n?.option:[n?.option]).map(e=>({fieldName:n?.leadFieldAssociated?.toString()||i?.stepName||i?.title?.toString()||r,fieldValue:rh(n?.leadFieldAssociated||"",i,i?.stepName)?"SANITIZED":e?.text?.toString()||e?.value?.toString()||""}))}),rS=e=>{let t={};return Object.entries(e).forEach(([e,r])=>{if(!r)return;if("location"===e){void 0!==r.state&&(t.state={key:"state",value:r.state}),void 0!==r.ipInferredPostalCode&&(t.ipInferredPostalCode={key:"ipInferredPostalCode",value:r.ipInferredPostalCode});return}if(!r.option)return;let n=r.option;if(Array.isArray(n))n.forEach(e=>{e.leadFieldAssociated&&void 0!==e.value&&(t[e.leadFieldAssociated]={key:e.leadFieldAssociated,value:e.value})});else{let e=r.leadFieldAssociated||n.leadFieldAssociated,i=n.value;e&&void 0!==i&&(t[e]={key:e,value:i})}}),t},rI=(e=null,t={})=>{if(!e)throw Error("base is required");let r=Object.entries(t).map(([e,t])=>{if(""===t||null===t)return!1;let r="object"==typeof t?JSON.stringify(t):t;return`${e}=${encodeURIComponent(r)}`}).filter(e=>e);return r.length<=0?e:e+(e.includes("?")?"&":"?")+r.join("&")},rC=e=>{let t=new URLSearchParams(e.includes("?")?e.split("?")[1]:e),r=(t.has("utmCap")||t.has("utm_cap")?t.get("utmCap")??t.get("utm_cap"):"organic")?.toLowerCase();return r&&["search","social"].includes(r)&&(r=`paid ${r}`),r??""},rj=()=>{if("function"==typeof window?.tagular)try{let e=window?.tagular("getAliasSet");if(!e)return;let{anonymousId:t,instanceId:r,sessionId:n,tenantId:i,transitId:o}=e;return{ref_anon:t??"",ref_inst:r??"",ref_sess:n??"",ref_tenant:i??"",transit_id:o??""}}catch{return}},rk="dexp-result",rE={},rA="/discover/hen",rN=e=>e.toLowerCase().replace(/^www\./,"");function rT(e){let t=e.match(/^\/discover((?:\/[^?#]*)?)((?:[?#].*)?)$/i);if(!t)return e;let[,r="",n=""]=t;return/^\/(hen|v2)(\/|$)/i.test(r)?e:`${rA}${r}${n}`}let rO=({step:e,currentStepId:t,correlationId:r,siteConfig:n,dcsData:i,redirectUrl:o,fromStepIndex:a,formViewedCorrelationId:l,outboundUrl:s,contextParams:c})=>rP(e,t,r,n,i,o,a,l,s,c),rP=(e,t,r,n,i,o,a,l,s,c)=>{let d,u,p,f=e?.resultType;if(e?.dslConfigId&&!(o&&o.toLowerCase().includes("discover")))return{url:"",outboundUrl:"",actionOutcome:rk};let m=o||"/school-search",h=(u=new URLSearchParams((d=(window?.location?.href||"").split("#")[0]).includes("?")?d.split("?")[1]:""),p={},u.forEach((e,t)=>{p[t]=e}),p),g="dexp-question-flow",y=n?.domain,b=window?.location?.hostname?.includes("dev.")||!1,v=function(e,t){if(!e)return"";let r=`https://${t}${e}`;if(!window.location)return r;let{pathname:n,origin:i,hostname:o}=window.location,a=n.replace(/^\/+/,"").split("/")[0]??"";if(a&&rN(a)===rN(e))return`${i}/${a}`;let l=rN(o)===rN(e),s=o.toLowerCase().endsWith(`.${rN(e)}`);if(!l&&s)return i;let c=o.toLowerCase(),d=rN(e);if(!(c===e.toLowerCase()||c===d||c.endsWith(`.${d}`))){let t=`${c}|${e.toLowerCase()}`;rE[t]||(rE[t]=!0,console.warn(`[generateResultUrl] Falling back to canonical base (${r}) on host "${o}" because the pathname's first segment ("${a}") does not match \`siteConfig.domain\` ("${e}"). If you are running on a path-prefixed staging host (WP Engine preview, localhost, ngrok, Vercel preview) the App Router should have a leading [tenant] segment that matches the configured domain (www-prefix differences are tolerated). The eject will route to the canonical host instead of staying on the current origin.`))}return r}
1(y,b?"dev.":"");switch(!y&&console.warn("[generateResultUrl] siteConfig.domain is missing; falling back to relative URLs. Thread `tenant.domain` into <DynamicExperience tenant={â¦} />."),f){case A.STUDY_MATCH:g=rk,m=rI(n?.appExperienceUrl,{publisher:n?.domain,url:window?.location?.href||"",degree:i?.degree?.value||"general",category:i?.category?.value||"general",subject:i?.subject?.value||"general",correlationId:r,trafficSource:rC(window?.location?.href||""),...rj()});break;case A.OFFERINGS:g=rk,m="";break;case A.DASHBOARD:g=rk,m=`${v}/${e.redirectUrl||""}`;break;case A.QUALIFIED_RESULTS_PAGE:case A.CUSTOM_RESULTS_PAGE:m="",s="",g=rk;break;default:if(g=rk,o){let d,u=o.toLowerCase().includes("discover"),p=!!n?.affiliate,f=u&&p,h=y||window.location?.hostname,x=h?rN(h):void 0,w=x?`/${x}`:"",S=f?`${b?"https://dev.highereducation.com":"https://www.highereducation.com"}${w}`:v;if(o.startsWith("http"))if(f)try{let e=new URL(o);d=`${S}${rT(e.pathname)}${e.search}`}catch{console.warn(`[generateResultUrl] Affiliate-discover redirectUrl could not be parsed as an absolute URL; falling back to the affiliate /discover/hen/ root. redirectUrl=${JSON.stringify(o)}`),d=`${S}${rA}/`}else d=o;else{let e=u?rT(o):o;d=`${S}${e}`}s=m=rI(d,{degree:i?.degree?.slug||i?.degree?.value||"general",category:i?.category?.slug||i?.category?.value||"general",subject:i?.subject?.slug||i?.subject?.value||"general",from:t||"",flowid:e?.flowId||"",jumpto:e?.id||"",correlationId:r,formViewedCorrelationId:l||"",actionOutcome:g,trafficSource:rC(window?.location?.href||""),...!c?{}:Object.fromEntries(Object.entries(c).filter(([e,t])=>e.startsWith("ctx_")&&"string"==typeof t&&t.length>0)),...rj(),fromStepIndex:a||""})}else m="/school-search",g=rk;s=m}if(m&&h){let e=new URLSearchParams(m.split("?")[1]||""),t=Object.fromEntries(Object.entries(h).filter(([t])=>!e.has(t)));Object.keys(t).length>0&&(m=rI(m,t))}return s=s||m,{url:m,outboundUrl:s||"",actionOutcome:g}};function rM(e){let t=[],r=new Set,n=e=>{let n=e.id;if(n){if(r.has(n))return;r.add(n)}t.push(e)};for(let t of e){n(t);let e=t.stepQuestions;if(Array.isArray(e))for(let t of e)n(t)}return t}let rR=(e,t,r,n)=>{let i=rM(t),o=i.find(t=>t.customField===e);if(o?.id){let e=r[o.id];if(e?.option)return e.option}for(let t of i){if(!t.id)continue;let n=r[t.id],i=n?.option;if(i){if(Array.isArray(i)){let t=i.find(t=>t.customField===e);if(t)return t}else if(i.customField===e)return i}}return n?.[e]};function rL(e,t,r){if(!r||0===r.length)return{};let n={};for(let i of r){if(Object.keys(n).length>=15)break;if("string"!=typeof i)continue;let r=i.trim();if(!r)continue;let o=t.find(e=>e.customField===r),a=rR(r,t,e),l=Array.isArray(a)?void 0:a?.leadFieldAssociated,s=o?.stepName??r,c=o?.leadFieldAssociated??l,d=null!=c&&String(c).length>0?String(c):null;if(rh(r,o,s)||null!==d&&rh(d,o,s))continue;let u=function(e){if(!e)return null;if(Array.isArray(e)){let t=e.map(e=>rF(e)).filter(e=>null!==e);return 0===t.length?null:t.join(",")}return rF(e)}(a);null!==u&&(u.length>200||(n[`ctx_${r}`]=u))}return n}function rF(e){let t=e.slug||e.value;if(null==t)return null;let r=String(t).trim();return r.length>0?r:null}let rU="de:conversion";function r$(e){let t=t=>{e(t.detail)};return window.addEventListener(rU,t),()=>window.removeEventListener(rU,t)}var r_=r(49088),rD=r.n(r_),rY=r(93275),rB=r.n(rY);let rz=e=>{if(null==e)return;let t=String(e).toLowerCase();return!1!==e&&"false"!==t&&"no"!==t&&(!0===e||"true"===t||"yes"===t||void 0)},rV=(e,t,r=null)=>{let n=null,i=null;if(e.currentAcademicAward?.value){let t=e.currentAcademicAward?.value;if("object"!=typeof t||Array.isArray(t))"string"==typeof t&&(t.includes("-in-progress")?(i=t.replace("-in-progress",""),n=null):(i=null,n=t));else{let e=Object.keys(t)[0];"IN_PROGRESS"===t[e]?(i=e,n=null):(n=e,i=null)}}else n=null,i=null;let o={firstName:e.firstName?.value,lastName:e.lastName?.value,email:e.email?.value,phoneNumber:e.phoneNumber?.value,location:{address:e.address?.value,address2:e.address2?.value,city:e.city?.value,postalCode:e.zip?.value??e.postalCode?.value,country:e.country?.value,state:e.state?.value,ipInferredPostalCode:e.ipInferredPostalCode?.value},hsGradYear:e?.hsGradYear?.value?Number(e?.hsGradYear?.value):void 0,levelOfEducation:e?.levelOfEducation?.value,militaryStatus:rz(e?.militaryStatus?.value),startDate:e?.startDate?.value==="null"?null:(e=>{if("string"==typeof e&&(e=Number(e)),null==e)return e;let t=new Date;return t.setMonth(t.getMonth()+Number(e)),t.toISOString().split("T")[0]})(e?.startDate?.value),gpa:e.gpa?.value?Number(e.gpa?.value):void 0,tcpaText:String(e.tcpaText?.value),transferCredits:e.transferCredits?.value,yearsOfWorkExperience:e.hasWorkExperience?.value===!1?0:e.yearsOfWorkExperience?.value,yearsOfProgramRelatedExperience:e.hasProgramRelatedExperience?.value===!1?0:e.yearsOfProgramRelatedExperience?.value,currentAcademicAward:n,inProgressAcademicAward:i,currentLicense:["NO_LICENSE","IN_PROGRESS",null,void 0].includes(e.currentLicense?.value)?null:e.currentLicense?.value,inProgressLicense:e.inProgressLicense?.value,workExperienceField:e?.workExperienceField?.value,hasGivenTCPAConsent:!0,hasGivenThirdPartySharingConsent:e?.hasGivenThirdPartySharingConsent?.value??!1,hasGivenProspectSharingConsent:e?.hasGivenProspectSharingConsent?.value??!1,undergraduateMajor:e?.undergraduateMajor?.value,inProgressUndergraduateMajor:e?.inProgressUndergraduateMajor?.value,learningPace:e?.learningPace?.value,programTrack:e?.programTrack?.value,currentCitizenship:e?.currentCitizenship?.value??null,currentPermanentResidenceCountry:e?.currentPermanentResidenceCountry?.value,isInARelatedRole:rz(e?.isInARelatedRole?.value),leadSource:r,tcpaEABConsentGiven:!!e?.tcpaEABConsentGiven?.value,tcpaEMCCConsentGiven:!!e?.tcpaEMCCConsentGiven?.value,someCollege:!!e?.someCollege?.value,is18YearsOrOlder:!!e?.is18YearsOrOlder?.value,lastAttendanceYear:e?.enrollmentYear?.value?Number(e?.enrollmentYear?.value):void 0};
1if(o.yearsOfWorkExperience&&(o.yearsOfWorkExperience=Number(o.yearsOfWorkExperience)),o.yearsOfProgramRelatedExperience&&(o.yearsOfProgramRelatedExperience=Number(o.yearsOfProgramRelatedExperience)),o.transferCredits&&(o.transferCredits=Number(o.transferCredits)),t){let e=new(rB())({removeAdditional:!0,allErrors:!0});rD()(e),e.compile(t)(o)}return o};function rH(e,t,r){null!=r&&""!==r&&(e[t]=r)}async function rq(e){let t,r,n,i,o;if(!e.lead.firstName?.trim()||!e.lead.lastName?.trim()||!e.lead.email?.trim()||!e.lead.phoneNumber?.trim()||!e.lead.location?.postalCode?.trim())return{success:!1,error:{code:"VALIDATION_ERROR",error:"Missing required contact information",path:ei}};let a={contact:{firstName:e.lead.firstName?.trim()??"",lastName:e.lead.lastName?.trim()??"",email:e.lead.email?.trim()??"",phoneNumber:e.lead.phoneNumber?.trim()??"",zip:e.lead.location?.postalCode?.trim()??"",details:(t=e.lead,rH(r={category:e.category,degree:e.degree,subject:e.subject},"lastName",t.lastName),rH(r,"email",t.email),rH(r,"phoneNumber",t.phoneNumber),rH(r,"hsGradYear",t.hsGradYear),rH(r,"levelOfEducation",t.levelOfEducation),rH(r,"militaryStatus",t.militaryStatus),rH(r,"startDate",t.startDate??void 0),rH(r,"tcpaText",t.tcpaText),rH(r,"thirdPartyLeadId",t.thirdPartyLeadId),rH(r,"currentLicense",t.currentLicense),rH(r,"hasGivenTCPAConsent",t.hasGivenTCPAConsent),rH(r,"hasGivenThirdPartySharingConsent",t.hasGivenThirdPartySharingConsent),rH(r,"hasGivenProspectSharingConsent",t.hasGivenProspectSharingConsent),rH(r,"currentPermanentResidenceCountry",t.currentPermanentResidenceCountry??void 0),rH(r,"leadSource",t.leadSource??void 0),(n=t.location?.postalCode?.trim())&&(r.location={postalCode:n,country:t.location?.country?.trim()||"US",ipInferredPostalCode:t.location?.ipInferredPostalCode?.trim()||n}),r),trackingContext:(i=window._Cohesion?.webContext,o=e.publisher?.trim()||window.HE?.publisher?.name||window.location?.host||"",{...i??{},sessionId:e.cohesionSessionId,publisher:o})}};try{let e=await ed(a);if(!e.data?.contactId?.length)return{success:!1,error:{code:"INVALID_RESPONSE",error:"Invalid response from contact service",path:ei}};return{success:!0,data:{contactId:e.data.contactId,transactionId:e.data.transactionId,retrievalUrl:e.data.retrievalUrl}}}catch(e){return{success:!1,error:{code:"NETWORK_ERROR",error:e instanceof Error?e.message:"Network error",path:ei}}}}let rG=["firstName","lastName","email","phoneNumber","zip"],rW=async e=>{let{flowState:t,correlationId:r,publisher:n="Unknown"}=e;try{let e=rQ(t,r,n);if(!e)return{success:!1,error:"Missing required contact information"};let i=await rq(e);return i.success?{success:!0,data:i.data}:{success:!1,error:i.error?.error||"Failed to save contact"}}catch(e){return{success:!1,error:e instanceof Error?e.message:"An unexpected error occurred"}}},rQ=(e,t,r)=>{let n=rS(e);if(rG.filter(e=>!n[e]).length>0)return null;let i=rV(n);return{degree:rK("degree",e),subject:rK("subject",e),category:rK("category",e),cohesionSessionId:window?._Cohesion?.sessionId||t,lead:i,publisher:r}},rK=(e,t)=>{let r=Object.values(t).find(t=>t?.leadFieldAssociated===e);if(r?.option){let e=Array.isArray(r.option)?r.option[0]:r.option;return e?.value?.toString()||e?.text?.toString()||"Unknown"}return"Unknown"},rJ="/v1/offerings/search/match",rX="/v1/offerings/search",rZ="dexp-results",r0="dexp-unqualified",r1=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,r2=e=>{let t=e?.tagularApiKey?.trim();return t&&r1.test(t)?t:void 0},r4=(e,t,r,n,i,o,a)=>{let l=e?.offeringId?.trim(),s=t?.tenantId?.trim(),c="string"==typeof n?{flowType:n,formatType:i,formatSubtype:o,location:a}:n??(i||o||a?{formatType:i,formatSubtype:o,location:a}:void 0),d=c?.flowType?.trim(),u=c?.trafficSource?.trim()||rC(window.location.href)||"organic";if(!l)throw Error("CMS v2 offeringId is required to create a conversion");if(!s)throw Error("CMS v2 tenantId is required to create a conversion");let p=r2(t),f=e?.resultsSource===rX?r0:rZ,m=function(e){let t=e?.country?.trim().toUpperCase(),r=e?.state?.trim().toUpperCase();if(t||r)return{...t?{country:t}:{},...r?{state:r}:{}}}(c?.location);return{offeringId:l,tenantId:s,trackingContext:{...p?{tenantId:p}:{},formatType:c?.formatType?.trim()||"dexp-offering",formatSubtype:c?.formatSubtype?.trim()||f,webContext:{anonymousId:window?._Cohesion?.anonymousId||"",fromManual:!1,instanceId:window?._Cohesion?.instanceId||"",page:{referrer:window?._Cohesion?.webContext?.page?.referrer||"",title:document.title||"",url:window.location.href||""},sessionId:window?._Cohesion?.sessionId||"",userAgent:window.navigator.userAgent||""}},correlationId:e?.productClickedCorrelationId||r||"",experience:"voyager",trafficSource:u,monetizationChannel:"voyager",...d?{flowType:d}:{},...m?{location:m}:{},conversionSubmitMode:"standard"}};function r3(e,t){if(null==e||""===e)return e;try{let r=/^https?:\/\//i.test(e)?new URL(e):e.startsWith("//")?new URL(`https:${e}`):new URL(e,"https://telemetry.invalid"),n=new Set((!t?[]:Object.entries(t).filter(([,e])=>(function(e){let[t,...r]=e.trim().split(".");if("lead"!==t||0===r.length)return!1;let n=r.join(".").toLowerCase().replace(/[^a-z0-9]/g,"");return n.includes("firstname")||n.includes("lastname")||n.includes("email")||n.includes("phone")||n.includes("address")})(e)).map(([e])=>e)).map(e=>e.toLowerCase())),i=[];
1if(r.searchParams.forEach((e,t)=>{n.has(t.toLowerCase())&&i.push(t)}),0===i.length)return e;if(i.forEach(e=>{r.searchParams.delete(e)}),/^https?:\/\//i.test(e))return r.toString();if(e.startsWith("//"))return`//${r.host}${r.pathname}${r.search}${r.hash}`;let o=e.replace(/[?#].*$/,"");return`${o}${r.search}${r.hash}`}catch{return}}function r5(e){return"string"!=typeof e?e:r3(e)??void 0}function r6(e,t){if(null!=e&&""!==e)return r3(e,t)??void 0}function r8(e,t){let r;(r=window?.location?.hostname)&&"localhost"!==r&&"127.0.0.1"!==r&&1||(console.groupCollapsed("%cNewRelicEvent:","background: #16a085; color: #fff; padding: 3px; font-weight: 700;",e),console.log("action: ",e),console.log("args: ",t),console.groupEnd());let n=window.newrelic;return n||void console.error(`New Relic Action Error: ${e}`,t)}function r9(e){if(!e)return e;let t={};for(let[r,n]of Object.entries(e)){let e=r5(n);void 0!==e&&(t[r]=e)}return t}function r7(e,t){let r=r8(e,t);r&&r[e](...t)}function ne(e,t){r7("noticeError",[e,{...r9(t),dynamicExperiencesError:"true"}])}function nt(e,t){let r=r5(t);void 0!==r&&r7("setCustomAttribute",[e,r])}var nr=r(53066);let nn="qualifications_not_met";function ni(){return Y().leadApiBaseUrl??""}async function no(e){try{return await e.json()}catch{return null}}let na=async e=>{let t={"Content-Type":"application/json",...tv((0,nr.A)())};try{let r=await fetch(`${ni()}/api/hen/v1/delivery-service/lead/conversion-init/`,{method:"POST",headers:t,body:JSON.stringify(e)});if(!r.ok){let e=await no(r);throw Error(`Failed to initialize conversion (status ${r.status}): ${JSON.stringify(e)}`)}return await r.json()}catch(e){throw console.error("Could not initialize conversion",e),e}},nl=async({needsActiveProspectToken:e,activeProspectToken:t,record:r,result:n,conversionId:i,inputs:o,productCorrelationId:a,jornayaToken:l,identityToken:s,programFinderContext:c})=>{let d;if(!o)throw Error("Invalid body");let u=n.organizationId?.trim();if(!u)throw Error("LDS v4 organizationId is required to submit a lead");let p=n.offeringUuid?.trim(),f=window?._Cohesion?.anonymousId;f||ne(Error("submitLead: missing Cohesion anonymousId; submitting lead without it"),{source:"submitLead",reason:"missing-anonymous-id"});let m={organizationId:u,...p?{offeringUuid:p}:{},slug:n.schoolSlug,conversionId:i,inputs:o,leadSource:r.program.leadSource,needsActiveProspectToken:e,activeProspectToken:t,jornayaToken:l,trackingContext:{correlationId:a,publisher:new URLSearchParams(window.location.search).get("publisher")||window.location.host,anonymousId:f,url:o?.sourceUrl?.value||window.location.href,experience:c?"ProgramFinder":"Voyager"},...!0===n.synchronousLeadDelivery&&{messageContext:{isSync:!0}},...s?{identityToken:s}:{},...c?{programFinderContext:c}:{}},h={"Content-Type":"application/json",...tv((0,nr.A)())};try{d=await fetch(`${ni()}/api/hen/v1/delivery-service/lead/submit/`,{method:"POST",headers:h,body:JSON.stringify(m)})}catch(e){throw console.error("Could not submit lead",e),e}if(!d.ok){let e=await no(d);if(function(e){if(!e||"object"!=typeof e)return!1;let t="string"==typeof e.error?e.error:"",r="string"==typeof e.message?e.message:"";return t.includes(nn)||r.includes(nn)}(e))throw Error(nn);throw console.error("Could not submit lead",e),Error(`Failed to submit lead (status ${d.status}): ${JSON.stringify(e)}`)}let g=await d.json();if(!0!==g.leadSubmitted)throw Error("LDS did not accept the lead");return g};function ns(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function nc(e){return"object"==typeof e&&null!==e&&"number"==typeof e.programId}function nd(e){return"string"==typeof e&&e.trim().length>0}function nu(e){if("object"!=typeof e||null===e||"number"!=typeof e.programId||!Number.isFinite(e.programId)||e.programId<=0)return!1;let t=nd(e.offeringUuid)&&nd(e.organizationId),r=nd(e.schoolId)&&nd(e.schoolSlug)&&nd(e.schoolName)&&nd(e.programName);return t||r}let np="We're preparing your matches!",nf="Preparing your matches",nm=[{label:"Compare schools",icon:"compare"},{label:"Pick your favorite",icon:"checklist"},{label:"Apply today",icon:"apply"}
1],nh="resultsPage",ng=new Set(["enabled","title","subtitle","disclosureTitle","disclosureContent"]),ny=new Set(["enabled","title","statusLabel","steps"]),nb=new Set(["label","icon"]),nv=new Set(["compare","checklist","apply"]),nx=new Set(["enabled","enableCompare","minSelection","maxSelection","variant","bannerText","ctaText","heading","logo","title","subtitle","buttonText","placeholderText","compareAttributes"]),nw=new Set(["bannerText","ctaText","heading","logo","title","subtitle","buttonText","placeholderText"]),nS=new Set(["enabled","title","subtitle"]),nI=new Set(["studentLoansInline","extraCta"]),nC=new Set(["enabled","label","eventName"]),nj=new Set(["enabled","title","subtitle","disclosure","partner","cta"]);function nk(e){let t=function(e){if(!nN(e))return;let t=e.root;if(!nN(t))return;let r=t.props;if(nN(r))return r}(e);if(!t||!("resultsPage"in t))return;let r=t.resultsPage;return nN(r)?function(e,t){let r={};for(let r of Object.keys(e))"flowType"!==r&&"recommender"!==r&&"spotlight"!==r&&"comparison"!==r&&"submissions"!==r&&"exitStrategy"!==r&&"loading"!==r&&t(`${nh}.${r} is not supported; skipping.`);void 0!==e.flowType&&("string"==typeof e.flowType&&e.flowType.trim()?r.flowType=e.flowType:t(`${nh}.flowType is not a non-empty string; skipping.`));let n=nE(e.recommender,`${nh}.recommender`,t);n&&(r.recommender=n);let i=nE(e.spotlight,`${nh}.spotlight`,t);i&&(r.spotlight=i);let o=function(e,t,r){if(void 0===e)return;if(!nN(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of(function(e,t,r,n){let i=Object.prototype.hasOwnProperty.call(e,"enabled"),o=Object.prototype.hasOwnProperty.call(e,"enableCompare"),a=e.enabled,l=e.enableCompare;if(i&&"boolean"!=typeof a&&n(`${r}.enabled is not a boolean; skipping.`),o&&"boolean"!=typeof l&&n(`${r}.enableCompare is not a boolean; skipping.`),"boolean"==typeof a&&"boolean"==typeof l&&a!==l&&n(`${r}.enableCompare conflicts with ${r}.enabled; using ${r}.enabled.`),"boolean"==typeof a){t.enabled=a;return}"boolean"==typeof l&&(t.enabled=l)}(e,n,t,r),Object.entries(e))){if(!nx.has(i)){r(`${t}.${i} is not supported; skipping.`);continue}if("enabled"!==i&&"enableCompare"!==i){if("variant"===i){"POPUP"===o?n.variant=o:r(`${t}.variant must be "POPUP"; skipping.`);continue}if("minSelection"===i){nA(o)?n.minSelection=o:r(`${t}.${i} is not a positive integer; skipping.`);continue}if("maxSelection"===i){nA(o)?n.maxSelection=o:r(`${t}.${i} is not a positive integer; skipping.`);continue}if(nw.has(i)){"string"==typeof o?n[i]=o:r(`${t}.${i} is not a string; skipping.`);continue}if("compareAttributes"===i){let e=function(e,t,r){return void 0===e?[]:Array.isArray(e)?(e.length>10&&r(`${t} exceeds 10 rows; using the first 10.`),e.slice(0,10).reduce((e,n,i)=>{if(!nN(n))return r(`${t}[${i}] is not an object; skipping.`),e;let{label:o,key:a}=n;return"string"!=typeof o||""===o.trim()?r(`${t}[${i}].label is not a non-empty string; skipping.`):"string"!=typeof a||""===a.trim()?r(`${t}[${i}].key is not a non-empty string; skipping.`):e.push({label:o,key:a}),e},[])):(r(`${t} is not an array; skipping.`),[])}(o,`${t}.compareAttributes`,r);e.length>0&&(n.compareAttributes=e);continue}}}return void 0!==n.minSelection&&void 0!==n.maxSelection&&n.minSelection>n.maxSelection&&(r(`${t}.minSelection is greater than maxSelection; skipping minSelection.`),delete n.minSelection),n}(e.comparison,`${nh}.comparison`,t);o&&(r.comparison=o);let a=function(e,t,r){if(void 0===e)return;if(!nN(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of Object.entries(e)){if(!nS.has(i)){r(`${t}.${i} is not supported; skipping.`);continue}if("enabled"===i){"boolean"==typeof o?n.enabled=o:r(`${t}.enabled is not a boolean; skipping.`);continue}("title"===i||"subtitle"===i)&&"string"==typeof o?n[i]=o:r(`${t}.${i} is not a string; skipping.`)}return n}(e.submissions,`${nh}.submissions`,t);a&&(r.submissions=a);let l=function(e,t,r){if(void 0===e)return;if(!nN(e))return void r(`${t} is not an object; skipping.`);for(let n of Object.keys(e))nI.has(n)||r(`${t}.${n} is not supported; skipping.`);let n=function(e,t,r){if(void 0===e)return;if(!nN(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of Object.entries(e)){if(!nj.has(i)){r(`${t}.${i} is not supported; skipping.`);continue}if("enabled"===i){"boolean"==typeof o?n.enabled=o:r(`${t}.enabled is not a boolean; skipping.`);continue}n[i]=o}return n}(e.studentLoansInline,`${t}.studentLoansInline`,r),i=function(e,t,r){if(void 0===e)return;if(!nN(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of Object.entries(e)){if(!nC.has(i)){r(`${t}.${i} is not supported; skipping.`);continue}if("enabled"===i){"boolean"==typeof o?n.enabled=o:r(`${t}.enabled is not a boolean; skipping.`);continue}"string"==typeof o?n[i]=o:r(`${t}.${i} is not a string; skipping.`)}return n}(e.extraCta,`${t}.extraCta`,r);return{...n?{studentLoansInline:n}:{},...i?{extraCta:i}:{}}}(e.exitStrategy,`${nh}.exitStrategy`,t);l&&(r.exitStrategy=l);let s=function(e,t,r){if(void 0===e)return;if(!nN(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of Object.entries(e)){if(!ny.has(i)){r(`${t}.${i} is not supported; skipping.`);continue}if("enabled"===i){"boolean"==typeof o?n.enabled=o:r(`${t}.enabled is not a boolean; skipping.`);continue}if("title"===i||"statusLabel"===i){"string"==typeof o?n[i]=o:r(`${t}.${i} is not a string; skipping.`);continue}if("steps"===i){let e=function(e,t,r){return void 0===e?[]:Array.isArray(e)?(e.length>3&&r(`${t} exceeds 3 steps; using the first 3.`),e.slice(0,3).reduce((e,n,i)=>{if(!nN(n))return r(`${t}[${i}] is not an object; skipping.`),e;for(let e of Object.keys(n))nb.has(e)||r(`${t}[${i}].${e} is not supported; skipping.`);let{label:o}=n;
1if("string"!=typeof o||""===o.trim())return r(`${t}[${i}].label is not a non-empty string; skipping.`),e;let a={label:o};return void 0!==n.icon&&("string"==typeof n.icon&&nv.has(n.icon)?a.icon=n.icon:r(`${t}[${i}].icon is not a supported loading icon; skipping.`)),e.push(a),e},[])):(r(`${t} is not an array; skipping.`),[])}(o,`${t}.steps`,r);e.length>0&&(n.steps=e)}}return Object.keys(n).length>0?n:void 0}(e.loading,`${nh}.loading`,t);return s&&(r.loading=s),r}(r,nT):void nT(`${nh} is not an object; skipping.`)}function nE(e,t,r){if(void 0===e)return;if(!nN(e))return void r(`${t} is not an object; skipping.`);for(let n of Object.keys(e))"modal"!==n&&r(`${t}.${n} is not supported; skipping.`);let n=function(e,t,r){if(void 0===e)return;if(!nN(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of Object.entries(e)){if(!ng.has(i)){r(`${t}.${i} is not supported; skipping.`);continue}if("enabled"===i){"boolean"==typeof o?n.enabled=o:r(`${t}.enabled is not a boolean; skipping.`);continue}("title"===i||"subtitle"===i||"disclosureTitle"===i||"disclosureContent"===i)&&"string"==typeof o?n[i]=o:r(`${t}.${i} is not a string; skipping.`)}return n}(e.modal,`${t}.modal`,r);return n?{modal:n}:{}}function nA(e){return"number"==typeof e&&Number.isInteger(e)&&e>0}function nN(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function nT(e){console.warn(`[ConfigurableStep] ${e}`)}let nO="entryPoint",nP=["degree","category","subject"];function nM(e){let t=e.find(e=>!0===e.isEntry)??e[0],r=t?.dslConfig;return r?.type==="entry"?function(e){let t=function(e){if(!nL(e))return;let t=e.root;if(!nL(t))return;let r=t.props;if(nL(r))return r}(e);if(!t||!("entryPoint"in t))return;let r=t.entryPoint;return nL(r)?function(e,t){let r={};for(let r of Object.keys(e))"enabled"!==r&&"defaults"!==r&&"forwardFields"!==r&&"subjectLabelFallback"!==r&&t(`${nO}.${r} is not supported; skipping.`);void 0!==e.enabled&&("boolean"==typeof e.enabled?r.enabled=e.enabled:t(`${nO}.enabled is not a boolean; skipping.`));let n=function(e,t,r){if(void 0===e)return;if(!nL(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of Object.entries(e)){if(!nP.includes(i)){r(`${t}.${i} is not supported; skipping.`);continue}"string"==typeof o&&o.length>0?n[i]=o:r(`${t}.${i} is not a non-empty string; skipping.`)}return n}(e.defaults,`${nO}.defaults`,t);n&&(r.defaults=n);let i=function(e,t,r){if(void 0===e)return;if(!Array.isArray(e))return void r(`${t} is not an array; skipping.`);let n=[];for(let i=0;i<e.length;i++){let o=e[i];if("string"==typeof o){let e=o.trim();if(e.length>0){n.push(e);continue}}r(`${t}[${i}] is not a non-empty string; skipping.`)}return n}(e.forwardFields,`${nO}.forwardFields`,t);void 0!==i&&(r.forwardFields=i);let o=function(e,t,r){if(void 0===e)return;if("string"!=typeof e)return void r(`${t} is not a string; skipping.`);let n=e.trim();return 0===n.length?void r(`${t} is empty; skipping.`):n}(e.subjectLabelFallback,`${nO}.subjectLabelFallback`,t);return void 0!==o&&(r.subjectLabelFallback=o),r}(r,nF):void nF(`${nO} is not an object; skipping.`)}(r.data):void 0}function nR(e,t){if(!t?.enabled||!t.defaults)return e;let r={...e??{}};for(let e of nP)!r[e]&&t.defaults[e]&&(r[e]=t.defaults[e]);return r}function nL(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function nF(e){console.warn(`[ConfigurableStep] ${e}`)}function nU(e){if(null==e)return{kind:"empty"};if("string"==typeof e)return 0===e.length?{kind:"empty"}:{kind:"dataPath",dataPath:e};if(!n_(e))return{kind:"invalid",reason:"malformed"};let t=Object.prototype.hasOwnProperty.call(e,"dataPath"),r=Object.prototype.hasOwnProperty.call(e,"literal");return t&&r?{kind:"invalid",reason:"both-dataPath-and-literal"}:t?"string"!=typeof e.dataPath?{kind:"invalid",reason:"malformed"}:0===e.dataPath.length?{kind:"empty"}:{kind:"dataPath",dataPath:e.dataPath}:r?"string"!=typeof e.literal?{kind:"invalid",reason:"malformed"}:0===e.literal.length?{kind:"empty"}:{kind:"literal",literal:e.literal}:{kind:"invalid",reason:"malformed"}}function n$(e){var t;if(null==e)return{kind:"empty"};if(!n_(e))return{kind:"invalid",reason:"malformed"};let r="string"==typeof(t=e.key)&&t.length>0?t:void 0;if(void 0===r)return{kind:"invalid",reason:"missing-key"};let n=nU(e);
1return"dataPath"===n.kind||"literal"===n.kind?{...n,key:r}:n}function n_(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let nD=new Set(["variant","category","name","formatType","formatSubtype","brand","productId","sku"]),nY=new Set(["formatType","formatSubtype"]),nB=new Set(["variant","category","name","formatType","formatSubtype"]);function nz(e,t){let r=nU(t);return"empty"===r.kind||"invalid"===r.kind||"string"==typeof t?r:nD.has(e)?"literal"!==r.kind||nY.has(e)?r:{kind:"invalid",reason:"literal-not-allowed"}:{kind:"invalid",reason:"unknown-key"}}function nV(e){let t=function(e){if(!nH(e))return;let t=e.root;if(!nH(t))return;let r=t.props;if(nH(r))return r}(e);if(!t||!("tracking"in t))return null;let r=t.tracking;if(!nH(r))return console.warn("[ConfigurableStep] tracking is not an object; skipping."),null;let n=function(e){if(void 0===e)return;if(!nH(e))return void console.warn("[ConfigurableStep] tracking.productFields is not an object; skipping.");let t={};for(let[r,n]of Object.entries(e)){let e=nz(r,n);if("dataPath"===e.kind){t[r]="string"==typeof n?n:{dataPath:e.dataPath};continue}if("literal"===e.kind){t[r]={literal:e.literal};continue}let i="invalid"===e.kind?e.reason:e.kind;console.warn(`[ConfigurableStep] tracking.productFields["${r}"] is invalid (${i}); skipping.`)}return Object.keys(t).length>0?t:void 0}(r.productFields),i=function(e){if(void 0===e)return;if(!Array.isArray(e))return void console.warn("[ConfigurableStep] tracking.customDimensions is not an array; skipping.");let t=[];for(let r of e){let e=n$(r);if("dataPath"===e.kind){t.push({key:e.key,dataPath:e.dataPath});continue}if("literal"===e.kind){t.push({key:e.key,literal:e.literal});continue}let n="invalid"===e.kind?e.reason:e.kind;console.warn(`[ConfigurableStep] tracking.customDimensions entry is invalid (${n}); skipping.`)}return t.length>0?t:void 0}(r.customDimensions);return n||i?{...n?{productFields:n}:{},...i?{customDimensions:i}:{}}:null}function nH(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let nq={DegreeCardDetailed:{kind:"product",location:"dexp-results-page"},EditorialListing:{kind:"product",formatType:"dexp-ad",formatSubtype:"dexp-editorial-listings"},StudentLoansBanner:{kind:"product",location:"student-loans-on-page",formatType:"affiliate",formatSubtype:"credible-student-loans",productName:"credible-student-loans-banner",productVariant:"banner"},StudentLoansInline:{kind:"product",formatType:"affiliate",formatSubtype:"credible-student-loans",productName:"credible-student-loans-inline",productVariant:"inline"},Select:{kind:"field",fieldType:"select"},Input:{kind:"field",fieldType:"input"},Checkbox:{kind:"field",fieldType:"checkbox"},Switch:{kind:"field",fieldType:"switch"},Radio:{kind:"field",fieldType:"radio"},CheckboxButton:{kind:"field",fieldType:"checkbox"},SelectionTile:{kind:"field",fieldType:"tile"}},nG=`${em}tracking`,nW=`${nG}.kind`,nQ=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&"string"==typeof e.type,nK=`${em}tracking`,nJ=`${nK}.kind`,nX=`${nK}.fieldName`,nZ=`${nK}.leadFieldAssociated`,n0=`${nK}.fieldType`,n1=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&"string"==typeof e.type,n2=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),n4=(...e)=>{for(let t of e)if("string"==typeof t&&""!==t.trim())return t.trim()};class n3 extends Error{constructor(e,t,r){super(void 0!==r?`${e} (at position ${r} in ${JSON.stringify(t)})`:`${e} (in ${JSON.stringify(t)})`),this.name="InterpolationError",this.template=t,this.position=r,Object.setPrototypeOf(this,n3.prototype)}}function n5(e){let t=[],r=e.length,n=0,i=0;for(;n<r;){if(!(123===e.charCodeAt(n)&&n+1<r&&123===e.charCodeAt(n+1))){n++;continue}n>i&&t.push({type:"literal",value:e.slice(i,n)});let o=n+2,a=o,l=!1;for(;a<r;){if(a+1<r&&123===e.charCodeAt(a)&&123===e.charCodeAt(a+1))throw new n3('Nested "{{" inside expression',e,a);if(a+1<r&&125===e.charCodeAt(a)&&125===e.charCodeAt(a+1)){l=!0;break}a++}if(!l)throw new n3('Unclosed "{{"',e,n);let s=e.slice(o,a);t.push(function e(t,r,n){let i=t.trim(),o=0===i.length?n:n+t.indexOf(i);if(0===i.length)throw new n3('Empty expression "{{}}"',r,n);let a=i.indexOf("(");if(-1!==a)return function(t,r,n,i){if(41!==t.charCodeAt(t.length-1))throw new n3('Unterminated function call â expected ")"',r,n+t.length);let o=t.slice(0,i),a=o.length-o.trimStart().length,l=o.trim(),s=t.slice(i+1,t.length-1),c=s.length-s.trimStart().length,d=s.trim();if(0===l.length)throw new n3("Function call has no callee",r,n);let{path:u}=n6(l,r,n+a);return{type:"expression",raw:t,path:u,kind:"functionCall",segments:[],fn:u,arg:0===d.length?void 0:e(d,r,n+i+1+c)}}(i,r,o,a);let{path:l,segments:s}=n6(i,r,o);return{type:"expression",raw:i,path:l,kind:"path",segments:s}}(s,e,o)),i=n=a+2}return i<r&&t.push({type:"literal",value:e.slice(i)}),{segments:t}}function n6(e,t,r){let n=[],i=!1,o=0;for(;o<e.length;){let l=e[o];if("."===l){if(!i)throw new n3('Unexpected "." in path',t,r+o);i=!1,o++;continue}if("["===l){if(!i)throw new n3('Unexpected "[" â array selector must follow an identifier',t,r+o);if("*"!==e[o+1]||"]"!==e[o+2])throw new n3('Only the "[*]" wildcard array selector is supported',t,r+o);n.push({type:"wildcard"}),o+=3,i=!0;continue}if(n8(l)){var a;
1let t=o+1;for(;t<e.length&&(n8(a=e[t])||a>="0"&&a<="9");)t++;let r=e.slice(o,t);n.push({type:"key",name:r}),o=t,i=!0;continue}throw new n3(`Invalid character "${l}" in path`,t,r+o)}if(!i)throw new n3("Path ends with a trailing separator",t,r+e.length);return{path:function(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];"wildcard"===n.type?t+="[*]":t+=0===r?n.name:`.${n.name}`}return t}(n),segments:n}}function n8(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e}let n9=new Set(["__proto__","constructor","prototype"]);function n7(e,t){return function e(t,r,n){if(n>=r.length)return t;let i=r[n];if("wildcard"===i.type){if(!Array.isArray(t))return;let i=[];for(let o=0;o<t.length;o++)i.push(e(t[o],r,n+1));return i}if(!(null==t||"object"!=typeof t||n9.has(i.name))&&Object.prototype.hasOwnProperty.call(t,i.name))return e(t[i.name],r,n+1)}(e,t,0)}function ie(e,t,r){let{segments:n}=n5(e),i=r?.encodeSubstitutions===!0,o=r?.onMissing==="literal";if(0===n.length)return"";if(1===n.length){let e=n[0];if("expression"===e.type){let r=it(e,t);return void 0===r&&o&&"path"===e.kind?ir(e):r}return e.value}let a="";for(let e=0;e<n.length;e++){let r=n[e];if("literal"===r.type){a+=r.value;continue}let l=it(r,t);void 0===l&&o&&"path"===r.kind?a+=ir(r):a+=function e(t,r=!1){if(null==t)return"";if(Array.isArray(t))return t.map(t=>e(t,r)).join(",");if("object"==typeof t)try{let e=JSON.stringify(t)??"";return r?encodeURIComponent(e):e}catch{return""}let n=String(t);return r?encodeURIComponent(n):n}(l,i)}return a}function it(e,t){if("functionCall"!==e.kind)return n7(t,e.segments)}function ir(e){return`{{${e.raw}}}`}function ii(e){if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function io(e){return"string"==typeof e&&-1!==e.indexOf("{{")}function ia(e){return function e(t,r){if(io(t))return!0;if(null===t||"object"!=typeof t||!ii(t)||r.has(t))return!1;r.add(t);try{if(Array.isArray(t)){for(let n=0;n<t.length;n++)if(e(t[n],r))return!0;return!1}let n=Object.keys(t);for(let i=0;i<n.length;i++)if(e(t[n[i]],r))return!0;return!1}finally{r.delete(t)}}(e,new WeakSet)}function il(e,t,r){return function e(t,r,n,i){if("string"==typeof t)return io(t)?ie(t,r,i):t;if(null===t||"object"!=typeof t||!ii(t)||n.has(t))return t;n.add(t);try{if(Array.isArray(t)){var o=t,a=r,l=n,s=i;let c=null;for(let t=0;t<o.length;t++){let r=o[t],n=e(r,a,l,s);n!==r&&null===c&&(c=o.slice(0,t)),null!==c&&c.push(n)}return c??o}return function(t,r,n,i){let o=null,a=Object.keys(t);for(let l=0;l<a.length;l++){let s=a[l],c=t[s],d=e(c,r,n,i);if(d!==c&&null===o){o={};for(let e=0;e<l;e++)o[a[e]]=t[a[e]]}null!==o&&(o[s]=d)}return o??t}(t,r,n,i)}finally{n.delete(t)}}(e,t,new WeakSet,r)}function is(e){let t=new Set,r=[],{segments:n}=n5(e);for(let e=0;e<n.length;e++){let i=n[e];"expression"===i.type&&"path"===i.kind&&(t.has(i.path)||(t.add(i.path),r.push(i.path)))}return r}function ic(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function id(e,t){var r;if("literal"===e.kind)return e.literal.length>0?e.literal:void 0;if(!t)return;let n=ie(`{{${e.dataPath}}}`,t);if(null==n)return;let i="string"==typeof(r=n)?r:"number"==typeof r||"boolean"==typeof r?String(r):Array.isArray(r)?r.map(e=>null==e||"object"==typeof e?"":String(e)).filter(Boolean).join(","):"";return i.length>0?i:void 0}function iu({map:e,root:t,baseProduct:r}){if(!(null!=e&&Object.keys(e).length>0))return r;let n=function(e,t){if(!e)return{};let r={};for(let[n,i]of Object.entries(e)){let e,o=nz(n,i);if("empty"===o.kind)continue;if("invalid"===o.kind){console.warn(`[ConfigurableStep] tracking.productFields["${n}"] is invalid (${o.reason}); skipping.`);continue}try{e=id(o,t)}catch(e){console.warn(`[ConfigurableStep] tracking.productFields["${n}"]: failed to resolve path "${"dataPath"===o.kind?o.dataPath:""}" â ${e instanceof n3?e.message:String(e)}`);continue}if(void 0===e)continue;let a=nB.has(n)?ic(e):e;0!==a.length&&(r[n]=a)}return r}(e,t);return r?0===Object.keys(n).length?r:{...r,...n}:Object.keys(n).length>0?n:void 0}function ip(e,t){if(!e||0===e.length)return[];let r=[];for(let n of e){let e,i=n$(n);if("empty"===i.kind)continue;if("invalid"===i.kind){console.warn(`[ConfigurableStep] tracking.customDimensions entry is invali
1d (${i.reason}); skipping.`);continue}try{e=id(i,t)}catch(e){console.warn(`[ConfigurableStep] tracking.customDimensions["${i.key}"]: failed to resolve path "${"dataPath"===i.kind?i.dataPath:""}" â ${e instanceof n3?e.message:String(e)}`);continue}if(void 0===e)continue;let o=ic(e);0!==o.length&&r.push({key:i.key,value:o})}return r}function im(e){let t=e?.flowType;return"string"==typeof t&&t.trim()?t:void 0}function ih(e){let t=e?.trafficSource;return"string"==typeof t&&t.trim()?t.trim():void 0}let ig="subject_label_with_fallback";function iy(e){if(n9.has(e))return!1;if(e.endsWith("_label")){let t=e.slice(0,-6);if(n9.has(t))return!1}return!0}function ib(e,t,r){iy(t)&&(e[t]=r)}function iv(e,t){return!!iy(t)&&Object.prototype.hasOwnProperty.call(e,t)}function ix(e,t,r,n){let i=Object.create(null);if(!e||!t)return i;for(let r of t){var o;let t=r?.id;if(t){let n=e[t];n&&iS(i,t,r.leadFieldAssociated,r.customField,n)}for(let t of(o=r).type!==O.MULTI_QUESTION&&o.type!==O.DCS?[]:o.stepQuestions??[]){let r=t.id;if(!r)continue;let n=e[r];n&&iS(i,r,t.leadFieldAssociated,t.customField,n)}}let a=im(r);a&&ib(i,"flowType",a);let l=ih(r);return l&&ib(i,"trafficSource",l),function(e,t){let r=e.subject;if("string"==typeof r&&r.length>0&&"general"!==r){let t=e.subject_label;"string"==typeof t&&t.length>0&&ib(e,ig,t);return}let n="string"==typeof t?t.trim():"";n.length>0&&ib(e,ig,n)}(i,n?.subjectLabelFallback),i}function iw(e){return String(e??"").split(",").map(e=>e.trim()).filter(Boolean)}function iS(e,t,r,n,i){let o=i.option;if(!o)return;let a=function(e){if(Array.isArray(e)){let t=[];for(let r of e)!0===r.isArray?t.push(...iw(r.value)):t.push(r.value);return t}return!0===e.isArray?iw(e.value):e.value}(o),l=Array.isArray(o)?o.map(e=>e.value):o.value,s=Array.isArray(o)?o.map(e=>e.text).join(", "):o.text;ib(e,t,a),ib(e,`${t}_label`,s);let c=i.leadFieldAssociated??r;for(let t of(c&&(ib(e,c,l),ib(e,`${c}_label`,s)),n&&n!==c&&(ib(e,n,a),ib(e,`${n}_label`,s)),Array.isArray(o)?o:[o])){let r=t.leadFieldAssociated;r&&!iv(e,r)&&(ib(e,r,t.value),ib(e,`${r}_label`,t.text));let n=t.customField;n&&!iv(e,n)&&(ib(e,n,!0===t.isArray?iw(t.value):t.value),ib(e,`${n}_label`,t.text))}}function iI(e){let t=e?.location,r=t?.countryCode;return"string"==typeof r&&r.length>0?r:void 0}let iC=/^[A-Za-z0-9]+$/;function ij(e){if("string"!=typeof e)return;let t=e.trim().toUpperCase();return iC.test(t)?t:void 0}function ik(e){let t=e?.location,r=ij(t?.state),n=ij(t?.countryCode);return n&&r?`${n}-${r}`:n||(r?`US-${r}`:void 0)}let iE=new Set(["degree","category","subject"]);function iA(e,t){return iE.has(e)&&"general"===t}let iN={};function iT(e){let t=[],r=e=>{if(Array.isArray(e)){for(let t=0;t<e.length;t++)r(e[t]);return}t.push(e)};return r(e),t}function iO(e){iN[e]||(iN[e]=!0,console.warn(`[ConfigurableStep] Display label fell back to the raw value (reason: ${e}). Check that the bound source has resolved and that \`_bind.optionLabelField\` / \`_bind.optionValueField\` are configured.`))}function iP(e){let t=[],r=e=>{if(Array.isArray(e)){for(let t=0;t<e.length;t++)r(e[t]);return}t.push(e)};return r(e),t}var iM=r(90075);function iR(e){return iM.Ay.filter(t=>t.serviceId===e).flatMap(e=>[e.runtimePath,...e.runtimeAliases??[]].map(t=>({pattern:t,methods:[e.method],description:e.description})))}let iL={offerings:iR("offerings"),offeringsService:iR("offeringsService"),organizations:iR("organizations"),deliverySystem:iR("deliverySystem"),campaignManagement:iR("campaignManagement"),mobius:iR("mobius"),reporting:iR("reporting"),sameOrigin:iR("sameOrigin"),productApi:iR("productApi")},iF={offerings:"offeringsSearchApiUrl",offeringsService:"offeringsServiceBaseUrl",organizations:"organizationApiUrl",deliverySystem:"deliverySystemApiUrl",campaignManagement:"campaignManagementApiUrl",mobius:"mobiusApiUrl",reporting:"reportingApiUrl",sameOrigin:"dynamicFlowUrl",productApi:"productApiBffOrigin"},iU={offerings:"offeringsServiceBaseUrl",organizations:"organizationServiceBaseUrl",deliverySystem:"deliverySystemBaseUrl"},i$=iM.Ay.flatMap(e=>{let t=e.serviceId;return Object.prototype.hasOwnProperty.call(iL,t)?[e.runtimePath,...e.runtimeAliases??[]].map(r=>({pattern:r,methods:[e.method],description:e.description,service:t,tenantScope:e.tenantScope})):[]});
1class i_ extends Error{constructor(e){super(e),this.name="DataSourceConfigurationError",Object.setPrototypeOf(this,i_.prototype)}}for(let e of i$){if(!e.pattern.startsWith("/"))throw new i_(`Allowlist pattern must start with '/': ${e.pattern}`);if(e.pattern.includes("*")&&!e.pattern.endsWith("/*"))throw new i_(`Allowlist wildcard only permitted as trailing '/*': ${e.pattern}`);if(0===e.methods.length)throw new i_(`Allowlist entry has no methods: ${e.pattern}`)}class iD extends Error{constructor(e,t,r,n){super(n),this.service=e,this.path=t,this.method=r,this.name="DataSourceNotAllowedError",Object.setPrototypeOf(this,iD.prototype)}}function iY(e,t,r){var n,i;let o,a=(n=e,i=t,(o=iq(n))?iH(o,i):null);return!!(a&&(0,iM.pp)(a.tenantScope,r))}let iB=iM.R4;function iz(e,t){let r;if(!e)return!1;if(e.startsWith("/"))return!0;try{r=new URL(e)}catch{return!1}if("http:"!==r.protocol&&"https:"!==r.protocol||!t||0===t.length)return!1;let n=r.origin.toLowerCase();return t.some(e=>(function(e){try{return new URL(e).origin.toLowerCase()}catch{return e.toLowerCase().replace(/\/+$/,"")}})(e)===n)}function iV(e,t,r,n,i){let o=iq(t),a=o?iH(o,r):null;if(!a||a.service!==e)throw new iD(e,t,r,`Endpoint ${r} ${t} is not in the data-source allowlist for service '${e}'`);if(!(0,iM.pp)(a.tenantScope,i))throw new iD(e,t,r,`Endpoint ${r} ${t} is not allowed for tenant '${i??""}'`);let l=iF[e],s=iU[e],c=n[l],d=s?n[s]:void 0,u="offerings"===e?c??d:d??c;if(!u)throw new iD(e,t,r,`No baseUrl configured for service '${e}' (ApiConfig.${l} is missing)`);return`${u.replace(/\/$/,"")}${o}`}function iH(e,t){let r=t.toUpperCase();return i$.find(t=>t.methods.includes(r)&&(0,iM.R4)(e,t.pattern))??null}function iq(e){var t;if(!e||"string"!=typeof e||(t=function(e){if(e.startsWith("/"))return e.split(/[?#]/)[0]??"";let t=/^[a-zA-Z][a-zA-Z0-9+\-.]*:\/\//.exec(e);if(!t)return e;let r=e.slice(t[0].length),n=r.indexOf("/");return -1===n?"":r.slice(n).split(/[?#]/)[0]??""}(e),/(?:^|\/)(?:\.|%2e){1,2}(?:\/|$)/i.test(t)))return"";if(e.startsWith("/"))return e.split(/[?#]/)[0]??"";try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return"";return t.pathname}catch{return""}}function iG(e,t){window.open(e,t??"_blank","noopener,noreferrer")}function iW(e){window.open(e,"_blank","noopener,noreferrer")}function iQ(e){return"string"==typeof e&&e.length>0?e:void 0}let iK="modal.open";function iJ(e,t,r,n="Modal"){if(t!==iK&&"modal.close"!==t)return;let i=r?.name;if("string"!=typeof i||0===i.trim().length)return void console.warn(`[${n}] ${t} ignored â params.name must be a non-empty string.`);let o=i.trim();(t===iK?e.open(o):e.close(o))||console.warn(`[${n}] ${t} ignored â no Modal registered as "${o}".`)}function iX(e){return void 0===e.kind||"http"===e.kind?"http":e.kind}function iZ(e){return void 0===e.kind||"http"===e.kind}function i0(e){return"reportingModel"===e.kind}function i1(e){return"inference"===e.kind}function i2(e){let t=iX(e);return"http"===t||"reportingModel"===t||"inference"===t}function i4(e){return i0(e)?[e.modelId,e.metrics,e.dimensions,e.segments,e.filters,e.having,e.order,e.limit,e.context]:i1(e)?[e.body,e.headers]:[e.endpoint,e.headers,e.query,e.body]}let i3=["offeringsServiceBaseUrl","offeringsSearchApiUrl","organizationServiceBaseUrl","organizationApiUrl","deliverySystemBaseUrl","deliverySystemApiUrl","campaignManagementApiUrl","mobiusApiUrl","reportingApiUrl","productApiBffOrigin"],i5=new Set(["degree_level","academic_subject_category","academic_subject"]),i6=["degreeId","categoryId","subjectId"],i8=["schoolId"];function i9(e){if("string"!=typeof e||!/^-?\d+$/.test(e))return e;let t=Number(e);return Number.isSafeInteger(t)?t:e}function i7(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function oe(e){if(!e)return null;try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return null;return t.origin.toLowerCase()}catch{return null}}function ot(e,t,r){var n,i;let o,a,l,s="object"==typeof e&&null!==e?e:{},c=s.organizations?.[0],d={schoolName:c?.name??"",schoolId:c?.externalIds?.edudirectId??"",schoolSlug:c?.slug??"",city:c?.location?.city??"",state:"string"==typeof(n=c?.location?.state)?n:n&&"object"==typeof n?n.abbreviation??n.name??"":"",programId:oo(s.externalId)??0,programName:s.name??"",snippet:s.shortDescription??"",levelOfInstitution:c?.levelOfInstitution??"",accreditator:c?.accreditator??"",percentOnlineEnrollment:void 0===(o=oo(c?.percentOnlineEnrollment))?null:o,isOnline:c?.tags?.isOnline??!1,notForProfit:c?.tags?.isNotForProfit??!1,applicationCtaURL:s.applicationCta?.url??"",applicationCtaLabel:s.applicationCta?.label??"",programFlow:[],tcpa:""};if(ol(s.applicationCta?.fieldMap)&&(d.applicationCtaFieldMap=s.applicationCta?.fieldMap),ol(s.applicationCta?.staticParams)&&
1(d.applicationCtaStaticParams=s.applicationCta?.staticParams),s.applicationCta?.missingValue&&(d.applicationCtaMissingValue=s.applicationCta.missingValue),function(e){if(!oa(e))return!1;try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}(s.postLeadCta?.url)){let e={url:s.postLeadCta.url};oa(s.postLeadCta.label)&&(e.label=s.postLeadCta.label),ol(s.postLeadCta.staticParams)&&(e.staticParams=s.postLeadCta.staticParams),ol(s.postLeadCta.fieldMap)&&(e.fieldMap=s.postLeadCta.fieldMap),("empty"===s.postLeadCta.missingValue||"omit"===s.postLeadCta.missingValue||"hide"===s.postLeadCta.missingValue)&&(e.missingValue=s.postLeadCta.missingValue),d.postLeadCta=e}"boolean"==typeof s.synchronousLeadDelivery&&(d.synchronousLeadDelivery=s.synchronousLeadDelivery),oa(s.offeringUuid)&&(d.offeringUuid=s.offeringUuid,d.offeringId=s.offeringUuid);let u=Array.isArray(s.organizationIds)?s.organizationIds[0]:void 0;oa(u)&&(d.organizationId=u);let p=Array.isArray(s.dynamicLinks)?s.dynamicLinks.find(e=>e?.type==="linkout")?.url:void 0;oa(p)&&(d.linkoutUrl=p);let f=or(s.attributes);f&&(d.attributes={...f});let m=or(f?.programFields)?.flowId;oa(m)&&(d.programFields={flowId:m}),oa(c?.images?.logo)&&(d.imageURL=c?.images?.logo),"boolean"==typeof c?.tags?.isPublic&&(d.isPublic=c.tags.isPublic),"boolean"==typeof c?.tags?.isPrivate&&(d.isPrivate=c.tags.isPrivate),"boolean"==typeof c?.tags?.isForProfit&&(d.forProfit=c.tags.isForProfit),function(e,t){if(!t)return;let r=oo(on(t,"fulltimeRetentionRate"));void 0!==r&&(e.fulltimeRetentionRate=r);let n=oo(on(t,"numberOnlinePrograms"));void 0!==n&&(e.numberOnlinePrograms=n);let i=oi(on(t,"areTransferCreditsAccepted"));void 0!==i&&(e.areTransferCreditsAccepted=i);let o=oi(on(t,"satOrActRequired"));void 0!==o&&(e.satOrActAdmissionsRequirements=o?"Yes":"No");let a=oi(on(t,"isFreeApplication"));void 0!==a&&(e.isApplicationFeeOnlineWaived=a)}(d,c?.institutionalStats);let h=(i=c,a={},i?.tags?.isOnline===!0&&(a.isOnline={label:"Online",value:!0}),oa(i?.accreditator)&&(a.isAccredited={label:"Accredited",value:!0}),i?.tags?.isPrivate===!0&&(a.isPrivate={label:"Private",value:!0}),i?.tags?.isNotForProfit===!0&&(a.isNotForProfit={label:"Not-for-Profit",value:!0}),i?.institutionalStats&&!1===oi(on(i.institutionalStats,"satOrActRequired"))&&(a.satOrActNotRequired={label:"No SAT/ACT Required",value:!0}),Object.keys(l={...a,...i?.institutionalStats}).length>0?l:void 0);return h&&(d.institutionalStats=h),oa(t)&&(d.resultsSource=t),oa(r)&&(d.listId=r),d}function or(e){return"object"!=typeof e||null===e||Array.isArray(e)?void 0:e}function on(e,t){let r=e[t];return r&&"object"==typeof r?r.value:void 0}function oi(e){if("boolean"==typeof e)return e;if("string"==typeof e){let t=e.trim().toLowerCase();if("true"===t)return!0;if("false"===t)return!1}}function oo(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"==typeof e&&e.trim().length>0){let t=Number(e);return Number.isFinite(t)?t:void 0}}function oa(e){return"string"==typeof e&&e.trim().length>0}function ol(e){if("object"!=typeof e||null===e||Array.isArray(e))return!1;let t=Object.entries(e);return t.length>0&&t.every(([,e])=>"string"==typeof e)}let os=["exact","recommended","related","spotlight"];function oc(e){let t=e.tracking;if(!op(t))return;let r=t.sortingReferenceId;return"string"==typeof r&&r.length>0?r:void 0}function od(e){return os.some(t=>t in e)}function ou(e,t,r){let n=null;for(let i of os){if(!(i in e))continue;let o=function(e,t,r){return Array.isArray(e)?e.map(e=>ot(e,t,r)):op(e)&&Array.isArray(e.data)?{...e,data:e.data.map(e=>ot(e,t,r))}:e}(e[i],t,r);o!==e[i]&&((n??={...e})[i]=o)}return n??e}function op(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function of(e){if(!e)return null;try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return null;return t.origin.toLowerCase()}catch{return null}}let om={percentOnlineEnrollment:"Online Enrollment",percentAdmittedUndergrad:"Acceptance Rate",graduationRateTotalCohort:"Graduation Rate",fulltimeRetentionRate:"Retention Rate",instateAvgTuitionFulltimeUndergrad:"In-State Tuition",avgNetPriceStudentsAwardedAid:"Avg Net Price",enrollmentTotal:"Students Enrolled",studentToFacultyRatio:"Student-to-Faculty Ratio",medianDebtCompletersOverall:"Median Debt",accreditator:"Accreditation"},oh={...om,instateAvgTuitionFulltimeUndergrad:"Avg. Undergrad Tuition, In-State",outOfStateAvgTuitionFulltimeUndergrad:"Avg. Undergrad Tuition, Out-of-State",inStateAvgTuitionFulltimeGrad:"Avg. Graduate Tuition, In-State",outOfStateAvgTuitionFulltimeGrad:"Avg. Graduate Tuition, Out-of-State"},og=["percentOnlineEnrollment","percentAdmittedUndergrad","graduationRateTotalCohort","fulltimeRetentionRate"],oy=["instateAvgTuitionFulltimeUndergrad","avgNetPriceStudentsAwardedAid","enrollmentTotal","studentToFacultyRatio","medianDebtCompletersOverall","accreditator"],ob=new Set(["percentOnlineEnrollment","percentAdmittedUndergrad","graduationRateTotalCohort","fulltimeRetentionRate"]),ov=new Set(["instateAvgTuitionFulltimeUndergrad","outOfStateAvgTuitionFulltimeUndergrad","inStateAvgTuitionFulltimeGrad","outOfStateAvgTuitionFulltimeGrad","avgNetPriceStudentsAwardedAid","medianDebtCompletersOverall"]),ox=new Set(["enrollmentTotal"]),ow=new Set(["studentToFacultyRatio"]);function oS(e,t){if(!oE(e))return[];let r=[];for(let n of t){let t=e[n];if(!oE(t)||null===t.value||void 0===t.value)continue;let i=om[n]??("string"==typeof t.label&&t.label.length>0?t.label:n);if("accreditator"===n){let e=oj(t.value);if(null===e)continue;r.push({label:i,value:"Yes",tooltip:e});continue}r.push({label:i,value:oI(n,t.value)})}return r}function oI(e,t){return"string"==typeof t?t:"number"==typeof t&&Number.isFinite(t)?ob.has(e)?`${Math.round(t)}
1%`:ov.has(e)?`$${Math.round(t).toLocaleString("en-US")}`:ox.has(e)?t.toLocaleString("en-US"):ow.has(e)?`${t}:1`:String(t):String(t)}function oC(e,t){if(!oE(e))return null;let r=e[t];return oE(r)?ok(r.value):null}function oj(e){if("string"!=typeof e)return null;let t=e.trim();return t.length>0?t:null}function ok(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function oE(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let oA="/v1/rankings/";function oN(e){if(!e)return null;try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return null;return t.origin.toLowerCase()}catch{return null}}class oT extends Error{constructor(){super("LDS did not accept the lead"),this.name="IncompleteLeadSubmissionError"}}function oO(e,t){null==(window.top?window.top:window).open(e,"_blank","noopener,noreferrer")&&t&&t(e)}let oP=e=>{let t=e.split("=");if(2===t.length)return{key:t[0].trim(),customField:t[1].trim().replace(/[^a-zA-Z]/g,"")};let r=e.trim();return{key:r,customField:r}},oM=e=>e?Array.isArray(e)?e.map(e=>e.value??e.text).join(","):e.value??e.text??"":null,oR=(e,t,r={})=>{if(!e||!t?.length)return e;let n=e;return t.forEach(e=>{try{let t=e.key.toLowerCase();if(n.includes(e.key)){let i=r[t]||e.defaultValue;n=n.split(e.key).join(i)}}catch(t){console.warn(`Failed to translate placeholder ${e.key}:`,t)}}),n},oL=(e,t,r)=>{if(!e||"object"!=typeof e)return e;let n={...e};return Object.keys(n).forEach(e=>{"string"==typeof n[e]?n[e]=oR(n[e],t,r):Array.isArray(n[e])?n[e]=n[e].map(e=>"string"==typeof e?oR(e,t,r):e&&"object"==typeof e?oL(e,t,r):e):n[e]&&"object"==typeof n[e]&&(n[e]=oL(n[e],t,r))}),n},oF=(e,t)=>{var r,n;let i,o=JSON.parse(JSON.stringify(e));if(!o.placeholders||0===o.placeholders.length)return o;let a=ry(t.steps,t.flowState),l=rv("degree",t.flowState)||t.dcs?.degree||t.audienceIntent?.degreeDecisionOutcome||"",s=rv("category",t.flowState)||t.dcs?.category||"",c=rv("subject",t.flowState)||t.dcs?.subject||t.audienceIntent?.subjectDecisionOutcome||"",d=rv("career",t.flowState)||t.audienceIntent?.careerDecisionOutcome||"",u=(r=t.steps,n=t.flowState,i={},rM(r).forEach(e=>{if(e.customField){let t=oM(rR(e.customField,r,n));t&&(i[e.customField.toLowerCase()]=t)}}),Object.values(n).forEach(e=>{e?.option&&(Array.isArray(e.option)?e.option:[e.option]).forEach(e=>{if(!e.customField)return;let t=e.customField.toLowerCase();if(i[t])return;let r=oM(e);r&&(i[t]=r)})}),i),p={degree:l,category:s,subject:c,career:d,...Object.keys(a).reduce((e,t)=>(["degree","category","subject","career"].includes(t)||(e[t.toLowerCase()]=a[t]),e),{}),...u};return oL(o,o.placeholders,p)},oU="dexp-question-flow",o$="dexp-results",o_=e=>e?.type===O.RESULT,oD=e=>e?e.replace(/_/g,"-").toLowerCase():"",oY="dexp-question-flow";var oB=r(29097);let oz=(e,t)=>{let r;if(!e)return[];let n=/\{\{([^}]+)\}\}/g,i=[];for(;null!==(r=n.exec(e));)i.push(r);if(0===i.length)return(0,oB.E)({path:e,json:t,wrap:!0});if(1===i.length&&i[0][0]===e)return(0,oB.E)({path:i[0][1].trim(),json:t,wrap:!0});let o=i.map(e=>(0,oB.E)({path:e[1].trim(),json:t,wrap:!0})),a=Math.min(...o.map(e=>e.length));return 0===a?[]:Array.from({length:a},(t,r)=>{if(i.every((e,t)=>{let n=o[t][r];return null==n||""===n}))return null;let n=e;return i.forEach((e,t)=>{let i=o[t][r];n=n.replace(e[0],null==i||""===i?"":String(i))}),(n=n.replace(/<(\w+)(?:\s[^>]*)?>[\s]*<\/\1>/g,"").trim())||null})},oV=async(e,t,r)=>{let n,i,{dynamicContent:o,flowState:a,steps:l,searchParamsOptions:s,sortContext:c}=e,{endpointUrl:d,method:u,body:p,queryParams:f,sortConfig:m}=o;if(!d)throw Error("Endpoint URL is required");let h=((e,t,r,n,i)=>{var o;let a=(o=t||[],0!==o.length)?o.map(e=>{let{key:t,customField:o}=oP(e),a=rR(o,n,r,i);if(!a)return null;let l=oM(a);return null===l?null:`${encodeURIComponent(t)}=${encodeURIComponent(l)}`}).filter(e=>null!==e).join("&"):"";if(!a)return e;let l=e.includes("?")?"&":"?";return`${e}${l}${a}`})(d,f,a,l,s),g=m?.enabled&&c;g&&(h=((e,t,r)=>{let n=new URL(e,"http://placeholder");if(n.searchParams.has("sortBy")||n.searchParams.set("sortBy","ml-fyp"),n.searchParams.has("limit")||null==t.limit||n.searchParams.set("limit",String(t.limit)),!n.searchParams.has("sortMaxResults")){let e=n.searchParams.get("limit")??(null!=t.limit?String(t.limit):null);null!=e&&n.searchParams.set("sortMaxResults",String(e))}return r.listId&&n.searchParams.set("sortListId",r.listId),n.toString().replace("http://placeholder","")})(h,o,c));let y="POST"===u?((e,t,r,n)=>{if(!e)return;let i="string"==typeof e?JSON.parse(e.replace(/(?<!")\{\{([\w.]+)\}\}(?!")/g,'"{{$1}}"')):e,o=e=>{if("string"==typeof e){let i=e.match(/^\{\{([\w.]+)\}\}$/);
1if(i){let e=rR(i[1],r,t,n);if(!e)return{value:void 0,drop:!0};let o=oM(e);return null==o?{value:void 0,drop:!0}:{value:o,drop:!1}}return/\{\{[\w.]+\}\}/.test(e)?{value:e.replace(/\{\{([\w.]+)\}\}/g,(e,i)=>{let o=rR(i,r,t,n);return o?oM(o)??"":""}),drop:!1}:{value:e,drop:!1}}if(Array.isArray(e))return{value:e.map(e=>o(e)).filter(({drop:e})=>!e).map(({value:e})=>e),drop:!1};if("object"==typeof e&&null!==e){let t={};for(let[r,n]of Object.entries(e)){let{value:e,drop:i}=o(n);i||(t[r]=e)}return{value:t,drop:!1}}return{value:e,drop:!1}},{value:a}=o(i);return JSON.stringify(a)})(p,a,l,s):void 0;g&&y&&((n=JSON.parse(y)).sortUserContext={...n.sortUserContext,country:c.userContext?.country||"",region:c.userContext?.region||"",isMobile:c.userContext?.isMobile||!1,...c.userContext?.searchPageType&&{searchPageType:c.userContext.searchPageType}},m.weaverModel&&!n.weaverModel&&(n.weaverModel=m.weaverModel),c.webContext&&!n.sortWebContext&&(n.sortWebContext=c.webContext),"fyp"===m.weaverModel&&c.flowAnswers&&!n.flowAnswers&&(n.flowAnswers=c.flowAnswers),y=JSON.stringify(n));let b=c?.userContext?.country;b&&((i=new URL(h,"http://placeholder")).searchParams.has("country")||i.searchParams.set("country",b),h=i.toString().replace("http://placeholder",""));try{let e=await fetch(h,{method:u||"GET",headers:{"Content-Type":"application/json"},body:y});if(!e.ok)throw Error(`Failed to fetch ${t}: ${e.statusText}`);let n=await e.json();return r(n,o)}catch(e){throw console.error(`Error fetching ${t}:`,e),Error(`Failed to fetch ${t}: ${e}`)}},oH=(e,t)=>{let{limit:r,optionConfig:n}=t;if(!n)return console.warn("No optionConfig provided, returning empty options array"),[];let{optionId:i,text:o,value:a,extractKeys:l}=n;if(l){let t=(0,oB.E)({path:i,json:e,wrap:!1});if(!t||"object"!=typeof t||Array.isArray(t))return console.warn("extractKeys is true but optionIdPath did not resolve to an object:",t),[];{let e=Object.keys(t);return(r?e.slice(0,r):e).map(e=>({optionId:e,text:e,value:e}))}}let s=oz(i,e),c=oz(o,e),d=oz(a,e),u=Math.min(s.length,c.length,d.length);return Array.from({length:r?Math.min(u,r):u},(e,t)=>({optionId:String(s[t]),text:String(c[t]),value:String(d[t])}))},oq=async(e,t,r)=>oV({dynamicContent:e,flowState:t,steps:r},"dynamic options",oH),oG=e=>{let t=e.dynamicOptions?.queryParams;return t&&0!==t.length?t.map(e=>oP(e).customField):[]},oW=(e,t,r)=>{let n;return e.type===O.QUESTION&&!!e.dynamicOptions?.endpointUrl&&(0===(n=oG(e)).length||n.every(e=>null!=rR(e,r,t)))},oQ=async(e,t,r)=>{let n=e.id;try{let i=await oq(e.dynamicOptions,t,r);return{stepId:n,options:i,success:!0}}catch(e){return console.warn(`[Prefetch] Failed to prefetch options for step ${n}:`,e),{stepId:n,error:e instanceof Error?e:Error(String(e)),success:!1}}},oK=async(e,t,r={})=>{let n=e.filter(n=>(!n.id||!r[n.id])&&oW(n,t,e));if(0===n.length)return r;let i=await Promise.all(n.map(r=>oQ(r,t,e))),o={...r};return i.forEach(e=>{e.success&&(o[e.stepId]=e.options)}),o},oJ=(e,t,r)=>{let n=oG(e),i=e.id||"unknown";if(0===n.length)return i;let o=n.map(e=>{let n=oM(rR(e,r,t));return`${e}:${n??"null"}`});return`${i}|${o.join("|")}`},oX=e=>{if(null==e)return;let t=e.flatMap(({key:e,value:t})=>{if(null==t)return[];let r="object"==typeof t?JSON.stringify(t):String(t);if("outboundurl"===e.toLowerCase()){let t=r3(r);return null==t||""===t?[]:[{key:e,value:t}]}return[{key:e,value:r}]});return t?.length>0?t:void 0},oZ=["name","htmlId","location","text"],o0=["sectionSlug","subTabSlug","modelId","metricNames","dimensionNames","blockId","blockType","dashboardConfigId"],o1=new Set(oZ),o2=new Set(["name","htmlId","location","text","dashboardConfigId","blockId","blockType","sectionSlug","subTabSlug","modelId","metricNames","dimensionNames"]),o4=new Set(o0),o3=new Set(["__proto__","constructor","prototype","email","phone","chat","
1insight","metric","row","rows","result","results","export","user","tenantid","formstate","flowcontext"]);function o5(e,t){let r={};for(let t of oZ){let n=e[t];"string"==typeof n&&n.length>0&&(r[t]=n)}let n=function(e,t,r={}){if(!e||0===Object.keys(e).length)return r;let n={...r};for(let[r,i]of Object.entries(e)){if(!o1.has(r)){o9(r,"unknown-field");continue}let e=function(e,t,r){let n=nU(t);if("empty"!==n.kind)return"invalid"===n.kind?void o9(e,"invalid-source"):o8(e,n,r)}(r,i,t);void 0!==e&&(n[r]=e)}return n}(e.fields,t,r),i=function(e,t){if(!e||0===e.length)return[];let r=[];for(let n of e){let e=n$(n);if("empty"===e.kind)continue;if("invalid"===e.kind){o9("customDimension","invalid-source");continue}if(!o4.has(e.key)){o9(e.key,"unknown-field");continue}let i=o8(e.key,e,t);void 0!==i&&r.push({key:e.key,value:i})}return r}(function(e){if(null==e)return;if(Array.isArray(e))return e;if(!o6(e))return o9("customDimension","invalid-source"),[];let t=[];for(let[r,n]of Object.entries(e)){if(!o4.has(r)){o9(r,"unknown-field");continue}if("string"==typeof n){t.push({key:r,dataPath:n});continue}if(!o6(n)){o9(r,"invalid-source");continue}let e=Object.prototype.hasOwnProperty.call(n,"dataPath"),i=Object.prototype.hasOwnProperty.call(n,"literal");if(e&&!i&&"string"==typeof n.dataPath){t.push({key:r,dataPath:n.dataPath});continue}if(i&&!e&&"string"==typeof n.literal){t.push({key:r,literal:n.literal});continue}o9(r,"invalid-source")}return t}(e.customDimensions),t),o={...n};return i.length>0&&(o.customDimensions=i),o}function o6(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function o8(e,t,r){var n,i;let o;if("literal"===t.kind)return t.literal;let a=(n=t.dataPath).toLowerCase().split(/[.[\]]+/).filter(Boolean).some(e=>o3.has(e))?"sensitive-path":o2.has(n)?void 0:"disallowed-path";if(a)return void o9(e,a);try{o=ie(`{{${t.dataPath}}}`,r)}catch{o9(e,"unresolved");return}let l="string"==typeof(i=o)?i:"number"==typeof i||"boolean"==typeof i?String(i):Array.isArray(i)?i.map(e=>"string"==typeof e||"number"==typeof e||"boolean"==typeof e?String(e):"").filter(Boolean).join(","):void 0;return void 0===l||0===l.length?void o9(e,"unresolved"):l}function o9(e,t){console.warn(`[tracking] element-field-resolve: ${t} field=${e}`)}let o7=["variant","category","name"],ae="dexp-flow",at="1.0.0",ar=e=>e?.map(({fieldNumber:e,...t})=>({...t})),an=e=>{let{viewCorrelationId:t,formatType:r,formatSubtype:n,presets:i,dcs:o,product:a,placement:l,customDimensions:s,dslConfigId:c,mappedCustomDimensions:d,brand:u,location:p,position:f,sku:m,productId:h,listId:g}=e,y=ai(s,c,d),b=ic(a?.variant??o?.degree??i?.degree??""),v=ic(a?.category??o?.category??i?.category??""),x=ic(a?.name??o?.subject??i?.subject??""),w=a?as(a):void 0;return{name:"ProductLoaded",payload:{viewCorrelationId:t,...y?{customDimensions:y}:{},...g?{listId:g}:{},product:{formatSubtype:n,formatType:r,variant:b,name:x,category:v,location:p||l||"",positionEngine:$.ALGOLIA,...u?{brand:u}:{},...void 0!==f?{position:f}:{},...m?{sku:m}:{},...h?{productId:h}:{},...w??{}}}}},ai=(e,t,r)=>{var n,i=(n=oX(e),t?[...n??[],{key:"dslConfigId",value:t}]:n),o=oX(r);if(!o||0===o.length)return i;let a=new Map;for(let e of i??[])a.set(e.key,e);for(let e of o)a.set(e.key,e);return Array.from(a.values())},ao=(e,t)=>{let{currentStep:r,formViewedCorrelationId:n,elementLoadedCorrelationId:i,currentStepIndex:o,productClickedCorrelationId:a,formName:l,stepName:s}=e;return t?{name:"FormViewed",payload:{formContext:{formId:`dexp-${r?.flowId}`,formName:l||oY},stepContext:{stepId:r?.id||"",stepName:s||r?.title||"",stepNumber:o},correlationId:a||n}}:{name:"FormViewed",payload:{sourceCorrelationId:i,formContext:{formId:`dexp-${r?.flowId}`,formType:ae},stepContext:{stepId:r?.id||"",stepName:r?.title||"",stepNumber:o},correlationId:n}}},aa=e=>{let{viewCorrelationId:t,formatSubtype:r,formatType:n,placement:i,presets:o,dcs:a,product:l,customDimensions:s,dslConfigId:c,mappedCustomDimensions:d,brand:u,location:p,position:f,sku:m,productId:h,listId:g}=e,y=ai(s,c,d),b=ic(l?.variant??a?.degree??o?.degree??""),v=ic(l?.category??a?.category??o?.category??""),x=ic(l?.name??a?.subject??o?.subject??""),w=l?as(l):void 0;return{name:"ProductViewed",payload:{viewCorrelationId:t,...g?{listId:g}:{},product:{formatSubtype:r,formatType:n,location:i||"",name:x,variant:b,category:v,positionEngine:$.ALGOLIA,...u?{brand:u}:{},...p?{location:p}:{},...void 0!==f?{position:f}:{},...m?{sku:m}:{},...h?{productId:h}:{},...w??{}},...y?{customDimensions:y}:{}}}},al=e=>{let{formViewedCorrelationId:t,outboundUrl:r,actionOutcome:n,formatSubtype:i,formatType:o,presets:a,dcs:l,product:s,viewCorrelationId:c,customDimensions:d,mappedCustomDimensions:u,productClickedCorrelationId:p,brand:f,location:m,placement:h,position:g,sku:y,productId:b,listId:v}=e,x=ai(d,void 0,u),w=ic(s?.variant??l?.degree??a?.degree??""),S=ic(s?.category??l?.category??a?.category??""),I=ic(s?.name??l?.subject??a?.subject??""),C=s?as(s):void 0;return{name:"ProductClicked",payload:{correlationId:p||t,viewCorrelationId:c,outboundUrl:r3(r),actionOutcome:n,...x?{customDimensions:x}:{},...v?{listId:v}:{},product:{formatSubtype:i,formatType:o,name:I,category:S,variant:w,positionEngine:$.ALGOLIA,location:m||h||"",...f?{brand:f}:{},...void 0!==g?{position:g}:{},...y?{sku:y}:{},...b?{productId:b}:{},...C??{}}}}};
1function as(e){let t=new Set(o7),r={};for(let[n,i]of Object.entries(e))t.has(n)||(r[n]=i);return r}let ac=e=>{let{productClickedCorrelationId:t,formViewedCorrelationId:r,currentStep:n,elementType:i,name:o,location:a,text:l,htmlId:s,variant:c,experienceVariant:d,customDimensions:u}=e,p=oX(u);return{name:"ElementViewed",payload:{correlationId:t||r,webElement:{htmlId:s||n?.id,elementType:i||`dexp-${n?.flowId}-${n?.id?.split("-")[0]}`,name:o||n?.title,location:a||"",text:l||"",variant:c||d},...p?{customDimensions:p}:{}}}},ad=(e,t)=>{let{formViewedCorrelationId:r,currentStep:n,fieldName:i,fieldType:o,fieldValue:a,fieldNumber:l,fieldLabel:s,fieldId:c,autofilled:d,currentStepIndex:u,stepName:p,stepId:f,productClickedCorrelationId:m}=e,h=e.formName||oY,g=p||n?.title||"",y=f??n?.id??"";return{name:t,payload:{correlationId:m||r,formContext:{formId:`dexp-${n?.flowId}`,formName:h,formType:ae,formVersion:at},userInputField:{fieldName:i??n?.leadFieldAssociated??n?.stepName??n?.title??n?.id??"",fieldType:o??"",fieldValue:a??"",fieldLabel:s??"",fieldId:c??"",...d?{autofilled:d}:{},...l?{fieldNumber:l}:{}},stepContext:{stepId:y,stepName:g,stepNumber:u??void 0}}}},au=(e,t)=>{let{formViewedCorrelationId:r,currentStep:n,viewCorrelationId:i,customDimensions:o}=t,a=oX(o);return{name:e,payload:{correlationId:r,webElement:{htmlId:n?.id,elementType:"dexp-pop-up",name:"dexp-terms-and-conditions",text:n?.modal?.buttonText||"Agree & See Matches"},viewCorrelationId:i,...a?{customDimensions:a}:{}}}},ap=e=>{let{productClickedCorrelationId:t,formViewedCorrelationId:r,elementType:n,name:i,location:o,htmlId:a,text:l,correlationId:s,viewCorrelationId:c,position:d,customDimensions:u}=e,p=oX(u);return{name:"ElementClicked",payload:{correlationId:s||t||r,viewCorrelationId:c,webElement:{elementType:n||"dexp-hosted-lead-application-cta",name:i||"dexp-cta-button",location:o||"",...void 0!==d?{position:String(d)}:{},...a?{htmlId:a}:{},...l?{text:l}:{}},...p?{customDimensions:p}:{}}}},af=["correlationId","viewCorrelationId","name","htmlId","location","text"],am=e=>{let t={};for(let r of af){let n=e[r];"string"==typeof n&&(t[r]=n)}return t},ah=new Set(o0),ag=(e,t)=>{let r=am(t),n=(e=>{let t=oX(e);if(!t||0===t.length)return;let r=t.filter(e=>ah.has(e.key));return r.length>0?r:void 0})(t.customDimensions);return{name:e,payload:{correlationId:r.correlationId,viewCorrelationId:r.viewCorrelationId,webElement:{elementType:"",name:r.name??"",location:r.location??"",text:r.text??"",...r.htmlId?{htmlId:r.htmlId}:{}},...n?{customDimensions:n}:{}}}},ay=e=>{let{correlationId:t,elementType:r,name:n,location:i,text:o,htmlId:a,viewCorrelationId:l,position:s,customDimensions:c}=e,d=oX(c);return{name:"ElementViewed",payload:{correlationId:t,viewCorrelationId:l,webElement:{elementType:r||"",name:n||"",location:i||"",text:o||"",...a?{htmlId:a}:{},...void 0!==s?{position:String(s)}:{}},...d?{customDimensions:d}:{}}}},ab=(e,t)=>{if("tagular"in window&&"function"==typeof window.tagular)try{let r=tb[e],n={...void 0!==r?{"@type":r}:{},...t};(0,window.tagular)("beam",e,n)}catch{console.warn("[tagularEvent] dispatch-failed:",e)}},av=()=>{let{eventContext:e}=aS();return{...((e,t="flow-defaults")=>{let r=(0,v.useCallback)(t=>{let{name:r,payload:n}=(e=>{let{formViewedCorrelationId:t,currentStep:r,currentStepIndex:n}=e;return{name:"FormStarted",payload:{formContext:{formId:`dexp-${r?.flowId}`,formName:e.formName||oY,formType:ae,formVersion:at},stepContext:{stepId:r?.id||"",stepName:r?.title||"",stepNumber:n},correlationId:t}}})(t??e);ab(r,n)},[e]),n=(0,v.useCallback)(t=>{let{name:r,payload:n}=(e=>{let{formViewedCorrelationId:t,currentStep:r,currentStepIndex:n,field:i,dcs:o}=e,a=ar(i);return{name:"FormContinued",payload:{formContext:{formId:`dexp-${r?.flowId}`,formName:e.formName||oY,formType:ae,formVersion:at},stepContext:{stepId:r?.id||"",stepName:r?.title||"",stepNumber:n},correlationId:t,field:a||o}}})(t??e);ab(r,n)},[e]),i=(0,v.useCallback)((e,t)=>{let{name:r,payload:n}=((e,t)=>{let{formViewedCorrelationId:r,productClickedCorrelationId:n,currentStep:i,currentStepIndex:o,field:a,dcs:l,stepName:s,stepNumber:c,outboundUrl:d}=e,u=ar(a),p=r3(d);return{name:t,payload:{formContext:{formId:`dexp-${i?.flowId}`,formName:e.formName||oY,formType:ae,formVersion:at},stepContext:{stepId:i?.id||"",stepName:s||i?.title||"",stepNumber:c||o},field:u||[{fieldName:"degree",fieldValue:l?.degree||""}
1,{fieldName:"category",fieldValue:l?.category||""},{fieldName:"subject",fieldValue:l?.subject||""}],correlationId:n||r,..."FormSubmitted"===t&&p?{outboundUrl:p}:{}}}})(t,e);ab(r,n)},[]),o=(0,v.useCallback)((e,t)=>{let{name:r,payload:n}=ad(t,e);ab(r,n)},[]),a=(0,v.useCallback)(t=>{let{name:r,payload:n}=an({...e,...t});ab(r,n)},[e]),l=(0,v.useCallback)(()=>{let{name:t,payload:r}=(e=>{let{formViewedCorrelationId:t,currentStep:r,placement:n,productClickedCorrelationId:i}=e;return{name:"ElementLoaded",payload:{correlationId:i||t,webElement:{htmlId:r?.id,elementType:`dexp-${r?.flowId}-${r?.id?.split("-")[0]}`,name:r?.title,location:n||"",text:""}}}})(e);ab(t,r)},[e]),s=(0,v.useCallback)(()=>{let{name:t,payload:r}=ac(e);ab(t,r)},[e]),c=(0,v.useCallback)(t=>{let{name:r,payload:n}=(e=>{let{currentStep:t,elementLoadedCorrelationId:r,placement:n,monarch:i,elementType:o,name:a,text:l,location:s,productClickedCorrelationId:c,htmlId:d}=e;return{name:"ElementLoaded",payload:{correlationId:c||r,webElement:{htmlId:d||t?.flowId||"",elementType:o||"dynamic-experiences-app",name:a||"dynamic-experiences-v1",location:void 0!==s?s:n||"personalizedQdf",text:void 0!==l?l:JSON.stringify(i)||""}}}})({...e,...t});ab(r,n)},[e]),d=(0,v.useCallback)(e=>{let{name:t,payload:r}=al(e);ab(t,r)},[]),u=(0,v.useCallback)(t=>{let{name:r,payload:n}=aa({...e,...t});ab(r,n)},[e]),p=(0,v.useCallback)(t=>{let{name:r,payload:n}=ao({...e,...t});ab(r,n)},[e]),f=(0,v.useCallback)(()=>{let{name:t,payload:r}=au("ElementViewed",e);ab(t,r)},[e]),m=(0,v.useCallback)(()=>{let{name:t,payload:r}=au("ElementClicked",e);ab(t,r)},[e]),h=(0,v.useCallback)(()=>{let{name:t,payload:r}=((e,t)=>{let{formViewedCorrelationId:r,currentStep:n,viewCorrelationId:i,customDimensions:o}=t,a=oX(o);return{name:e,payload:{correlationId:r,webElement:{htmlId:n?.id,elementType:"dexp-pop-up",name:"dexp-terms-and-conditions-exit",text:""},viewCorrelationId:i,...a?{customDimensions:a}:{}}}})("ElementClicked",e);ab(t,r)},[e]);return{triggerProductLoadedEvent:a,triggerProductViewedEvent:u,triggerStepElementLoadedEvent:l,triggerStepElementViewedEvent:s,triggerFieldEvents:o,triggerFormStartedEvent:r,triggerFormContinuedEvent:n,triggerFormViewedEvent:p,triggerFormEvents:i,triggerElementLoadedEvent:c,triggerProductClickedEvent:d,triggerModalElementViewedEvent:f,triggerModalElementClickedEvent:m,triggerModalElementClosedEvent:h,triggerElementClickedEvent:(0,v.useCallback)(r=>{let n={...e,...r};if("explicit-node-enable"===t){let{name:e,payload:t}=ag("ElementClicked",am(n));ab(e,t);return}let{name:i,payload:o}=ap(n);ab(i,o)},[e,t]),triggerElementViewedEvent:(0,v.useCallback)(r=>{let n={...e,...r};if("explicit-node-enable"===t){let{name:e,payload:t}=ag("ElementViewed",am(n));ab(e,t);return}let{name:i,payload:o}=ac(n);ab(i,o)},[e,t]),eventContext:e}})(e),eventContext:e}},ax=(0,v.createContext)(null),aw=({dcs:e,forwardedContext:t,schoolId:r,headline:n,params:i,steps:o,children:a,placementId:l,entryStepId:s,searchParams:c,jumpToStepId:d,debugResult:u=!1,fromStepIndex:p=0,isFullPageExp:f=!1,audienceIntent:m,styleVariant:h="default",elementLoadedCorrelationId:g,correlationId:y,leadSubmissionConfig:x,customDimensions:w=[],slotName:S,slotVariant:I,experienceName:C})=>{let j=ro(),k=(0,v.useMemo)(()=>j?.configs?.multitenant?.programFinderEnabled,[j]),A=(0,v.useMemo)(()=>(e=>{if(!e)return{};let t=(e=>{if("object"==typeof e)return e;let t=new URLSearchParams(e),r={};return t.forEach((e,t)=>{let n=r[t];void 0===n?r[t]=e:Array.isArray(n)?n.push(e):r[t]=[n,e]}),r})(e),r={};for(let[e,n]of Object.entries(t))n&&(Array.isArray(n)?r[e]=n.map((t,r)=>({optionId:`${e}-search-param-${r}`,text:t,value:t,group:`${e}-search-param`})):r[e]={optionId:`${e}-search-param`,text:n,value:n,group:`${e}-search-param`});return r})(c),[c]),N=tl(),T=(0,v.useRef)(N);T.current=N;let P=(0,v.useMemo)(()=>{let r,n=nR(e,nM(o)),i=eU(o,{dcs:n,entryStepId:s,jumpToStepId:d,dcsTranslate:T.current.translateDcsValue,forwardedContext:t}),a=(r={},o.forEach(e=>{"QUESTION"===e.type&&e$(e,r),("MULTI_QUESTION"===e.type||"DCS"===e.type)&&(e.stepQuestions??[]).forEach(e=>{e$(e,r,e.leadFieldAssociated)})}),r),l={};if(u){let e={firstName:"John",lastName:"Doe",email:"[email protected]",phoneNumber:"5555551234",zip:"90210",countryCode:"US",hsGradYear:"2023",location:{address:"123 Main St",city:"Los Angeles",state:"CA",stateAbbr:"CA",postalCode:"90210",country:"US",ipInferredPostalCode:"90210"}};o.forEach(t=>{let r=t.leadFieldAssociated;if(r&&r in e){let n=e[r]||"",i={optionId:`${r}-debug-input`,text:n,value:n,group:`${r}-debug-input`};l[t.id||""]={option:i,leadFieldAssociated:t.leadFieldAssociated}}})}let c={...a,...i,...l},{currentStep:f,currentStepIndex:h}=(({steps:e,jumpToStepId:t,fromStepIndex:r})=>{if(t){let n=e.findIndex(e=>e.id===t);if(-1!==n)return{currentStep:e[n],currentStepIndex:r?r+1:1}}return{currentStep:e[0],currentStepIndex:1}})({steps:o,jumpToStepId:d,fromStepIndex:p}),g=oF(f,{steps:o,flowState:c,dcs:e,audienceIntent:m||void 0});return{steps:o,currentStep:g,currentStepIndex:h,openModal:!1,acceptTCPA:!1,validationErrors:[],formStartedFired:!1,flowState:c,navigationHistory:[g],currentStepType:g?.type,isSubmitting:!1,submissionError:null,popupBlockedUrl:null}},[o,e,t,m,s,d,p,u]),[L,U]=(0,v.useReducer)(ts,P),$=(0,v.useRef)(L.flowState);$.current=L.flowState,(0,v.useEffect)(()=>{(async()=>{try{let e=await eu();if(!e)return;let t=eU(o,{location:{state:e.regionCode,zipCode:e.zipCode,countryCode:e.countryCode}});Object.entries(t).forEach(([e,t])=>{$.current={...$.current,[e]:t},U(tp(e,t))})}catch(e){console.warn("Failed to initialize location data",e)}})()},[o]);let _=(0,v.useMemo)(()=>L.currentStep?.isTerminal||L.currentStep?.branchingLogic?.length===0,[L.currentStep]),D=L.currentStep?.nextButtonText||(_?"See My Matches":"Next Question"),Y=$.current[L.currentStep?.id||""]||{},B=(0,v.useCallback)(e=>{$.current={...$.current,TCPA:{accepted:e}},U(tp("TCPA",{accepted:e})),U(tf(!1))},[]),z=(0,v.useCallback)(()=>{U({type:F.CLEAR_VALIDATION_ERRORS})},[]),V=(0,v.useCallback)(e=>{U(tm(e))},[]),H=(0,v.useCallback)(e=>L.flowState[e]||{},[L.flowState]),q=(0,v.useCallback)((e,t)=>{$.current={...$.current,[e]:t},U(tp(e,t))},[]),G=(0,v.useCallback)(()=>Promise.resolve(L.flowState[L.currentStep?.id||""]||{}),[L.flowState,L.currentStep?.id]),W=(0,v.useCallback)(e=>t4(e),[]),Q=(0,v.useCallback)(()=>{z(),U({type:F.GO_BACK_IN_HISTORY})},[z]),[K,J]=(0,v.useState)(E),X=(0,v.useCallback)(()=>{let e,t;if(!o||0===o.length)return;let r=0;if(s){let e=o.findIndex(e=>e.id===s);-1!==e&&(r=e)}let n=o[r];n&&($.current={},J(E()),ed.current=!1,U((e=n,t=r,{type:F.RESET_FLOW,payload:{entryStep:e,entryStepIndex:t}})))},[o,s]),Z=(0,v.useCallback)(e=>{let t,r=new Set(o.slice(0,e).map(e=>e.id));U((t=Object.fromEntries(Object.entries($.current).filter(([e])=>r.has(e))),{type:F.SET_FLOW_STATE,payload:t}))},[o]),ee=(0,v.useCallback)((e,t)=>{let r,{resetFlowState:n=!1}=t??{},i=o.findIndex(t=>t.id===e);if(-1===i)return void console.error("No target step found");let a=o[i],l=o.slice(0,i+1);n&&Z(i),U(tc(a)),U(td(i)),U((r=l,{type:F.SET_NAVIGATION_HISTORY,payload:r}))},[o,Z]),{correlationId:et,formViewedCorrelationId:er,eventContext:en}=(({steps:e,currentStep:t,currentStepType:r,currentStepIndex:n,dcs:i,placementId:o,correlationId:a,elementLoadedCorrelationId:l,formViewedCorrelationId:s,providedCustomDimensions:c,monarch:d})=>{let u=(0,v.useMemo)(()=>((e={})=>{let t,r=(t=e.search??window.location.search)?new URLSearchParams(t).get("formViewedCorrelationId"):null;return{correlationId:e.correlationId??E(),elementLoadedCorrelationId:e.elementLoadedCorrelationId??E(),viewCorrelationId:E(),formViewedCorrelationId:e.formViewedCorrelationId??r??E()}})({correlationId:a,elementLoadedCorrelationId:l,formViewedCorrelationId:s}),[]),p=(0,v.useMemo)(()=>(({steps:e,currentStep:t,currentStepType:r,currentStepIndex:n,dcs:i,placementId:o,elementLoadedCorrelationId:a,viewCorrelationId:l,formViewedCorrelationId:s,providedCustomDimensions:c,monarch:d})=>{let{formatType:u,formatSubtype:p}=((e,t)=>{let r;if(!e)return{formatType:"",formatSubtype:""};let n=oD(e),i=t?.isEntry?`dexp-entry-${n}`:`dexp-${n}`;switch(e){case O.COMPONENT:{let e=oD(t.componentType);if(e)r=`dexp-${e}`;else{let e=oD(t.dslConfig?.type);r=e?`dexp-dsl-${e}`:"dexp-unknown"}break}case O.QUESTION:{let e=oD(t.questionType);r=e?`dexp-${e}`:"dexp-unknown";break}case O.MULTI_QUESTION:r="dexp-multi-question";break;case O.DCS:{let e=oD(t.variant);r=e?`dexp-${e}`:"dexp-unknown";break}case O.BANNER_CTA:r="dexp-banner-cta";break;default:r="dexp-unknown"}return{formatType:i,formatSubtype:r}})(r,t),f=((e,t,r)=>{if(!e)return"";let n=e?e===O.DCS?oD(t?.variant):e===O.COMPONENT?oD(t?.componentType):oD(t?.type):"";if(!n)return"";let i=e===O.DCS&&t?.variant==="personalized";return r&&i?`${n}-${r}`:`${n}-default`})(r,t,d?.slotVariant),m=t?.type===O.RESULT&&t?.isEntry!==!0,h=(({elementLoadedCorrelationId:e,currentStep:t,
1sourceCorrelationId:r,providedCustomDimensions:n=[],monarch:i,slotId:o,experienceVariant:a})=>{let l=t?.flowId??"",s=[{key:"sourceCorrelationId",value:r??e},{key:"experienceVariant",value:a??""},{key:"formId",value:l?`dexp-${l}`:""},{key:"stepId",value:t?.id??""},{key:"stepTitle",value:t?.title??""},{key:"experienceName",value:i?.experienceName??""},{key:"slotName",value:i?.slotName??""},{key:"slotId",value:o??""},{key:"slotVariant",value:i?.slotVariant??""},{key:"flowId",value:l}],c=new Map;for(let e of[...s,...n])c.set(e.key,e);return Array.from(c.values())})({elementLoadedCorrelationId:a,currentStep:t,sourceCorrelationId:m?s:a,providedCustomDimensions:c,monarch:d,slotId:o||"",experienceVariant:f});return{dcs:i,placement:o||"",currentStep:t,currentStepType:r,currentStepIndex:n,formName:oY,stepName:t?.title,actionOutcome:((e,t=[])=>{if(!e)return oU;let r=e.branchingLogic??[];if(0===r.length)return e.isTerminal?o$:oU;let n=new Map(t.map(e=>[e.id,e])),i=r.filter(e=>e?.condition?.type!==void 0).map(e=>n.get(e.nextId??"")).filter(e=>!!e);return 0===i.length?e.isTerminal?o$:oU:i.every(o_)?o$:oU})(t,e),formatType:u,formatSubtype:p,experienceVariant:f,elementLoadedCorrelationId:a,viewCorrelationId:l,formViewedCorrelationId:s,customDimensions:h}})({steps:e,currentStep:t,currentStepType:r,currentStepIndex:n,dcs:i,placementId:o,elementLoadedCorrelationId:u.elementLoadedCorrelationId,viewCorrelationId:u.viewCorrelationId,formViewedCorrelationId:u.formViewedCorrelationId,providedCustomDimensions:c,monarch:d}),[e,t,r,n,i,o,u.elementLoadedCorrelationId,u.viewCorrelationId,u.formViewedCorrelationId,c,d?.slotName,d?.slotVariant,d?.experienceName]);return{correlationId:u.correlationId,elementLoadedCorrelationId:u.elementLoadedCorrelationId,viewCorrelationId:u.viewCorrelationId,formViewedCorrelationId:u.formViewedCorrelationId,eventContext:p}})({steps:L.steps,currentStep:L.currentStep,currentStepType:L.currentStepType,currentStepIndex:L.currentStepIndex,dcs:e,placementId:l,correlationId:y,elementLoadedCorrelationId:g,providedCustomDimensions:w,monarch:{slotName:S,slotVariant:I,experienceName:C}}),{triggerFormEvents:ei}=av(),{triggerIdentify:eo}={triggerIdentify:(0,v.useCallback)((e,t)=>{ab("Identify",{traits:{email:rx("email",e)?.value||"",firstName:rx("firstName",e)?.value||"",website:`dcs[degrees][]=${t?.degree?.text||""}&dcs[categories][]=${t?.category?.text||""}&dcs[subjects][]=${t?.subject?.text||""}`},anonymousId:window?._Cohesion?.anonymousId||"",correlationId:E()})},[])},ea=(0,v.useMemo)(()=>nM(L.steps),[L.steps]),el=function({flowStateRef:e,currentStep:t,steps:r,currentStepIndex:n,currentStepData:i,correlationId:o,siteConfig:a,fromStepIndex:l,formViewedCorrelationId:s,dispatch:c,triggerFormEvents:d,triggerIdentify:u,eventContext:p,leadSubmissionConfig:f,onPopupBlocked:m,programFinderContext:h,forwardFields:g}){return(0,v.useCallback)(async(y,b)=>{let v=y||t;if(!v)return;let x=!!(t?.isEntry&&b),w=e.current,S=w.TCPA?.accepted===!0;if(v.modal?.enable&&!S)return void c(tf(!0));let I=v.branchingLogic?.find(e=>e.type===R.RESULT&&rm(e,i,rg(w),v))?.nextId;await rW({flowState:w,correlationId:o,publisher:a?.domain||"Unknown"});let C=y||r?.find(e=>e.id===I),j={degree:rx("degree",w),category:rx("category",w),subject:rx("subject",w)},k=rL(w,r,g);if(u){let e=rx("emailConsent",w)?.value,t=!!rx("email",w)?.value,r=!!rx("firstName",w)?.value;t&&("Yes"===e||"true"===e||r)&&u(w,j)}if(f){var E;c(tg(null)),c(th(!0));try{let e=w.location,i=r4(f.result,a??{},o,{flowType:im(C||v),trafficSource:ih(C||v),location:{country:e?.countryCode,state:e?.state}}),u=await na(i),g=rS(w),y=await nl({inputs:g,record:f.record,result:f.result,conversionId:u.conversionId,activeProspectToken:f.activeProspectToken,jornayaToken:f.jornayaToken,needsActiveProspectToken:f.needsActiveProspectToken,productCorrelationId:o,identityToken:a?.identityToken,programFinderContext:h});if(!1===y.leadSubmitted)throw new oT;try{E={name:"Lead",pageUrl:window.location.href},window.dispatchEvent(new CustomEvent(rU,{detail:E}))}catch{}let{url:S}=rO({step:C||v,currentStepId:t?.id||"",correlationId:o,siteConfig:a,dcsData:j,redirectUrl:b,fromStepIndex:l,formViewedCorrelationId:s,contextParams:k});if(S&&d&&p&&!x&&d("FormSubmitted",{...p,outboundUrl:S,currentStep:v,field:rw(w,r)}),S&&oO(S,m),!b){let e=C||v;c(tc(e)),c(td(n+1)),c(tu(e))}}catch(e){c(tg(e instanceof Error&&"qualifications_not_met"===e.message?"This program is not available for your profile.":"Something went wrong submitting your application. Please try again."))}finally{c(th(!1))}return}let{url:A}=rO({step:C||v,currentStepId:t?.id||"",correlationId:o,siteConfig:a,dcsData:j,redirectUrl:b,fromStepIndex:l,formViewedCorrelationId:s,contextParams:k});if(p&&d&&v?.isTerminal&&!x&&d("FormSubmitted",{...p,outboundUrl:A,currentStep:v,field:rw(w,r)}),A&&oO(A,m),!b){let e=C||v;c(tc(e)),c(td(n+1)),c(tu(e))}},[o,r,t,n,i,a,l,s,e,c,d,u,p,f,m,h,g])}({steps:L.steps,currentStep:L.currentStep,currentStepIndex:L.currentStepIndex,siteConfig:j,flowStateRef:$,correlationId:et,fromStepIndex:p,currentStepData:Y,formViewedCorrelationId:er,dispatch:U,triggerFormEvents:ei,triggerIdentify:eo,eventContext:en,leadSubmissionConfig:x,onPopupBlocked:e=>U(ty(e)),forwardFields:ea?.forwardFields}),es=(0,v.useCallback)(()=>{U(ty(null))},[U]),ec=(0,v.useRef)(null),ed=(0,v.useRef)(!1),ep=(0,v.useMemo)(()=>{let e=L.currentStep;if(!e?.isEntry)return;let t=e.dslConfig;if(t)return nV(t.data)},[L.currentStep]),ef=ep?.productFields,em=ep?.customDimensions,eh=function({flowStateRef:e,currentStep:t,
1steps:r,currentStepIndex:n,isLastStep:i,clearValidationErrors:o,updateFlowState:a,handleSubmit:l,dispatch:s,dcs:c,audienceIntent:d,forwardStepEventFirerRef:u,entryProductFields:p,entryCustomDimensionMappings:f,siteConfig:m,correlationId:h,fromStepIndex:g,formViewedCorrelationId:y,forwardFields:b}){let x=tl();return(0,v.useCallback)(async()=>{let v,w,S;if(o(),!t)return;try{let r=await t5(t,e.current);if(!r.isValid)return void s(tm(r.errors));if(r.resolvedZipData?.stateAbbr){let{stateAbbr:t}=r.resolvedZipData,n=e.current.location||{};a("location",{...n,state:t})}}catch{s(tm([{field:t.id||"unknown",message:"Something went wrong validating your input. Please try again."}]));return}let I=e.current.TCPA?.accepted===!0;if(t.modal?.enable&&!I)return void s(tf(!0));let C=t.id||"",j=r.find(e=>!0===e.isEntry)?.id??r[0]?.id,k=nM(r),E=function(e,t,r,n){var i;if(!t||!r?.enabled||!r.defaults)return e;let o=r.defaults;if(!nP.some(e=>{let t=o[e];return"string"==typeof t&&t.trim().length>0}))return e;let a=e[t],l=(i=a?.option)?Array.isArray(i)?[...i]:[i]:[],s=!1,c=[...l];for(let e of nP){let t=o[e];if("string"!=typeof t||0===t.trim().length)continue;let r=t.trim(),i=n?.(e,r)??r,a=c.findIndex(t=>t.leadFieldAssociated===e);if(a>=0){let t=c[a];if(!function(e){let t=void 0===e.value||null===e.value||"string"==typeof e.value&&0===e.value.trim().length,r="string"!=typeof e.slug||0===e.slug.trim().length;return t&&r}(t))continue;c[a]={...t,value:r,slug:r,text:"string"==typeof t.text&&t.text.trim().length>0?t.text:i,leadFieldAssociated:e,optionId:"string"==typeof t.optionId&&t.optionId.trim().length>0?t.optionId:e},s=!0;continue}c.push({optionId:e,text:i,value:r,slug:r,leadFieldAssociated:e}),s=!0}if(!s)return e;let d=1===c.length?c[0]:c;return{...e,[t]:{...a??{},option:d}}}(e.current,j,k,x.translateDcsValue);if(E!==e.current&&j){let t=E[j];t&&(e.current=E,a(j,t))}let A=function(e,t,r,n){if(e.type===O.MULTI_QUESTION&&"stepQuestions"in e){let t=e.stepQuestions||[],i=[];return t.forEach(e=>{let t=(r[e.id]||{}).option;if(!t)return;let o=e.stepName||e.title||"",a=e.id;if(Array.isArray(t))t.forEach(e=>{i.push({fieldName:o,fieldId:a,fieldNumber:n,fieldValue:String(e?.text??e?.value??"")})});else if("object"==typeof t&&null!==t){let e=t.text??t.value;i.push({fieldName:o,fieldId:a,fieldNumber:n,fieldValue:String(e??"")})}}),i}if(!t||"object"!=typeof t)return[];let i=t.option,o=e.stepName||e.title||"",a=e.id;return Array.isArray(i)?i.map(e=>({fieldName:o,fieldId:a,fieldNumber:n,fieldValue:String(e?.text??e?.value??"")})):i&&"object"==typeof i&&null!==i?[{fieldName:o,fieldId:a,fieldNumber:n,fieldValue:String(i.text??i.value??"")}]:[]}(t,e.current[C]||{},e.current,n),N=t.dslConfigId||t.dslConfig?t.redirectUrl:void 0,T=!!N&&N.toLowerCase().includes("discover"),P=t.type===O.DCS?t.redirectUrl:T?N:void 0,R=!!P,L=e.current[C]||{},F=rg(e.current),U=i?void 0:await (({selectedOptions:e,currentStepData:t,currentStep:r,allSteps:n})=>{if(!r.branchingLogic||0===r.branchingLogic.length)return null;let i=rp(r),o=r.branchingLogic.find(n=>n.condition.type!==M.DEFAULT&&rm(n,t,e,r,i));if(o)return rs(o,n);let a=r.branchingLogic.find(e=>e.condition.type===M.DEFAULT);return a?rs(a,n):null})({currentStepData:L,selectedOptions:F,currentStep:t,allSteps:r})??void 0,$=i||o_(U)||void 0===U?o$:oU,_=t.isEntry&&void 0!==p&&Object.keys(p).length>0,D=t.isEntry&&void 0!==f&&f.length>0;if(_||D){let n=nM(r)?.subjectLabelFallback,i=ix(e.current,r,t,{subjectLabelFallback:n});if(_&&(v=iu({map:p,root:i})),D){let e=ip(f,i);e.length>0&&(w=e)}}else if(t.isEntry){let t={degree:rx("degree",e.current)?.value,category:rx("category",e.current)?.value,subject:rx("subject",e.current)?.value};(t.degree||t.category||t.subject)&&(S=t)}let Y=t.redirectUrl||null;if(R&&t.isEntry){let n=rL(e.current,r,b),{url:i}=rO({step:U??t,currentStepId:C,correlationId:h??"",siteConfig:m,dcsData:{degree:rx("degree",e.current),category:rx("category",e.current),subject:rx("subject",e.current)},redirectUrl:P,fromStepIndex:g,formViewedCorrelationId:y,contextParams:n});Y=i||null}if(u.current?.({isExitingStepWithRedirect:R,isLastStep:i,outboundUrl:Y,ctaText:t.nextButtonText||"Next Question",actionOutcome:$,isResultsLanding:$===o$,...v&&Object.keys(v).length>0?{productOverride:v}:{},...w?{mappedCustomDimensions:w}:{},...S?{dcs:S}:{},field:A}),R&&P){U&&await l(U,P);return}if(i)return void await l();if(U){let t=n+1,i=oF(U,{steps:r,flowState:e.current,dcs:c,audienceIntent:d||void 0});s(tc(i)),s(td(t)),s(tu(i))}},[t,r,n,i,o,a,l,e,s,c,d,u,p,f,m,h,g,y,b,x.translateDcsValue])}({isLastStep:_,flowStateRef:$,steps:L.steps,currentStep:L.currentStep,currentStepIndex:L.currentStepIndex,dispatch:U,handleSubmit:el,updateFlowState:q,clearValidationErrors:z,dcs:e,audienceIntent:m,forwardStepEventFirerRef:ec,entryProductFields:ef,entryCustomDimensionMappings:em,siteConfig:j,correlationId:et,fromStepIndex:p,formViewedCorrelationId:er,forwardFields:ea?.forwardFields}),{getCachedOptions:eg,isPrefetching:ey}=(({steps:e,flowState:t,enabled:r=!0})=>{let[n,i]=(0,v.useState)({}),[o,a]=(0,v.useState)(()=>r&&e.some(r=>oW(r,t,e))),l=(0,v.useRef)({}),s=(0,v.useRef)(n);s.current=n;let c=(0,v.useRef)(0),d=(0,v.useRef)(!0);(0,v.useEffect)(()=>(d.current=!0,()=>{d.current=!1}),[]);let u=(0,v.useMemo)(()=>{let t=new Map;for(let r of e)r.id&&t.set(r.id,r);return t},[e]),p=(0,v.useCallback)(r=>{let n=[];if(Object.keys(r).forEach(r=>{let i=u.get(r);i?oJ(i,t,e)!==l.current[r]&&n.push(r):n.push(r)}),0===n.length)return r;let i={...r};
1return n.forEach(e=>{delete i[e],delete l.current[e]}),i},[e,t,u]),f=(0,v.useCallback)(async()=>{if(!r||0===e.length)return;let n=++c.current;if(d.current){a(!0);try{let r=p(s.current),o=await oK(e,t,r);if(!d.current||n!==c.current)return;Object.keys(o).forEach(r=>{let n=u.get(r);n&&(l.current[r]=oJ(n,t,e))}),i(o)}catch(e){"undefined"!=typeof console&&console.error&&console.error("[DynamicOptionsCache] Prefetch error:",e)}finally{d.current&&n===c.current&&a(!1)}}},[r,e,t,u,p]),m=(0,v.useCallback)(r=>{if(!r.id)return;let i=n[r.id];if(i){if(oJ(r,t,e)===l.current[r.id])return i}},[n,t,e]),h=(0,v.useCallback)(e=>{i(t=>{let{[e]:r,...n}=t;return n}),delete l.current[e]},[]),g=(0,v.useCallback)(()=>{i({}),l.current={}},[]),y=(0,v.useMemo)(()=>(e=>{let t=new Set;for(let r of e)if(r.type===O.QUESTION&&r.dynamicOptions?.endpointUrl)for(let e of oG(r))t.add(e);let r=new Set;for(let n of e)n.type===O.QUESTION&&n.id&&n.customField&&t.has(n.customField)&&r.add(n.id);return Array.from(r).sort()})(e),[e]),b=(0,v.useMemo)(()=>JSON.stringify(Object.fromEntries(y.map(e=>[e,t[e]??null]))),[y,...y.map(e=>t[e])]);return(0,v.useEffect)(()=>{if(!r)return;let e=setTimeout(()=>{f()},50);return()=>clearTimeout(e)},[r,e,b]),{cache:n,isPrefetching:o,getCachedOptions:m,prefetchAll:f,invalidateStep:h,clearCache:g}})({steps:(0,v.useMemo)(()=>rM(L.steps||[]),[L.steps]),flowState:L.flowState,enabled:!0}),eb=(0,v.useMemo)(()=>({steps:L.steps||[],schoolId:r,headline:n,params:i,getCachedOptions:eg,isPrefetching:ey,openModal:L.openModal,flowState:L.flowState,currentStep:L.currentStep,currentStepType:L.currentStepType,validationErrors:L.validationErrors,currentStepIndex:L.currentStepIndex,navigationHistory:L.navigationHistory,isSubmitting:L.isSubmitting,submissionError:L.submissionError,popupBlockedUrl:L.popupBlockedUrl??null,clearPopupBlocked:es,buttonText:D,placementId:l,eventContext:en,styleVariant:h,correlationId:et,isFullPageExp:f,currentStepData:Y,searchParamsOptions:A,formViewedCorrelationId:er,programFinderEnabled:k,handleTCPA:B,handleGoToStep:ee,handlePrevious:Q,handleRestart:X,updateFlowState:q,handleStepForward:eh,getCurrentStepData:G,stepNeedsValidation:W,getStepMetadataById:H,clearValidationErrors:z,setValidationErrors:V,forwardStepEventFirerRef:ec,formStartedFiredRef:ed,flowSessionId:K}),[l,r,n,i,h,f,eg,ey,L.steps,L.flowState,L.openModal,L.currentStep,L.currentStepType,L.currentStepIndex,L.validationErrors,L.navigationHistory,L.isSubmitting,L.submissionError,L.popupBlockedUrl,es,D,en,et,Y,A,er,k,B,ee,Q,X,q,eh,G,H,W,V,z,ec,ed,K]);return(0,b.jsx)(ax.Provider,{value:eb,children:a})},aS=()=>{let e=(0,v.useContext)(ax);return e||(console.warn("useDynamicExperienceContext must be used within a DynamicExperienceProvider"),{})};var aI=r(30837),aC=r(62755),aj=r(79662);function ak(e,t,r,n,i,o){let a=function(e){if(!e)return"";let t=Object.keys(e).sort(),r=[];for(let n of t){let t=e[n],i=Array.isArray(t)?t.join(","):String(t);r.push(`${encodeURIComponent(n)}=${encodeURIComponent(i)}`)}return r.join("&")}(r),l=void 0===n?"":aE(n),s=function(e){if(!e)return"";let t={};for(let r of Object.keys(e))t[r.toLowerCase()]=e[r];return aE(t)}(i);return`${e.toUpperCase()} ${t}?${a} ${l} h:${s} rp:${o??""}`}function aE(e){try{return function e(t,r){if(null===t)return"null";if("number"==typeof t)return Number.isFinite(t)?String(t):"null";if("boolean"==typeof t||"string"==typeof t)return JSON.stringify(t);if(void 0===t||"function"==typeof t)return"null";if("object"!=typeof t)return JSON.stringify(t)??"null";if(r.has(t))return'"<cycle>"';r.add(t);try{if(Array.isArray(t)){let n=t.map(t=>e(t,r));return`[${n.join(",")}]`}let n=Object.keys(t).sort().map(n=>`${JSON.stringify(n)}:${e(t[n],r)}`);return`{${n.join(",")}}`}finally{r.delete(t)}}(e,new WeakSet)}catch{return"<unserializable>"}}class aA extends Error{constructor(e){super(`DataSource dependency cycle detected: ${e.join(" -> ")} -> ${e[0]??""}`),this.name="DataSourceCycleError",this.cycle=e,Object.setPrototypeOf(this,aA.prototype)}}class aN extends Error{constructor(e,t){super(`DataSource "${e}" declares dependsOn "${t}", but no data source with that name exists.`),this.name="DataSourceMissingDependencyError",this.source=e,this.missing=t,Object.setPrototypeOf(this,aN.prototype)}}
1class aT extends Error{constructor(e,t){super(`DataSource endpoint "${t} ${e}" is not permitted by the data source allowlist.`),this.name="DataSourceEndpointNotAllowedError",this.endpoint=e,this.method=t,Object.setPrototypeOf(this,aT.prototype)}}class aO extends Error{constructor(e,t){super(e),this.name="DataSourceExtractionError",this.responsePath=t,Object.setPrototypeOf(this,aO.prototype)}}class aP extends Error{constructor(e,t,r,n,i){super(n??`DataSource "${r} ${t}" responded with HTTP ${e}`),this.name="DataSourceHttpError",this.status=e,this.endpoint=t,this.method=r,void 0!==i&&(this.code=i),Object.setPrototypeOf(this,aP.prototype)}}class aM extends Error{constructor(e,t,r,n){super(r??(void 0!==n?"The data source could not be reached.":`DataSource "${t} ${e}" could not be reached.`)),this.name="DataSourceTransportError",this.endpoint=e,this.method=t,void 0!==n&&(this.code=n),Object.setPrototypeOf(this,aM.prototype)}}class aR extends Error{constructor(e){super(`DataSource kind "${e}" is not supported.`),this.name="DataSourceUnknownKindError",this.kind=e,Object.setPrototypeOf(this,aR.prototype)}}class aL extends Error{constructor(){super("DataSource reportingModel fetch requires reportingQueryUrl on DataSourceManagerProvider."),this.name="DataSourceReportingNotConfiguredError",Object.setPrototypeOf(this,aL.prototype)}}class aF extends Error{constructor(){super("DataSource inference fetch requires inferenceUrl on DataSourceManagerProvider."),this.name="DataSourceInferenceNotConfiguredError",Object.setPrototypeOf(this,aF.prototype)}}let aU="_facets.",a$="_filterCounts.";function a_(e,t){return void 0===t||0===t.length?e:t.startsWith(aU)?aD(e,"_facets",t.slice(aU.length),t):t.startsWith(a$)?aD(e,"_filterCounts",t.slice(a$.length),t):n7(e,t.split(".").filter(e=>e.length>0).map(e=>({type:"key",name:e})))}function aD(e,t,r,n){if(0===r.length)throw new aO(`"${n}" must name a ${t} key (e.g. "${t}.degreeTypes").`,n);if(null===e||"object"!=typeof e)throw new aO(`Cannot extract "${n}" from a non-object response.`,n);let i=e[t];if(void 0===i)return;if(null===i||"object"!=typeof i)throw new aO(`Response field "${t}" must be an object.`,n);let o=i[r];if(void 0!==o){if(!Array.isArray(o))throw new aO(`"${t}.${r}" must be an array of { name, slug, count }.`,n);return o.map((e,i)=>(function(e,t,r,n,i){if(null===e||"object"!=typeof e)throw new aO(`"${t}.${r}[${n}]" must be an object.`,i);let o=e.name,a=e.slug,l=e.count;if("string"!=typeof o)throw new aO(`"${t}.${r}[${n}].name" must be a string.`,i);if("string"!=typeof a)throw new aO(`"${t}.${r}[${n}].slug" must be a string.`,i);if("number"!=typeof l)throw new aO(`"${t}.${r}[${n}].count" must be a number.`,i);return{name:o,slug:a,count:l}})(e,t,r,i,n))}}async function aY(e,t,r={}){var n,i,o,a,l,s;let c,d,u,p,f=(n=e,i=t,c=String(il(n.endpoint,i)),d=n.headers?il(n.headers,i):void 0,u=void 0!==n.body?il(n.body,i):void 0,p=n.query?il(n.query,i):void 0,{endpoint:c,method:n.method,headers:d,body:u,query:p}),m=r.coerceRequestBody?r.coerceRequestBody(f):f;if(!iY(m.endpoint,m.method,r.tenantId))return console.warn(`[DataSourceManager] blocked endpoint by allowlist: ${m.method} ${m.endpoint}`),{status:"error",request:m,error:new aT(m.endpoint,m.method)};if(!iz(m.endpoint,r.trustedOrigins))return console.warn(`[DataSourceManager] blocked endpoint by origin allowlist: ${m.method} ${m.endpoint} (trustedOrigins: ${r.trustedOrigins?.join(", ")??"<none configured>"})`),{status:"error",request:m,error:new aT(m.endpoint,m.method)};let h=e.errorStrategy?.timeout??1e4,g=e.errorStrategy?.retries??2,y=r.fetchImpl??globalThis.fetch,b=r.delay??az,v=Error("DataSource fetch never attempted â unreachable.");for(let t=0;t<=g;t++){if(r.signal?.aborted)return{status:"error",request:m,error:aV(r.signal.reason,"DataSource fetch aborted.")};try{let n=await aB(m,y,h,r.signal,r.setTimeoutImpl,r.clearTimeoutImpl);if(n.status>=400&&n.status<500)return{status:"error",request:m,error:new aP(n.status,m.endpoint,m.method)};if(n.status>=500){if(v=new aP(n.status,m.endpoint,m.method),t<g){await b((o=t,200*2**o),r.signal);continue}return{status:"error",request:m,error:v}}let i=await n.json(),l=r.coerceResponse?r.coerceResponse(i,m,e):i,s=a_(l,e.responsePath);if(a=s,null==a||(Array.isArray(a)?0===a.length:"object"==typeof a&&0===Object.keys(a).length))return{status:"empty",request:m,data:s};return{status:"resolved",request:m,data:s}}catch(e){if(v=aV(e,"DataSource fetch failed."),null!==(l=e)&&"object"==typeof l&&"AbortError"===l.name||r.signal?.aborted)return{status:"error",request:m,error:v};if(t<g){try{await b((s=t,200*2**s),r.signal)}catch{return{status:"error",request:m,error:v}}continue}break}}return{status:"error",request:m,error:v}}async function aB(e,t,r,n,i=setTimeout,o=clearTimeout){let a=new AbortController,l=()=>{a.abort(n?.reason)};n&&(n.aborted?a.abort(n.reason):n.addEventListener("abort",l,{once:!0}));let s=i(()=>{a.abort(Error("DataSource fetch timed out."))},r);try{let r=function(e,t){if(!t)return e;let r=Object.keys(t);if(0===r.length)return e;let n=[];for(let e of r){let r=t[e],i=Array.isArray(r)?r.join(","):String(r);n.push(`${encodeURIComponent(e)}=${encodeURIComponent(i)}`)}let i=e.includes("?")?"&":"?";return`${e}${i}${n.join("&")}`}(e.endpoint,e.query),n={method:e.method,headers:e.headers,signal:a.signal};return"GET"!==e.method&&void 0!==e.body&&(n.body=JSON.stringify(e.body),n.headers={"content-type":"application/json",...e.headers??{}}),await t(r,n)}finally{o(s),n&&n.removeEventListener("abort",l)}}function az(e,t){return new Promise((r,n)=>{if(t?.aborted)return void n(aV(t.reason,"DataSource fetch aborted during backoff."));let i=setTimeout(()=>{a(),r()},e),o=()=>{clearTimeout(i),a(),n(aV(t?.reason,"DataSource fetch aborted during backoff."))},a=()=>{t?.removeEventListener("abort",o)};t?.addEventListener("abort",o,{once:!0})})}function aV(e,t){return e instanceof Error?e:"string"==typeof e?Error(e):Error(t)}async function aH(e,t,r={}){let n=r.inferenceUrl?.trim();if(!n)return{status:"error",request:{endpoint:"",method:"POST"},error:new aF};let i=e.headers?il(e.headers,t):void 0,o=void 0!==e.body?il(e.body,t):void 0,a={endpoint:n,method:"POST",headers:{...i??{},"content-type":"application/json"},body:o};if(r.coerceRequestBody&&(a=r.coerceRequestBody(a)),!iY(a.endpoint,a.method,r.tenantId))return console.warn(`[DataSourceManager] blocked inference endpoint by allowlist: ${a.method} ${a.endpoint}`),{status:"error",request:a,error:new aT(a.endpoint,a.method)};if(!iz(a.endpoint,r.trustedOrigins))return console.warn(`[DataSourceManager] blocked inference endpoint by origin allowlist: ${a.method} ${a.endpoint}`),{status:"error",request:a,error:new aT(a.endpoint,a.method)};let l=e.errorStrategy?.timeout??3e4,s=e.errorStrategy?.retries??0,c=r.fetchImpl??globalThis.fetch,d=r.delay??aG,u=Error("Inference fetch never attempted â unreachable.");for(let t=0;t<=s;t++){var p,f,m,h;if(r.signal?.aborted)return{status:"error",request:a,error:aW(r.signal.reason,"Inference fetch aborted.")};try{let n=await aq(a,c,l,r.signal,r.setTimeoutImpl,r.clearTimeoutImpl);if(n.status>=400&&n.status<500)return{status:"error",request:a,error:new aP(n.status,a.endpoint,a.method)};if(n.status>=500){if(u=new aP(n.status,a.endpoint,a.method),t<s){await d((p=t,200*2**p),r.signal);continue}return{status:"error",request:a,error:u}}let i=await n.json(),o=r.coerceResponse?r.coerceResponse(i,a):i,m=a_(o,e.responsePath);if(f=m,null==f||(Array.isArray(f)?0===f.length:"object"==typeof f&&0===Object.keys(f).length))return{status:"empty",request:a,data:m};return{status:"resolved",request:a,data:m}}catch(e){if(u=aW(e,"Inference fetch failed."),null!==(m=e)&&"object"==typeof m&&"AbortError"===m.name||r.signal?.aborted)return{status:"error",request:a,error:u};if(t<s){try{await d((h=t,200*2**h),r.signal)}catch{return{status:"error",request:a,error:u}}continue}break}}return{status:"error",request:a,error:u}}async function aq(e,t,r,n,i=setTimeout,o=clearTimeout){let a=new AbortController,l=()=>{a.abort(n?.reason)};n&&(n.aborted?a.abort(n.reason):n.addEventListener("abort",l,{once:!0}));let s=i(()=>{a.abort(Error("Inference fetch timed out."))},r);try{let r={method:e.method,headers:e.headers,signal:a.signal};return void 0!==e.body&&(r.body=JSON.stringify(e.body)),await t(e.endpoint,r)}finally{o(s),n&&n.removeEventListener("abort",l)}}function aG(e,t){return new Promise((r,n)=>{if(t?.aborted)return void n(aW(t.reason,"Inference fetch aborted during backoff."));let i=setTimeout(()=>{a(),r()},e),o=()=>{clearTimeout(i),a(),n(aW(t?.reason,"Inference fetch aborted during backoff."))},a=()=>{t?.removeEventListener("abort",o)};t?.addEventListener("abort",o,{once:!0})})}function aW(e,t){return e instanceof Error?e:"string"==typeof e?Error(e):Error(t)}function aQ(e,t){return{modelId:String(il(e.modelId,t)),metrics:aK(e.metrics,t),...e.dimensions?.length?{dimensions:aK(e.dimensions,t)}:{},...function(e,t){let r={};if(e.segments?.length&&(r.segments=aK(e.segments,t)),e.filters?.length&&(r.filters=e.filters.map(e=>il(e,t))),e.having?.length){let n=e.having.map(e=>il(e,t)).filter(e=>!function e(t){return Array.isArray(t)?0===t.length||t.some(e):"str
1ing"==typeof t?0===t.trim().length:null==t}(e?.value));n.length>0&&(r.having=n)}if(e.order?.length&&(r.order=e.order.map(e=>il(e,t))),void 0!==e.limit){let n=il(e.limit,t);"number"==typeof n&&Number.isFinite(n)&&(r.limit=n)}if(e.context&&Object.keys(e.context).length>0){let n=il(e.context,t),i={};for(let[e,t]of Object.entries(n))"string"==typeof t||"number"==typeof t?i[e]=t:null!=t&&(i[e]=String(t));Object.keys(i).length>0&&(r.context=i)}return r}(e,t)}}function aK(e,t){return e.map(e=>String(il(e,t)))}let aJ="SERVICE_UNAVAILABLE";async function aX(e,t,r={}){let n=r.reportingQueryUrl?.trim();if(!n)return{status:"error",request:{endpoint:"",method:"POST"},error:new aL};let i={endpoint:n,method:"POST",headers:{"content-type":"application/json"},body:aQ(e,t)};if(r.coerceRequestBody&&(i=r.coerceRequestBody(i)),!iY(i.endpoint,i.method,r.tenantId))return console.warn(`[DataSourceManager] blocked reporting endpoint by allowlist: ${i.method} ${i.endpoint}`),{status:"error",request:i,error:new aT(i.endpoint,i.method)};if(!iz(i.endpoint,r.trustedOrigins))return console.warn(`[DataSourceManager] blocked reporting endpoint by origin allowlist: ${i.method} ${i.endpoint}`),{status:"error",request:i,error:new aT(i.endpoint,i.method)};let o=e.errorStrategy?.timeout??1e4,a=e.errorStrategy?.retries??2,l=r.fetchImpl??globalThis.fetch,s=r.delay??a1,c=Error("ReportingModel fetch never attempted â unreachable.");for(let t=0;t<=a;t++){var d,u,p;if(r.signal?.aborted)return{status:"error",request:i,error:a2(r.signal.reason,"ReportingModel fetch aborted.")};let n=!1;try{let p=await a0(i,l,o,r.signal,r.setTimeoutImpl,r.clearTimeoutImpl);if(n=!0,p.status>=400&&p.status<500)return{status:"error",request:i,error:await aZ(p,i)};if(p.status>=500){if(c=new aP(p.status,i.endpoint,i.method,void 0,aJ),t<a){await s((d=t,200*2**d),r.signal);continue}return{status:"error",request:i,error:c}}let f=await p.json(),m=r.coerceResponse?r.coerceResponse(f,i):f,h=a_(m,e.responsePath);if(u=h,null==u||(Array.isArray(u)?0===u.length:"object"==typeof u&&0===Object.keys(u).length))return{status:"empty",request:i,data:h};return{status:"resolved",request:i,data:h}}catch(o){let e=a2(o,"ReportingModel fetch failed.");if(r.signal?.aborted)return{status:"error",request:i,error:c=e};if(c=n?e:new aM(i.endpoint,i.method,void 0,aJ),t<a){try{await s((p=t,200*2**p),r.signal)}catch{return{status:"error",request:i,error:c}}continue}break}}return{status:"error",request:i,error:c}}async function aZ(e,t){let r,n=await e.text();try{r=JSON.parse(n)}catch{return new aP(e.status,t.endpoint,t.method,n||e.statusText,aJ)}if(function(e){if("object"!=typeof e||null===e||"object"!=typeof e.error||null===e.error)return!1;let t=e.error;return"string"==typeof t.code&&"string"==typeof t.message}(r)){let{code:n,message:i}=r.error;return new aP(e.status,t.endpoint,t.method,i,n)}return new aP(e.status,t.endpoint,t.method,n||e.statusText,aJ)}async function a0(e,t,r,n,i=setTimeout,o=clearTimeout){let a=new AbortController,l=()=>{a.abort(n?.reason)};n&&(n.aborted?a.abort(n.reason):n.addEventListener("abort",l,{once:!0}));let s=i(()=>{a.abort(Error("ReportingModel fetch timed out."))},r);try{return await t(e.endpoint,{method:e.method,headers:e.headers,body:JSON.stringify(e.body),signal:a.signal})}finally{o(s),n&&n.removeEventListener("abort",l)}}function a1(e,t){return new Promise((r,n)=>{if(t?.aborted)return void n(a2(t.reason,"ReportingModel fetch aborted during backoff."));let i=setTimeout(()=>{a(),r()},e),o=()=>{clearTimeout(i),a(),n(a2(t?.reason,"ReportingModel fetch aborted during backoff."))},a=()=>{t?.removeEventListener("abort",o)};t?.addEventListener("abort",o,{once:!0})})}function a2(e,t){return e instanceof Error?e:"string"==typeof e?Error(e):Error(t)}async function a4(e,t,r={}){if(!i2(e)){let t=String(e.kind??"");return{status:"error",request:{endpoint:iZ(e)?e.endpoint:"",method:iZ(e)?e.method:"GET"},error:new aR(t)}}return i0(e)?aX(e,t,r):i1(e)?aH(e,t,r):aY(e,t,r)}let a3=["offerings","offeringsService"];function a5(e){if(!e)return"";if(e.startsWith("/"))return e.split("?")[0]??"";try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return"";return t.pathname}catch{return""}}function a6(e){if("POST"!==e.method)return!1;let t=a5(e.endpoint);if(!t)return!1;for(let e of a3)for(let r of iL[e])if(r.methods.some(e=>"POST"===e)&&iB(t,r.pattern))return!0;return!1}function a8(e,t){return Object.prototype.hasOwnProperty.call(e,t)}let a9=new Set(["context"]),a7=(0,v.createContext)(void 0);function le(e,t){switch(t.type){case"reset":{let e={};for(let r of t.names){let n=t.missingBySource.get(r);void 0!==n?e[r]={data:void 0,status:"error",error:new aN(r,n)}:e[r]={data:void 0,status:"pending"}}return e}case"reconcile":{let r={};for(let n of t.names){let i=t.missingBySource.get(n);void 0!==i?r[n]={data:void 0,status:"error",error:new aN(n,i)}:t.refetch.has(n)?r[n]={data:void 0,status:"pending"}:r[n]=e[n]??{data:void 0,status:"pending"}}if(Object.keys(e).length===t.names.length){let n=!0;for(let i of t.names)if(e[i]!==r[i]){n=!1;break}if(n)return e}return r}case"pending":return{...e,[t.name]:{data:void 0,status:"pending",lastUpdatedAt:e[t.name]?.lastUpdatedAt}};case"resolved":return{...e,[t.name]:{data:t.data,status:"resolved",lastUpdatedAt:t.at}};case"empty":return{...e,[t.name]:{data:t.data,status:"empty",lastUpdatedAt:t.at}};case"error":return{...e,[t.name]:{data:void 0,status:"error",error:t.error,lastUpdatedAt:e[t.name]?.lastUpdatedAt}};default:return e}}function lt(e,t){switch(t.type){case"set":if(e[t.key]===t.value)return e;return{...e,[t.key]:t.value};case"replace":return t.next;default:return e}}
1let lr=({dataSources:e,flowContext:t,onFormStateChange:r,initialFormState:n,trustedOrigins:i,tenantId:o,coerceRequestBody:a,coerceResponse:l,reportingQueryUrl:s,inferenceUrl:c,children:d})=>{let u=(0,v.useMemo)(()=>aE(e),[e]),{ordered:p,missingDependencies:f}=(0,v.useMemo)(()=>(function(e){let t=Object.keys(e);if(0===t.length)return{ordered:[],missingDependencies:[]};let r=new Map,n=new Map,i=[],o=new Set;for(let e of t)r.set(e,0),n.set(e,[]);for(let a of t)for(let t of e[a].dependsOn??[]){if(!r.has(t)){o.has(a)||(o.add(a),i.push({source:a,missing:t}));continue}r.set(a,(r.get(a)??0)+1);let e=n.get(t);e&&e.push(a)}let a=[];for(let e of t)(r.get(e)??0)===0&&a.push(e);let l=[];for(;a.length>0;){let e=a.shift();if(void 0===e)break;for(let t of(l.push(e),n.get(e)??[])){let e=(r.get(t)??0)-1;r.set(t,e),0===e&&a.push(t)}}if(l.length!==t.length)throw new aA(function(e,t){let r=new Set(t),n=Object.keys(e).filter(e=>!r.has(e));for(let t of n){let n=function e(t,r,n,i,o){if(i.includes(t)){let e=i.indexOf(t);return i.slice(e)}if(o.has(t))return null;o.add(t),i.push(t);let a=r[t];for(let t of a?.dependsOn??[]){if(n.has(t))continue;let a=e(t,r,n,i,o);if(null!==a)return a}return i.pop(),null}(t,e,r,[],new Set);if(null!==n)return n}return n}(e,l));return{ordered:l,missingDependencies:i}})(e),[u]),m=(0,v.useMemo)(()=>{let e=new Map;for(let{source:t,missing:r}of f)e.has(t)||e.set(t,r);return e},[f]),[h,g]=(0,v.useReducer)(le,{orderedNames:p,missingBySource:m},({orderedNames:e,missingBySource:t})=>{let r={};for(let n of e){let e=t.get(n);void 0!==e?r[n]={data:void 0,status:"error",error:new aN(n,e)}:r[n]={data:void 0,status:"pending"}}return r}),[y,x]=(0,v.useReducer)(lt,n??{},e=>({...e})),w=(0,v.useRef)(null);w.current||(w.current=function(e={}){let t=new Map,r=e.now??Date.now,n=e=>{let n=t.get(e);if(n)return n.expiresAt<=r()?void t.delete(e):n};return{get:e=>n(e)?.data,getEntry:e=>n(e),set(e,n,i){if(!Number.isFinite(i)||i<=0)return;let o=r();t.set(e,{data:n,expiresAt:o+i,storedAt:o})},delete(e){t.delete(e)},clear(){t.clear()},size:()=>t.size}}());let S=(0,v.useRef)(new Map),I=(0,v.useRef)(y),C=(0,v.useRef)(t),j=(0,v.useRef)(!0),k=(0,v.useRef)(r),E=(0,v.useRef)(e),A=(0,v.useRef)(i),N=(0,v.useRef)(o),T=(0,v.useRef)(a),O=(0,v.useRef)(l),P=(0,v.useRef)(s),M=(0,v.useRef)(c),R=(0,v.useRef)(m),L=(0,v.useRef)(null),F=(0,v.useRef)(new Map),U=(0,v.useRef)(!1),$=(0,v.useRef)(new Map);I.current=y,C.current=t,k.current=r,E.current=e,A.current=i,N.current=o,T.current=a,O.current=l,P.current=s,M.current=c,R.current=m;let _=(0,v.useRef)({}),D=(0,v.useCallback)(async(e,t)=>{var r,n,i,o,a,l,s,c;let d,u,p,f;if(R.current.has(e))return;let m=E.current[e];if(!m)return;let h=null!=t&&"body"in t?{...m,body:t.body}:m;if(!t?.force&&i1(h)&&(h.trigger??"auto")==="explicit")return;let y=S.current.get(e);y&&y.abort(Error("DataSource re-run: superseded by newer run."));let b=new AbortController;S.current.set(e,b);let v=function(e,t,r){for(let e of Object.keys(r))li.has(e)&&!lo.has(e)&&(lo.add(e),console.warn(`[DataSourceManager] data source name "${e}" shadows the built-in interpolation root and will be ignored. Rename the source.`));return{...r,context:e,formState:t}}(C.current,I.current,_.current);if(j.current&&g({type:"pending",name:e}),d=[...i0(r=h)||i1(r)?i4(r):[r.endpoint,r.headers,r.query]],(u=!iZ(n=h)||!function(e){if(!iZ(e)||"POST"!==e.method)return!1;let t=function(e){if(!e)return"";if(e.startsWith("/"))return e.split("?")[0]??"";try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return"";return t.pathname}catch{return""}}(e.endpoint);return t===rX||t===rJ}(n)||null===n.body||"object"!=typeof n.body||Array.isArray(n.body)?[]:[n.body.geolocation]).length>0&&d.push(...u),d.some(e=>ia(e))&&d.some(e=>(function e(t,r){return"string"==typeof t?function(e,t){let r;try{r=n5(e)}catch{return!1}for(let e of r.segments){if("expression"!==e.type||"path"!==e.kind)continue;let r=e.segments[0];if(!(void 0===r||"key"!==r.type||a9.has(r.name))){var n;if(null==(n=n7(t,e.segments))||"string"==typeof n&&0===n.trim().length)return!0}}return!1}(t,r):null!==t&&"object"==typeof t&&(Array.isArray(t)?t.some(t=>e(t,r)):Object.values(t).some(t=>e(t,r)))})(e,v)))return void delete _.current[e];let x=function(e){let t=e.trafficSource;if("string"==typeof t&&t.length>0)return t;let r=rC(window.location?.href??"");return"string"==typeof r&&r.length>0?r:void 0}(C.current),k=(p=window.location?.href??"").length>0?p:void 0,L=(l=(o=(i=function(e,t,r,n){var i,o;if(i0(e))return ak("POST",r?.trim()??"",void 0,aQ(e,t),void 0,e.responsePath);if(i1(e))return ak("POST",n?.trim()??"",void 0,void 0!==e.body?il(e.body,t):void 0,e.headers?il(e.headers,t):void 0,e.responsePath);if(!i2(e))return ak("GET",`unknown-kind://${iX(e)}`,void 0,e,void 0,e.responsePath);let{interpolated:a}=(i=e,o=t,iZ(i)?{interpolated:{endpoint:String(il(i.endpoint,o)),method:i.method,headers:i.headers?il(i.headers,o):void 0,body:void 0!==i.body?il(i.body,o):void 0,query:i.query?il(i.query,o):void 0}}:{interpolated:{endpoint:"",method:"GET"}});return ak(a.method,a.endpoint,a.query,a.body,a.headers,e.responsePath)}(h,v,P.current,M.current),(f=la({flowType:C.current.flowType}))?`${i}:flowType=${f}`:i),(a=x)?`${o}:trafficSource=${a}`:o),(s=k)?`${l}:presentationUrl=${s}`:l),U=w.current;if(h.cache?.ttlMs?F.current.set(e,L):F.current.delete(e),!t?.force&&U&&h.cache?.ttlMs){let t=U.getEntry(L),r=t?.data;if(void 0!==t&&void 0!==r){if(_.current[e]=r,!j.current)return;null==(c=r)||(Array.isArray(c)?0===c.length:"object"==typeof c&&0===Object.keys(c).length)?g({type:"empty",name:e,data:r,at:t.storedAt}):g({type:"resolved",name:e,data:r,at:t.storedAt});return}}let $=la(C.current),D=await a4(h,v,{signal:b.signal,trustedOrigins:A.current,tenantId:N.current,reportingQueryUrl:P.current,inferenceUrl:M.current,coerceRequestBody:e=>{var t=function(e,t){if(!t||!a6(e))return e;let r=e.body;return null==r?{...e,body:{trafficSource:t}}:"object"!=typeof r||Array.isArray(r)?e:{...e,body:{...r,trafficSource:t}}}(function(e,t){if(!t||!a6(e))return e;let r=e.body;return null==r?{...e,body:{flowType:t}}:"object"!=typeof r||Array.isArray(r)?e:{...e,body:{...r,flowType:t}}}(T.current?.(e)??e,$),x);if(!k||!(a6(t)&&"/v1/offerings/search"===a5(t.endpoint)))return t;let r=t.body;return null==r?{...t,body:{presentationUrl:k}}:"object"!=typeof r||Array.isArray(r)?t:{...t,body:{...r,presentationUrl:k}}},coerceResponse:O.current});if(!j.current||b.signal.aborted)return;"resolved"===D.status||"empty"===D.status?(U&&h.cache?.ttlMs&&U.set(L,D.data,h.cache.ttlMs),_.current[e]=D.data):_.current[e]=void 0;let Y=Date.now();switch(D.status){case"resolved":g({type:"resolved",name:e,data:D.data,at:Y});break;case"empty":g({type:"empty",name:e,data:D.data,at:Y});break;case"error":g({type:"error",name:e,error:D.error??Error(`DataSource "${e}" failed without a cause.`)})}},[]),Y=(0,v.useCallback)(async(e,t)=>{for(let r of e){if(!j.current)return;await D(r,t)}},[D]);(0,v.useEffect)(()=>{j.current=!0;let e=S.current,t=E.current,r=new Map;for(let e of p){let n=m.get(e);r.set(e,void 0!==n?`\u0000missing:${n}`:aE(t[e]))}if(!U.current){U.current=!0,_.current={}
1,F.current.clear(),$.current=r,g({type:"reset",names:p,missingBySource:m}),Y(p);return}let n=$.current,i=new Set(p),o=new Set,a=(t,r)=>{let n=e.get(t);n&&(n.abort(Error(r)),e.delete(t));let i=F.current.get(t);void 0!==i&&(w.current?.delete(i),F.current.delete(t)),delete _.current[t]},l=!1;n.forEach((e,t)=>{i.has(t)||(a(t,"DataSource removed from declarations."),l=!0)});let s=!1;for(let e of p)n.get(e)!==r.get(e)&&(s=!0,a(e,"DataSource declaration changed."),void 0===m.get(e)&&o.add(e));$.current=r,(l||s)&&(g({type:"reconcile",names:p,refetch:o,missingBySource:m}),o.size>0&&Y(p.filter(e=>o.has(e))))},[p,m,Y]),(0,v.useEffect)(()=>{let e=S.current;return()=>{j.current=!1,e.forEach(e=>{e.abort(Error("DataSourceManager unmounted."))}),e.clear(),w.current?.clear(),F.current.clear(),_.current={},$.current=new Map,U.current=!1}},[]);let B=(0,v.useCallback)((e,t)=>{let r=I.current[e];if(x({type:"set",key:e,value:t}),r===t)return;let n={...I.current,[e]:t};I.current=n,L.current=n;let i=function(e,t,r){let n=new Set;for(let i of t){let t=e[i];t&&function(e,t){let r=`formState.${t}`,n=i4(e);return!!n.some(e=>(function e(t,r){return"string"==typeof t?t.includes(r):null!==t&&"object"==typeof t&&(Array.isArray(t)?t.some(t=>e(t,r)):Object.values(t).some(t=>e(t,r)))})(e,r))&&n.some(e=>ia(e))}(t,r)&&n.add(i)}let i=new Set(n),o=!0;for(;o;)for(let r of(o=!1,t))if(!i.has(r)){for(let t of e[r]?.dependsOn??[])if(i.has(t)){i.add(r),o=!0;break}}return t.filter(e=>i.has(e))}(E.current,p,e);i.length>0&&Y(i)},[p,Y]),z=(0,v.useCallback)(async(e,t)=>{if(!Object.prototype.hasOwnProperty.call(E.current,e))return;let r=t?.cascade===!0?function(e,t,r){if(!a8(e,r))return[];let n=new Set,i=[r];for(;i.length>0;){let t=i.pop();if(void 0===t)break;let r=e[t];for(let t of r?.dependsOn??[])a8(e,t)&&(n.has(t)||(n.add(t),i.push(t)))}let o=new Set,a=!0;for(;a;)for(let n of(a=!1,t))if(!(n===r||o.has(n))){for(let t of e[n]?.dependsOn??[])if(t===r||o.has(t)){o.add(n),a=!0;break}}let l=new Set([r]);return n.forEach(e=>{l.add(e)}),o.forEach(e=>{l.add(e)}),t.filter(e=>l.has(e))}(E.current,p,e):[e];if(0!==r.length){if(!(null!=t&&"body"in t))return void await Y(r,{force:!0});for(let n of r){if(!j.current)return;await D(n,{force:!0,...n===e?{body:t.body}:{}})}}},[p,D,Y]),V=(0,v.useCallback)(async()=>{await Y(p,{force:!0})},[p,Y]),H=(0,v.useCallback)(async(e,t)=>{let r=t?.includeDependencies?function(e,t,r){let n=t=>Object.prototype.hasOwnProperty.call(e,t),i=new Set,o=r.filter(n);for(;o.length>0;){let t=o.pop();if(!(void 0===t||i.has(t)))for(let r of(i.add(t),e[t]?.dependsOn??[]))n(r)&&!i.has(r)&&o.push(r)}return 0===i.size?[]:t.filter(e=>i.has(e))}(E.current,p,e):e,n=function(e,t,r){let n=new Set(r.filter(t=>Object.prototype.hasOwnProperty.call(e,t)));if(0===n.size)return[];let i=new Map;for(let r of t){if(!n.has(r))continue;let t=0;for(let n of e[r]?.dependsOn??[]){let e=i.get(n);void 0!==e&&(t=Math.max(t,e+1))}i.set(r,t)}let o=[];for(let e of t){let t=i.get(e);if(void 0===t)continue;let r=o[t];void 0===r?o[t]=[e]:r.push(e)}return o}(E.current,p,r);if(0===n.length)return;let i=t?.concurrency??5,o=Number.isFinite(i)?Math.max(1,Math.trunc(i)):5;for(let e of n){if(!j.current)return;let t=0,r=Array.from({length:Math.min(o,e.length)},async()=>{for(;t<e.length;){let r=e[t];if(t+=1,void 0===r||!j.current)return;await D(r,{force:!0})}});await Promise.all(r)}},[p,D]),q=(0,v.useCallback)(e=>{let t=F.current.get(e);void 0!==t&&(w.current?.delete(t),F.current.delete(e))},[]),G=(0,v.useCallback)(e=>{if(0===e.length)return[];let t=new Set(e);return p.filter(e=>E.current[e]?.tags?.some(e=>t.has(e)))},[p]),W=(0,v.useCallback)(async(e,t)=>{await H(G(e),t)},[G,H]),Q=(0,v.useCallback)(e=>{for(let t of G(e))q(t)},[q,G]);(0,v.useEffect)(()=>{let e=L.current;null!==e&&k.current&&(L.current=null,k.current(e))},[y]);let K=(0,v.useMemo)(()=>({sources:h,formState:y,flowContext:t,getSource:e=>h[e],updateFormState:B,refetchSource:z,refetchAll:V,refetchMany:H,invalidate:q,namesByTags:G,refetchByTags:W,invalidateByTags:Q}),[h,y,t,B,z,V,H,q,G,W,Q]);return(0,b.jsx)(a7.Provider,{value:K,children:d})};function ln(){let e=(0,v.useContext)(a7);if(void 0===e)throw Error("useDataSourceManager must be used within a <DataSourceManagerProvider>.");return e}let li=new Set(["context","formState"]),lo=new Set;function la(e){let t=e.flowType;return"string"==typeof t&&t.length>0?t:void 0}let ll="11a86905-d823-4fd9-921e-662d9937cb8e",ls=Object.freeze({dispatch(e,t){console.warn(`[binding-enhancer] No ActionDispatcher provided; dropping dispatch("${e}")`,t)},has:()=>!1}),lc=(0,v.createContext)(ls);function ld(){return(0,v.useContext)(lc)}let lu=B.Ik({startDate:B.Yj(),showDateOn:B.Yj(),registerDate:B.Yj()}),lp=B.Ik({primary:B.Yj(),secondary:B.Yj(),cta:B.Yj(),formBackgroun
1d:B.Yj(),heroGradient:B.Yj()}),lf=B.Ik({address:B.Yj(),address2:B.Yj(),city:B.Yj(),stateId:B.ai(),state:B.Yj(),zipcode:B.Yj()}),lm=B.Ik({title:B.Yj(),description:B.Yj(),icon:B.Yj().optional()}),lh=B.Ik({title:B.Yj(),image:B.Yj(),text:B.Yj().optional(),list:B.YO(B.Ik({text:B.Yj()}))}),lg=B.Ik({voyagerSpotlightSchoolCardHeader:B.Yj(),voyagerSpotlightImage:B.Yj(),header:B.Yj(),blocks:B.YO(lh)}),ly=B.Ik({description:B.Yj(),confirmation:B.Ik({meta:B.Ik({shortIntro:B.Yj().optional(),text:B.Yj().optional(),prepareCard:B.Ik({title:B.Yj(),text:B.Yj()}).optional()})}),snippet:B.Yj(),summary:B.Yj(),tcpa:B.Yj(),valueProps:B.YO(lm),spotlight:lg.optional()}),lb=B.Ik({undergrad:B.YO(lu),grad:B.YO(lu)}),lv=B.Ik({providerProgramIdArray:B.KC([B.YO(B.Yj()),B.Yj()]).transform(e=>Array.isArray(e)?e:e.split(",").map(e=>e.trim()).filter(Boolean)).optional(),tcpa:B.Yj().optional()}),lx=B.Ik({flow:B.Yj(),programFlow:B.YO(lv),formName:B.Yj(),formDatesLabel:B.Yj(),showNextStartDate:B.zM()}),lw=B.Ik({requiredProgramMetadata:B.YO(B.Ik({name:B.Yj(),type:B.Yj()})).nullable(),metadata:B.bz()}),lS=B.Ik({logo:B.Yj(),hero:B.Yj()}),lI=B.Ik({organizationId:B.ai(),name:B.Yj(),mobiusIdToken:B.Yj(),tcpaSecondParagraph:B.Yj().optional(),slug:B.Yj(),homepage:B.Yj().optional(),tags:B.g1(B.bz()).optional(),themeColors:lp,citationText:B.Yj().optional(),sdbSchoolId:B.Yj(),priority:B.ai(),location:lf,content:ly,formDates:lb,formCustomizations:lx,partnerMetadata:lw,images:lS,additional:B.bz()});B.Ik({schoolIds:B.YO(B.ai()),isPreview:B.zM().optional(),version:B.Yj().optional()});let lC=B.Ik({data:B.YO(lI)});B.Ik({edudirectIds:B.YO(B.ai())});let lj=B.Ik({edudirectId:B.ai(),organizationId:B.Yj()}),lk=B.Ik({data:B.YO(lj)});class lE{constructor(e){this.cache=new Map;const t={baseUrl:"",defaultHeaders:{},cache:new Map,newRelic:{noticeError:(e,t)=>{console.error("Error in OrganizationServiceApiClient: noticeError",e,t)}},strictValidation:!1};this.config={...t,...e},this.cache=this.config.cache??new Map}getApiName(){return"organization-service"}async post(e,t,r={cacheEnabled:!1}){let n=JSON.stringify(t),i=`${this.config.baseUrl}${e}`;if(r.bustCache&&this.bustCache(i),this.shouldUseCache(i,r)){let e=this.cache.get(i);if(e)return e.clone()}let o=await fetch(`${this.config.baseUrl}${e}`,{method:"POST",body:n,...r,headers:{"Content-Type":"application/json",...r.headers}});return r.cacheEnabled&&o.ok&&this.cache.set(i,o.clone()),o}bustCache(e){this.cache.delete(e)}shouldUseCache(e,t){return!!t.cacheEnabled&&this.cache.has(e)}hasError(e){return e.status>=400}async toJson(e,t){let r=await e.json(),n=t.safeParse(r);if(!n.success){let e=Error(`Invalid response for ${this.getApiName()}`);if(console.error(e),console.log(this.buildErrorMessage(n.error.errors)),this.config.strictValidation)throw e;return r}return n.data}buildErrorMessage(e){return e.map(e=>`Path: ${e.path.join(".")}, Message: ${e.message}`)}async postMarketingLookup(e,t,r={cacheEnabled:!1}){let n={};t&&(n["User-Agent"]=t);let i=await this.post("/v1/marketing/lookup",e,{...r,headers:{...r.headers,...n}});return this.hasError(i)&&console.error(`Failed to request marketing lookup for schools: ${e.schoolIds.join(", ")}`),await this.toJson(i,lC)}async resolveExternalIds(e,t={cacheEnabled:!1}){let r=await this.post("/v1/organizations/resolve-edudirect-ids",e,t);return this.hasError(r)&&console.error(`Failed to resolve external ids: ${e.edudirectIds.join(", ")}`),this.toJson(r,lk)}}let lA=new Map,lN=new Map,lT=async(e,t)=>{let r=Array.from(new Set(e)).filter(e=>Number.isFinite(e));if(!r.length||!t)return[];let n=r.filter(e=>!lN.has(e));if(n.length)try{let e,{data:r}=await (!(e=lA.get(t))&&(e=new lE({baseUrl:t}),lA.set(t,e)),e).resolveExternalIds({edudirectIds:n});for(let e of r)lN.set(e.edudirectId,e.organizationId)}catch(e){return console.error("Failed to resolve organization ids:",e),[]}let i=[];for(let e of r){let t=lN.get(e);t&&!i.includes(t)&&i.push(t)}return i},lO=(e=1)=>{let[t,r]=(0,v.useState)([]),[n,i]=(0,v.useState)([]),o=(0,v.useRef)(null),a=(0,v.useRef)(!1),l=(0,v.useCallback)(()=>{a.current=!0,o.current&&(o.current.disconnect(),o.current=null)},[]);return(0,v.useEffect)(()=>
1{if(!a.current)return o.current&&(o.current.disconnect(),o.current=null),o.current=new((n[0]?.ownerDocument?.defaultView??window).IntersectionObserver??window.IntersectionObserver)(e=>r(e),{root:null,rootMargin:"0px",threshold:e}),n.forEach(e=>o.current?.observe(e)),()=>o.current?.disconnect()},[n,e]),{setNodes:i,entries:t,disconnect:l}},lP=new Set,lM=(e,t)=>{let r=t.flowId??t.dslConfigId??"-",n=t.stepId??"-",i=`entryPoint:${e}:${r}:${n}`;return t.flowSessionId?`${i}:${t.flowSessionId}`:i},lR=e=>{lP.add(e)},lL=({sessionId:e,configId:t,stepIndex:r,nodeId:n})=>`${e??"no-session"}::${t??"no-cfg"}::${r??"no-idx"}::${n}`,lF=(0,v.createContext)(void 0),lU=({dslConfigId:e,pageCategory:t,children:r})=>{let n=aS(),i=av(),o=n?.eventContext,a=n?.flowSessionId,l=(0,v.useMemo)(()=>({page:o??{},dedupScope:{sessionId:a??"",configId:e??""},policy:"flow-defaults"}),[o,a,e]),s=(0,v.useMemo)(()=>(({currentStep:e,currentStepIndex:t,dslConfigId:r,pageCategory:n})=>({stepId:e?.id??"",stepIndex:"number"==typeof t?t:0,stepType:e?.type??"",dslConfigId:r,pageCategory:n??"dexp-step"}))({currentStep:n?.currentStep,currentStepIndex:n?.currentStepIndex,dslConfigId:e,pageCategory:t}),[n?.currentStep,n?.currentStepIndex,e,t]),{triggerElementLoadedEvent:c,triggerProductLoadedEvent:d,triggerStepElementLoadedEvent:u,triggerStepElementViewedEvent:p,triggerElementViewedEvent:f,triggerElementClickedEvent:m,triggerProductClickedEvent:h,triggerProductViewedEvent:g,triggerFieldEvents:y,triggerFormStartedEvent:x,triggerFormContinuedEvent:w,triggerFormViewedEvent:S,triggerFormEvents:I}=i,C=(0,v.useMemo)(()=>({triggerElementLoadedEvent:c,triggerProductLoadedEvent:d,triggerStepElementLoadedEvent:u,triggerStepElementViewedEvent:p,triggerElementViewedEvent:f,triggerElementClickedEvent:m,triggerProductClickedEvent:h,triggerProductViewedEvent:g,triggerFieldEvents:y,triggerFormStartedEvent:x,triggerFormContinuedEvent:w,triggerFormViewedEvent:S,triggerFormEvents:I}),[c,d,u,p,f,m,h,g,y,x,w,S,I]),j=n?.currentStep?.dslConfig?.data?.content,k=(0,v.useMemo)(()=>(function e(t){if(Array.isArray(t)){for(let r of t)if(e(r))return!0;return!1}if(!nQ(t))return!1;if("product"===function(e){let t=e.props??{},r=t[nG];if("object"==typeof r&&null!==r&&!Array.isArray(r)&&"string"==typeof r.kind)return r.kind;let n=t[nW];if("string"==typeof n)return n;let i=e.type;if("string"==typeof i)return nq[i]?.kind}(t))return!0;for(let r of Object.values(t.props??{}))if((Array.isArray(r)||nQ(r))&&e(r))return!0;return!1})(j),[j]),E=(0,v.useMemo)(()=>(function(e){let t=[];if(!function e(t,r){if(Array.isArray(t)){for(let n of t)e(n,r);return}if(n1(t)){if("field"===function(e){let t=e.props??{},r=t[nK];if(n2(r)&&"string"==typeof r.kind)return r.kind;let n=t[nJ];if("string"==typeof n)return n;let i=e.type;if("string"==typeof i)return nq[i]?.kind}(t)){let e=function(e){let t=e.props??{},r=t[nK],n=n2(r)?n4(r.fieldName,r.leadFieldAssociated):void 0,i=n4(n,t[nX],t[nZ],t[eh],t.name);if(i)return i;let o=n2(r)?r.fieldType:void 0,a="string"==typeof e.type?e.type:void 0,l=a?nq[a]?.fieldType:void 0,s=n4(o,t[n0],l,a);return s?s.toLowerCase():void 0}(t);e&&r.push(e)}for(let n of Object.values(t.props??{}))(Array.isArray(n)||n1(n))&&e(n,r)}}(e,t),0===t.length)return[];let r=[],n=new Set;for(let e of t)n.has(e)||(n.add(e),r.push(e));let i=Array.from(new Set(r.map(e=>e.toLowerCase()))).sort((e,t)=>e.localeCompare(t));return[{key:"fieldCount",value:String(r.length)},{key:"fieldNames",value:r.join(",")},{key:"fieldSet",value:i.join("_")}]})(j),[j]),A=(0,v.useMemo)(()=>{let e=n?.currentStep?.dslConfig;if(e)return nV(e.data)},[n?.currentStep]),N=A?.productFields,T=A?.customDimensions,{setEntryRootNode:O}=(e=>{let{eventContext:t,currentStep:r,triggers:n,dslConfigId:i,flowSessionId:o,contentEmitsProducts:a,entryFieldDimensions:l,productFields:s,customDimensionMappings:c,flowState:d,steps:u}=e,p=void 0!==r&&void 0!==t,f=r?.isEntry===!0,m=!0!==a,h=(0,v.useRef)({productFields:s,customDimensionMappings:c,flowState:d,steps:u,currentStep:r});h.current={productFields:s,customDimensionMappings:c,flowState:d,steps:u,currentStep:r};let g=e=>{let t=h.current,r=nM(t.steps??[])?.subjectLabelFallback,n=ix(t.flowState,t.steps,t.currentStep,{subjectLabelFallback:r}),i=iu({map:t.productFields,root:n}),o=ip(t.customDimensionMappings,n);if(e||i||0!==o.length)return{...e,...i?{product:i}:{},...o.length>0?{mappedCustomDimensions:o}:{}}},y=(0,v.useMemo)(()=>
1{if(!l||0===l.length)return;let e=new Map;for(let r of[...t?.customDimensions??[],...l])e.set(r.key,r);return{customDimensions:Array.from(e.values())}},[t?.customDimensions,l]),b=r?.flowId,x=r?.id;(0,v.useEffect)(()=>{if(!p)return;let e={flowSessionId:o,flowId:b,dslConfigId:i,stepId:x};if(f){let t=lM("ElementLoaded",e);if(lP.has(t)||(lR(t),n.triggerElementLoadedEvent()),m){let t=lM("ProductLoaded",e);lP.has(t)||(lR(t),n.triggerProductLoadedEvent(g(y)))}}else{let t=lM("ElementLoaded",e);lP.has(t)||(lR(t),n.triggerStepElementLoadedEvent())}},[p,f,m,y,b,x,i,o,n]);let[w,S]=(0,v.useState)(null),I=(0,v.useRef)(null),C=(0,v.useCallback)(e=>{e!==I.current&&(I.current=e,S(e))},[]),{setNodes:j,entries:k,disconnect:E}=lO();return(0,v.useEffect)(()=>{p&&j(w?[w]:[])},[p,w,j]),(0,v.useEffect)(()=>{if(!p||0===k.length||!k.find(e=>e.isIntersecting))return;E();let e={flowSessionId:o,flowId:b,dslConfigId:i,stepId:x};if(f){if(m){let t=lM("ProductViewed",e);lP.has(t)||(lR(t),n.triggerProductViewedEvent(g(y)))}let t=lM("FormViewed",e);lP.has(t)||(lR(t),n.triggerFormViewedEvent())}else{let t=lM("ElementViewed",e);lP.has(t)||(lR(t),n.triggerStepElementViewedEvent())}},[p,f,m,y,k,E,b,x,i,o,n]),{setEntryRootNode:C}})({eventContext:o,currentStep:n?.currentStep,triggers:C,dslConfigId:e,flowSessionId:a,contentEmitsProducts:k,entryFieldDimensions:E,productFields:N,customDimensionMappings:T,flowState:n?.flowState,steps:n?.steps}),{fireForwardStepClick:P}=(e=>{let{eventContext:t,currentStep:r,currentStepIndex:n,triggers:i,forwardStepEventFirerRef:o,formStartedFiredRef:a}=e,l=(0,v.useRef)(!1),s=a??l,c=(0,v.useCallback)(e=>{!t||!r||(r.isEntry&&!s.current?(i.triggerFormStartedEvent(t),i.triggerProductClickedEvent({...t,outboundUrl:e.outboundUrl,...e.productOverride?{product:{...e.productOverride}}:{},...e.dcs?{dcs:e.dcs}:{},actionOutcome:e.actionOutcome,customDimensions:[...t.customDimensions||[],{key:"ctaText",value:e.ctaText}],...e.mappedCustomDimensions&&e.mappedCustomDimensions.length>0?{mappedCustomDimensions:[...e.mappedCustomDimensions]}:{}}),(e.isExitingStepWithRedirect||!e.isLastStep)&&(e.isResultsLanding?i.triggerFormEvents("FormSubmitted",{...t,currentStep:r,currentStepIndex:n,field:e.field.length>0?[...e.field]:void 0,outboundUrl:e.outboundUrl}):i.triggerFormContinuedEvent({...t,currentStep:r,currentStepIndex:n,field:e.field.length>0?[...e.field]:void 0})),s.current=!0):e.isLastStep||e.isExitingStepWithRedirect||i.triggerFormContinuedEvent({...t,currentStep:r,currentStepIndex:n,field:e.field.length>0?[...e.field]:void 0}))},[t,r,n,i]);return(0,v.useEffect)(()=>{if(o)return o.current=c,()=>{o.current===c&&(o.current=null)}},[o,c]),{fireForwardStepClick:c}})({eventContext:o,currentStep:n?.currentStep,currentStepIndex:n?.currentStepIndex,triggers:C,forwardStepEventFirerRef:n?.forwardStepEventFirerRef,formStartedFiredRef:n?.formStartedFiredRef}),M=(0,v.useMemo)(()=>({elementLoadedCorrelationId:o?.elementLoadedCorrelationId,viewCorrelationId:o?.viewCorrelationId,formViewedCorrelationId:o?.formViewedCorrelationId}),[o?.elementLoadedCorrelationId,o?.viewCorrelationId,o?.formViewedCorrelationId]);return(0,b.jsx)(l$,{host:l,eventContext:o,stepCorrelation:s,triggers:C,entryPointCorrelation:M,flowSessionId:a,setEntryRootNode:O,fireForwardStepClick:P,productFields:N,customDimensionMappings:T,children:r})},l$=({children:e,host:t,eventContext:r,stepCorrelation:n,triggers:i,entryPointCorrelation:o,flowSessionId:a,setEntryRootNode:l,fireForwardStepClick:s,productFields:c,customDimensionMappings:d})=>{let u=(0,v.useMemo)(()=>e=>lL({sessionId:a,configId:n.dslConfigId,stepIndex:n.stepIndex,nodeId:e}),[a,n.dslConfigId,n.stepIndex]),p=(0,v.useMemo)(()=>({host:t,eventContext:r,stepCorrelation:n,triggers:i,entryPointCorrelation:o,flowSessionId:a,composeDedupKey:u,setEntryRootNode:l,fireForwardStepClick:s,productFields:c,customDimensionMappings:d}),[t,r,n,i,o,a,u,l,s,c,d]);return(0,b.jsx)(lF.Provider,{value:p,children:e})},l_=()=>(0,v.useContext)(lF);function lD({minItems:e,maxItems:t}={}){let r=Math.max(1,e??2),n=Math.max(t??3,r);return{minItems:r,maxItems:n}}function lY(e){var t,r;if(!e||"object"!=typeof e)return{};let n={};lz(e.tcpa)&&(n.tcpa=e.tcpa),lz(e.tcpaSecondParagraph)&&(n.tcpaSecondParagraph=e.tcpaSecondParagraph);let i=Array.isArray(t=e.valueProps)?t.filter(e=>e&&lz(e.title)).map(e=>
1({title:e.title,description:e.description??"",icon:e.icon??""})):[];i.length>0&&(n.valueProps=i);let o=Array.isArray(r=e.programFlow)?r.map(e=>{let t={};if(lz(e.providerProgramIdArray)){let r=e.providerProgramIdArray.split(",").map(e=>e.trim()).filter(e=>e.length>0);r.length>0&&(t.providerProgramIdArray=r)}return lz(e.tcpa)&&(t.tcpa=e.tcpa),t}).filter(e=>Object.keys(e).length>0):[];o.length>0&&(n.programFlow=o);let a=function(e){if(!e)return;let t=e.undergrad?.[0]??e.grad?.[0];if(t&&lz(t.startDate))return{startDate:t.startDate}}(e.formDates);a&&(n.programDates=a);let l=e.confirmation?.shortIntroText;lz(l)&&(n.confirmationShortIntroText=l);let s=e.confirmation?.text;lz(s)&&(n.confirmationText=s);let c=function(e){if(!e||"object"!=typeof e)return;let t=Array.isArray(e.blocks)?e.blocks.map(e=>{let t=Array.isArray(e.list)?e.list.map(e=>e?.text).filter(e=>lz(e)).map(e=>({text:e})):[];return{...lz(e.title)?{title:e.title}:{},...lz(e.image)?{image:e.image}:{},...t.length>0?{list:t}:{}}}).filter(e=>Object.keys(e).length>0):void 0,r=lz(e.header);if(r||t&&0!==t.length)return{...r?{header:e.header}:{},...t&&t.length>0?{blocks:t}:{}}}(e.spotlight);return c&&(n.spotlight=c),n}function lB(e){if(!e||"object"!=typeof e)return;if("data"in e&&e.data&&"object"==typeof e.data&&!Array.isArray(e.organizations))return lB(e.data);let t=e.organizations;if(Array.isArray(t)){let e=t[0];return e&&"object"==typeof e?e:void 0}return e}function lz(e){return"string"==typeof e&&e.trim().length>0}async function lV(e,t={}){let r,n=e.trim();if(!n)return null;let i=t.apiConfig??Y();try{r=iV("offeringsService",`/v1/offerings/${encodeURIComponent(n)}`,"GET",i)}catch{return null}let o=t.fetchImpl??globalThis.fetch;try{let e=await o(r,{method:"GET",headers:{Accept:"application/json"},signal:t.signal});if(!e.ok)return null;let n=await e.json(),i=lB(n);return lY(i)}catch{return null}}function lH(e){let t=e.offeringUuid?.trim();if(t)return t;let r=e.offeringId?.trim();if(r)return r}let lq=(0,v.createContext)(void 0),lG=({children:e,minPrograms:t,maxPrograms:r,onAdd:n,onRemove:i,dslConfigId:o})=>{let a,l,s,[c,d]=(0,v.useState)([]),[u,p]=(0,v.useState)(!1),[f,m]=(0,v.useState)(!0),{minItems:h,maxItems:g}=lD({minItems:t,maxItems:r}),y=(0,v.useRef)(c);y.current=c;let x=(0,v.useRef)(n);x.current=n;let w=(0,v.useRef)(i);w.current=i;let S=(0,v.useCallback)(e=>!(y.current.length>=g||y.current.some(t=>t.programId===e.programId))&&(d(t=>[...t,e]),x.current?.(e),!0),[g]),I=(0,v.useCallback)(e=>{y.current.some(t=>t.programId===e)&&(d(t=>t.filter(t=>t.programId!==e)),w.current?.(e))},[]),C=(0,v.useCallback)((e,t)=>{y.current.some(t=>t.programId===e)&&d(r=>r.map(r=>r.programId===e?{...r,...t}:r))},[]),j=(0,v.useCallback)(()=>{d([])},[]),k=(0,v.useCallback)(e=>{p(e)},[]),E=(0,v.useCallback)(e=>{m(e)},[]),A=(0,v.useCallback)(e=>c.some(t=>t.programId===e),[c]),N=(0,v.useCallback)(e=>y.current.some(t=>t.programId===e.programId)?(I(e.programId),!1):S(e),[S,I]);(0,v.useEffect)(()=>{y.current.length<=g||d(e=>e.slice(0,g))},[g]),a=ri().api,l=(0,v.useRef)(new Map),s=(0,v.useRef)(new Set),(0,v.useEffect)(()=>{let e=new Set(c.map(e=>e.programId));for(let t of(Array.from(l.current.entries()).forEach(([t,r])=>{e.has(t)||(r.abort(),l.current.delete(t),s.current.delete(t))}),c)){if(!(!t.tcpa?.trim()&&lH(t))){s.current.add(t.programId);continue}if(s.current.has(t.programId)||l.current.has(t.programId))continue;let e=lH(t);if(!e){s.current.add(t.programId);continue}let r=new AbortController;l.current.set(t.programId,r);let n=t.programId;lV(e,{signal:r.signal,apiConfig:a}).then(e=>{r.signal.aborted||null!==e&&(Object.keys(e).length>0&&C(n,e),s.current.add(n))}).finally(()=>{l.current.delete(n)})}},[c,C,a]),(0,v.useEffect)(()=>()=>{Array.from(l.current.values()).forEach(e=>{e.abort()}),l.current.clear(),s.current.clear()},[]);let T=(0,v.useMemo)(()=>{let e=c.map(e=>e.programId),t={};for(let r of e)t[r]=!0;return{selectedIds:e,selectedIdsMap:t,count:e.length,minItems:h,maxItems:g,hasMetMin:e.length>=h,hasReachedMax:e.length>=g}},[c,h,g]),O=c.length<g,P=(0,v.useMemo)(()=>({snapshot:T,minItems:h,maxItems:g,hasMetMin:T.hasMetMin,hasReachedMax:T.hasReachedMax,togglePrograms:N,clear:j,programsToCompare:c,isComparisonModalOpen:u,isBannerVisible:f,addProgramToCompare:S,removeProgramFromCompare:I,patchProgramInCompare:C,clearProgramsToCompare:j,toggleComparisonModal:k,setBannerVisible:E,canAddMorePrograms:O,isProgramSelected:A,dslConfigId:o}),[T,o,h,g,N,c,u,f,S,I,C,j,k,E,O,A]);return(0,b.jsx)(lq.Provider,{value:P,children:e})},lW=()=>{let e=(0,v.useContext)(lq);if(void 0===e)throw Error("useComparison must be used within a ComparisonProvider");return e},lQ=()=>(0,v.useContext)(lq),lK=Object.freeze({});var lJ=((m={}).INFO="info",m.WARNING="warning",m);let lX=(0,v.createContext)(void 0),lZ=(0,v.createContext)(void 0),l0={isPopupOpen:!1,setPopupOpen:()=>{}},l1=({config:e,children:t})=>{let r=(0,v.useMemo)(()=>l5(e??lK),[e]),[n,i]=(0,v.useState)(!1),o=(0,v.useCallback)(e=>{i(e)},[]),a=(0,v.useMemo)(()=>({isPopupOpen:n,setPopupOpen:o}),[n,o]);return(0,b.jsx)(lX.Provider,{value:r,children:(0,b.jsx)(lZ.Provider,{value:a,children:t})})};function l2(){return(0,v.useContext)(lZ)??l0}function l4(){let e=(0,v.useContext)(lX);return e||l6}function l3(){return(0,v.useContext)(lX)}function l5(e){let t=e.recommender?.modal,r=e.spotlight?.modal,n=e.comparison,i=e.loading,{minItems:o,maxItems:a}=lD({minItems:n?.minSelection,maxItems:n?.maxSelection}),l=e.submissions;return{config:e,shouldShowLoadingInterstitial:i?.enabled===!0,shouldShowRecommenderModal:t?.enabled===!0,shouldShowSpotlightModal:r?.enabled===!0,shouldShowComparison:e.comparison?.enabled===!0,shouldShowSubmissions:l?.enabled===!0,comparisonMinSelection:o,comparisonMaxSelection:a,getRecommenderModalCopy:()=>({title:t?.title,subtitle:t?.subtitle,disclosureTitle:t?.disclosureTitle,disclosureContent:t?.disclosureContent}),getSpotlightModalCopy:()=>
1({title:r?.title,subtitle:r?.subtitle,disclosureTitle:r?.disclosureTitle,disclosureContent:r?.disclosureContent}),getLoadingCopy:()=>({title:i?.title??np,statusLabel:i?.statusLabel??nf,steps:i?.steps&&i.steps.length>0?i.steps:nm}),getComparisonCopy:()=>({bannerText:n?.bannerText,ctaText:n?.ctaText,heading:n?.heading,logo:n?.logo,title:n?.title,subtitle:n?.subtitle,buttonText:n?.buttonText,placeholderText:n?.placeholderText}),getComparisonBounds:()=>({minItems:o,maxItems:a}),getComparisonConfig:()=>n,getSubmissionsCopy:()=>({title:l?.title,subtitle:l?.subtitle})}}let l6=l5(lK);var l8=((h={}).PENDING="PENDING",h.SUBMITTED="SUBMITTED",h.SUBMITTING="SUBMITTING",h.ERROR="ERROR",h.UNQUALIFIED="UNQUALIFIED",h);function l9(e){return{...e.partnerIdentifiers??{},...e.referenceId?{referenceId:e.referenceId}:{}}}let l7=(0,v.createContext)(void 0),se=({children:e})=>{let[t,r]=(0,v.useState)([]),n=(0,v.useCallback)(e=>{r(t=>t.some(t=>t.programId===e.programId)?t:[...t,e])},[]),i=(0,v.useCallback)(e=>t.some(t=>t.programId===e),[t]),o=(0,v.useCallback)(e=>t.some(t=>t.schoolId===e),[t]),a=(0,v.useCallback)(e=>t.find(t=>t.schoolId===e),[t]),l=(0,v.useMemo)(()=>t.map(e=>({programId:e.programId,schoolId:e.schoolId})),[t]),s=(0,v.useMemo)(()=>{let e=t.map(e=>e.programId);return{programIds:e,schoolIds:t.map(e=>e.schoolId),count:e.length}},[t]),c=(0,v.useMemo)(()=>({snapshot:s,trackSubmission:n,isProgramSubmitted:i,hasSchoolSubmitted:o,getSubmittedForSchool:a,submittedResults:l,submittedResultsFull:t}),[s,n,i,o,a,l,t]);return(0,b.jsx)(l7.Provider,{value:c,children:e})},st=()=>(0,v.useContext)(l7);class sr extends v.Component{static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){ne(e,{source:"LeadFlowDrawerBoundary",componentStack:t.componentStack??""}),this.props.onError?.(e,t)}render(){return this.state.hasError?null:this.props.children}constructor(...e){super(...e),this.state={hasError:!1}}}let sn=({result:e,otherPrograms:t,isLoading:r=!1,onClose:n,onViewNextSteps:i})=>e?(0,b.jsx)(aI.Modal,{open:!0,onOpenChange:e=>{e||n()},children:(0,b.jsxs)(aI.Modal.Content,{size:"md",className:"overflow-y-auto",children:[(0,b.jsx)(aI.Modal.Header,{className:"sr-only",children:(0,b.jsx)(aI.Modal.Title,{children:"You already requested info from this school"})}),(0,b.jsxs)(aI.Flex,{align:"center",gap:"lg",className:"bg-primary-100 px-lg py-2xl",children:[e.imageURL&&(0,b.jsx)(aI.LogoBox,{src:e.imageURL,alt:e.schoolName}),(0,b.jsx)(aI.Flex,{asChild:!0,gap:"xs",children:(0,b.jsxs)("section",{children:[(0,b.jsx)(aI.Heading,{variant:"h3",align:"center",children:"Youâve already requested info from this school."}),(0,b.jsx)(aI.Text,{variant:"b4",align:"center",children:"You requested information about:"}),(0,b.jsx)(aI.Text,{variant:"b4",weight:"bold",color:"heading",align:"center",children:e.programName})]})}),(0,b.jsx)(aI.Flex,{asChild:!0,gap:"xxs",children:(0,b.jsxs)("section",{children:[(0,b.jsx)(aI.Text,{variant:"b4",weight:"bold",color:"heading",align:"center",children:e.schoolName}),(0,b.jsx)(aI.Text,{variant:"b4",align:"center",children:"has many programs you might be interested in!"}),(0,b.jsx)(aI.Text,{variant:"b4",align:"center",children:"Chat through your options with your advisors."})]})}),(0,b.jsx)(aI.Flex,{asChild:!0,width:"full",gap:"sm",className:"rounded-sm bg-white px-sm py-lg",children:(0,b.jsxs)("section",{children:[(0,b.jsx)(aI.Heading,{variant:"h6",children:"Other programs available:"}),r?(0,b.jsxs)(aI.Flex,{direction:"row",align:"center",gap:"xs",children:[(0,b.jsx)(aI.Spinner,{label:"Loading more programs"}),(0,b.jsx)(aI.Text,{variant:"b4",color:"subtext",children:"Searching for more programs..."})]}):t.length>0?(0,b.jsx)(aI.List,{bulletStyle:"check",className:"max-h-40 overflow-y-auto",children:t.map((e,t)=>(0,b.jsx)(aI.ListItem,{children:(0,b.jsx)(aI.Text,{variant:"b4",children:e.programName})},`${e.programId}-${t}`))}):(0,b.jsx)(aI.Text,{variant:"b4",color:"subtext",children:"Weâll share more options soon."})]})}),(0,b.jsx)(aI.Button,{type:"button",variant:"primaryFill",size:"lg",className:"w-full",onClick:()=>{i()},children:"View next steps"})]})]})}):null;var si=((g={}).PII_CONFIRMATION="PII_CONFIRMATION",g.EXIT_STRATEGY="EXIT_STRATEGY",g.ADDITIONAL_QUESTIONS="ADDITIONAL_QUESTIONS",g);let so=(...e)=>e.filter(Boolean).join(" "),sa=({html:e,variant:t="b4",color:r,align:n,weight:i,className:o})=>{let a=(0,v.useMemo)(()=>k(e),[e]);return null==a?null:(0,b.jsx)(aI.Text,{tag:"div",variant:t,color:r,align:n,weight:i,className:so("prose-links [&_a]:text-primary-700","[&_p]:mb-sm [&_p:last-child]:mb-0 [&_h1]:font-heading [&_h1]:font-bold [&_h1]:text-h1 [&_h1]:mb-xs [&_h2]:font-heading [&_h2]:font-bold [&_h2]:text-h2 [&_h2]:mb-xs [&_h3]:font-heading [&_h3]:font-bold [&_h3]:text-h3 [&_h3]:mb-xxs [&_h4]:font-heading [&_h4]:font-bold [&_h4]:text-h4 [&_h4]:mb-xxs [&_h5]:font-heading [&_h5]:font-bold [&_h5]:text-h5 [&_h5]:mb-xxs [&_h6]:font-heading [&_h6]:font-bold [&_h6]:text-h6 [&_h6]:mb-xxs [&_h2:not(:first-child)]:mt-sm [&_h3:not(:first-child)]:mt-sm [&_h4:not(:first-child)]:mt-sm [&_strong]:font-bold [&_b]:font-bold [&_em]:italic [&_ul]:mb-sm [&_ul]:flex [&_ul]:list-disc [&_ul]:flex-col [&_ul]:gap-xs [&_ul]:pl-6 [&_ol]:mb-sm [&_ol]:flex [&_ol]:list-decimal [&_ol]:flex-col [&_ol]:gap-xs [&_ol]:pl-6 [&_li]:text-inherit [&_blockquote]:border-l-2 [&_blockquote]:border-neutral-200 [&_blockquote]:pl-md",o??""),children:a})},sl=({schoolId:e="",tcpa:t,programFlow:r})=>{if(!t&&!r)return null;let n=r?.find(t=>t.providerProgramIdArray?.includes(e)),i=n?.tcpa??t,o=i?i.replace(/(submit|get) info|
1send your request/gi,"Learn More"):"";return(0,b.jsx)(aI.Text,{tag:"span",variant:"l2",weight:"regular",color:"subtext",children:(0,b.jsx)("span",{dangerouslySetInnerHTML:{__html:o}})})},ss=({tcpa:e,title:t="Terms and Conditions",schoolId:r="",schoolName:n="",tcpaSecondParagraph:i,providerName:o,programFlow:a})=>{let l=aS(),[s,c]=(0,v.useState)(!0),d=l?.flowState?.hasGivenThirdPartySharingConsent?.option,u=Array.isArray(d)?d[0]?.value:d?.value,p="boolean"==typeof u?u:"true"===u||"false"!==u&&void 0,f=(0,v.useCallback)(e=>{l?.updateFlowState&&l.updateFlowState("hasGivenThirdPartySharingConsent",{option:{optionId:"hasGivenThirdPartySharingConsent",text:e?"true":"false",value:e,leadFieldAssociated:"hasGivenThirdPartySharingConsent"},leadFieldAssociated:"hasGivenThirdPartySharingConsent"})},[l]);if((0,v.useEffect)(()=>{void 0===p?(f(!0),c(!0)):c(p)},[p,f,l]),!e||!e.length)return(0,b.jsx)(b.Fragment,{});let m="subtext",h=i&&n.includes("Syracuse")?i.split("\n")[0]:i;return(0,b.jsxs)(aI.Section,{as:"section",padding:"none",className:"gap-0","data-tf-element-role":"consent-language",children:[t&&(0,b.jsx)(aI.Text,{tag:"div",variant:"l1",weight:"bold",color:m,className:"mb-xxs",children:t}),(0,b.jsxs)(aI.Text,{tag:"div",variant:"l2",color:m,className:"mb-md",children:[(0,b.jsxs)(aI.Text,{tag:"span",variant:"l1",weight:"bold",className:"font-bold","data-tf-element-role":"consent-advertiser-name",children:[n,":"]})," ","\xa0",(0,b.jsxs)(aI.Label,{htmlFor:"leadid_tcpa_disclosure",variant:"subtext",className:"font-normal","data-tf-element-role":"consent-language",children:[(0,b.jsx)("input",{type:"hidden",id:"leadid_tcpa_disclosure"}),(0,b.jsx)(sl,{schoolId:r,tcpa:e,programFlow:a})]}),h&&(0,b.jsx)("span",{className:"mt-xxs block",dangerouslySetInnerHTML:{__html:h}}),"TwoU"===o&&(0,b.jsx)(aI.Checkbox,{id:"hasGivenThirdPartySharingConsent",className:"mt-xs",checked:s,onCheckedChange:e=>{var t;c(t=!0===e),f(t)},"data-tf-element-role":"consent-language",label:(0,b.jsx)(aI.Text,{tag:"span",weight:"bold",children:"Please contact me about these educational programs."})})]})]})};function sc(e){let t=e.replace(/\D/g,"").slice(0,10);return 0===t.length?"":t.length<4?`(${t}`:t.length<7?`(${t.slice(0,3)}) ${t.slice(3)}`:`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`}let sd=({eventContext:e,listId:t,presets:r,location:n,productClickedCorrelationId:i,viewCorrelationId:o,brand:a,position:l,capId:s,programId:c,outboundUrl:d,isProgramSubmitted:u,isUserRequested:p,dslConfigId:f})=>{let m,h=null!=r?{degree:r.degree??e.dcs?.degree??"",category:r.category??e.dcs?.category??"",subject:r.subject??e.dcs?.subject??""}:e.dcs;return{...e,dcs:h,formatType:"dexp-offering",formatSubtype:(m=e.currentStep,m?.resultType?`dexp-${m.resultType.replace(/_/g,"-").toLowerCase()}`:m?.componentType?`dexp-${m.componentType.replace(/_/g,"-").toLowerCase()}`:"dexp-results"),formName:"dexp-hosted-lead-form",stepName:"pii-confirmation",location:n||U.CONVERSION_DRAWER,stepType:"LEAD",listId:t,customDimensions:[{key:"sourceCorrelationId",value:e.formViewedCorrelationId||""},{key:"isUserRequested",value:String(p)},{key:"flowId",value:e.currentStep?.flowId||""},{key:"resultsSource",value:"/v1/offerings/search/match"}],presets:r?{degree:r.degree??void 0,category:r.category??void 0,subject:r.subject??void 0}:void 0,productClickedCorrelationId:i||E(),viewCorrelationId:o,brand:a,position:l,sku:s?String(s):void 0,productId:c?String(c):void 0,outboundUrl:d,actionOutcome:u?"application":"explore",...f?{dslConfigId:f}:{}}},su=e=>{let{setNodes:t,entries:r}=lO(),n=(0,v.useRef)(null);return(0,v.useEffect)(()=>{n.current&&(t([n.current]),r?.forEach(r=>{r?.isIntersecting&&(e.forEach(e=>{let{name:t,payload:r}=e;ab(t,r&&"object"==typeof r&&!Array.isArray(r)?r:{})}),t([]))}))},[r?.[0]?.isIntersecting]),{ref:n}},sp=({eventContext:e,productClickedCorrelationId:t,dslConfigId:r})=>({...e,productClickedCorrelationId:t,formName:"dexp-hosted-lead-form-additional",stepName:"additional-questions",...r?{dslConfigId:r}:{}}),sf=({eventContext:e,productClickedCorrelationId:t,elementType:r,name:n,location:i,text:o,dslConfigId:a,outboundUrl:l,fieldMap:s})=>{let c=[];a&&c.push({key:"dslConfigId",value:a});let d=r6(l,s);return d&&c.push({key:"outboundUrl",value:d}),{...e,correlationId:t,productClickedCorrelationId:t,elementType:r,name:n,location:i,htmlId:e.currentStep?.flowId,text:o??"",...c.length>0?{customDimensions:c}:{}}},sm=(e,t)=>{let{eventContext:r}=aS(),{triggerFieldEvents:n}=av(),i=sd({eventContext:r,productClickedCorrelationId:e,dslConfigId:t}),o=sp({eventContext:r,productClickedCorrelationId:e,dslConfigId:t}),a=(0,v.useRef)({});return{sendDebouncedFieldEvent:(0,v.useCallback)((e,t,r,l)=>{a.current[e]&&clearTimeout(a.current[e]),a.current[e]=setTimeout(()=>{n("FieldInputted",{...l?o:i,fieldValue:rh(e)?"SANITIZED":r||"",fieldName:e,fieldType:t}),delete a.current[e]},2e3)},[r,n,o,i])}},sh=({message:e,className:t=""})=>(0,b.jsxs)("div",{role:"alert",className:`flex items-center gap-1 text-sm text-error-500 ${t}`,children:[(0,b.jsx)(aI.Icon,{icon:"circle-alert",size:"sm","aria-hidden":!0}),(0,b.jsx)(aI.Text,{variant:"b5",tag:"span",children:e})]}),sg=[{fieldName:"first-name",fieldType:"text",fieldLabel:"First Name",fieldId:"first-name"},{fieldName:"last-name",fieldType:"text",fieldLabel:"Last Name",fieldId:"last-name"},{fieldName:"email",fieldType:"email",fieldLabel:"Email",fieldId:"email"},{fieldName:"phone",fieldType:"text",fieldLabel:"Phone",fieldId:"phone"}],sy=({header:e="Confirm your contact details:",firstName:t,lastName:r,email:n,phone:i,setFirstName:o,setLastName:a,setEmail:l,setPhone:s,onSubmit:c,formErrors:d,showPhoneError:u=!1,showEmailError:p=!1,productClickedCorrelationId:f,dslConfigId:m})=>{let{sendDebouncedFieldEvent:h}=sm(f,m),{eventContext:g}=aS(),y={...sd({eventContext:g,productClickedCorrelationId:f}),dslConfigId:m},{ref:v}=su([ao(y,!0),...sg.map(e=>ad({...y,fieldName:e.fieldName,fieldType:e.fieldType,fieldLabel:e.fieldLabel,fieldId:e.fieldId},"FieldViewed"))]);return(0,b.jsxs)(aI.Section,{as:"section",padding:"none",className:"not-prose gap-0",ref:v,children:[(0,b.jsx)(aI.Flex,{direction:"row",align:"center",justify:"between",gap:"none",children:(0,b.jsx)(aI.Heading,{variant:"h5",className:"mb-3 mt-4",children:e})}),d?.length!==0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aI.Text,{tag:"p",variant:"b5",className:"my-1 text-error-500",children:"We were unable to save your information. Please correct the errors listed below."}),d?.map(e=>(0,b.jsx)(sh,{message:`Make sure the ${e.field} field is valid.`},e.field))]}),(0,b.jsx)(aI.Flex,{asChild:!0,direction:"column",gap:"sm",children:(0,b.jsxs)("form",{onSubmit:e=>{e.preventDefault(),c()},children:[(0,b.jsx)(aI.Flex,{direction:"column",gap:"none",className:"flex-1",children:(0,b.jsx)(aI.Input,{variant:"two-line",label:"First Name",id:"first-name",type:"text","data-testid":"pii-form-first-name-input",value:t,onChange:e=>{o(e.target.value),h("first-name","text")}})}),(0,b.jsx)(aI.Flex,{direction:"column",gap:"none",className:"flex-1",children:(0,b.jsx)(aI.Input,{variant:"two-line",label:"Last Name",id:"last-name",type:"text","data-testid":"pii-form-last-name-input",value:r,onChange:e=>{a(e.target.value),h("last-name","text")}})}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"none",children:[(0,b.jsx)(aI.Input,{variant:"two-line",label:"Email",id:"email",type:"email","data-testid":"pii-form-email-input",value:n,error:p,onChange:e=>{l(e.target.value),h("email","email")}}),p&&(0,b.jsx)(aI.Flex,{direction:"row",justify:"start",width:"full",gap:"none",className:"pt-1",children:(0,b.jsx)(sh,{message:"Please enter a valid email address."})})]}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"none",children:[(0,b.jsx)(aI.Input,{variant:"two-line",label:"Phone",id:"phone",type:"text",inputMode:"numeric",autoComplete:"tel",maxLength:14,"data-testid":"pii-form-phone-input",value:i,error:u,onChange:e=>{s(sc(e.target.value)),h("phone","text")}}),u&&(0,b.jsx)(aI.Flex,{direction:"row",justify:"start",width:"full",gap:"none",className:"pt-1",children:(0,b.jsx)(sh,{message:"Please enter a valid phone number."})})]})]})})]})};
1function sb(){if("undefined"==typeof document)return window;let e=document.querySelector('iframe[title="Viewport Preview"]');return e?.contentWindow?e.contentWindow:window}function sv(e){let[t,r]=(0,v.useState)(()=>sb().matchMedia(e).matches);return(0,v.useEffect)(()=>{let t=sb().matchMedia(e);r(t.matches);let n=()=>r(t.matches);return t.addEventListener("change",n),()=>t.removeEventListener("change",n)},[e]),t}let sx=({isLoading:e,onProgramSubmit:t,firstName:r,lastName:n,email:i,phone:o,setFirstName:a,setLastName:l,setEmail:s,setPhone:c,formErrors:d,setFormErrors:u,setEditMode:p,editMode:f,piiLeadErrors:m,selectedResult:h,formHeading:g,leadSubmissionStatus:y,setLeadSubmissionStatus:x,productClickedCorrelationId:w,dslConfigId:S})=>{let I=sv("(max-width: 767px)"),{showPhoneError:C,showEmailError:j,handleSubmitClick:k}=(({phone:e,email:t,onProgramSubmit:r,setLeadSubmissionStatus:n})=>{let[i,o]=(0,v.useState)(!1),[a,l]=(0,v.useState)(!1);return{showPhoneError:i,showEmailError:a,handleSubmitClick:async i=>{let a=!1;if(i.preventDefault(),o(!1),l(!1),n(l8.SUBMITTING),e||(o(!0),a=!0),t||(l(!0),a=!0),e&&e.length>0){let t=await t1(e);(!t||!1===t.validPhoneNumber||"error"in t&&t.error)&&(o(!0),a=!0)}t&&t.length>0&&!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(t)&&(l(!0),a=!0),a?n(l8.PENDING):r()}}})({phone:o,email:i,onProgramSubmit:t,setLeadSubmissionStatus:x}),E=y===l8.SUBMITTING,A=e||E?(0,b.jsx)(aI.LoadingDots,{color:"white",label:"Submitting..."}):"Confirm & Submit",N=h?.valueProps?.map((e,t)=>({title:e.title,value:`value-prop-${t}`,content:(0,b.jsx)(sa,{variant:"b5",color:"default",html:e.description})})),T=h?.tcpa,O=h?.tcpaSecondParagraph,P=h?.imageURL||(h?.schoolSlug?`https://simple-storage-server.highereducation.com/${h.schoolSlug}.png?w=130&h=80`:void 0);return(0,b.jsx)(aI.Flex,{asChild:!0,direction:"column",gap:"none",width:"full",className:"not-prose relative h-full bg-white md:h-auto md:min-h-full",children:(0,b.jsxs)("form",{onSubmit:e=>e.preventDefault(),"data-tf-element-role":"offer",children:[(0,b.jsx)(aI.Flex,{asChild:!0,direction:"row",gap:"lg",align:"start",className:so("shrink-0 bg-white px-lg py-md","border-b border-neutral-200 md:border-b-0"),children:(0,b.jsxs)("header",{children:[P&&(0,b.jsx)(aI.LogoBox,{src:P,alt:h?.schoolName??"",className:"p-xxs shadow-xl"}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"min",className:"min-w-0 flex-1",children:[(0,b.jsx)(aI.Heading,{variant:"h4",className:"truncate text-h6 md:text-h4",children:h?.schoolName}),(0,b.jsx)(aI.Text,{variant:"b4",color:"default",children:[h?.city,h?.state].filter(Boolean).join(", ")})]})]})}),I?(0,b.jsxs)(aI.Flex,{direction:"column",gap:"lg",className:"min-h-0 w-full min-w-0 flex-1 overflow-y-auto bg-neutral-50 px-lg py-lg","data-vaul-no-drag":!0,children:[(0,b.jsx)(aI.Heading,{variant:"h3",className:"text-h4",children:h?.programName}),(0,b.jsx)(aI.Flex,{direction:"column",gap:"sm",children:(0,b.jsx)(sy,{onSubmit:t,header:g??"Confirm your contact details:",setEditMode:p,editMode:f,piiLeadErrors:m,location:"single-program",firstName:r,lastName:n,email:i,phone:o,setFirstName:a,setLastName:l,setEmail:s,setPhone:c,setFormErrors:u,formErrors:d,productClickedCorrelationId:w,showPhoneError:C,showEmailError:j,dslConfigId:S})}),(0,b.jsx)(ss,{tcpa:T,schoolId:h?.schoolSlug,schoolName:h?.schoolName,programFlow:h?.programFlow,tcpaSecondParagraph:O,providerName:h?.providerName}),(0,b.jsx)(aI.Button,{variant:"primaryFill",size:"lg",className:"w-full",disabled:e||E,id:"reward_click_lds","data-testid":"edumatch-leaddelivery-submit","data-tf-element-role":"submit",onClick:k,type:"button",children:A}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"xxs",children:[(0,b.jsx)(aI.Brow,{className:"normal-case",children:"School Highlights"}),h?.snippet&&(0,b.jsx)(sa,{variant:"b4",color:"subtext",html:h.snippet})]}),N&&N.length>0&&(0,b.jsx)(aI.Accordion,{type:"single",collapsible:!0,variant:"no-background",defaultValue:"value-prop-0",items:N})]}):(0,b.jsxs)(aI.Flex,{direction:"row",gap:"2xl",height:"full",className:"w-full min-w-0 bg-neutral-50 px-2xl py-2xl",children:[(0,b.jsxs)(aI.Section,{as:"section",gap:"md",padding:"none","aria-label":"School highlights",className:"min-w-0 max-w-[860px] flex-1",children:[(0,b.jsxs)(aI.Flex,{direction:"column",gap:"xxs",children:[(0,b.jsx)(aI.Brow,{className:"normal-case",children:"School Highlights"}),(0,b.jsx)(aI.Heading,{variant:"h3",children:h?.programName}),h?.snippet&&(0,b.jsx)(sa,{variant:"b4",color:"subtext",className:"mt-xxs",html:h.snippet})]}),N&&N.length>0&&(0,b.jsx)(aI.Accordion,{type:"single",collapsible:!0,variant:"no-background",defaultValue:"value-prop-0",items:N})]}),(0,b.jsxs)(aI.Section,{as:"section",gap:"md",padding:"none","aria-label":"Contact form",className:so("min-w-0 max-w-[860px] flex-1"),children:[(0,b.jsx)(aI.Flex,{direction:"column",gap:"sm",children:(0,b.jsx)(sy,{onSubmit:t,header:g??"Confirm your contact details:",setEditMode:p,editMode:f,piiLeadErrors:m,location:"single-program",firstName:r,lastName:n,email:i,phone:o,setFirstName:a,setLastName:l,setEmail:s,setPhone:c,setFormErrors:u,formErrors:d,productClickedCorrelationId:w,showPhoneError:C,showEmailError:j,dslConfigId:S})}),(0,b.jsx)(aI.Flex,{direction:"row",gap:"xs",children:(0,b.jsx)(aI.Text,{variant:"b5",color:"default",children:"Start a conversation with a school admin by submitting your contact information. Once you submit, youâll be able to start your application."})}),(0,b.jsx)(aI.Button,{variant:"primaryFill",size:"lg",className:"w-full",disabled:e||E,id:"reward_click_lds","data-testid":"edumatch-leaddelivery-submit","data-tf-element-role":"submit",onClick:k,type:"button",children:A}),(0,b.jsx)(aI.Text,{variant:"b5",weight:"bold",color:"default",children:"Your information will never be shared with a school without your consent."}),(0,b.jsx)(ss,{tcpa:T,schoolId:h?.schoolSlug,schoolName:h?.schoolName,programFlow:h?.programFlow,tcpaSecondParagraph:h?.tcpaSecondParagraph,providerName:h?.providerName})]})]})]})})};var sw=r(82113);let sS=new Set(["modal.open","modal.close"]),sI=["formatType","formatSubtype","correlationId","country","state"],sC=new Set(["context","formState","item","event","this"]),sj=new Set;function sk(e){sj.has(e)||(sj.add(e),console.warn(e))}let sE=new Map;function sA(e,t){let r,n=((r=sE.get(e))||(r=new Set,sE.set(e,r)),r);n.has(t)||(n.add(t),console.warn(t))}function sN(e,t){if("item"===e)return t.item;if("formState"===e)return t.formState;if("context"===e)return t.flowContext;let r=t.sources[e];return r?.data}let sT={mobile:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 1023px)",desktop:"(min-width: 1024px)"},sO=new Set(Object.values(P));function sP(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function sM(e,t){return Array.isArray(e)?e.some(e=>String(e)===String(t)):String(e).includes(String(t))}function sR(e,t){return Array.isArray(t)&&t.some(t=>sM(e,t))}function sL(e){if(!sP(e))return{ok:!1,reason:"when must be an object"};let{source:t,path:r,operator:n,value:i}
1=e,o="string"==typeof t?t.trim():"";if(0===o.length)return{ok:!1,reason:"when.source must be a non-empty string"};let a="string"==typeof r?r.trim():"";return 0===a.length?{ok:!1,reason:"when.path must be a non-empty string"}:"string"==typeof n&&sO.has(n)?{ok:!0,when:{source:o,path:a,operator:n,value:i}}:{ok:!1,reason:"when.operator must be a known Operator"}}function sF(e,t){let r=sN(e.source,t),n=e.path.split(".").map(e=>e.trim()).filter(e=>e.length>0).map(e=>({type:"key",name:e})),i=0===n.length?void 0:n7(r,n);var o=e.operator,a=e.value;if(null==i)return o===P.NOT_CONTAINS_ANY;switch(o){case P.EQUALS:return String(i)===String(a);case P.NOT_EQUALS:return String(i)!==String(a);case P.CONTAINS:return sM(i,a);case P.CONTAINS_ANY:return sR(i,a);case P.NOT_CONTAINS_ANY:return!sR(i,a);case P.GREATER_THAN:return Number(i)>Number(a);case P.LESS_THAN:return Number(i)<Number(a);default:return!1}}function sU(e,t){return void 0===e||0===e.length||e.some(e=>t.has(e))}let s$=new Set(["options","text","count","isEmpty","tagLabels","stats","badges"]);function s_(e){return!(null===e||"object"!=typeof e||Array.isArray(e))&&"string"==typeof e.source&&0!==e.source.length&&"string"==typeof e.path&&0!==e.path.length&&(void 0===e.transform||"string"==typeof e.transform&&s$.has(e.transform))}let sD=["_bind.","_action.","_meta."];function sY(e){for(let t of sD)if(e.startsWith(t))return!0;return!1}function sB(e){return!("object"!=typeof e||null===e||Array.isArray(e))&&"string"==typeof e.type&&null!==e.props&&"object"==typeof e.props&&!Array.isArray(e.props)}function sz(e,t){return!(!(null===e||"object"!=typeof e||sB(e))&&ii(e))||t.has(e)}let sV=new Set(["item","formState","context"]),sH=new Set(["context","formState","item","event","this"]),sq=new Set(["href","url","ctaHref","link","to","src"]);function sG(e,t,r){return io(e)?ie(e,r,sq.has(t)?{encodeSubstitutions:!0}:void 0):e}function sW(e){if(!0===e)return!0;if("string"==typeof e){let t=e.trim().toLowerCase();return"true"===t||"yes"===t}return!1}function sQ(e,t){if("string"==typeof e&&e.length>0)return e;void 0!==e&&s1(`[binding-enhancer] _bind.${t} expected a non-empty string field name; got ${sK(e)}. Falling back to default value extraction â bound options may render as "[object Object]".`)}function sK(e){return null===e?"null":Array.isArray(e)?"an array":"object"==typeof e?"an object":typeof e}function sJ(e,t){if(t&&sX(e)){let r=e[t];if(null!=r)return String(r)}}function sX(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function sZ(e){if(void 0!==e){if(Array.isArray(e)){let t=e.filter(e=>"string"==typeof e&&e.length>0);return t.length<e.length&&s1(`[binding-enhancer] _bind.tagKeys contained ${e.length-t.length} non-string entr(y/ies); they were ignored.`),t.length>0?t:void 0}s1(`[binding-enhancer] _bind.tagKeys expected an array of entry-key strings; got ${sK(e)}. Falling back to all affirmative entries.`)}}let s0=new Set;function s1(e){s0.has(e)||(s0.add(e),console.warn(e))}let s2=new Map;function s4(e){let t,r=s2.get(e);if(void 0!==r)return r;try{let{segments:r}=n5(`{{${e}}}`),n=r[0];t=n&&"expression"===n.type&&"path"===n.kind?n.segments:[]}catch(r){if(!(r instanceof n3))throw r;sA(s9,`[binding-enhancer] Skipping invalid bind declaration path "${e}": ${r.message}`),t=[]}if(s2.size>=1e3){let e=s2.keys().next().value;void 0!==e&&s2.delete(e)}return s2.set(e,t),t}function s3(e,t,r){if(void 0!==e){if(s_(e)){sV.has(e.source)||r.add(e.source);let n=sN(e.source,t),i=s4(e.path);return s5(0===i.length?void 0:n7(n,i))}if("string"==typeof e&&io(e)){let n=s6(t,r,e);try{return s5(ie(e,n))}catch(e){if(e instanceof n3)return void sA(s9,`[binding-enhancer] Skipping invalid template on a tag-key companion: ${e.message}`);throw e}}return e}}function s5(e){return Array.isArray(e)?e:"string"==typeof e?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):e}function s6(e,t,r){let n={context:e.flowContext,formState:e.formState,item:e.item};for(let[t,r]of Object.entries(e.sources)){if(sH.has(t)){sA(s9,`[binding-enhancer] Ignoring data source "${t}" â collides with a reserved interpolation root.`);continue}n[t]=r.data}try{for(let e of is(r)){let r=e.split(".")[0];r&&!sH.has(r)&&t.add(r)}}catch{}return n}let s8={error:0,pending:1,empty:2,resolved:3},s9="binding-resolver",s7=(0,v.createContext)(void 0),ce=(0,v.createContext)(void 0),ct=(0,v.createContext)(void 0),cr=({item:e,index:t,section:r,children:n})=>{let i=(0,v.useContext)(ce),o=(0,v.useContext)(ct),a=void 0===t?i:void 0===i?String(t):`${i}.${t}`;return(0,b.jsx)(s7.Provider,{value:e,children:(0,b.jsx)(ce.Provider,{value:a,children:(0,b.jsx)(ct.Provider,{value:r??o,children:n})})})};function cn(){return(0,v.useContext)(s7)}function ci(){return(0,v.useContext)(ce)}let co=e=>e?.policy==="explicit-node-enable";function ca(e){let{stepCorrelation:t,eventContext:r}=e,n=r?.customDimensions??[],i=[];return t.stepId&&i.push({key:"stepId",value:t.stepId}),"number"==typeof t.stepIndex&&i.push({key:"stepIndex",value:String(t.stepIndex)}),t.stepType&&i.push({key:"stepType",value:t.stepType}),t.dslConfigId&&i.push({key:"dslConfigId",value:t.dslConfigId}),t.pageCategory&&i.push({key:"pageCategory",value:t.pageCategory}),{customDimensions:[...n,...i]}}let cl=e=>"string"==typeof e&&e.length>0?e:void 0,cs=e=>{if(null!=e&&""!==e){if("number"==typeof e)return Number.isFinite(e)?String(e):void 0;if("string"==typeof e)return e}};function cc(e,t,r){let n=t?.customDimensions??[];return 0===n.length&&0===r.length?e:[...e,...n,...r]}let cd="tracking";function cu(e){return null!=e&&"object"==typeof e&&"product"===e.kind&&!1===e.enabled}
1let cp=new WeakSet,cf=new Set,cm=({meta:e,stableKey:t,productContext:r,fieldValue:n,children:i})=>{let o=l_(),a=(e=>{if(!e)return null;let t=e[cd];return"object"!=typeof t||null===t||Array.isArray(t)?null:t})(e);if(co(o?.host)&&(a?.kind!=="element"||!0!==a.enabled))return(0,b.jsx)(b.Fragment,{children:i});if(cu(a)){let t=Object.keys(e??{}).filter(e=>e!==cd);return 0===t.length?(0,b.jsx)(b.Fragment,{children:i}):(0,b.jsx)("span",{"data-edu-trackable":"placeholder","data-edu-meta-keys":t.join(","),style:{display:"contents"},children:i})}return a&&o?(0,b.jsx)(ch,{tracking:o,trackingMeta:a,stableKey:t,productContext:r,fieldValue:n,children:i},t):void 0!==e&&Object.keys(e).length>0?(0,b.jsx)("span",{"data-edu-trackable":"placeholder","data-edu-meta-keys":Object.keys(e??{}).join(","),style:{display:"contents"},children:i}):(0,b.jsx)(b.Fragment,{children:i})},ch=({tracking:e,trackingMeta:t,stableKey:r,productContext:n,fieldValue:i,children:o})=>{let{setNodes:a,entries:l,disconnect:s}=lO(),c=(0,v.useRef)(null),d=t.kind??"element",{isPopupOpen:u}=l2();return(0,v.useEffect)(()=>{if(!("product"!==d||co(e.host))){if(r){if(cf.has(r))return;cf.add(r)}!function({tracking:e,trackingMeta:t,productContext:r}){if(co(e.host))return;let{triggers:n}=e,i=cg(ca(e),t,r);n.triggerProductLoadedEvent(i)}({tracking:e,trackingMeta:t,productContext:n})}},[]),(0,v.useEffect)(()=>{if(!c.current)return;let e=c.current.firstElementChild instanceof Element?c.current.firstElementChild:c.current;if(!(r&&lP.has(r))&&!(!r&&cp.has(e))){if(u)return void a([]);a([e])}},[a,d,r,u]),(0,v.useEffect)(()=>{if(0===l.length||u)return;let o=l.find(e=>e.isIntersecting);if(!o)return;let a=o.target;r&&lP.has(r)||!r&&cp.has(a)?s():(r&&lR(r),cp.add(a),s(),function({kind:e,tracking:t,trackingMeta:r,productContext:n,fieldValue:i}){if(co(t.host))return t.triggers.triggerElementViewedEvent(o5(r,t.host.page));let{triggers:o,eventContext:a}=t,l=ca(t);switch(e){case"product":{let e=cg(l,r,n);o.triggerProductViewedEvent(e);return}case"field":{let e={...a??{},...l,fieldName:r.fieldName,fieldType:r.fieldType,fieldId:r.leadFieldAssociated,fieldValue:i};o.triggerFieldEvents("FieldViewed",e);return}case"submit":return;default:{let e={...l};void 0!==r.name&&(e.name=r.name),void 0!==r.elementType&&(e.elementType=r.elementType),void 0!==r.htmlId&&(e.htmlId=r.htmlId),void 0!==r.location&&(e.location=r.location),void 0!==r.text&&(e.text=r.text),o.triggerElementViewedEvent(e);return}}}({kind:d,tracking:e,trackingMeta:t,productContext:n,fieldValue:i}))},[l]),(0,b.jsx)("span",{ref:c,"data-edu-trackable":"active","data-edu-tracking-kind":d,style:{display:"contents"},children:o})};function cg(e,t,r){var n;let i,o=(i=[],(n=t).ctaText&&i.push({key:"ctaText",value:n.ctaText}),n.outboundUrl&&i.push({key:"outboundUrl",value:n.outboundUrl}),n.actionOutcome&&i.push({key:"actionOutcome",value:n.actionOutcome}),i),a=cc(e.customDimensions,r,o);return{...r??{},...void 0!==t.formatType?{formatType:t.formatType}:{},...void 0!==t.formatSubtype?{formatSubtype:t.formatSubtype}:{},...void 0!==t.location?{location:t.location}:{},...void 0!==t.productName||void 0!==t.productVariant?{product:{...void 0!==t.productName?{name:t.productName}:{},...void 0!==t.productVariant?{variant:t.productVariant}:{}}}:{},customDimensions:a}}let cy=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);function cb(e,t,r,n){let i="string"==typeof e?e:"";return 0===i.length?"":rh(t.leadFieldAssociated??t.fieldName??r,n)?"SANITIZED":i}let cv=Object.keys(sT),cx=null,cw=null,cS=new Set,cI=new Set;function cC(e){let t=new Set;for(let{token:r,media:n}of e)n.matches&&t.add(r);return t}function cj(e){cS=e,cI.forEach(t=>{t(e)})}function ck(e=!0){let[t,r]=(0,v.useState)(()=>new Set);return(0,v.useEffect)(()=>{if(!e)return;!function(){let e;if(null===cx){try{e=sb()}catch{return}for(let{media:t}of(cx=cv.map(t=>({token:t,media:e.matchMedia(sT[t])})),cw=()=>{null!==cx&&cj(cC(cx))},cx))t.addEventListener("change",cw);cj(cC(cx))}}();let t=e=>{r(e)};return cI.add(t),r(cS),()=>{cI.delete(t)}},[e]),t}function cE(e){return e in sT}function cA({showOn:e,children:t}){let r=(0,v.useId)().replace(/:/g,""),n=`de-vis-bp-${r}`,i=sU(e,ck()),o=e.filter(cE).map(e=>sT[e]),a=0===o.length?`.${n}{display:none!important}`:`.${n}{display:none!important}@media ${o.join(",")}{.${n}{display:contents!important}}`;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("style",{children:a}),(0,b.jsx)("div",{className:n,"data-testid":"de-visibility-css-hide","aria-hidden":!i,children:t})]})}function cN(e,t){ne(e instanceof Error?e:Error(String(e)),{source:t})}let cT="__edu_bound";function cO(e){if(null==e)return"";if("object"==typeof e){if(e.target&&"object"==typeof e.target&&void 0!==e.target.value)return String(e.target.value);if(e.currentTarget&&"object"==typeof e.currentTarget&&void 0!==e.currentTarget.value)return String(e.currentTarget.value)}return String(e)}function cP(e){if(!("tracking"in e))return e;let t={...e};return delete t.tracking,t}let cM=e=>
1"object"==typeof e&&null!==e&&!Array.isArray(e),cR=new Map,cL=[{valueProp:"expanded",changeProp:"onExpandedChange",default:!1},{valueProp:"modalOpen",changeProp:"onModalOpenChange",default:!1}],cF=[{prop:"children",variant:"b5"}],cU={RankingCard:{controlledState:cL,htmlProps:cF},SponsoredCard:{controlledState:cL,htmlProps:cF}};function c$(e,t,r){let n={},i=Object.keys(e.components);for(let o=0;o<i.length;o++){let a=i[o],l=e.components[a],s=t?.[a]??cU[a],c=r?.[a],d=function(e,t,r){if(!0===e[cT])return e;let n=t?.eventPropNames&&t.eventPropNames.length>0?t.eventPropNames:eg,i=t?.formKeyValueTransform??cO,o=t?.staticProps,a=t?.valuePropName,l=t?.formStateValueTransform,s=t?.clickPropName??"onClick",c=t?.outboundUrlPropPath,d=t?.autoSelectSingleOption===!0,u=t?.controlledState??[],p=(t?.htmlProps??[]).map(e=>"string"==typeof e?{prop:e}:e),f=t=>{var f;let m=ln(),h=ld(),g=cn(),y=ci(),x=(0,v.useContext)(ct),w=l_(),S=st(),I=u.map(e=>(0,v.useState)(e.default)),{props:C,loading:j,dataSourceStatus:k,formKey:E,meta:A,referencedSources:N}=function(e,t){let r,n=function(e){let t=new Set;for(let r of Object.keys(e)){if(!r.startsWith(ep))continue;let e=r.slice(ep.length);0!==e.length&&e!==ey&&e!==eb&&e!==ev&&e!==ex&&e!==ew&&e!==eS&&e!==eI&&e!==eC&&t.add(e)}return t}(e),i={},o={},a=new Set,l=function(e,t,r){let n=`${ep}${ey}`,i=`${ep}${eb}`,o=`${ep}${ev}`,a=`${ep}${ex}`,l=`${ep}${ew}`,s=`${ep}${eS}`,c=`${ep}${eI}`,d=`${ep}${eC}`;return{optionLabelField:e[n],optionValueField:e[i],statLabelField:e[l],statValueField:e[s],statTooltipField:e[c],badgeField:e[d],tagKeys:s3(e[o],t,r),defaultTagKeys:s3(e[a],t,r)}}(e,t,a);for(let s of Object.keys(e)){let c=e[s];if(s.startsWith(ep)){let e=s.slice(ep.length);if(0===e.length){sA(s9,`[binding-enhancer] Ignoring empty bind key "${ep}" â DSL must declare a target prop name (e.g. "${ep}label").`);continue}if(e===ey||e===eb||e===ev||e===ex||e===ew||e===eS||e===eI||e===eC)continue;let r=function(e,t,r,n,i){if(s_(t)){sV.has(t.source)||i.add(t.source);let o=sN(t.source,r),a=s4(t.path),l=0===a.length?void 0:n7(o,a),s=n;return void 0!==t.keys&&(Array.isArray(t.keys)?s={...n,tagKeys:function(e,t){let r=[];for(let n of e){if("string"==typeof n){n.length>0&&r.push(n);continue}if(!n||"object"!=typeof n||Array.isArray(n)){sA(s9,"[binding-resolver] Ignoring _bind.*.keys entry that is neither a string nor a { key, when } object.");continue}if("string"!=typeof n.key||0===n.key.length){sA(s9,'[binding-resolver] Ignoring _bind.*.keys entry without a non-empty string "key".');continue}if(void 0===n.when){r.push(n.key);continue}let e=sL(n.when);if(!1===e.ok){sA(s9,`[binding-resolver] Malformed _bind.*.keys[].${e.reason}; keeping "${n.key}".`),r.push(n.key);continue}sF(e.when,t)&&r.push(n.key)}return r}(t.keys,r)}:sA(s9,`[binding-resolver] Ignoring non-array _bind.${e}.keys; using node-level tagKeys.`)),function(e,t,r){switch(e){case"options":return function(e,t){if(!Array.isArray(e))return[];let r=sQ(t.optionLabelField,"optionLabelField"),n=sQ(t.optionValueField,"optionValueField"),i=function(e){let t=[],r=e=>{if(Array.isArray(e)){for(let t=0;t<e.length;t++)r(e[t]);return}t.push(e)};return r(e),t}(e),o=[];for(let e=0;e<i.length;e++){var a;let t=i[e];o.push({label:sJ(a=t,r)??String(a),value:function(e,t){let r=sJ(e,t);return void 0!==r?r:sX(e)&&void 0!==e.value&&null!==e.value?String(e.value):String(e)}(t,n)})}return o}(t,r);case"text":return function e(t){if(null==t)return"";if(Array.isArray(t))return t.filter(e=>null!=e).map(t=>e(t)).join(", ");if("object"==typeof t)try{return JSON.stringify(t)??""}catch{return""}return String(t)}(t);case"count":return Array.isArray(t)?t.length:0;case"isEmpty":if(null==t)return!0;if("string"==typeof t||Array.isArray(t))return 0===t.length;if("object"==typeof t){let e=Object.getPrototypeOf(t);if(e!==Object.prototype&&null!==e)return!1;for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}return!1;case"tagLabels":if(!sX(t))return[];let n=sZ(r.tagKeys)??sZ(r.defaultTagKeys)??Object.keys(t),i=[];for(let e of n){let r=t[e];sX(r)&&sW(r.value)&&"string"==typeof r.label&&r.label.length>0&&i.push(r.label)}return i;case"stats":return function(e,t){let r=function(e,t){if(Array.isArray(e))return e;if(!sX(e))return[];let r=sZ(t.tagKeys)??sZ(t.defaultTagKeys)??Object.keys(e),n=[];for(let t of r)Object.prototype.hasOwnProperty.call(e,t)&&n.push(e[t]);return n}(e,t);if(0===r.length)return[];let n=sQ(t.statLabelField,"statLabelField"),i=sQ(t.statValueField,"statValueField"),o=sQ(t.statTooltipField,"statTooltipField"),a=[];for(let e=0;e<r.length;e++){let t=r[e];if(null==t)continue;let l=sJ(t,n)??String(t);if(0===l.length)continue;
1let s=sJ(t,i)??"",c=function(e,t){let r=sJ(e,t);return void 0!==r&&r.length>0?r:void 0}(t,o);a.push(void 0===c?{label:l,value:s}:{label:l,value:s,tooltip:c})}return a}(t,r);case"badges":return function(e,t){if(!Array.isArray(e))return[];let r=sQ(t.badgeField,"badgeField"),n=[];for(let t=0;t<e.length;t++){let i=e[t];if(null==i)continue;let o=r&&sX(i)?sJ(i,r)??"":String(i);0!==o.length&&n.push(o)}return n}(t,r);case void 0:return t;default:return sA(s9,`[binding-enhancer] Unknown transform "${String(e)}"; passing raw value through.`),t}}(t.transform,l,s)}if("string"==typeof t&&io(t)){let n=s6(r,i,t);try{return ie(t,n)}catch(t){if(t instanceof n3)return void sA(s9,`[binding-enhancer] Skipping invalid template on _bind.${e}: ${t.message}`);throw t}}return t}(e,c,t,l,a);i[e]=r;continue}if(s.startsWith(ef)){for(let e of function(e){if(!e||"object"!=typeof e||Array.isArray(e)||!e.params||"object"!=typeof e.params)return[];let t=[];for(let r of Object.values(e.params))if("string"==typeof r&&io(r))try{for(let e of is(r))t.push(e)}catch{}return t}(c)){let t=e.split(".")[0];t&&!sH.has(t)&&a.add(t)}continue}if(s.startsWith(em)){let e=s.slice(em.length);if(0===e.length){sA(s9,`[binding-enhancer] Ignoring empty meta key "${em}" â DSL must declare a meta name (e.g. "${em}flowState").`);continue}o[e]=c;continue}if(s===eh){"string"==typeof c&&c.length>0&&(r=c);continue}n.has(s)||(i[s]=function(e,t,r,n){if(!function e(t,r){if("string"==typeof t)return io(t);if(sz(t,r))return!1;r.add(t);try{if(Array.isArray(t)){for(let n of t)if(e(n,r))return!0;return!1}for(let[n,i]of Object.entries(t))if(!sY(n)&&e(i,r))return!0;return!1}finally{r.delete(t)}}(t,new WeakSet))return t;!function(e,t){!function e(t,r,n){if("string"==typeof t)return void n(t);if(!sz(t,r)){r.add(t);try{if(Array.isArray(t)){for(let i of t)e(i,r,n);return}for(let[i,o]of Object.entries(t))sY(i)||e(o,r,n)}finally{r.delete(t)}}}(e,new WeakSet,e=>{var r=e,n=t;if(io(r))try{for(let e of is(r)){let t=function(e){let t=e.split(".")[0];if(!t)return;let r=t.indexOf("[");return r>=0?t.slice(0,r):t}(e);t&&!sH.has(t)&&n.add(t)}}catch{}})}(t,n);let i=function(e){let t={context:e.flowContext,formState:e.formState,item:e.item};for(let[r,n]of Object.entries(e.sources))sH.has(r)||(t[r]=n.data);return t}(r);try{if("string"==typeof t)return sG(t,e,i);let r=new WeakSet;return function e(t,r,n){if("string"==typeof t)return n(t,void 0);if(null===t||"object"!=typeof t||sB(t)||!ii(t)||r.has(t))return t;r.add(t);try{if(Array.isArray(t)){var i=t,o=r,a=n;let l=null;for(let t=0;t<i.length;t++){let r=i[t],n=sB(r)?r:e(r,o,a);n!==r&&null===l&&(l=i.slice(0,t)),null!==l&&l.push(n)}return l??i}return function(t,r,n){let i=null,o=!1,a=Object.keys(t);for(let l=0;l<a.length;l++){let s=a[l];if(sY(s)){o=!0;continue}let c=t[s],d=e(c,r,(e,t)=>n(e,t??s));if(d!==c&&null===i){i={};for(let e=0;e<l;e++){let r=a[e];sY(r)||(i[r]=t[r])}}null!==i&&(i[s]=d)}if(null!==i)return i;if(o){let e={};for(let r of a)sY(r)||(e[r]=t[r]);return e}return t}(t,r,n)}finally{r.delete(t)}}(t,r,(t,r)=>sG(t,r??e,i))}catch(t){if(t instanceof n3)return void sA("plain-prop-resolver",`[binding-enhancer] Skipping invalid template on plain prop "${e}": ${t.message}`);throw t}}(s,c,t,a))}return{props:i,loading:function(e,t){let r=!1;return e.forEach(e=>{if(r)return;let n=t[e];void 0!==n&&"pending"===n.status&&(r=!0)}),r}(a,t.sources),dataSourceStatus:function(e,t){if(0===e.size)return"resolved";let r="resolved";return e.forEach(e=>{let n=t[e],i=void 0===n?"error":n.status;s8[i]<s8[r]&&(r=i)}),r}(a,t.sources),formKey:r,meta:o,referencedSources:a}}(t,{sources:m.sources,formState:m.formState,flowContext:m.flowContext,item:g}),T="string"==typeof t.id&&t.id.length>0?t.id:void 0,O=w&&T?w.composeDedupKey(void 0!==y?`${T}::${y}`:T):void 0,P=A&&cM(A.tracking)&&null!==A.tracking?A.tracking:void 0,M=(0,v.useMemo)(()=>P?JSON.stringify(P):"",[P]),R=c?function(e,t){let r=n7(e,t.split(".").map(e=>e.trim()).filter(e=>e.length>0).map(e=>({type:"key",name:e})));return"string"==typeof r&&r.length>0?r:void 0}(C,c):void 0,L=P&&"string"==typeof P.location?P.location:void 0,F=(0,v.useMemo)(()=>(function(e,t,r){if(!t||void 0!==r)return e;let n=e.tracking;if(!cM(n)||"product"!==n.kind)return e;let i="string"==typeof n.location&&n.location.length>0?n.location:void 0;return i?{...e,tracking:{...n,location:`${i}-${t}`}}:e})(function(e,t){if(!t)return e;let r=e.tracking;return!cM(r)||"product"!==r.kind||"string"==typeof r.outboundUrl&&r.outboundUrl.length>0?e:{...e,tracking:{...r,outboundUrl:t}}}(function(e,t,r){let n=function(e){let t=e.tracking;if(null!=t&&"object"==typeof t&&!Array.isArray(t))return t}(t);if(!e)return cu(n)?cP(t):t;let i={...e,...n??{}};return("field"===i.kind&&r&&(void 0===i.fieldName&&(i.fieldName=r),void 0===i.leadFieldAssociated&&(i.leadFieldAssociated=r)),cu(i))?cP(t):{...t,tracking:i}}(r,A,E),R),x,L),[M,E,R,x,L]),U=co(w?.host)?null:function(e){if(!e)return null;let t=e.tracking;if(!cM(t)||"field"!==t.kind)return null;let r={};return"string"==typeof t.fieldName&&(r.fieldName=t.fieldName),"string"==typeof t.fieldType&&(r.fieldType=t.fieldType),"string"==typeof t.leadFieldAssociated&&(r.leadFieldAssociated=t.leadFieldAssociated),r}(F),$=function(e,t){if(!e)return null;let r=e.tracking;if(!cM(r))return null;if("explicit-node-enable"===t&&"element"===r.kind&&!0===r.enabled){let e={kind:"element",enabled:!0};return"string"==typeof r.elementType&&(e.elementType=r.elementType),"string"==typeof r.name&&(e.name=r.name),"string"==typeof r.htmlId&&(e.htmlId=r.htmlId),"string"==typeof r.location&&(e.location=r.location),"string"==typeof r.text&&(e.text=r.text),cM(r.fields)&&(e.fields=r.fields),void 0!==r.customDimensions&&(e.customDimensions=r.customDimensions),e}if("explicit-node-enable"===t||cu(r)||"product"!==r.kind)return null;let n={kind:"product"};return"string"==typeof r.ctaText&&(n.ctaText=r.ctaText),"string"==typeof r.outboundUrl&&(n.outboundUrl=r.outboundUrl),"string"==typeof r.actionOutcome&&(n.actionOutcome=r.actionOutcome),"string"==typeof r.location&&(n.location=r.location),"string"==typeof r.formatType&&(n.formatType=r.formatType),"string"==typeof r.formatSubtype&&(n.formatSubtype=r.formatSubtype),"string"==typeof r.productName&&(n.productName=r.productName),"string"==typeof r.productVariant&&(n.productVariant=r.productVariant),n}
1(F,w?.host?.policy),_=$?.kind==="product"?$:null,{productContext:D,resultActionOutcome:Y,fieldViewValue:B}=function({item:e,itemIndexPath:t,clickKind:r,clickFormatSubtype:n,fieldMeta:i,formKey:o,formStateValue:a,currentStep:l,isProgramSubmitted:s,productFields:c,customDimensionMappings:d}){var u;let p,f="product"===r?(u=function(e,t,r){if(!t||0===Object.keys(t).length)return e;let n=iu({map:t,root:cy(r)?r:void 0,baseProduct:e?.product});return n?e?e.product===n?e:{...e,product:n}:{product:n}:e}(function(e,t){if(!("object"==typeof e&&null!==e&&!Array.isArray(e)))return;let r=cl(e.schoolSlug),n=cs(e.programId);if(void 0===r&&void 0===n)return;let i=cl(e.resultsSource),o={formatType:"dexp-offering",formatSubtype:i===rX?r0:rZ};void 0!==r&&(o.brand=r),void 0!==n&&(o.productId=n);let a=cs(e.capId);void 0!==a&&(o.sku=a);let l=cl(e.viewCorrelationId);void 0!==l&&(o.viewCorrelationId=l);let s=cl(e.productClickedCorrelationId);void 0!==s&&(o.productClickedCorrelationId=s);let c=cl(e.listId);void 0!==c&&(o.listId=c);let d=cl(e.degreeSlug),u=cl(e.categorySlug),p=cl(e.subjectSlug);(void 0!==d||void 0!==u||void 0!==p)&&(o.presets={degree:d,category:u,subject:p});let f=(e=>{if(!e)return;let t=e.split("."),r=Number(t[t.length-1]);return Number.isFinite(r)?r+1:void 0})(t);return void 0!==f&&(o.position=f),void 0!==i&&(o.customDimensions=[{key:"resultsSource",value:i}]),o}(e,t),c,e),0===(p=ip(d,cy(e)?e:void 0)).length?u:u?{...u,mappedCustomDimensions:p}:{mappedCustomDimensions:p}):void 0,m=(()=>{let t;if(!f||(t=n??f.formatSubtype)!==rZ&&t!==r0)return;let r=cy(e)&&"number"==typeof e.programId?e.programId:void 0;return void 0!==r&&s?.(r)===!0?"application":"explore"})();return{productContext:f,resultActionOutcome:m,fieldViewValue:i&&void 0!==o?cb(a,i,o,l):void 0}}({item:g,itemIndexPath:y,clickKind:_?.kind,clickFormatSubtype:_?.formatSubtype,fieldMeta:U,formKey:E,formStateValue:void 0!==E?m.formState[E]:void 0,currentStep:w?.eventContext?.currentStep,isProgramSubmitted:S?e=>S.isProgramSubmitted(e):void 0,productFields:w?.productFields,customDimensionMappings:w?.customDimensionMappings}),z=function(e,t,r,n){let i=e?.formatType??t?.formatType,o=e?.formatSubtype??t?.formatSubtype,a=t?.productClickedCorrelationId||r,{country:l,state:s}=function(e){let t=e.geolocation?.trim().toUpperCase();if(t){let e=t.split("-").map(e=>e.trim()).filter(e=>e.length>0);if(2===e.length){let[t,r]=e;return{country:t,state:r}}if(1===e.length)return{country:e[0]}}let r=e.countryCode?.trim().toUpperCase();return r?{country:r}:{}}(n);if(void 0!==i||void 0!==o||void 0!==a||void 0!==l||void 0!==s)return{...void 0!==i?{formatType:i}:{},...void 0!==o?{formatSubtype:o}:{},...void 0!==a?{correlationId:a}:{},...void 0!==l?{country:l}:{},...void 0!==s?{state:s}:{}}}(_,D,w?.eventContext?.formViewedCorrelationId,m.formState),V=function(e,t){let r={};for(let i of Object.keys(e)){var n;if(!i.startsWith(ef))continue;let o=i.slice(ef.length);if(0===o.length)continue;let a=e[i];if(!(!(null===(n=a)||"object"!=typeof n||Array.isArray(n))&&"string"==typeof n.type&&0!==n.type.length&&(void 0===n.params||!(null===n.params||"object"!=typeof n.params||Array.isArray(n.params))))){sk(`[binding-enhancer] Skipping malformed _action.${o} â expected { type: string, params?: Record<string,string> }`);continue}r[o]=function(e,t,r){return(...n)=>{var i;let o,a=n.length>0?n[0]:void 0,l=t.dispatcher;if(l.has&&!1===l.has(e.type))return void sk(`[binding-enhancer] No handler registered for action "${e.type}"; dropping _action.${r}`);if(void 0!==e.params)try{o=function(e,t,r){if(!ia(e))return{...e};let n={context:t.flowContext,formState:t.formState,item:t.item,event:r,this:t.componentSelf??{}};for(let e of Object.keys(t.sources))sC.has(e)||(n[e]=t.sources[e]?.data);return il(e,n)}(e.params,t,a)}catch(e){if(e instanceof n3)return void sk(`[binding-enhancer] Interpolation error in _action.${r}.params: ${e.message}`);throw e}"navigation.linkout"===e.type&&t.linkoutParamFallbacks&&(o=function(e,t){let r;for(let n of sI){let i=t[n];if(void 0===i)continue;let o=e?.[n];(void 0===o||""===o)&&(r||(r={...e??{}}),r[n]=i)}return r??e}(o,t.linkoutParamFallbacks)),"onClick"===r&&sS.has(e.type)&&"object"==typeof(i=a)&&null!==i&&"preventDefault"in i&&"function"==typeof i.preventDefault&&a.preventDefault();try{l.dispatch(e.type,o)}catch(t){console.error(`[binding-enhancer] ActionDispatcher.dispatch("${e.type}") threw`,t)}}}(a,t,o)}return r}
1(t,{dispatcher:h,sources:m.sources,formState:m.formState,flowContext:m.flowContext,item:g,componentSelf:{formKey:E},linkoutParamFallbacks:z});!function(e){let{handler:t,referencedSources:r,sources:n,stableKey:i}=e,o=(0,v.useRef)(new Map),a=(0,v.useRef)(void 0);a.current=t;let l=Array.from(r).sort(),s=l.join("|");(0,v.useEffect)(()=>{let e;if(0===l.length)return;if(i){let t=cR.get(i);t||(t=new Map,cR.set(i,t)),e=t}else e=o.current;let t=!1;for(let r=0;r<l.length;r++){let i=l[r],o=n[i];o&&"pending"!==o.status&&(e.has(i)&&e.get(i)!==o.data&&(t=!0),e.set(i,o.data))}if(t){let e=a.current;if(!e)return;try{e()}catch(e){cN(e,"binding-enhancer:_action.onSourceChange")}}},[s,n,i])}({handler:function(e){let t={};for(let r of Object.keys(e))ek(r)&&(t[r]=e[r],delete e[r]);return t}(V).onSourceChange,referencedSources:N,sources:m.sources,stableKey:O});let H=function(e){let{eventPropNames:t,staticProps:r,resolvedProps:n,actionHandlers:i,formKey:o,formKeyValueTransform:a,updateFormState:l,tracking:s,fieldTrackingMeta:c,clickPropName:d,clickTrackingMeta:u,productContext:p,resultActionOutcome:f}=e,m=o?function(e,t){return e.find(e=>e in t)??e[0]}(t,i):void 0,h=s&&u?d:void 0,g=[],y={},b=e=>{y[e]||(y[e]=!0,g.push(e))};for(let e of Object.keys(i))b(e);if(m&&b(m),h&&b(h),r)for(let e of Object.keys(r))"function"==typeof r[e]&&"function"==typeof n[e]&&b(e);let v={};for(let e of g){let t=function(e,t,r){let n=[],i=r?.[e];"function"==typeof i&&n.push({fn:i,origin:"static"});let o=t[e];return"function"==typeof o&&n.push({fn:o,origin:"resolved"}),n}(e,n,r),d=i[e],g=void 0!==o&&e===m,y=void 0!==h&&e===h;(0!==t.length||d||g||y)&&(v[e]=(...r)=>{for(let n of t)try{n.fn(...r)}catch(t){cN(t,`binding-enhancer:authored:${e}:${n.origin}`)}if(d)try{d(...r)}catch(t){cN(t,`binding-enhancer:_action:${e}`)}if(g&&o){let e=a(r.length>0?r[0]:void 0);try{l(o,e)}catch(e){cN(e,`binding-enhancer:updateFormState:${o}`)}if(s&&c)try{let t=ca(s),r={...s.eventContext??{},...t,fieldName:c.fieldName??o,fieldType:c.fieldType,fieldId:c.leadFieldAssociated??o,fieldValue:cb(e,c,o,s.eventContext?.currentStep)};s.triggers.triggerFieldEvents("FieldInputted",r)}catch(e){cN(e,`binding-enhancer:triggerFieldEvents:FieldInputted:${o}`)}}if(y&&s&&u)try{if("element"===u.kind)return void s.triggers.triggerElementClickedEvent(co(s.host)?o5(u,s.host.page):{...void 0!==u.elementType?{elementType:u.elementType}:{},...void 0!==u.name?{name:u.name}:{},...void 0!==u.htmlId?{htmlId:u.htmlId}:{},...void 0!==u.location?{location:u.location}:{},...void 0!==u.text?{text:u.text}:{}});if(co(s.host))return;let e=ca(s),t=function(e){let t=[];return e.ctaText&&t.push({key:"ctaText",value:e.ctaText}),e.outboundUrl&&t.push({key:"outboundUrl",value:e.outboundUrl}),e.actionOutcome&&t.push({key:"actionOutcome",value:e.actionOutcome}),t}(u),r={...s.eventContext??{},...p??{},...void 0!==f?{actionOutcome:f}:{},...void 0!==u.outboundUrl?{outboundUrl:u.outboundUrl}:{},...void 0!==u.actionOutcome?{actionOutcome:u.actionOutcome}:{},...void 0!==u.location?{location:u.location}:{},...void 0!==u.formatType?{formatType:u.formatType}:{},...void 0!==u.formatSubtype?{formatSubtype:u.formatSubtype}:{},...void 0!==u.productName||void 0!==u.productVariant?{product:{...void 0!==u.productName?{name:u.productName}:{},...void 0!==u.productVariant?{variant:u.productVariant}:{}}}:{},customDimensions:cc(e.customDimensions,p,t)};s.triggers.triggerProductClickedEvent(r)}catch(e){cN(e,`binding-enhancer:click-dispatch:${u.kind}`)}})}return v}({eventPropNames:n,staticProps:o,resolvedProps:C,actionHandlers:V,formKey:E,formKeyValueTransform:i,updateFormState:m.updateFormState,tracking:w,fieldTrackingMeta:U,clickPropName:s,clickTrackingMeta:$,productContext:D,resultActionOutcome:Y}),q={...o??{},...C,...H,loading:j,dataSourceStatus:k};if(void 0!==E&&void 0!==a&&!(a in q)){let e=m.formState[E];q[a]=l?l(e):e}for(let e=0;e<u.length;e++){let{valueProp:r,changeProp:n}=u[e],[i,a]=I[e],l=`${ep}${r}`in t||r in C||o?.[r]!==void 0;l||(q[r]=i);let s="function"==typeof q[n]?q[n]:void 0,c=`${ef}${n}`in t||"function"==typeof t[n]||"function"==typeof o?.[n]||n in H||"function"==typeof C[n];c&&l||(c&&s?q[n]=(...e)=>{a(e[0]),s(...e)}:q[n]=(...e)=>{a(e[0])})}let G=d&&void 0!==E&&!j&&!0!==q.disabled&&Array.isArray(f=q.options)&&f.every(e=>null!==e&&"object"==typeof e&&"value"in e)&&1===q.options.length?String(q.options[0].value):void 0,W=void 0!==E?m.formState[E]:void 0,Q=m.updateFormState;for(let{prop:e,variant:t}of((0,v.useEffect)(()=>{void 0===G||void 0===E||W!==G&&Q(E,G)},[G,W,E,Q]),void 0!==G&&(q.disabled=!0),p)){let r=q[e];"string"==typeof r&&r.trim().length>0&&(q[e]=(0,b.jsx)(sa,{html:r,variant:t}))}
1return(0,b.jsx)(cm,{meta:F,stableKey:O,productContext:D,fieldValue:B,children:(0,b.jsx)(e,{...q})})};f.displayName=`Bound(${e.displayName??e.name??"Component"})`;let m=e=>{let t=ln(),r=cn(),n=e["_meta.visibility"],i=ck(function(e){if("object"!=typeof e||null===e||Array.isArray(e))return!1;let t=e.showOn;return Array.isArray(t)&&t.length>0}(n));if(void 0===n)return(0,b.jsx)(f,{...e});let o=function(e){let t,r,n;if(!sP(e))return{ok:!1,reason:"_meta.visibility must be a plain object"};if(void 0!==e.when){let r=sL(e.when);if(!1===r.ok)return{ok:!1,reason:`_meta.visibility.${r.reason}`};t=r.when}if(void 0!==e.showOn){if(!Array.isArray(e.showOn)||!e.showOn.every(e=>"string"==typeof e))return{ok:!1,reason:"_meta.visibility.showOn must be an array of strings"};r=e.showOn}if(void 0!==e.mode){if("mount"!==e.mode&&"css"!==e.mode)return{ok:!1,reason:'_meta.visibility.mode must be "mount" or "css"'};n=e.mode}return{ok:!0,meta:{when:t,showOn:r,mode:n}}}(n);if(!1===o.ok)return ne(Error(`[binding-enhancer] Malformed _meta.visibility: ${o.reason}`),{source:"binding-enhancer:visibility"}),(0,b.jsx)(f,{...e});let{meta:a}=o,l={sources:t.sources,formState:t.formState,flowContext:t.flowContext,item:r};if(void 0!==a.when&&!sF(a.when,l))return null;let s=sU(a.showOn,i);return"css"===a.mode&&void 0!==a.showOn&&a.showOn.length>0?(0,b.jsx)(cA,{showOn:a.showOn,children:(0,b.jsx)(f,{...e})}):s?(0,b.jsx)(f,{...e}):null};return m.displayName=`VisibilityGate(${e.displayName??e.name??"Component"})`,m[cT]=!0,m}(l.render,s,c);n[a]={...l,render:d}}return{...e,components:n}}let c_={},cD={},cY=aI.StudentLoansInline,cB=c$({components:{StudentLoansInline:{fields:{},render:e=>(0,b.jsx)(cY,{...e})}},root:{fields:{},render:({children:e})=>(0,b.jsx)(b.Fragment,{children:e})}},{StudentLoansInline:{eventPropNames:["onCtaClick"],clickPropName:"onCtaClick",outboundUrlPropPath:"cta.href"}},nq);class cz extends v.Component{static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(`[StudentLoansInlinePlacement] Render error for config "${this.props.configId??"unknown"}":`,e,t.componentStack)}render(){return this.state.hasError?null:this.props.children}constructor(...e){super(...e),this.state={hasError:!1}}}let cV=({content:e,configId:t})=>{let r=(0,v.useMemo)(()=>{var t;return!function(e){if(e?.type!=="StudentLoansInline")return!1;let t=e.props;if(!cH(t))return!1;let r=t.partner,n=t.cta;return cq(t.title)&&cq(t.subtitle)&&cq(t.disclosure)&&cH(r)&&cq(r.label)&&cq(r.logo)&&cq(r.name)&&"number"==typeof r.rating&&cH(n)&&cq(n.label)&&cq(n.href)}(t=e)?null:{content:[{type:"StudentLoansInline",props:{...t.props,"_meta.tracking":{location:"voyager-exit-credible"}}}],root:{props:{}}}},[e]);return r?(0,b.jsx)(cz,{configId:t,children:(0,b.jsx)(lr,{dataSources:c_,flowContext:cD,children:(0,b.jsx)(sw.dw,{config:cB,data:r})})}):null};function cH(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function cq(e){return"string"==typeof e&&e.trim().length>0}function cG({baseUrl:e,staticParams:t,fieldMap:r,sources:n,missingValue:i="empty"}){let o=function(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol?t:void 0}catch{return}}(e);if(!o)return{hide:!0};let a=Object.entries(t??{});for(let[e,t]of Object.entries(r??{})){let r=function(e,t){let[r,...n]=t.split(".");if("lead"!==r&&"partnerIdentifiers"!==r||0===n.length)return;let i=e[r];for(let e of n){var o;if(!("object"==typeof(o=i)&&null!==o&&!Array.isArray(o))||!Object.prototype.hasOwnProperty.call(i,e))return;i=i[e]}return i}(n,t);if(null==r){if("hide"===i)return{hide:!0};if("omit"===i)continue;a.push([e,""]);continue}a.push([e,String(r)])}if(a.length>0){let e=a.map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("&"),t=o.search.slice(1);o.search=t?`${t}&${e}`:e}return{href:o.toString()}}let cW="dexp-hosted-lead-application-cta",cQ=({firstName:e,schoolName:t,schoolSlug:r,city:n,state:i,applicationCtaUrl:o,applicationCtaLabel:a,applicationCtaFieldMap:l,onCloseExperience:s,productClickedCorrelationId:c,dslConfigId:d,studentLoansInlineContent:u,extraCta:p,lead:f,partnerIdentifiers:m,showCloseButton:h})=>{let g=r?`https://simple-storage-server.highereducation.com/${r}.png?w=130&h=80`:void 0,{eventContext:y}=aS(),{triggerElementClickedEvent:v}=av(),x=()=>
1{if(p?.enabled!==!0||!p.destination?.url)return;let e=cG({baseUrl:p.destination.url,staticParams:p.destination.staticParams,fieldMap:p.destination.fieldMap,missingValue:p.destination.missingValue,sources:{lead:f,partnerIdentifiers:m}});return"href"in e?e.href:void 0},w=x(),S=p?.label??p?.destination?.label??"Learn more",I=!!d&&!!o,C=sf({eventContext:y,productClickedCorrelationId:c,elementType:"dexp-application-cta",name:"dexp-application-cta",location:U.THANK_YOU_PAGE,text:a,dslConfigId:d,outboundUrl:o,fieldMap:l}),j=!!d&&!!w,k=p?.eventName?.trim()||cW,E=sf({eventContext:y,productClickedCorrelationId:c,elementType:cW,name:k,location:U.THANK_YOU_PAGE,text:S,dslConfigId:d,outboundUrl:w,fieldMap:p?.destination?.fieldMap}),A=[...I?[ay(C)]:[],...j?[ay(E)]:[]],{ref:N}=su(A),{ref:T}=su(A),O=(e,t)=>{e.preventDefault(),I&&v(C),window.open(t,"_blank","noopener,noreferrer")},P=e=>{e.preventDefault();let t=x();t&&(j&&v(E),window.open(t,"_blank","noopener,noreferrer"))};return(0,b.jsxs)(aI.Section,{variant:"light",padding:"none",gap:null,className:"relative h-full max-h-dvh flex flex-col overflow-hidden",children:[h&&s&&(0,b.jsx)(aI.Button,{type:"button",variant:"iconOnly",size:"sm",iconBefore:"x","aria-label":"Close",className:"absolute right-4 top-4 z-20",onClick:s}),(0,b.jsxs)(aI.Flex,{direction:"row",align:"center",gap:"lg",className:"px-6 py-5 bg-white shrink-0 z-10",children:[g&&(0,b.jsx)(aI.LogoBox,{src:g,alt:t??""}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"xs",className:"min-w-0 flex-1",children:[(0,b.jsx)(aI.Heading,{variant:"h5",className:"truncate",children:t}),n&&i&&(0,b.jsxs)(aI.Text,{variant:"b4",children:[n,", ",i]})]})]}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"lg",className:"px-10 py-10 flex-1 overflow-y-auto min-h-0",children:[(0,b.jsxs)(aI.Flex,{direction:"column",gap:"xs",children:[(0,b.jsxs)(aI.Heading,{variant:"h2",children:["Congratulations",e?`, ${e}`:"","!"]}),(0,b.jsx)(aI.Text,{variant:"b4",color:"subtext",children:"Your information was submitted successfully."})]}),(0,b.jsx)(aI.Badge,{variant:"light",size:"lg",children:"Now Accepting Students"}),(o||w)&&(0,b.jsxs)(aI.Flex,{ref:N,direction:"column",gap:"md",className:"hidden lg:flex bg-white px-8 py-7 rounded-md",children:[(0,b.jsxs)(aI.Flex,{direction:"column",gap:"xs",children:[(0,b.jsx)(aI.Heading,{variant:"h4",children:o?"Apply Online Today":"Next Steps"}),o&&(0,b.jsx)(aI.Text,{variant:"b4",color:"subtext",children:"Online applications are fast, convenient, and let you track your acceptance status. Start yours today!"})]}),o&&(0,b.jsx)(aI.Button,{variant:"primaryFill",size:"lg",className:"w-full !h-auto min-h-10",onClick:e=>O(e,o),children:a||"Start Your Application"}),w&&(0,b.jsx)(aI.Button,{variant:"primaryFill",size:"lg",className:"w-full !h-auto min-h-10",onClick:P,children:S})]}),!!u&&(0,b.jsx)(cV,{content:u,configId:d}),(0,b.jsxs)(aI.Timeline,{children:[(0,b.jsx)(aI.TimelineEvent,{title:"What to expect from your application:",index:0,hideMarker:!0,children:(0,b.jsx)(aI.TimelineEventDescription,{index:0,isLast:!1,lineColor:"primary",lineWidth:"thick",children:(0,b.jsxs)(aI.List,{bulletStyle:"bullet",children:[(0,b.jsx)(aI.ListItem,{children:"Most applications don't take long to complete."}),(0,b.jsx)(aI.ListItem,{children:"Be prepared to highlight your strengths, achievements, and individuality to show the school who you are."}),(0,b.jsx)(aI.ListItem,{children:"Depending on the school and degree level, you may be asked to provide your GPA and test scores."}),(0,b.jsx)(aI.ListItem,{children:"After submitting your application, track its status online. The school should have a decision soon."})]})})}),(0,b.jsx)(aI.TimelineEvent,{title:"Preparing for a chat with your advisor:",index:1,hideMarker:!0,children:(0,b.jsx)(aI.TimelineEventDescription,{index:1,isLast:!1,lineColor:"primary",lineWidth:"thick",children:(0,b.jsxs)(aI.List,{bulletStyle:"bullet",children:[(0,b.jsxs)(aI.ListItem,{children:["Generally, you can expect to be called immediately or within 2 business days, depending on the availability of the school's counselors. If you miss your call, ",t," ","will try again."]}),(0,b.jsx)(aI.ListItem,{children:"Calls average 20-30 minutes, and you'll typically receive a follow-up email afterwards."}),(0,b.jsx)(aI.ListItem,{children:"Be prepared to talk about your work and school history."}),(0,b.jsx)(aI.ListItem,{children:"Write down a few questions before the call."})]})})}),(0,b.jsx)(aI.TimelineEvent,{title:"Here's what other students are asking:",index:2,hideMarker:!0,children:(0,b.jsx)(aI.TimelineEventDescription,{index:2,isLast:!1,lineColor:"primary",lineWidth:"thick",children:(0,b.jsxs)(aI.List,{bulletStyle:"bullet",children:[(0,b.jsx)(aI.ListItem,{children:"What type of courses will I be taking for my degree?"}),(0,b.jsx)(aI.ListItem,{children:"What scholarships and financial aid are available?"}),(0,b.jsx)(aI.ListItem,{children:"How can I estimate my tuition cost, including books and fees?"})]})})})]})]}),(o||w)&&(0,b.jsxs)(aI.Flex,{ref:T,direction:"column",gap:"md",className:"p-6 bg-white shrink-0 border-t border-gray-100 lg:hidden",children:[(0,b.jsxs)(aI.Flex,{direction:"column",gap:"xs",children:[(0,b.jsx)(aI.Heading,{variant:"h5",children:t}),n&&i&&(0,b.jsxs)(aI.Flex,{direction:"row",align:"center",gap:"xs",children:[(0,b.jsx)(aI.Icon,{icon:"map-pin",size:"sm",color:"secondary","aria-hidden":!0}),(0,b.jsxs)(aI.Text,{variant:"b5",color:"subtext",children:[n,", ",i]})]})]}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"sm",children:[o&&(0,b.jsx)(aI.Button,{variant:"primaryFill",size:"lg",className:"w-full !h-auto min-h-10",onClick:e=>O(e,o),children:a||"Next Steps"}),w&&(0,b.jsx)(aI.Button,{variant:"primaryFill",size:"lg",className:"w-full !h-auto min-h-10",onClick:P,children:S})]}),(0,b.jsx)(aI.Button,{variant:"textOnly",size:"sm",className:"mx-auto",iconAfter:"chevrons-right",onClick:s,children:"Continue browsing schools"})]})]})},cK=U.CONVERSION_DRAWER,cJ=({tcpa:e,schoolName:t,schoolSlug:r,programName:n,questions:i,onProgramSubmit:o,tcpaSecondParagraph:a,programFlow:l,leadSubmissionStatus:s,onCloseExperience:c,productClickedCorrelationId:d,dslConfigId:u})=>{let p=s===l8.SUBMITTING,f=s===l8.UNQUALIFIED,m=r?`https://simple-storage-server.highereducation.com/${r}.png?w=130&h=80`:"",{eventContext:h}=aS(),{triggerElementLoadedEvent:g}=av(),{sendDebouncedFieldEvent:y}=sm(d,u),x=!!u,w=x&&!f&&!!i?.length,S=sp({eventContext:h,productClickedCorrelationId:d,dslConfigId:u}),I=sf({eventContext:h,productClickedCorrelationId:d,elementType:"dexp-hosted-lead-form",name:"dexp-hosted-lead-form-additional",location:cK,dslConfigId:u}),C=(0,v.useRef)(!1);(0,v.useEffect)(()=>{!C.current&&w&&(C.current=!0,g(I))},[w]);let{ref:j}=su(w?[ay(I),ao(S,!0),...i.map((e,t)=>{let r=e.id||`question-${t}`;return ad({...S,fieldName:r,fieldType:"TEXT"===e.questionType?"text":"dropdown",fieldLabel:e.title??"",fieldId:r},"FieldViewed")})]:[]),k=(e,t,r)=>{x&&y(e,t,r,!0)},[E,A]=(0,v.useState)({});return(0,b.jsx)(aI.Section,{asChild:!0,variant:"light",padding:"none",gap:null,minHeight:"screen",children:(0,b.jsxs)("form",{onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget),r={};t.forEach((e,t)=>{r[t]=e.toString()}),o(r)},children:[(0,b.jsxs)(aI.Flex,{direction:"column",gap:"lg",className:"px-section-sides py-section-top-bottom",children:[(0,b.jsxs)(aI.Flex,{direction:"row",align:"center",gap:"sm",children:[(0,b.jsx)(aI.Heading,{variant:"h4",children:"This school requires some additional info."}),(0,b.jsx)(aI.Icon,{icon:"circle-alert",size:"lg",color:"secondary","aria-hidden":!0})]}
1),(0,b.jsx)(aI.DegreeCardSimple,{layout:"compact",schoolName:t??"",degreeTitle:n??"",schoolLogo:m}),f?(0,b.jsx)(aI.Flex,{direction:"column",gap:"sm",children:(0,b.jsx)(aI.Text,{variant:"b3",weight:"bold",children:"Sorry, you do not meet the qualification requirements for this program. You can still explore other programs that may be a better fit for your background."})}):(0,b.jsxs)(aI.Flex,{direction:"column",gap:"md",ref:j,children:[i?.map((e,t)=>{let r=e.id||`question-${t}`;return"TEXT"===e.questionType?(0,b.jsx)(aI.Input,{variant:"two-line",label:e.title??"",id:r,name:r,type:"text",onChange:e=>k(r,"text",e.target.value)},r):(0,b.jsxs)("div",{children:[(0,b.jsx)("input",{type:"hidden",name:r,value:E[r]??""}),(0,b.jsx)(aI.Select,{variant:"two-line",label:e.title??"",id:r,placeholder:"Select...",value:E[r],onValueChange:e=>{A(t=>({...t,[r]:e})),k(r,"dropdown",e)},children:e.options?.map(e=>(0,b.jsx)(aI.SelectItem,{value:String(e.value??""),children:e.text},e.optionId))})]},r)}),(0,b.jsx)(ss,{title:"",tcpaSecondParagraph:a,tcpa:e,schoolId:r,schoolName:t,programFlow:l})]}),f&&(0,b.jsx)(aI.Flex,{direction:"row",children:(0,b.jsx)(aI.Button,{type:"button",variant:"primaryOutline",size:"sm",onClick:c,children:"Close"})})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aI.Flex,{className:"flex-1"}),(0,b.jsx)(aI.Section,{variant:"white-border-top",padding:"section",position:"sticky-bottom",children:(0,b.jsxs)(aI.Flex,{direction:"column",gap:"sm",align:"center",children:[(0,b.jsx)(aI.Text,{variant:"b4",weight:"bold",children:"Double check your information before submitting"}),(0,b.jsx)(aI.Text,{variant:"b5",color:"subtext",children:"Your information will never be shared with a school without your consent."}),(0,b.jsx)(aI.Button,{type:"submit",variant:"primaryFill",size:"lg",disabled:p,children:p?(0,b.jsx)(aI.LoadingDots,{color:"white",label:"Submitting additional information"}):"Submit"})]})})]})]})})},cX=({status:e,schoolName:t,onRetry:r,onCloseExperience:n})=>e?(0,b.jsx)(aI.Flex,{direction:"column",justify:"center",align:"center",height:"full",width:"full",className:"min-h-status-panel px-3 text-center",children:(0,b.jsxs)(aI.Flex,{direction:"column",justify:"center",align:"center",gap:"md",className:"animate-fade-in-0 motion-reduce:animate-none",children:[e===l8.SUBMITTING&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aI.LoadingDots,{label:`Requesting information from ${t}...`,color:"primary"}),(0,b.jsxs)(aI.Heading,{variant:"h4",children:["Requesting information from ",t,"..."]}
1)]}),e===l8.SUBMITTED&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aI.Icon,{icon:"circle-check",size:"4xl",color:"primary","aria-hidden":!0}),(0,b.jsxs)(aI.Text,{variant:"b1",children:["Successfully requested information from"," ",(0,b.jsxs)("strong",{children:[t,"!"]})]})]}),e===l8.ERROR&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aI.Icon,{icon:"circle-alert",size:"4xl",color:"secondary","aria-hidden":!0}),(0,b.jsxs)(aI.Text,{variant:"b1",children:["Unable to request information from ",(0,b.jsx)("strong",{children:t})]}),(0,b.jsx)(aI.Text,{variant:"b3",color:"subtext",children:"Something went wrong. Please try again in a moment."}),r&&(0,b.jsx)(aI.Button,{variant:"primaryFill",onClick:r,children:"Try again"})]}),e===l8.UNQUALIFIED&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aI.Icon,{icon:"circle-alert",size:"4xl",color:"warning","aria-hidden":!0}),(0,b.jsx)(aI.Heading,{variant:"h4",children:"This program isn't a fit right now"}),(0,b.jsx)(aI.Text,{variant:"b3",color:"subtext",className:"max-w-sm",children:"You don't meet the qualification requirements for this program. You can still explore other programs that may be a better fit."}),(0,b.jsx)(aI.Button,{variant:"primaryFill",onClick:n,children:"Browse other programs"})]})]},e)}):null;function cZ(e,t){let r=e?.applicationCtaURL;if(!r)return;let{applicationCtaFieldMap:n,applicationCtaStaticParams:i}=e??{};if(!n&&!i)return r;let o=cG({baseUrl:r,fieldMap:n,staticParams:i,missingValue:e?.applicationCtaMissingValue,sources:t});return"href"in o?o.href:void 0}let c0=({PiiConfirmationComponent:e,ExitStrategyComponent:t,AdditionalQuestionsComponent:r,SubmissionStatusComponent:n,step:i,selectedResult:o,startTime:a,piiLeadErrors:l,editMode:s,setEditMode:c,degree:d,isLoading:u,leadSubmissionStatus:p,setLeadSubmissionStatus:f,canSubmit:m,formHeading:h,formSubHeading:g,firstName:y,lastName:v,email:x,phone:w,setFirstName:S,setLastName:I,setEmail:C,setPhone:j,formErrors:k,questions:E,onProgramSubmit:A,onNextSteps:N,onBackButtonClick:T,onCloseExperience:O,productClickedCorrelationId:P,dslConfigId:M,studentLoansInlineContent:R,extraCtaConfig:L,partnerIdentifiers:F,showExitStrategyCloseButton:U})=>{if((p!==l8.UNQUALIFIED||i!==si.ADDITIONAL_QUESTIONS)&&(p===l8.SUBMITTING||p===l8.ERROR||p===l8.SUBMITTED||p===l8.UNQUALIFIED)&&n)return(0,b.jsx)(n,{status:p,schoolName:o?.schoolName,onRetry:A,onCloseExperience:O});let $={PII_CONFIRMATION:e,EXIT_STRATEGY:t,ADDITIONAL_QUESTIONS:r}[i];if(!$)return null;let _={firstName:y,lastName:v,email:x,phoneNumber:w},D={selectedResult:o,startTime:a,piiLeadErrors:l,editMode:s,setEditMode:c,degree:d,isLoading:u,leadSubmissionStatus:p,setLeadSubmissionStatus:f,canSubmit:m,formHeading:h,formSubHeading:g,firstName:y,lastName:v,email:x,phone:w,setFirstName:S,setLastName:I,setEmail:C,setPhone:j,formErrors:k,questions:E,onFormError:()=>{},onProgramSubmit:A,formCorrelationId:"",setPiiLeadErrors:()=>{},setFormErrors:()=>{},tcpa:o?.tcpa||"",schoolName:o?.schoolName||"",schoolSlug:o?.schoolSlug||"",city:o?.city,state:o?.state,programName:o?.programName||"",programFlow:o?.programFlow||[],tcpaSecondParagraph:o?.tcpaSecondParagraph||"",imageURL:o?.imageURL,valueProps:o?.valueProps,programDates:o?.programDates,onBackButtonClick:T,onCloseExperience:O,introText:o?.confirmationShortIntroText||o?.confirmationText||"",applicationCtaUrl:cZ(o,{lead:_,partnerIdentifiers:F}),applicationCtaLabel:o?.applicationCtaLabel,applicationCtaFieldMap:o?.applicationCtaFieldMap,productClickedCorrelationId:P,dslConfigId:M,studentLoansInlineContent:R,extraCta:L?{enabled:L.enabled,label:L.label,eventName:L.eventName,destination:o?.postLeadCta}:void 0,partnerIdentifiers:F,...L&&o?.postLeadCta?.url||o?.applicationCtaFieldMap?{lead:_}:{},showCloseButton:U};return(0,b.jsx)($,{...D})},c1=e=>(0,b.jsx)(c0,{...e,PiiConfirmationComponent:sx,ExitStrategyComponent:cQ,AdditionalQuestionsComponent:cJ,SubmissionStatusComponent:cX}),c2=({open:e,onClose:t,children:r,title:n="Program submission"})=>{let i=sv("(max-width: 767px)");return(0,b.jsx)(aI.Drawer,{direction:i?"bottom":"right",open:e,onOpenChange:e=>{e||t()},children:(0,b.jsxs)(aI.DrawerContent,{size:i?"full":"1/2",className:"bg-neutral-50 overflow-x-hidden overflow-y-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden data-[vaul-drawer-direction=bottom]:!max-h-full data-[vaul-drawer-direction=bottom]:!mt-0 data-[vaul-drawer-direction=bottom]:w-full data-[vaul-drawer-direction=bottom]:max-w-full",bottomBarEnd:i?(0,b.jsx)(aI.DrawerClose,{asChild:!0,children:(0,b.jsx)(aI.Button,{type:"button",variant:"iconOnly",size:"sm",iconBefore:"x","aria-label":"Close program details",className:"shrink-0"})}):void 0,children:[(0,b.jsxs)(aI.DrawerHeader,{className:"sr-only",children:[(0,b.jsx)(aI.DrawerTitle,{children:n}),(0,b.jsx)(aI.DrawerDescription,{children:"Review program details and confirm your contact information."})]}),r]})})},c4=({productClickedCorrelationId:e})=>{let[t,r]=(0,v.useState)(si.PII_CONFIRMATION),[n,i]=(0,v.useState)(!1),{eventContext:o}=aS(),{triggerElementClickedEvent:a}=av(),l=(0,v.useCallback)(()=>{i(!1),r(si.PII_CONFIRMATION)},[]),s=(0,v.useCallback)(()=>{i(!1),a({...o,productClickedCorrelationId:e,elementType:"dexp-slideout-close",name:"dexp-slideout-close-button",text:"X",location:U.CONVERSION_DRAWER})},[e,o,a]),c=(0,v.useCallback)(()=>i(!0),[]),d=(0,v.useCallback)(()=>r(si.PII_CONFIRMATION),[]),u=(0,v.useCallback)(()=>r(si.ADDITIONAL_QUESTIONS),[]),p=(0,v.useCallback)(()=>r(si.EXIT_STRATEGY),[]);return{showSlideoutExperience:n,closeSlideoutExperience:s,resetSlideoutExperience:l,openSlideoutExperience:c,singleSubmissionExperienceStep:t,setSingleSubmissionExperienceStep:r,goToSlideoutPiiConfirmation:d,goToSlideoutExitStrategy:p,goToSlideoutAdditionalQuestions:u}},c3=async({postResultsQuestions:e,programFlowQuestions:t,requiredFields:r,schema:n})=>{if(!e||!r)return[];let i=e.filter(e=>e.leadFieldAssociated&&r.includes(e.leadFieldAssociated)),o=[],a=new Set;
1(t??[]).forEach(e=>{if(e.type!==O.QUESTION)return;let t=e.leadFieldAssociated,n=!!t&&r.includes(t),i=!1,l=new Set;e.options&&e.options.forEach(e=>{e.leadFieldAssociated&&r.includes(e.leadFieldAssociated)&&(i=!0,l.add(e.leadFieldAssociated))}),(n||i)&&(o.push(e),n&&t&&a.add(t),l.forEach(e=>a.add(e)))});let l=new Set;o.forEach(e=>{e.leadFieldAssociated&&l.add(e.leadFieldAssociated),e.options&&e.options.forEach(e=>{e.leadFieldAssociated&&l.add(e.leadFieldAssociated)})});let s=[...o,...i.filter(e=>!e.leadFieldAssociated||!l.has(e.leadFieldAssociated))],c=n?.properties?.programTrack?.anyOf?.map(e=>e.enum).flat(),d=s.map(e=>{if(e?.leadFieldAssociated!=="programTrack"||!c||0===c.length||!e.options||!Array.isArray(e.options))return e;let t=new Set(c),r=e.options.filter(e=>e.value&&t.has(e.value));return{...e,options:r}}),u=new Set;return a.forEach(e=>u.add(e)),d.forEach(e=>{e?.leadFieldAssociated&&u.add(e.leadFieldAssociated)}),[...d,...r.filter(e=>!u.has(e)).map(e=>({id:`default-${e}`,type:O.QUESTION,questionType:N.TEXT,title:`${e}*`,leadFieldAssociated:e,isTerminal:!1,options:[]}))]},c5="default",c6=[{fieldName:"first-name",fieldType:"text",fieldValue:"SANITIZED"},{fieldName:"last-name",fieldType:"text",fieldValue:"SANITIZED"},{fieldName:"email",fieldType:"text",fieldValue:"SANITIZED"},{fieldName:"phone",fieldType:"text",fieldValue:"SANITIZED"}],c8=({lead:e,needsActiveProspectToken:t,activeProspectToken:r,jornayaToken:n,programId:i,selectedResult:o,productClickedCorrelationId:a,contactId:l,inputs:s,record:c,dslConfigId:d,flowType:u,trafficSource:p,precreatedConversionId:f,programFinderContext:m,onLeadSubmitted:h})=>{let[g,y]=(0,v.useState)(!1),[b,x]=(0,v.useState)(!1),[w,S]=(0,v.useState)([]),[I,C]=(0,v.useState)(!1),[j,k]=(0,v.useState)(null),{eventContext:A}=aS(),{triggerFormEvents:N}=av(),T=ro(),O=async()=>{C(!0),k(null);try{let i=Y(),a=o?.organizationId?.trim(),l=o?.offeringUuid?.trim();if(!a)throw Error("LDS v4 organizationId is required to fetch post-result questions");let s=tv(E()),c=new tZ({baseUrl:i.deliverySystemApiUrl||"",defaultHeaders:s}),d=await c.getLeadSchemaV4({organizationId:a,offeringUuid:l}),u=d.required?.includes("thirdPartyLeadId")?{...e,thirdPartyLeadId:t?r:n}:e,p=await c.getDiffyV4({lead:u},{organizationId:a,offeringUuid:l});if(!p?.diffy)throw Error("LDS v4 diffy response did not include a diffy schema");let f=p.diffy,m=o?.programFields?.flowId,h=[];if(m){let e=await en(c5,m);e.error&&console.warn(`Failed to fetch program-fields flow "${m}": ${e.error}`),h=e.data??[]}let g=(await en(c5,"prq-flow")).data||[],y=f.required||[],b=[],v=new Set,x=f.properties||{};return Object.entries(x).forEach(([e,t])=>{let r=t.required;Array.isArray(r)&&r.length>0&&(v.add(e),r.forEach(e=>{b.includes(e)||b.push(e)}))}),y.forEach(e=>{let t=v.has(e),r=b.includes(e);t||r||b.push(e)}),await c3({postResultsQuestions:g,programFlowQuestions:h,requiredFields:b,schema:d})}catch(e){throw k(e instanceof Error?e:Error("Unknown error")),e}finally{C(!1)}},P=async i=>{if(!c)throw Error("Cannot submit lead: record is not available");if(!o)throw Error("Cannot submit lead: selectedResult is not available");y(!0);try{let s=f;if(!s){let t=r4(o,T??{},o.productClickedCorrelationId||a,{flowType:u,trafficSource:p,location:{country:e.location?.country,state:e.location?.stateAbbr??e.location?.state}});s=(await na(t)).conversionId}let d=await nl({activeProspectToken:r,jornayaToken:n,needsActiveProspectToken:t||!1,record:c,result:o,conversionId:s,inputs:i,productCorrelationId:a,contactId:l,identityToken:T?.identityToken,programFinderContext:m});return h?.(d),d}finally{y(!1)}},M=(0,v.useCallback)((t,r,n)=>{let i=[];n&&w.length>0&&Object.entries(n).forEach(([e,t])=>{let r=w.find(t=>t.id===e);r&&i.push({fieldName:r.title||e,fieldType:r.type||"text",fieldValue:rh(String(r.leadFieldAssociated),r,r.title)?"SANITIZED":String(t??"")})});let a=cZ(o,{lead:e,partnerIdentifiers:r?l9(r):void 0});N("FormSubmitted",{...A,productClickedCorrelationId:t,outboundUrl:r6(a,o?.applicationCtaFieldMap)??"",formName:"dexp-hosted-lead-form",stepName:"pii-confirmation",stepType:"LEAD",field:[...c6,...i]})},[A,N,w,o,e]),R=(0,v.useCallback)(()=>{d&&N("FormContinued",{...A,productClickedCorrelationId:a,formName:"dexp-hosted-lead-form",stepName:"pii-confirmation",stepType:"LEAD",field:[...c6]})},[A,a,d,N]),L=(0,v.useCallback)(async()=>{try{let e=await O();if(0!==e.length)return R(),S(e),x(!0),{hasQuestions:!0};{let e=await P(s);return M(a,e),{hasQuestions:!1}}}catch(e){throw console.error("Error checking for additional questions:",e),k(e instanceof Error?e:Error("Unknown error")),e}},[e,i,a,l,s,c,M,R,m]),F=(0,v.useCallback)(async e=>{let t={};Object.entries(e).forEach(([e,r])=>{let n=w.find(t=>
1t.id===e),i=n?.leadFieldAssociated||n?.options?.find(e=>e.leadFieldAssociated&&String(e.value)===String(r))?.leadFieldAssociated;i&&(t[i]={key:i,value:r})});let r={...s,...t};M(a,await P(r),e),x(!1),S([])},[s,c,a,l,w,M,m]);return{isSubmitting:g,showAdditionalQuestions:b,additionalQuestions:w,isLoadingQuestions:I,questionsError:j,checkForAdditionalQuestionsAndSubmit:L,submitWithAdditionalData:F,resetAdditionalQuestions:(0,v.useCallback)(()=>{x(!1),S([])},[])}},c9=()=>{let[e,t]=(0,v.useState)("");return(0,v.useEffect)(()=>{if(window.trustedFormCallback=e=>t(e),document.querySelector('script[src*="cdn.trustedform.com/bootstrap.js"]'))return;let e=new Date().getTime()+Math.random(),r="http:"===document.location.protocol?"http":"https",n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=`${r}://cdn.trustedform.com/bootstrap.js?provide_referrer=false&field=xxTrustedFormCertUrl&l=${e}&invert_field_sensitivity=false&use_tagged_consent=true`,document.body.appendChild(n)},[]),e},c7=()=>((0,v.useEffect)(()=>{if(document.querySelector('script[src*="create.lidstatic.com/campaign/1a8b1fee-893f-e8f5-901a-5d12b2e0d47b.js"]'))return;let e=document.createElement("script");return e.id="LeadiDscript_campaign",e.type="text/javascript",e.async=!0,e.src="//create.lidstatic.com/campaign/1a8b1fee-893f-e8f5-901a-5d12b2e0d47b.js?snippet_version=2",document.body.appendChild(e),()=>{document.body.removeChild(e)}},[]),window.LeadiD?.token??""),de=e=>{if(!e||0===e.length)return;let t=new Date().getTime(),r=e.find(e=>new Date(e.registerDate).getTime()>t);return r&&Object.keys(r).forEach(e=>{let t=new Date(r[e]);t.setDate(t.getDate()+1),r[e]=new Date(t).toLocaleString("en-US",{month:"long",day:"numeric"})}),r},dt=/^(Master's|Doctorate)$/i,dr=(e,t,r,n,i,o,a)=>{let l=E();return e.map(e=>{let s=parseInt(e.organization.id,10),c=t[s]??(Number.isFinite(e.organization.sourceId)?t[e.organization.sourceId]:void 0)??(e.organization.slug?a?.[e.organization.slug]:void 0),d=n&&n.includes(s)?function(e,t,r,n,i){if(!n)return;let o=i||Y().mobiusApiUrl||"https://api.mobius.highereducation.com",a=`idToken=${n}&helid=${E()}`;return`${o}/v1/redirect/${e}/${t}`+(""!==r&&"none"!==r?`/${r}`:"")+`?${a}`}(e.id,e.meta.capId,e.meta.audience||"",i,o):void 0;return{schoolName:e?.organization?.name,schoolId:e?.organization?.id,schoolSlug:e?.organization?.slug,city:c?.location?.city||c?.tags?.city||"",state:c?.location?.state||c?.tags?.state||"",programId:e?.id,programName:e?.name,imageURL:c?.images?.logo||e?.imageUrl,snippet:e?.snippet,levelOfInstitution:c?.additional?.levelOfInstitution||"",accreditator:c?.additional?.accreditator||"",percentOnlineEnrollment:c?.additional?.percentOnlineEnrollment||null,isOnline:c?.tags?.isOnline??!1,isPublic:c?.tags?.isPublic,isPrivate:c?.tags?.isPrivate,forProfit:c?.tags?.isForProfit,notForProfit:c?.tags?.isNotForProfit??!1,applicationCtaLabel:e?.meta?.applicationCta?.label,applicationCtaURL:e?.meta?.applicationCta?.url,programFlow:c?.formCustomizations?.programFlow,tcpa:c?.content?.tcpa,tcpaSecondParagraph:c?.tcpaSecondParagraph,confirmationShortIntroText:c?.content?.confirmation?.meta?.shortIntro,confirmationText:c?.content?.confirmation?.meta?.text,valueProps:c?.content?.valueProps,programDates:dt.test(r||"")?de(c?.formDates?.grad):de(c?.formDates?.undergrad),providerName:e?.meta?.providerName,viewCorrelationId:E(),embeddedViewCorrelationId:E(),spotlight:c?.content?.spotlight,audience:e.meta.audience,capId:e.meta.capId,linkoutUrl:d,degreeSlug:e.meta?.degree?.slug,categorySlug:e.meta?.category?.slug,subjectSlug:e.meta?.subject?.slug,listId:l}})},dn=async e=>{if(!e.lead)throw Error("Lead is required to fetch qualified results");let t="undefined"!=typeof navigator?navigator.userAgent:"",r=Y(),n=r.deliverySystemApiUrl??"",i=r.offeringsSearchApiUrl??"",o=r.organizationApiUrl??"",a=r.mobiusApiUrl??"",l={...tv(E())};try{let r,s=e.qualified||[],c=e.unqualified||[],d=s.map(e=>({id:e})),u=c.map(e=>({id:e}));if(!e.qualified&&!e.unqualified){let t=new tZ({defaultHeaders:l,baseUrl:n}),r=await t.postLeadQualifications({lead:e.lead,trackingContext:e.trackingContext||{}});if(!r)throw Error("Invalid qualifications response");s=r.qualified?.map(e=>e.id).filter(e=>!!e)||[],c=r.unqualified?.map(e=>e.id).filter(e=>!!e)||[],d=(r.qualified||[]).flatMap(e=>e.id?[{id:e.id}]:[]),u=(r.unqualified||[]).flatMap(e=>e.id?[{id:e.id}]:[])}let p=await eu(),f=p?.regionCode||e.lead.location?.state||"CA",m=p?.countryCode||"US",h=e.lead.location?.state||f,g=e.lead.location?.country||m,y={state:h,degree:e.degree||"",category:e.category||"",subject:e.subject||"",qualified:s,unqualified:c,country:g,channel:"web",media:"organic",experience:"voyager",presentationUrl:e.presentationUrl||"",startDate:e.lead.startDate||void 0,schoolIds:e.schoolIds,excludeProgramIds:e.excludeProgramIds,limit:e.limit};e.forceLinkoutSchoolIds&&Array.isArray(e.forceLinkoutSchoolIds)&&e.forceLinkoutSchoolIds.length>
10&&(y.forceAudience={audience:"branded",schoolIds:e.forceLinkoutSchoolIds});let b=new e7({baseUrl:i,defaultHeaders:l}),v=await b.getQualifiedOfferings(y,p?.ip?p.ip:null);if(!v||!v?.data)throw Error("No qualified offerings found");let{exact:x,related:w,recommended:S,spotlight:I}=v.data,C=[...x,...w,...S,...I],j=Array.from(new Set(C.map(e=>parseInt(e.organization.id)).filter(e=>void 0!==e&&!isNaN(e)))),k={},E={};if(j.length>0)try{let e=new lE({baseUrl:o,defaultHeaders:l}),r=await e.postMarketingLookup({schoolIds:j,isPreview:!1,version:"latest"},t||"unknown"),n=r?.data||[];for(let e of(k={},E={},n))"number"==typeof e.organizationId&&(k[e.organizationId]=e),e.slug&&(E[e.slug]=e)}catch(e){console.warn("Failed to fetch organization marketing data, continuing without it",e)}let A=(({degree:e,exactOfferings:t,relatedOfferings:r})=>{if(!t||!r)return[];let n=0;if("Associate's"===e&&t.length<4&&(n=4),"Bachelor's"===e&&t.length<6&&(n=6),0!==n){var i;let e,o;return(e=new Set,i=r.filter(t=>{let r=t.organization.id;return!e.has(r)&&(e.add(r),!0)}),o=new Set(t?.map(e=>e.organization.id)??[]),i?.filter(e=>!o.has(e.organization.id)))?.slice(0,n-t.length)}return[]})({degree:e.degree,exactOfferings:x,relatedOfferings:w}),N=[...x,...A],T=(r=new Set(A?.map(e=>e.id)??[]),w?.filter(e=>!r.has(e.id)));return{qualified:d,unqualified:u,locationInference:{stateAbbr:f,countryCode:m},exactResults:dr(N,k,e.degree,e.forceLinkoutSchoolIds,e.publisherToken,a,E),relatedResults:dr(T,k,e.degree,e.forceLinkoutSchoolIds,e.publisherToken,a,E),recommendedResults:dr(S,k,e.degree,e.forceLinkoutSchoolIds,e.publisherToken,a,E),spotlightResults:dr(I,k,e.degree,e.forceLinkoutSchoolIds,e.publisherToken,a,E)}}catch(e){throw console.error("Could not fetch qualified results",e),e}},di=async({lead:e,degree:t,category:r,subject:n,presentationUrl:i,forceLinkoutSchoolIds:o,schoolId:a,excludeProgramIds:l,limit:s,qualified:c,unqualified:d})=>{if(!a)throw Error("schoolId is required to fetch duplicate programs");return(await dn({lead:e,degree:t,category:r,subject:n,presentationUrl:i,forceLinkoutSchoolIds:o,schoolIds:[a],excludeProgramIds:l,limit:s,exactOnly:!0,qual
1ified:c,unqualified:d})).exactResults},da=({duplicateResult:e,leadRef:t,degree:r,category:n,subject:i,forceLinkoutSchoolIds:o,qualifiedIds:a,unqualifiedIds:l})=>{let[s,c]=(0,v.useState)([]),[d,u]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{if(!e){c([]),u(!1);return}let s=parseInt(e.schoolId,10);if(Number.isNaN(s))return;let d=!1,p=window.location.href;return(async()=>{u(!0);try{if(!t.current){console.warn("Lead is not available for fetching duplicate programs"),d||c([]);return}let u=await di({lead:t.current,degree:r,category:n,subject:i,presentationUrl:p,forceLinkoutSchoolIds:o,schoolId:s,excludeProgramIds:[e.programId],limit:50,qualified:a,unqualified:l});d||c(u)}catch(e){console.error("Error fetching duplicate programs",e),d||c([])}finally{d||u(!1)}})(),()=>{d=!0}},[n,r,e,i,a,l,o,t]),{duplicatePrograms:s,duplicateProgramsLoading:d}},dl=[64,75,142,495,1151,81],ds=e=>e instanceof Error&&e.message.includes("qualifications_not_met")?l8.UNQUALIFIED:l8.ERROR,dc=async(e,t,r,n,i,o)=>{let a=e.offeringId?.trim()||e.offeringUuid?.trim(),l=t?.tenantId?.trim();if(!a||!l)return;let s=e.offeringId?.trim()?e:{...e,offeringId:a};try{let a=r4(s,t??{},e.productClickedCorrelationId||r,{flowType:n,trafficSource:o,location:i});return(await na(a)).conversionId}catch(e){console.error("[ensureConversion] click-time conversion create failed; the user still routes into the application view",e);return}},dd=(0,v.createContext)(void 0),du=!1,dp=[],df=Object.freeze({openLeadFlow:()=>{du||(du=!0,console.warn("[LeadFlowProvider] openLeadFlow dispatched without a LeadFlowProvider in scope; dropping."))},closeLeadFlow:()=>{},selectedResult:void 0,isOpen:!1,mode:"drawer",firstName:void 0,leadFlowContent:null,submittedResults:dp,applyOfferingDetail:()=>{}}),dm=[],dh=({children:e,dslConfigId:t,flowType:r,trafficSource:n,studentLoansInlineContent:i,extraCtaConfig:o})=>{let[a,l]=(0,v.useState)(),[s,c]=(0,v.useState)(void 0),[d,u]=(0,v.useState)("drawer"),[p,f]=(0,v.useState)(),[m,h]=(0,v.useState)(),{flowState:g,steps:y}=aS(),x=st(),w=(0,v.useRef)(x);w.current=x;let S=(0,v.useMemo)(()=>rS(g??{}),[g]),I=(0,v.useMemo)(()=>ry(y??[],g??{}),[y,g]),[C,j]=(0,v.useState)(""),[k,A]=(0,v.useState)(""),[N,T]=(0,v.useState)(""),[O,P]=(0,v.useState)(""),[M,R]=(0,v.useState)(!1),[L,F]=(0,v.useState)(void 0),[U,$]=(0,v.useState)(void 0),[_,D]=(0,v.useState)(void 0),Y=(0,v.useCallback)(e=>{D(l9(e))},[]),B=(0,v.useRef)(0),z=(0,v.useRef)(new Map),V=ro();(0,v.useEffect)(()=>{j(e=>e||(S.firstName?.value?.toString()??"")),A(e=>e||(S.lastName?.value?.toString()??"")),T(e=>e||(S.email?.value?.toString()??"")),P(e=>e||(S.phoneNumber?.value?.toString()??""))},[S]);let H=(0,v.useMemo)(()=>({...S,...!S.country?{country:{key:"country",value:"US"}}:{},firstName:{key:"firstName",value:C},lastName:{key:"lastName",value:k},email:{key:"email",value:N},phoneNumber:{key:"phoneNumber",value:O}}),[S,C,k,N,O]),q=(0,v.useMemo)(()=>rV(H),[H]),G=(0,v.useRef)(q);(0,v.useEffect)(()=>{G.current=q},[q]);let W=(0,v.useMemo)(()=>(x?.submittedResults??dp).map(e=>({programId:e.programId,schoolId:e.schoolId})),[x?.submittedResults]),Q=c9(),K=c7(),J=(0,v.useMemo)(()=>a?.productClickedCorrelationId||E(),[a]),X=(0,v.useMemo)(()=>{if(a)return{school:{id:a.schoolId,slug:a.schoolSlug,name:a.schoolName},program:{id:a.programId,leadSource:I.leadSource}}},[a,I]),{additionalQuestions:Z,checkForAdditionalQuestionsAndSubmit:ee,submitWithAdditionalData:et}=c8({lead:q,needsActiveProspectToken:(0,v.useMemo)(()=>!!a?.schoolId&&dl.includes(Number(a.schoolId)),[a?.schoolId]),activeProspectToken:Q||"",jornayaToken:K,programId:a?.programId.toString()||"",selectedResult:a,productClickedCorrelationId:J,inputs:H,record:X,applicationCtaURL:a?.applicationCtaURL||"",dslConfigId:t,flowType:r,trafficSource:n,precreatedConversionId:U,onLeadSubmitted:Y}),{showSlideoutExperience:er,closeSlideoutExperience:en,resetSlideoutExperience:ei,openSlideoutExperience:eo,singleSubmissionExperienceStep:ea,goToSlideoutPiiConfirmation:el,goToSlideoutAdditionalQuestions:es,goToSlideoutExitStrategy:ec}=c4({productClickedCorrelationId:J}),{duplicatePrograms:ed,duplicateProgramsLoading:eu}=da({duplicateResult:p??null,leadRef:G,degree:I.levelOfEducation,category:I.category,subject:I.subject,qualifiedIds:dm,unqualifiedIds:dm}),ep=(0,v.useMemo)(()=>{let e=L===l8.SUBMITTING,t=!C||!k||!N||!O;return!e&&!!a&&!t},[L,a,C,k,N,O]),ef=(0,v.useRef)(a);ef.current=a;let em=(0,v.useCallback)(()=>{let e=ef.current;e&&w.current?.trackSubmission(e)},[]),eh=(0,v.useCallback)(async()=>{F(l8.SUBMITTED),em();let e=ef.current;await new Promise(e=>setTimeout(e,1500)),ef.current===e&&(F(void 0),ec())},[em,ec]),eg=(0,v.useCallback)((e,t,i="pii")=>{if(ef.current?.offeringUuid!==e.offeringUuid&&c(void 0),l(e),F(void 0),u(t?.mode??"drawer"),"pii"===i&&D(void 0),$(void 0),"pii"===i&&nu(e)){let t=e.productClickedCorrelationId||e.offeringId||e.offeringUuid||String(e.programId),i=z.current.get(t);if(i)$(i);else{let i=B.current+=1,o=g?.location;dc(e,V,e.productClickedCorrelationId||"",r,{country:o?.countryCode,state:o?.state},n).then(e=>{e&&B.current===i&&(z.current.set(t,e),$(e))})}}"exitStrategy"===i?ec():el(),eo()},[el,ec,eo,V,r,n,g]),ey=(0,v.useCallback)((e,t)=>{if(!nu(e))return void console.warn("[LeadFlowProvider] openLeadFlow ignored â result must carry a numeric programId and either a non-empty offeringUuid or the full schoolId, schoolSlug, schoolName, and programName quartet.");let r=w.current;if(r){if(r.isProgramSubmitted(e.programId))return void eg(e,t,"exitStrategy");if(!t?.skipDuplicateCheck&&r.hasSchoolSubmitted(e.schoolId)){f(e),h(t);return}}eg(e,t)},[eg]),eb=(0,v.useCallback)(()=>{f(void 0),h(void 0)},[]),ev=(0,v.useCallback)(()=>
1{if(f(void 0),h(void 0),!p)return;let e=w.current?.getSubmittedForSchool(p.schoolId);e&&eg(e,m,"exitStrategy")},[p,m,eg]),ex=(0,v.useCallback)(async()=>{try{F(l8.SUBMITTING);let{hasQuestions:e}=await ee();e?(F(l8.PENDING),es()):await eh()}catch(e){console.error("Error submitting lead:",e),F(ds(e))}},[ee,es,eh]),ew=(0,v.useCallback)(async e=>{try{F(l8.SUBMITTING),await et(e),await eh()}catch(e){console.error("Error submitting lead with additional data:",e),F(ds(e))}},[et,eh]),eS=(0,v.useCallback)(e=>{ea===si.ADDITIONAL_QUESTIONS&&e?ew(e):ex()},[ea,ew,ex]),eI=(0,v.useCallback)(e=>{c(e)},[]),eC=(0,v.useMemo)(()=>{if(!a||s?.status!=="resolved")return a;try{let e=lB(s.data);if(!function(e,t){if(!e||!t)return!1;let r=e.externalIds?.edudirectId,n=e.slug,i=lz(r)&&lz(t.schoolId),o=lz(n)&&lz(t.schoolSlug);return!i&&!o||!!i&&r===t.schoolId||!!o&&n===t.schoolSlug}(e,a))return a;let t=lY(e);return{...a,...t}}catch(e){return ne(e instanceof Error?e:Error(String(e)),{source:"LeadFlowProvider",context:"offering-detail-merge"}),a}},[a,s]),ej=eC?(0,b.jsx)(c1,{selectedResult:eC,step:ea,startTime:parseInt(I?.startDate??"",10),piiLeadErrors:[],setEditMode:R,editMode:M,setFirstName:j,setLastName:A,setEmail:T,setPhone:P,formErrors:[],setFormErrors:()=>{},formHeading:"Confirm your contact details:",formSubHeading:"",onBackButtonClick:el,onNextSteps:ec,onProgramSubmit:eS,firstName:C,lastName:k,email:N,phone:O,leadSubmissionStatus:L,setLeadSubmissionStatus:F,canSubmit:ep,isLoading:!1,questions:Z,productClickedCorrelationId:J,onCloseExperience:en,dslConfigId:t,studentLoansInlineContent:i,extraCtaConfig:o,partnerIdentifiers:_,showExitStrategyCloseButton:"inline"===d}):null,ek=ej?(0,b.jsx)(sr,{onError:ei,children:ej},a?.offeringUuid||a?.programId):null,eE=(0,v.useMemo)(()=>({openLeadFlow:ey,closeLeadFlow:en,selectedResult:eC,isOpen:er,mode:d,firstName:C||S.firstName?.value?.toString()||void 0,leadFlowContent:ek,submittedResults:W,applyOfferingDetail:eI}),[ey,en,eC,er,d,C,S.firstName?.value,ek,W,eI]);return(0,b.jsxs)(dd.Provider,{value:eE,children:[e,"drawer"===d&&(0,b.jsx)(c2,{open:er,onClose:en,children:ek}),p&&(0,b.jsx)(sn,{result:p,otherPrograms:ed,isLoading:eu,onClose:eb,onViewNextSteps:ev})]})};function dg(){return(0,v.useContext)(dd)??df}function dy(){return(0,v.useContext)(dd)}function db(e,t,r){let{name:n,payload:i}=ap({correlationId:e.correlationId??E(),viewCorrelationId:e.viewCorrelationId,elementType:"dexp-compare-checkbox",name:"dexp-compare-toggle",location:"dexp-results-page",position:e.position,htmlId:t?"enabled":"disabled",text:"Compare",customDimensions:[{key:"schoolSlug",value:e.schoolSlug},...r?[{key:"dslConfigId",value:r}]:[]]}),o=window._Cohesion?.webContext;ab(n,o?{...i,webContext:o}:i)}function dv(e,t){let r=t??"",n=function(e){if(0===e.length)return[];if(e.includes("["))return null;let t=e.split("."),r=[];for(let e of t){if(0===e.length)return null;r.push({type:"key",name:e})}return r}(r);if(null===n)return console.warn(`[platform.dataRepeater] Invalid iteratorPath "${r}" â must be a plain dot path with no [*] wildcards.`),null;let i=n7(e,n);return Array.isArray(i)?i:null}let dx=(e,t,r)=>Math.min(r,Math.max(t,e));function dw(e,t){if(0!==t.length)return n7(e,t.split(".").map(e=>({type:"key",name:e})))}function dS(e){return"function"==typeof e}function dI({slots:e,children:t,...r}){let n=function({status:e,bound:t=!1,unboundStatus:r="resolved",narrowedToNothing:n=!1,lastUpdatedAt:i,staleAfterMs:o,now:a}){let l=function(e,t,r){if(void 0===e)return{};let n=Math.max(0,(r??Date.now())-e);return void 0===t?{ageMs:n}:{ageMs:n,isStale:n>t}}(i,o,a);switch(t?e??"pending":e??r){case"pending":return{surface:"loading",...l};case"error":return{surface:"error",...l};case"empty":return{surface:"empty",emptyReason:"source-empty",...l};case"resolved":return n?{surface:"empty",emptyReason:"narrowed",...l}:{surface:"ready",...l};default:return{surface:"ready",...l}}}(r);switch(n.surface){case"loading":{let t=e?.loading;return(0,b.jsx)(b.Fragment,{children:(dS(t)?t(n):t)??null})}case"error":{let t=e?.error;return(0,b.jsx)(b.Fragment,{children:(dS(t)?t(n):t)??null})}case"empty":{let t=e?.empty;if(!dS(t))return(0,b.jsx)(b.Fragment,{children:t??null});return(0,b.jsx)(b.Fragment,{children:t({...n,emptyReason:n.emptyReason??"source-empty"})??null})}case"ready":return(0,b.jsx)(b.Fragment,{children:t})}}let dC=({rows:e=3,label:t="Loadingâ¦"})=>{let r=Math.max(1,Math.min(e,12));return(0,b.jsx)("div",{role:"status","aria-busy":"true","aria-label":t,"data-testid":"data-repeater-loading",style:{display:"flex",flexDirection:"column",gap:12,width:"100%"},children:Array.from({length:r},(e,t)=>(0,b.jsx)("div",{"aria-hidden":"true",style:{height:56,borderRadius:8,background:"linear-gradient(90deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.10) 50%, rgba(0,0,0,0.06) 100%)",backgroundSize:"200% 100%"}},t))})},dj=({heading:e="No results",body:t="Try adjusting your filters and search again."})=>(0,b.jsxs)("section",{"aria-labelledby":"data-repeater-empty-heading","data-testid":"data-repeater-empty",style:{padding:24,textAlign:"center"},children:[(0,b.jsx)("h3",{id:"data-repeater-empty-heading",style:{margin:0,fontSize:18,fontWeight:600},children:e}),(0,b.jsx)("p",{style:{marginTop:8,marginBottom:0,color:"rgba(0,0,0,0.65)"},children:t})]}),dk=({heading:e="Couldn't load results",body:t="Please try again in a moment.",ctaLabel:r,onRetry:n})=>(0,b.jsxs)("div",{role:"alert","data-testid":"data-repeater-error",style:{padding:24,textAlign:"center"},children:[(0,b.jsx)("h3",{style:{margin:0,fontSize:18,fontWeight:600},children:e}),(0,b.jsx)("p",{style:{marginTop:8,marginBottom:0,color:"rgba(0,0,0,0.65)"},children:t}),r&&n?(0,b.jsx)("button",{type:"button",onClick:n,style:{marginTop:16,padding:"8px 16px",borderRadius:6,border:"1px solid currentColor",background:"transparent",curs
1or:"pointer"},children:r}):null]}),dE=[],dA=new Map,dN=new Set(["none","paginated","loadMore","viewMore"]),dT=({item:e,index:t,section:r,children:n})=>{let i=(0,v.useRef)(E()).current,o=(0,v.useRef)(E()).current,a=(0,v.useMemo)(()=>e&&"object"==typeof e?{...e,viewCorrelationId:i,productClickedCorrelationId:o}:e,[e,i,o]);return(0,b.jsx)(cr,{item:a,index:t,section:r,children:n})},dO=({id:e,source:t,iteratorPath:r,pageSize:n,paginationMode:i,limit:o,viewMoreOnExhausted:a,filter:l=!1,filterStateKey:s="activeFilters",filterPath:c="institutionalStats",sortable:d=!1,sortOptions:u,layout:p="flex",direction:f="column",wrap:m="nowrap",align:h="stretch",justify:g="start",columns:y=1,columnsMd:x,columnsLg:w,columnsXl:S,gap:I="sm",emptyStateText:C,errorStateHeading:j,errorStateBody:k,errorCtaLabel:E,onRetry:A,children:N})=>{let T=ln(),{formState:O}=T,P=l_(),M=ci(),R=T.getSource(t),L=R?.data,F=R?.status,U=(0,v.useMemo)(()=>dv(L,r)??[],[L,r]),$="string"==typeof e&&e.length>0?void 0!==M?`${e}::${M}`:e:void 0,_=void 0===$?void 0:P?P.composeDedupKey($):lL({nodeId:$}),D=l?O[s]:void 0,Y=(0,v.useMemo)(()=>{if(!l)return U;let e=D?D.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];return 0===e.length?U.slice():U.map((t,r)=>({row:t,index:r,score:function(e,t,r){if(0===t.length)return 0;let n=function(e,t){if(null===e||"object"!=typeof e)return;let r=e;for(let e of t.split("."))if(0!==e.length){if(null===r||"object"!=typeof r)return;r=r[e]}return null!==r&&"object"==typeof r?r:void 0}(e,r);if(!n)return 0;let i=0;for(let e of t)(function(e,t){let r=e[t];return null!==r&&"object"==typeof r?sW(r.value):sW(r)})(n,e)&&(i+=1);return i}(t,e,c)})).sort((e,t)=>t.score-e.score||e.index-t.index).map(e=>e.row)},[l,U,D,c]),B=d&&u&&u.length>0?u:dE,{sortedItems:z,activeSortIndex:V,canSort:H,setActiveSortIndex:q}=function(e,t){let r=t.length>0,[n,i]=(0,v.useState)(0),o=(0,v.useCallback)(e=>{r&&i(dx(e,0,t.length-1))},[r,t.length]),a=(0,v.useMemo)(()=>{if(!r||n<0||n>=t.length)return e;let i=t[n],o="desc"===i.direction?-1:1,a=e.slice();return a.sort((e,t)=>{let r=dw(e,i.field),n=dw(t,i.field);return void 0===r&&void 0===n?0:void 0===r?1:void 0===n?-1:function(e,t){if("number"==typeof e&&"number"==typeof t)return e<t?-1:+(e>t);let r=String(e),n=String(t);return r<n?-1:+(r>n)}(r,n)*o}),a},[e,t,r,n]);return(0,v.useMemo)(()=>({sortedItems:a,activeSortIndex:r?dx(n,0,t.length-1):0,canSort:r,setActiveSortIndex:o}),[a,r,n,t.length,o])}(Y,B),G=i&&dN.has(i)?i:"number"==typeof n&&n>0?"paginated":"none",W="viewMore"===G,Q="none"===G,{visibleItems:K,page:J,totalPages:X,hasMore:Z,goToPage:ee,loadMore:et}=function(e,t,r={}){let n=r.mode??"paginated",i="number"==typeof t&&t>0,o=(0,v.useMemo)(()=>i?0===e.length?0:Math.ceil(e.length/t):+(0!==e.length),[e,t,i]),[a,l]=(0,v.useState)(0),[s,c]=(0,v.useState)(1);(0,v.useEffect)(()=>
1{l(0),c(1)},[e]),(0,v.useEffect)(()=>{i&&a>=o&&o>0&&l(0)},[i,a,o]);let d=(0,v.useCallback)(e=>{i&&l(Math.min(Math.max(0,o-1),Math.max(0,e)))},[i,o]),u=(0,v.useCallback)(()=>{i&&c(e=>Math.min(e+1,o))},[i,o]);return(0,v.useMemo)(()=>{if(!i)return{visibleItems:e,page:0,totalPages:o,hasMore:!1,goToPage:d,loadMore:u};if("loadMore"===n){let r=e.slice(0,Math.min(e.length,s*t));return{visibleItems:r,page:0,totalPages:o,hasMore:r.length<e.length,goToPage:d,loadMore:u}}let r=a*t;return{visibleItems:e.slice(r,r+t),page:a,totalPages:o,hasMore:a<o-1,goToPage:d,loadMore:u}},[e,t,i,n,a,s,o,d,u])}(z,W||Q?void 0:n,{mode:"loadMore"===G?"loadMore":"paginated"}),er=ld(),[en,ei]=(0,v.useState)(()=>{if(!_)return!1;let e=dA.get(_);return void 0!==e&&e.itemsRef===U&&e.expanded}),eo=(0,v.useRef)(U);(0,v.useEffect)(()=>{eo.current!==U&&(eo.current=U,ei(!1))},[U]),(0,v.useEffect)(()=>{_&&dA.set(_,{itemsRef:U,expanded:en})},[_,U,en]);let ea=W&&"number"==typeof o&&o>0?o:void 0,el=W&&!en&&void 0!==ea&&z.length>ea,es=el||"advance"==("hide"===a?"hide":"advance"),ec=(0,v.useMemo)(()=>W?en||void 0===ea?z:z.slice(0,ea):K,[W,K,en,ea,z]),ed=(0,v.useCallback)(()=>{el?ei(!0):er.dispatch("navigation.advanceStep")},[el,er]),eu=(0,v.useId)(),ep=(0,v.useId)(),ef=n&&n>0?J*n:0,em=function(e){if(!e)return;let t=e.trim();if(!t.includes("."))return;let r=t.split(".")[0]?.trim();if(r&&"data"!==r)return r}(r),eh=ec.map((e,t)=>{let r=ef+t;return(0,b.jsx)(dT,{item:e,index:r,section:em,children:N},((e,t)=>{if(e&&"object"==typeof e){let t=[e.programId,e.schoolName,e.programName].filter(e=>"string"==typeof e||"number"==typeof e);if(t.length>0)return t.join("-")}return t})(e,r))});return(0,b.jsx)(dI,{status:F,bound:!0,narrowedToNothing:0===ec.length,slots:{loading:(0,b.jsx)(dC,{}),error:(0,b.jsx)(dk,{heading:j,body:k,ctaLabel:E,onRetry:A}),empty:(0,b.jsx)(dj,{body:C})},children:(0,b.jsxs)("div",{"data-testid":"data-repeater",children:[H?(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:12},children:[(0,b.jsx)("label",{id:ep,style:{marginRight:8},children:"Sort by"}),(0,b.jsx)("select",{"aria-labelledby":ep,value:V,onChange:e=>q(Number(e.target.value)),children:B.map((e,t)=>(0,b.jsx)("option",{value:t,children:e.label},`${e.field}-${e.direction}-${t}`))})]}):null,"grid"===p?(0,b.jsx)(aI.Grid,{role:"region","aria-live":"polite","aria-label":"Results",id:eu,"data-layout":"grid",className:"items-stretch",columns:y,...x?{"columns-md":x}:{},...w?{"columns-lg":w}:{},...S?{"columns-xl":S}:{},gap:I,children:eh}):(0,b.jsx)(aI.Flex,{role:"region","aria-live":"polite","aria-label":"Results",id:eu,"data-layout":"flex",direction:f,wrap:m,align:h,justify:g,gap:I,children:eh}),W?es?(0,b.jsx)("div",{style:{marginTop:16,textAlign:"center"},children:(0,b.jsx)(aI.Button,{variant:"primaryFill",onClick:ed,"data-testid":"data-repeater-view-more",children:"View More Programs"})}):null:!Q&&n&&n>0?"loadMore"===G?(0,b.jsx)("div",{style:{marginTop:16,textAlign:"center"},children:Z?(0,b.jsx)("button",{type:"button",onClick:et,children:"Load more"}):null}):(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:16},children:[(0,b.jsx)("button",{type:"button",onClick:()=>ee(J-1),disabled:0===J,children:"Previous"}),(0,b.jsxs)("span",{"aria-live":"polite",children:["Page ",J+1," of ",Math.max(X,1)]}),(0,b.jsx)("button",{type:"button",onClick:()=>ee(J+1),disabled:!Z,children:"Next"})]}):null]})})};function dP(e,t){let r=lQ(),n=r?.programsToCompare,i=r?.canAddMorePrograms??!0,o=r?.dslConfigId,a=t?.position,l=t?.viewCorrelationId,s=t?.correlationId,c=(0,v.useRef)(r);return c.current=r,(0,v.useMemo)(()=>{if(!c.current||!e)return{compare:!1,compareChecked:!1,compareDisabled:!1,onCompareChange:void 0};let t=n?.some(t=>t.programId===e.programId)??!1,r=!i&&!t;return{compare:!0,compareChecked:t,compareDisabled:r,onCompareChange:t=>{let r=c.current;if(!r)return;let n={schoolSlug:e.schoolSlug,position:a,viewCorrelationId:l,correlationId:s??e.productClickedCorrelationId};if(t){r.addProgramToCompare(e)&&db(n,!0,o);return}r.isProgramSelected(e.programId)&&(r.removeProgramFromCompare(e.programId),db(n,!1,o))}}},[e,n,i,o,a,l,s])}(0,v.forwardRef)(({program:e,compare:t=!0,...r},n)=>{let i=dP(e);return t?(0,b.jsx)(aI.DegreeCardDetailed,{ref:n,...r,...i}
1):(0,b.jsx)(aI.DegreeCardDetailed,{ref:n,...r,compare:!1,compareDisabled:!1})}).displayName="ComparisonAwareDegreeCard";let dM="Submitted",dR="Clear Selection",dL="See Comparison",dF="dexp-comparison-bar",dU="dexp-comparison-bar",d$="dexp-comparison-clear-selection",d_="dexp-comparison-see-comparison",dD=()=>{var e;let{programsToCompare:t,isBannerVisible:r,minItems:n,maxItems:i,toggleComparisonModal:o,clearProgramsToCompare:a,removeProgramFromCompare:l,dslConfigId:s}=lW(),{getComparisonCopy:c}=l4(),{bannerText:d,ctaText:u}=c(),p=l_(),f=s?{customDimensions:[{key:"dslConfigId",value:s}]}:void 0,m=r&&t.length>0;if((0,v.useEffect)(()=>{if(!m)return;let e=p?.eventContext?.viewCorrelationId;p?.triggers.triggerElementViewedEvent?.({correlationId:E(),viewCorrelationId:e,elementType:dU,name:dU,location:dF,...f}),p?.triggers.triggerElementViewedEvent?.({correlationId:E(),viewCorrelationId:e,elementType:d$,name:d$,text:dR,location:dF,...f}),p?.triggers.triggerElementViewedEvent?.({correlationId:E(),viewCorrelationId:e,elementType:d_,name:d_,text:dL,location:dF,...f})},[m,s]),!m)return null;let h=t.map(e=>({id:String(e.programId),schoolLogo:e.imageURL??"",schoolName:e.schoolName,programName:e.programName,onRemove:()=>{l(e.programId),p?.triggers.triggerElementClickedEvent({correlationId:E(),viewCorrelationId:p.eventContext?.viewCorrelationId,elementType:"dexp-comparison-banner",name:"dexp-comparison-banner-remove-button",text:"X",location:"dexp-comparison-bar",...f})}}));return(0,b.jsx)(aI.ComparisonBar,{items:h,maxItems:i,minItemsToCompare:n,statusText:(e=t.length,d?.replace(/\{count\}/g,String(e))),compareLabel:u??dL,clearLabel:dR,onCompare:()=>{o(!0),p?.triggers.triggerElementClickedEvent({correlationId:E(),viewCorrelationId:p.eventContext?.viewCorrelationId,elementType:"dexp-comparison-banner",name:"dexp-comparison-banner-see-comparison-button",text:dL,location:"dexp-comparison-bar",...f})},onClear:()=>{a(),p?.triggers.triggerElementClickedEvent({correlationId:E(),viewCorrelationId:p.eventContext?.viewCorrelationId,elementType:"dexp-comparison-banner",name:"dexp-comparison-banner-clear-selection-button",text:dR,location:"dexp-comparison-bar",...f})},reserveViewportSpace:!0})};function dY({result:e,eventContext:t,position:r,isProgramSubmitted:n,dslConfigId:i}){return sd({eventContext:t,listId:e.listId,presets:{degree:e.degreeSlug,category:e.categorySlug,subject:e.subjectSlug},location:"dexp-comparison-modal",viewCorrelationId:e.viewCorrelationId,productClickedCorrelationId:e.productClickedCorrelationId,brand:e.schoolSlug,position:r,capId:e.capId,programId:e.programId,outboundUrl:e.applicationCtaURL,isProgramSubmitted:n,dslConfigId:i})}var dB=r(7128),dz=r(65082);let dV={isPrivate:{value:"Private",icon:(0,b.jsx)(dB.QLA,{})},isOnline:{value:"Online",icon:(0,b.jsx)(dB.oUQ,{})},isPublic:{value:"Public",icon:(0,b.jsx)(dB.zeF,{})},forProfit:{value:"Forprofit",icon:(0,b.jsx)(dz.Peu,{})},notForProfit:{value:"Nonprofit",icon:(0,b.jsx)(dB.Kzi,{})},notOnline:{value:"On Campus",icon:(0,b.jsx)(dB.XOr,{})}};function dH(e){return Object.entries(e).flatMap(([e,t])=>t&&Object.prototype.hasOwnProperty.call(dV,e)?[{key:e,flag:dV[e]}]:[])}let dq=[{key:"flags",label:"Highlights",type:"badgeList",badgeVariant:"neutral",badgeSize:"sm"},{key:"onlineEnrollment",label:"Online Enrollment",type:"text",labelTooltip:"Percentage of all students who are enrolled online."},{key:"accreditation",label:"Accreditation",type:"text",labelTooltip:"The school's accrediting agency or organization."},{key:"onlinePrograms",label:"Online Programs",type:"text"},{key:"retentionRate",label:"Retention Rate",type:"text"},{key:"transferCredits",label:"Transfer Credits Accepted",type:"text"},{key:"feeWaived",label:"Online Application Fee Waived",type:"text"},{key:"satAct",label:"SAT/ACT Required",type:"text"},{key:"snippet",label:"Program Overview",type:"text"},{key:"tcpa",label:"Terms and Conditions",type:"text",clamp:!1,html:!0}];function dG(e){return null==e?"N/A":`${Math.round(Number(e))}%`}function dW(e){return void 0===e?"N/A":e?"Yes":"No"}function dQ(e,t){return`configured-${t}-${e.replace(/[^a-zA-Z0-9_-]/g,"-")}`}let dK=({squareButtons:e,onProductClick:t,submittedResults:r=[]})=>{let{programsToCompare:n,isComparisonModalOpen:i,maxItems:o,toggleComparisonModal:a,removeProgramFromCompare:l,dslConfigId:s}=lW(),{getComparisonConfig:c,getComparisonCopy:d}=l4(),u=c(),p=d(),{eventContext:f}=av(),m=(0,v.useCallback)(()=>{a(!1)},[a]),h=(0,v.useCallback)(e=>r.some(t=>t.programId===e),[r]),g=(0,v.useCallback)(e=>{let r=n.findIndex(t=>t.programId===e.programId);!function(e){if(!e.eventContext)return;let{name:t,payload:r}=al(dY(e));ab(t,r)}({result:e,eventContext:f,position:-1===r?0:r+1,isProgramSubmitted:h(e.programId),dslConfigId:s}),a(!1),t?.(e,!1)},[t,a,n,f,h,s]),y=(0,v.useCallback)(e=>{!function({eventContext:e,dslConfigId:t}){let{name:r,payload:n}=ap({correlationId:e?.formViewedCorrelationId??E(),viewCorrelationId:e?.viewCorrelationId,elementType:"dexp-comparison-popup-close",name:"dexp-comparison-popup-close-button",location:"dexp-comparison-popup",text:"X",...t?{customDimensions:[{key:"dslConfigId",value:t}]}:{}}),i=window._Cohesion?.webContext;ab(r,i?{...n,webContext:i}:n)}({eventContext:f,dslConfigId:s}),l(e),n.length<=1&&a(!1)},[f,s,n.length,l,a]),x=(0,v.useMemo)(()=>(function(e,{onProductClick:t,onRemove:r,isProgramSubmitted:n,config:i}){let o=i?.compareAttributes??[],a=i?.buttonText?.trim();return e.map(e=>{var i,l;let s=n(e.programId),c=s?"Next Steps":a||(e.applicationCtaLabel?e.applicationCtaLabel:"Learn More");return{id:String(e.programId),header:{image:{src:e.imageURL??"",alt:`${e.schoolName} logo`},title:e.schoolName,subtext:e.programName,remove:{onClick:()=>r(e.programId),ariaLabel:`Remove ${e.schoolName} from comparison`}},ctaBottom:{label:c,onClick:()=>t(e)},fields:{flags:{badges:dH({isOnline:e.isOnline,isPublic:e.isPublic,isPrivate:e.isPrivate,forProfit:e.forProfit,notForProfit:e.notForProfit}).map(({flag:e})=>({text:e.value}))},onlineEnrollment:{text:dG(e.percentOnlineEnrollment)},accreditation:{text:e.accreditator?"Yes":"N/A"},onlinePrograms:{text:e.numberOnlinePrograms?String(e.numberOnlinePrograms):"N/A"},retentionRate:{text:dG(e.fulltimeRetentionRate)},transferCredits:{text:dW(e.areTransferCreditsAccepted)},feeWaived:{text:dW(e.isApplicationFeeOnlineWaived)},satAct:{text:e.satOrActAdmissionsRequirements??"N/A"},snippet:{text:e.snippet??""},tcpa:{text:e.tcpa?.trim()?(i=e.tcpa)?j(i):"":"N/A"},...(l=e,o.reduce((e,t,r)=>(e[dQ(t.key,r)]={text:function(e,t){let r=e.compareAttributeValues?.find(e=>e.key===t||e.label===t);if(r?.value)return r.value;let n=t.includes("{{")?t:t.startsWith("item.")?`{{${t}}
1}`:`{{item.${t}}}`;try{let t=ie(n,{item:e});if(null==t||""===t)return"N/A";if(Array.isArray(t))return t.length>0?t.map(e=>String(e)).join(", "):"N/A";if("object"==typeof t)return JSON.stringify(t)??"N/A";return String(t)}catch{return"N/A"}}(l,t.key)},e),{}))}}})})(n,{onProductClick:g,onRemove:y,isProgramSubmitted:h,config:u}),[n,g,y,h,u]),w=(0,v.useMemo)(()=>{let e;return e=u?.compareAttributes,e?.length?e.map((e,t)=>({key:dQ(e.key,t),label:e.label,type:"text"})):dq},[u]),S=p.heading??p.title??"Compare Programs",I=p.subtitle??`Compare up to ${o} credit programs from our partners using the side-by-side comparison below.`,C=p.placeholderText??"Add another program";(0,v.useEffect)(()=>{i&&n.forEach((e,t)=>{!function(e){if(!e.eventContext)return;let{name:t,payload:r}=an(dY(e));ab(t,r)}({result:e,eventContext:f,position:t+1,isProgramSubmitted:h(e.programId),dslConfigId:s})})},[i]);let k=(0,v.useCallback)(e=>{let t=n.findIndex(t=>String(t.programId)===e);if(-1===t)return;let r=n[t];!function(e){if(!e.eventContext)return;let{name:t,payload:r}=aa(dY(e));ab(t,r)}({result:r,eventContext:f,position:t+1,isProgramSubmitted:h(r.programId),dslConfigId:s})},[n,f,h,s]);return(0,b.jsx)(aI.Modal,{open:i,onOpenChange:e=>{e||m()},children:(0,b.jsxs)(aI.Modal.Content,{size:"xl",className:"p-0 max-h-[95vh] overflow-y-auto",children:[(0,b.jsx)(aI.Modal.Header,{className:"sr-only",children:(0,b.jsx)(aI.Modal.Title,{children:S})}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"md",className:"px-lg py-md",children:[(0,b.jsxs)(aI.Flex,{direction:"column",gap:"xxs",children:[(0,b.jsx)(aI.Heading,{variant:"h3",children:S}),(0,b.jsx)(aI.Text,{variant:"b2",color:"subtext",children:I})]}),(0,b.jsx)(aI.ComparisonTable,{styleVersion:"v1",items:x,rowDefs:w,maxItems:o,visibleItems:o,emptySlot:{label:C,onClick:m,ariaLabel:"Close to add another program to compare"},inView:i,onProductViewed:k})]})]})})},dJ=()=>{let e,t,r,{onProductClick:n,submittedResults:i}=(e=dy(),t=e?.openLeadFlow,r=ld(),{onProductClick:(0,v.useMemo)(()=>t?(e,r=!1)=>t(e,{skipDuplicateCheck:r}):e=>{let t=e.applicationCtaURL;t&&1?window.open(t,"_blank","noopener,noreferrer"):e.offeringId&&r.has?.("navigation.linkout")&&r.dispatch("navigation.linkout",{offeringId:e.offeringId})},[t,r]),submittedResults:e?.submittedResults});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(dD,{}),(0,b.jsx)(dK,{squareButtons:!0,onProductClick:n,submittedResults:i})]})},dX={Select:{eventPropNames:["onValueChange","onChange","onSelect"],valuePropName:"value",autoSelectSingleOption:!0},Button:{eventPropNames:["onClick"]},Input:{eventPropNames:["onChange"],valuePropName:"value"},ToggleGroup:{eventPropNames:["onValueChange"],valuePropName:"value",formKeyValueTransform:e=>Array.isArray(e)?e.filter(Boolean).join(","):"string"==typeof e?e:"",formStateValueTransform:e=>e&&e.length>0?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[]},StudentLoansBanner:{eventPropNames:["onCtaClick"],clickPropName:"onCtaClick",outboundUrlPropPath:"cta.href"},StudentLoansInline:{eventPropNames:["onCtaClick"],clickPropName:"onCtaClick",outboundUrlPropPath:"cta.href"},EditorialListing:{eventPropNames:["onVisitSiteClick"],clickPropName:"onVisitSiteClick"}},dZ=e=>{let t,r,n=aI.DegreeCardDetailed,{shouldShowComparison:i}=l4(),o=cn(),a=nc(o)?o:void 0,l=i&&!!a,s=l_(),c=ci(),d=c?.split(".").pop(),u=void 0===d||""===d||Number.isNaN(Number(d))?void 0:Number(d),p=dP(l?a:void 0,{position:void 0!==u?u+1:void 0,viewCorrelationId:s?.eventContext?.viewCorrelationId,correlationId:s?.eventContext?.formViewedCorrelationId}),{isProgramSubmitted:f}=(t=st(),r=t?.snapshot,(0,v.useMemo)(()=>t&&a?{isProgramSubmitted:t.isProgramSubmitted(a.programId)}:{isProgramSubmitted:!1},[a,r])),m=dy(),h=f&&a?{ctaLabel:dM,onCtaClick:()=>m?.openLeadFlow(a)}:{},g=e.onClick,y=h.onCtaClick??e.onCtaClick,x=!!g||!!y,w=x?e=>{let t=e.target;if(!t.closest?.("button[aria-controls]")){if(t.closest?.("[data-degree-card-footer]")){if(!t.closest?.('a[href], button:not([role="checkbox"])'))return;g?.(e);return}g?.(e),y?.(e)}}:e.onClick,S=x?[e.className,"cursor-pointer"].filter(Boolean).join(" "):e.className;return(0,b.jsx)(n,{...e,compare:l&&p.compare,compareChecked:!!l&&p.compareChecked,compareDisabled:!!l&&p.compareDisabled,onCompareChange:l?p.onCompareChange:void 0,...h,onClick:w,className:S})},d0=e=>{let t=aI.EditorialListing,{shouldShowComparison:r}=l4(),n=cn(),i=nc(n)?n:void 0,o=r&&!!i&&(i?.programId??0)>0,a=l_(),l=ci(),s=l?.split(".").pop(),c=void 0===s||""===s||Number.isNaN(Number(s))?void 0:Number(s),d=dP(o?i:void 0,{position:void 0!==c?c+1:void 0,viewCorrelationId:a?.eventContext?.viewCorrelationId,correlationId:a?.eventContext?.formViewedCorrelationId}),u=e.onClick,p=u?e=>{let t=e.target;if(!t.closest?.("button[aria-controls]")){if(t.closest?.("[data-editorial-listing-footer]")&&!t.closest?.('a[href], button:not([role="checkbox"])'))return;u?.(e)}}:e.onClick;return(0,b.jsx)(t,{...e,compare:o&&d.compare,compareChecked:!!o&&d.compareChecked,compareDisabled:!!o&&d.compareDisabled,onCompareChange:o?d.onCompareChange:void 0,onClick:p})},d1={...aI},d2=e=>"function"==typeof e||"object"==typeof e&&null!==e&&"$$typeof"in e,d4=new Set(["Text","Heading","Brow","FeedbackBox"]),d3=new Set(["Text","Link","PuckText"]),d5=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),d6=new Set(["platform.dataRepeater"]),d8=e=>!!d5(e)&&"string"==typeof e.type&&!!d5(e.props)&&("PuckText"===e.type||d6.has(e.type)||/^[A-Z]/.test(e.type)&&d2(d1[e.type]));function d9(e){return d8(e)&&"PuckText"===e.type}function d7(e){let t=e.props?.text;return"string"==typeof t?t:""}function ue(e){let t=e.props?.children;return"string"==typeof t?t:d9(t)?d7(t):Array.isArray(t)?t.map(e=>"string"==typeof e?e:d9(e)?d7(e):d8(e)?ue(e):"").join(""):d8(t)?ue(t):""}function ut(e){if("string"==typeof e||d9(e))return[e];if(d8(e)){let t=ue(e);return t?[t]:[]}return[]}function ur(e,t){let r={...e.props??{}};if(t&&"Text"===e.type){let e="string"==typeof r.tag?r.tag.toLowerCase():"p";aI.INLINE_PHRASING_TAGS.has(e)||(r.tag="span")}if("Link"!==e.type||"string"!=typeof r.href||(0,aI.isSafeInlineLinkHref)(r.href)||delete r.href,t&&"children"in r){let e=r.children;if(Array.isArray(e))r.children=e.flatMap(ut);else if(d8(e)&&!d9(e)){let t=ue(e);t?r.children=t:delete r.children}}return{...e,props:r}}let un=e=>!!Array.isArray(e)&&0!==e.length&&e.every(e=>"string"==typeof e||d8(e))&&e.some(e=>d8(e)&&!d9(e));function ui(e,t){return"string"==typeof e?e.trim().length>0?{type:"PuckText",props:{text:e}}:null:d8(e)?uo(e,t):null}function uo(e,t){let r=t[e.type]??{},n={...e.props??{}};for(let e of Object.keys(r)){if(eA(e))continue;let r=n[e];if(Array.isArray(r))n[e]=r.map(e=>ui(e,t)).filter(e=>null!==e);else if(d8(r))n[e]=[uo(r,t)];else if("string"==typeof r){let i=ui(r,t);n[e]=i?[i]:[]}else n[e]=[]}return{...e,props:n}}let ua=({render:e,inline:t=!1})=>(0,b.jsx)(b.Fragment,{children:e({as:t?aI.InlineSlotElement:aI.SlotPassthrough})}),ul=(e,t=!1)=>"function"==typeof e?(0,b.jsx)(ua,{render:e,inline:t}):e;class us extends v.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`[DslConfig] Render error for config "${this.props.configId??"unknown"}":`,e,t.componentStack),this.props.onRenderError?.(e,t)}
1render(){if(!this.state.hasError)return this.props.children;let{fallback:e}=this.props;return"function"==typeof e&&this.state.error?e(this.state.error):e??null}constructor(...e){super(...e),this.state={hasError:!1}}}let uc=({dslConfig:e,excludedContentTypes:t,renderErrorFallback:r,onRenderError:n})=>{let i,o,a,l,s=e?.configId,c=(i=aS(),o=i?.handleStepForward,a=i?.handlePrevious,l="function"==typeof aI.useModalHostOptional?(0,aI.useModalHostOptional)():null,(0,v.useMemo)(()=>{let e={};return o&&(e["flow.forward"]=()=>{o()}),a&&(e["flow.back"]=()=>{a()}),l&&(e["modal.open"]=e=>{iJ(l,"modal.open",e,"DslConfig")},e["modal.close"]=e=>{iJ(l,"modal.close",e,"DslConfig")}),{dispatch(t,r){let n=e[t];n?n(r):console.warn(`[DslConfig] No handler registered for action "${t}" â dropping.`)},has:t=>t in e}},[o,a,l])),d=(0,v.useContext)(a7),u=(0,v.useContext)(lc),p=lQ(),f=l3(),m=void 0!==d,h=u!==ls,{config:g,data:y,dataSources:x,bindingsApplied:w,resultsPageConfig:S}=(0,v.useMemo)(()=>{let r,n,i,o=function(e,t){if(!t||0===t.length||!e||"object"!=typeof e)return e;let r=e.content;if(!Array.isArray(r))return e;let n=new Set(t);return{...e,content:r.filter(e=>{if(!e||"object"!=typeof e)return!0;let t=e.type;return"string"!=typeof t||!n.has(t)})}}(e?.data,t);if(!o||!Array.isArray(o.content))return{config:null,data:null,dataSources:null,bindingsApplied:!1,resultsPageConfig:void 0};let a=(r=e=>Array.isArray(e)?e.map(r):d8(e)?function e(t){let r={...t.props??{}},n=d4.has(t.type);for(let[t,i]of Object.entries(r))!("id"===t||eA(t))&&(n&&"children"===t?r[t]=function(e,t){if(Array.isArray(e)){let r=[];for(let n of e){if("string"==typeof n||d9(n)){r.push(n);continue}if(d8(n)){if(t){r.push(...ut(n));continue}d3.has(n.type)&&r.push(ur(n,!0))}}return r}return d9(e)?e:d8(e)?t?e:d3.has(e.type)?ur(e,!0):null:e}(i,!1):Array.isArray(i)?r[t]=i.map(t=>d8(t)?e(t):t):d8(i)&&(r[t]=e(i)));return{...t,props:r}}(e):e,{...o,content:Array.isArray(o.content)?o.content.map(r):o.content,...o.zones?{zones:function(e,t){if(!d5(e))return e;let r={};for(let[n,i]of Object.entries(e))r[n]=Array.isArray(i)?i.map(t):i;return r}(o.zones,r)}:{}}),l=(n={},i=e=>{let t=e.type,r=e.props??{};for(let[e,o]of(n[t]||(n[t]={}),Object.entries(r)))"id"!==e&&(eA(e)||(Array.isArray(o)&&un(o)?(n[t][e]={type:"slot"},o.filter(d8).forEach(i)):d8(o)&&!d9(o)&&(n[t][e]={type:"slot"},i(o))))},a.content.forEach(i),n),{config:s,boundConfigRef:c}=function(e){let t={},r={current:void 0};for(let[r,n]of Object.entries(d1)){if(!d2(n))continue;let i="DegreeCardDetailed"===r?dZ:"EditorialListing"===r?d0:n,o=Object.keys(e[r]??{});t[r]={fields:e[r]??{},render:e=>{var t;let{editMode:n,puck:a,...l}=e??{};for(let[e,t]of Object.entries(l))!("id"===e||eA(e))&&(o.includes(e)||(l[e]=function e(t){if(null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||v.isValidElement(t))return t;if(Array.isArray(t))return t.map(t=>e(t));if(d9(t))return d7(t);if(d8(t)){let r=d1[t.type];if(!d2(r))return t;let n={...t.props??{}};return"children"in n&&(n.children=e(n.children)),v.createElement(r,n)}return t}(function(e){if(d9(e))return d7(e);if(Array.isArray(e)&&e.some(d9)){if(e.some(e=>d8(e)&&!d9(e)))return e;let t=[];for(let r of e){if("string"==typeof r){r.trim().length>0&&t.push(r);continue}if(d9(r)){let e=d7(r);e.trim().length>0&&t.push(e)}}return t}return e}(t))));for(let e of o)if(e in l){if("children"===e&&"function"==typeof aI.shouldResolveSlotChildren&&aI.shouldResolveSlotChildren(r))continue;l[e]=ul(l[e],d4.has(r)&&"children"===e)}if("Select"===r&&Array.isArray(t=l.options)&&t.every(e=>null!==e&&"object"==typeof e&&"label"in e&&"value"in e)){let e=d1.SelectItem;e&&(l.children=l.options.map((t,r)=>(0,b.jsx)(e,{value:String(t.value),children:String(t.label)},`${String(t.value)}-${r}`)),delete l.options)}if("function"==typeof aI.shouldResolveSlotChildren&&aI.shouldResolveSlotChildren(r)&&"function"==typeof l.children&&aI.SlotHost){let{children:e,...t}=l;return(0,b.jsx)(aI.SlotHost,{Host:i,hostProps:t,slot:e,resolveComponent:e=>{let t=d1[e];return d2(t)?t:null},mode:"render"})}return(0,b.jsx)(i,{...l})}}}t.PuckText={fields:{},render:e=>{let t="string"==typeof e.tag&&e.tag?e.tag:"span",r="string"==typeof e.text?e.text:"";return v.createElement(t,null,r)}};let n={components:t,root:{fields:{},render:({children:e})=>(0,b.jsx)(b.Fragment,{children:e})}};return t["platform.dataRepeater"]={fields:{},render:e=>{let{itemSlot:t,editMode:i,puck:o,...a}=e??{},l=Array.isArray(t)?t:[],s=r.current??n;return(0,b.jsx)(dO,{...a,children:(0,b.jsx)(sw.dw,{config:s,data:{content:l,root:{props:{}}}})})}},r.current=n,{config:n,boundConfigRef:r}}(l),d={...a,content:(a.content??[]).map(e=>uo(e,l)),root:a.root??{props:{}}},u=function(e){let t=e?.root?.props,r=t?.dataSources;if(!r||"object"!=typeof r)return null;let n=Object.entries(r);if(0===n.length)return null;let i={};for(let[e,t]of n)t&&"object"==typeof t&&(iZ(t)&&"string"==typeof t.endpoint&&("GET"===t.method||"POST"===t.method)||i0(t)&&"string"==typeof t.modelId&&Array.isArray(t.metrics)&&t.metrics.length>0||i1(t))&&(i[e]=t);return Object.keys(i).length>0?i:null}(d),p=!!u||function(e){if(!e)return!1;let t=!1,r=e=>{if(t||!e)return;if(Array.isArray(e)){for(let t of e)r(t);return}if("object"!=typeof e)return;let n=e.props??null;if(n){for(let e of Object.keys(n))if("formKey"===e||e.startsWith("_bind.")||e.startsWith("_action.")||"_meta.tracking"===e||"_meta.visibility"===e){t
1=!0;return}for(let e of Object.values(n))r(e)}};return r(e.content??[]),t}(d)||function(e){if(!e)return!1;let t=!1,r=e=>{if(!t&&e){if(Array.isArray(e)){for(let t of e)r(t);return}if("object"==typeof e){if("string"==typeof e.type&&e.type in nq){t=!0;return}if(e.props)for(let t of Object.values(e.props))r(t)}}};return r(e.content??[]),t}(d),f=p?c$(s,dX,nq):s;return c.current=f,{config:f,data:d,dataSources:u,bindingsApplied:p,resultsPageConfig:nk(d)}},[e,t]);if(m&&x&&console.warn(`[DslConfig] Ignoring inner dataSources for "${s??"unknown"}" â host bridge owns the DataSourceManager.`),!g||!y)return console.warn(`[DslConfig] Missing or malformed payload for config "${s??"unknown"}" â rendering nothing.`),null;let I=(0,b.jsx)(us,{configId:s,fallback:r,onRenderError:n,children:(0,b.jsx)(sw.dw,{config:g,data:y})}),C=void 0!==f?I:(0,b.jsx)(l1,{config:S,children:I}),j=S?.comparison,k=j?.enabled===!0,E=void 0===p&&k?(0,b.jsxs)(lG,{minPrograms:j?.minSelection,maxPrograms:j?.maxSelection,children:[C,(0,b.jsx)(dJ,{})]}):C,A=h?E:(0,b.jsx)(lc.Provider,{value:c,children:E});return m||!w?A:(0,b.jsx)(lr,{dataSources:x??{},flowContext:{},children:A})},ud=({position:e="below",spanText:t="Sponsored",disclosureTitle:r,disclosureContent:n})=>{var i;let o=r?.trim()||t;return(0,b.jsx)(aI.Flex,{direction:"row",align:"center",className:"shrink-0",children:(0,b.jsx)(aI.Tooltip,{content:(i=n,i?.trim()||"This site is a free online resource that strives to offer helpful content and comparison features to our visitors. We accept advertising compensation from companies that appear on the site, which impacts the location and order in which brands (and/or their products) are presented, and also impacts the score that is assigned to it. Company listings on this page DO NOT imply endorsement. We do not feature all providers on the market."),side:"above"===e?"top":"bottom",children:(0,b.jsx)(aI.Button,{type:"button",variant:"textOnlyNeutral",size:"flush",iconAfter:"info",children:o})})})},uu=({results:e,firstName:t,productClickedCorrelationId:r,onProgramClick:n,onCloseExperience:i,submittedResults:o=[],title:a,subtitle:l,disclosureTitle:s,disclosureContent:c})=>{var d;let u,p=e?.[0],f=t?.trim(),m=(0,v.useRef)(null),h=(0,v.useRef)(!1),{triggerProductLoadedEvent:g,triggerProductClickedEvent:y,eventContext:x}=av(),w=l_()?.stepCorrelation.dslConfigId,S=(0,v.useMemo)(()=>E(),[]),I=(0,v.useMemo)(()=>r||E(),[r]),{setNodes:C,entries:j}=lO(0),k=j[0]?.isIntersecting??!1,A=(0,v.useMemo)(()=>sd({eventContext:x,listId:p?.listId,presets:{degree:p?.degreeSlug||null,category:p?.categorySlug||null,subject:p?.subjectSlug||null},location:U.SPOTLIGHT_POPUP,productClickedCorrelationId:I,viewCorrelationId:S,brand:p?.schoolSlug,position:1,capId:p?.capId,programId:p?.programId,isUserRequested:p?.isUserRequested,dslConfigId:w}),[x,p,S,I,w]);if((0,v.useEffect)(()=>{m.current&&C([m.current])},[C]),(0,v.useEffect)(()=>{if(h.current||!k)return;let e=aa(A);ab(e.name,e.payload),h.current=!0,C([])},[k,A,C]),(0,v.useEffect)(()=>{g(A)},[]),!p)return null;let N=o.some(e=>e.programId===p.programId),T=p.spotlight?.header,O=p.spotlight?.blocks?.[0]?.list??[],P=(u=[],(d=p).isOnline&&u.push("Online"),d.isOnline||u.push("On Campus"),d.isPublic&&u.push("Public"),d.isPrivate&&u.push("Private"),d.notForProfit&&u.push("Nonprofit"),d.forProfit&&u.push("Forprofit"),d.accreditator&&u.push("Accredited"),u),M=p.city&&p.state?`${p.city}, ${p.state}`:void 0,R=O.map(({text:e})=>({icon:"circle-check",label:e}));return(0,b.jsxs)("section",{ref:m,className:"not-prose flex flex-col gap-lg rounded-lg border border-neutral-200 bg-neutral-50 p-lg",children:[(0,b.jsxs)("header",{className:"flex flex-col gap-xxs",children:[(0,b.jsx)(aI.Heading,{variant:"h3",children:a??`Great News${f?`, ${f}!`:"!"}`}),(0,b.jsx)(aI.Text,{variant:"b4",children:l??"We've found a great school near you!"})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-lg lg:flex-row lg:items-stretch",children:[(0,b.jsx)("div",{className:"flex-1 min-w-0 lg:max-w-md",children:(0,b.jsx)(aI.DegreeCardDetailed,{schoolLogo:`https://simple-storage-server.highereducation.com/${p.schoolSlug}
1.png?w=130&h=80`,schoolName:p.schoolName,schoolDetails:M,degreeTitle:p.programName,tags:P,description:p.snippet??"",ctaLabel:N?dM:"Explore Program",onCtaClick:()=>{y(A),n({...p,productClickedCorrelationId:I})},compare:!1,favorite:!1,border:"stroke"})}),(T||R.length>0)&&(0,b.jsxs)("aside",{className:"flex flex-1 min-w-0 flex-col gap-md",children:[T&&(0,b.jsx)(aI.Text,{variant:"b4",color:"subtext",children:T}),R.length>0&&(0,b.jsxs)("div",{className:"flex flex-col gap-sm",children:[(0,b.jsx)(aI.Heading,{variant:"h5",children:"School Highlights"}),(0,b.jsx)("ul",{className:"flex flex-col gap-xs",children:R.map(e=>(0,b.jsxs)("li",{className:"flex items-start gap-xxs",children:[(0,b.jsx)("span",{"aria-hidden":!0,className:"mt-min shrink-0 text-secondary-700",children:"â"}),(0,b.jsx)(aI.Text,{variant:"b4",children:e.label})]},e.label))})]})]})]}),(0,b.jsxs)("footer",{className:"flex items-center justify-between",children:[(0,b.jsx)(ud,{position:"above",spanText:"Learn More About Our Partners",disclosureTitle:s,disclosureContent:c}),i&&(0,b.jsx)(aI.Button,{type:"button",variant:"textOnlyNeutral",size:"sm",iconAfter:"chevron-right",onClick:i,children:"Skip to all results"})]})]})},up=()=>{let e=ro(),{flowState:t}=aS(),r=(0,v.useRef)(new Set);return{createAppViewConversion:(0,v.useCallback)(n=>{let i=n.productClickedCorrelationId||n.offeringId||n.offeringUuid||String(n.programId);if(r.current.has(i))return;r.current.add(i);let o=t?.location;dc(n,e,n.productClickedCorrelationId||"",void 0,{country:o?.countryCode,state:o?.state})},[e,t])}},uf=({result:e,position:t,isProgramSubmitted:r=!1,governSubmittedClick:n=!1,onProductClick:i})=>{var o;let a,l=(0,v.useRef)(null),s=(0,v.useRef)(!1),{triggerProductLoadedEvent:c,triggerProductClickedEvent:d,eventContext:u}=av(),{createAppViewConversion:p}=up(),f=l_()?.stepCorrelation.dslConfigId,m=(0,v.useRef)(E()).current,h=(0,v.useRef)(E()).current,{setNodes:g,entries:y}=lO(),x=y[0]?.isIntersecting??!1,w=(0,v.useMemo)(()=>sd({eventContext:u,listId:e.listId,presets:{degree:e.degreeSlug||null,category:e.categorySlug||null,subject:e.subjectSlug||null},location:U.POPUP,productClickedCorrelationId:h,viewCorrelationId:m,brand:e.schoolSlug,position:t,capId:e.capId,programId:e.programId,outboundUrl:e.applicationCtaURL,isProgramSubmitted:r,isUserRequested:e.isUserRequested,dslConfigId:f}),[u,e,t,r,f,m,h]);(0,v.useEffect)(()=>{l.current&&g([l.current])},[g]),(0,v.useEffect)(()=>{if(s.current||!x)return;let e=aa(w);ab(e.name,e.payload),s.current=!0,g([])},[x,w,g]),(0,v.useEffect)(()=>{c(w)},[]);let S=function(e,{isProgramSubmitted:t,governSubmittedClick:r}){if(!t)return{label:"Explore Program",intent:"explore"};if(r)return{label:dM,intent:"submitted"};let n=e.applicationCtaURL;return n?{label:e.applicationCtaLabel||"Start Your Application",intent:"appCta",url:n}:{label:dM,intent:"noop"}}(e,{isProgramSubmitted:r,governSubmittedClick:n}),I=(a=dH({isPrivate:(o=e).isPrivate,isOnline:o.isOnline,isPublic:o.isPublic,forProfit:o.forProfit,notForProfit:o.notForProfit,notOnline:!o.isOnline}).map(({flag:e})=>e.value),o.accreditator&&a.push("Accredited"),a),C=e.city&&e.state?`${e.city}, ${e.state}`:void 0;return(0,b.jsx)("div",{ref:l,className:"flex-1 min-w-0",children:(0,b.jsx)(aI.DegreeCardDetailed,{schoolLogo:`https://simple-storage-server.highereducation.com/${e.schoolSlug}.png?w=130&h=80`,schoolName:e.schoolName,schoolDetails:C,degreeTitle:e.programName,tags:I,description:e.snippet??"",ctaLabel:S.label,onCtaClick:()=>{switch(d(w),S.intent){case"explore":case"submitted":i({viewCorrelationId:m,productClickedCorrelationId:h});return;case"appCta":S.url&&(p(e),window.open(S.url,"_blank","noopener,noreferrer"));return;default:return}},compare:!1,favorite:!1,border:"stroke"})})},um=({results:e,onCloseExperience:t,loading:r,onProgramClick:n,submittedResults:i=[],governSubmittedClick:o=!1,title:a,subtitle:l,disclosureTitle:s,disclosureContent:c})=>{if(r)return(0,b.jsx)(aI.Flex,{asChild:!0,align:"center",justify:"center",gap:"xxs",className:"h-full min-h-[45vh]",children:(0,b.jsxs)("section",{children:[(0,b.jsx)(aI.Heading,{variant:"h4",children:"Loading..."}),(0,b.jsx)(aI.LoadingDots,{color:"primary",label:"Loading school recommendations"})]})});let d=e?.slice(0,2)??[];return(0,b.jsx)(aI.Flex,{asChild:!0,gap:"lg",className:"rounded-lg border border-neutral-200 bg-secondary-50 p-lg",children:(0,b.jsxs)("section",{children:[(0,b.jsx)(aI.Flex,{asChild:!0,gap:"xxs",children:(0,b.jsxs)("header",{children:[(0,b.jsx)(aI.Heading,{variant:"h3",children:a??"Great News! Youâre a Strong Match for These Schools!"}),(0,b.jsx)(aI.Text,{variant:"b4",children:l??"Select a school to request more information."})]})}),(0,b.jsx)(aI.Flex,{direction:"column","direction-md":"row",gap:"lg",children:d.map((e,t)=>{let r=i.some(t=>t.programId===e.programId);return(0,b.jsx)(uf,{result:e,position:t+1,isProgramSubmitted:r,governSubmittedClick:o,onProductClick:t=>n({...e,...t})},e.programId??`${e.schoolSlug}-${t}`)})}),(0,b.jsx)(aI.Flex,{asChild:!0,direction:"row",align:"center",justify:"between",gap:"none",children:(0,b.jsxs)("footer",{children:[(0,b.jsx)(ud,{position:"above",spanText:"Learn More About Our Partners",disclosureTitle:s,disclosureContent:c}),t&&(0,b.jsx)(aI.Button,{type:"button",variant:"textOnlyNeutral",size:"sm",iconAfter:"chevron-right",onClick:t,children:"Skip to all results"})]})})]})})};function uh(e,t,r){return dv(e,t)??dv(e,r)??[]}let ug=()=>{let{shouldShowRecommenderModal:e,shouldShowSpotlightModal:t,getRecommenderModalCopy:r,getSpotlightModalCopy:n}=l4(),{getSource:i}=ln(),{openLeadFlow:o,closeLeadFlow:a,isOpen:l,leadFlowContent:s,firstName:c}=dg(),d=st(),u=(0,v.useMemo)(()=>[...d?.submittedResults??[]],[d?.submittedResults]),p=i("results")?.data,f=(0,v.useMemo)(()=>uh(p,"spotlightResults","spotlight.data"),[p]),m=(0,v.useMemo)(()=>uh(p,"recommendedResults","recommended.data"),[p]),h=f.length>0&&t,g=!h&&m.length>0&&e,y=h||g,x=(0,v.useRef)(!1),[w,S]=(0,v.useState)(!1),{setPopupOpen:I}=l2();(0,v.useEffect)(()=>{y&&!x.current&&S(!0)},[y]),(0,v.useEffect)(()=>(I(w),()=>I(!1)),[w,I]);let C=(0,v.useCallback)(()=>{x.current=!0,S(!1),a()},[a]),j=(0,v.useCallback)(e=>{o(e,{mode:"inline"})},[o]);if(!y)return null;let k=h?n():r(),E=k.title??(h?"Spotlight program":"Recommended programs");return(0,b.jsx)(aI.Modal,{open:w,onOpenChange:e=>{e||C()},children:(0,b.jsxs)(aI.Modal.Content,{size:"xl",className:"max-w-5xl p-0 max-h-[95vh] overflow-y-auto rounded-2xl bg-transparent border-0 shadow-none",children:[(0,b.jsx)(aI.Modal.Header,{className:"sr-only",children:(0,b.jsx)(aI.Modal.Title,{children:E})}),(0,b.jsx)("div",{className:"flex flex-col gap-md",children:l?(0,b.jsx)("div",{className:"rounded-2xl bg-white",children:s}):h?(0,b.jsx)(uu,{results:f,firstName:c,submittedResults:u,title:k.title,subtitle:k.subtitle,disclosureTitle:k.disclosureTitle,disclosureContent:k.disclosureContent,onProgramClick:j,onCloseExperience:C}):(0,b.jsx)(um,{results:m,firstName:c,importantFactors:[],submittedResults:u,governSubmittedClick:!0,title:k.title,subtitle:k.subtitle,disclosureTitle:k.disclosureTitle,disclosureContent:k.disclosureContent,onProgramClick:j,onCloseExperience:C})})]})})},uy=({data:e,onViewNextSteps:t})=>{let r=`https://simple-storage-server.highereducation.com/${e.school.slug}.png?w=130&h=80`;return(0,b.jsx)(aI.Card,{variant:"background-white",rounded:"md",border:"shadow",children:(0,b.jsxs)(aI.Flex,{direction:"column","direction-lg":"row",align:"stretch",justify:"between",gap:"md",width:"full",className:"lg:items-center",children:[(0,b.jsx)(aI.Flex,{direction:"row",align:"center",gap:"md",asChild:!0,children:(0,b.jsxs)("header",{children:[(0,b.jsx)(aI.Image,{src:r,alt:`${e.school.name} logo`,width:130,height:80,objectFit:"contain"}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"none",children:[(0,b.jsx)(aI.Text,{variant:"b5",weight:"bold",className:"text-primary-700",children:e.program.name}),(0,b.jsx)(aI.Heading,{variant:"h4",children:e.school.name})]})]})}),(0,b.jsx)(aI.Button,{variant:"primaryFill",size:"lg",type:"button",onClick:()=>{t&&t(e)},className:"w-full lg:w-auto",children:"Next Steps"})]})})},ub=({submissions:e,firstName:t,title:r,subtitle:n,onViewNextSteps:i})=>{let[o,a]=(0,v.useState)(!0),l=(0,v.useId)();return e?.length?(0,b.jsx)(aI.Section,{as:"section",variant:"default",padding:"section",className:"my-lg bg-primary-100",children:(0,b.jsxs)(aI.Flex,{direction:"column",gap:"2xl",width:"full",className:"mx-auto max-w-[1536px]",children:[(0,b.jsx)(aI.Flex,{direction:"row",align:"start",ga
1p:"md",asChild:!0,children:(0,b.jsxs)("header",{children:[(0,b.jsxs)(aI.Flex,{direction:"column",gap:"none",className:"flex-1",children:[(0,b.jsx)(aI.Heading,{variant:"h2",className:"mb-xxs",children:r??`Good news${t?`, ${t}`:""}! You're ready for the next step.`}),n?(0,b.jsx)(aI.Text,{variant:"b3",children:n}):(0,b.jsxs)(aI.Text,{variant:"b3",children:["Select"," ",(0,b.jsx)(aI.Text,{tag:"b",variant:"b3",weight:"bold",children:"Next Steps"})," ","to learn about what you can expect from your call with a rep and how to apply."]})]}),(0,b.jsx)(aI.Button,{variant:"iconOnly",iconAfter:"chevron-up",type:"button","aria-expanded":o,"aria-controls":l,"aria-label":o?"Collapse submissions list":"Expand submissions list",onClick:()=>a(e=>!e),className:o?"rotate-180 transition-transform":"transition-transform"})]})}),o&&(0,b.jsx)(aI.Grid,{columns:1,gap:"sm",id:l,children:e.map((e,t)=>(0,b.jsx)(uy,{data:e,position:t+1,onViewNextSteps:i},e.program.id))})]})}):null},uv=()=>{let{shouldShowSubmissions:e,getSubmissionsCopy:t}=l4(),{openLeadFlow:r,firstName:n}=dg(),i=st(),o=i?.submittedResultsFull,a=(0,v.useMemo)(()=>(o??[]).map(e=>({program:{id:e.programId,name:e.programName},school:{name:e.schoolName,slug:e.schoolSlug},applicationCtaLabel:e.applicationCtaLabel,applicationCtaUrl:e.applicationCtaURL})),[o]),l=(0,v.useCallback)(e=>{let t=o?.find(t=>t.programId===e.program.id);t&&r(t)},[o,r]);if(!e||0===a.length)return null;let s=t();return(0,b.jsx)(ub,{submissions:a,firstName:n,title:s.title,subtitle:s.subtitle,onViewNextSteps:l})},ux=({title:e=np,statusLabel:t=nf,steps:r=nm})=>{let n=r.length>0?r:nm;return(0,b.jsxs)(aI.Flex,{align:"center",className:"container pt-10 text-center",gap:"xl",children:[(0,b.jsx)(aI.Heading,{align:"center",className:"mx-14 my-2 max-w-xl md:mx-auto md:my-4 md:mb-6",variant:"h2",children:e}),(0,b.jsx)("div",{className:"my-6 md:my-8",children:(0,b.jsx)(aI.LoadingDots,{color:"secondary",label:t})}),(0,b.jsx)("div",{className:"mx-auto grid max-w-4xl grid-cols-1 gap-2 md:grid-cols-3",children:n.slice(0,3).map((e,t)=>{let r=nm[t]?.icon;return(0,b.jsx)(uw,{icon:e.icon??r??"compare",children:e.label},`${e.label}-${t}`)})})]})},uw=({children:e,icon:t})=>(0,b.jsxs)("div",{className:"flex flex-col items-center justify-between gap-4 px-12 md:flex-col md:justify-start",children:[(0,b.jsx)(uS,{icon:t}),(0,b.jsx)("div",{className:"mt-3 mb-7 flex flex-row space-x-1 p-1 text-center md:flex-col md:space-x-0 md:p-0",children:(0,b.jsx)(aI.Text,{align:"center",children:e})})]}),uS=({icon:e})=>"checklist"===e?(0,b.jsxs)("svg",{"data-loading-step-icon":e,xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),(0,b.jsx)("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),(0,b.jsx)("path",{d:"m9 14 2 2 4-4"})]}):"apply"===e?(0,b.jsxs)("svg",{"data-loading-step-icon":e,xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"}),(0,b.jsx)("polyline",{points:"10 17 15 12 10 7"}),(0,b.jsx)("line",{x1:"15",y1:"12",x2:"3",y2:"12"})]}):(0,b.jsxs)("svg",{"data-loading-step-icon":e,xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("circle",{cx:"10.5",cy:"7",r:"5"}),(0,b.jsx)("circle",{cx:"10.5",cy:"7",r:"1"}),(0,b.jsx)("path",{d:"M3.5 12h2l1.5 5L10.5 12l3 5 1.5-5h2"})]}),uI=["StudentLoansInline"];function uC(e){return"string"==typeof e&&e.trim()?e:void 0}let uj=({dslConfig:e,comparisonEnabled:t,flowType:r,trafficSource:n})=>{let i=aS(),o=tl(),a=(0,v.useRef)(o);a.current=o;let l=ri().api,s=ro(),c=s?.tenantId?.trim(),d=e?.type==="result",u=(0,v.useMemo)(()=>(function(e){if(!ns(e))return{};let t=e.root;if(!ns(t))return{};let r=t.props;if(!ns(r))return{};let n=r.dataSources;if(!ns(n))return{};let i={};for(let[e,t]of Object.entries(n)){if(!ns(t)){console.warn(`[ConfigurableStep] dataSources["${e}"] is not an object; skipping.`);continue}i[e]=t}return i})(e?.data),[e?.data]),p=(0,v.useMemo)(()=>(function(e,t,r){let n={};
1for(let[i,o]of Object.entries(e)){if(!iZ(o)){n[i]=o;continue}let e=o.endpoint;if("string"!=typeof e||0===e.length){n[i]=o;continue}let a=function(e,t){let r=t.toUpperCase();for(let[t,n]of Object.entries(iL))for(let i of n)if(i.methods.includes(r)&&iB(function(e){if(!e)return"";if(e.startsWith("/"))return e.split("?")[0]??"";try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return"";return t.pathname}catch{return""}}(e),i.pattern))return t;return null}(e,o.method);if(!a){n[i]=o;continue}try{let l=iV(a,e,o.method,t,r);n[i]={...o,endpoint:l}}catch(e){if(e instanceof iD){console.warn(`[ConfigurableStep] dropping dataSources["${i}"]: ${e.message}`);continue}throw e}}return n})(u,l,c),[u,l,c]),f=(0,v.useMemo)(()=>(function(e,t,r){let n=function(e,t){let r=[],n=oe(e.mobiusApiUrl);if(n&&t.identityToken){let e=t.identityToken;r.push({origin:n,apply:t=>{var r,n,i;let o;return r=t,n="idToken",i=e,(o=r.query)&&Object.prototype.hasOwnProperty.call(o,n)?r:{...r,query:{...o??{},[n]:i}}}})}return r}(t,r);if(0===n.length)return e;let i={...e},o=!1;for(let[t,r]of Object.entries(e)){if(!iZ(r))continue;let e=oe(r.endpoint);if(!e)continue;let a=n.find(t=>t.origin===e);if(!a)continue;let l=a.apply(r);l!==r&&(i[t]=l,o=!0)}return o?i:e})(p,l,{identityToken:ll}),[p,l]),m=(0,v.useMemo)(()=>(function(e,t){let r=e.reportingApiUrl?.trim()||t?.sameOriginBase?.trim();if(r)return`${r.replace(/\/$/,"")}/api/reporting/v1/query`})(l,{sameOriginBase:window.location.origin}),[l]),h=(0,v.useMemo)(()=>(function(e,t){if(!t)return e;try{let r=new URL(t).origin.toLowerCase();if(e.some(e=>e.toLowerCase()===r))return e;return[...e,r]}catch{return e}})(function(e){let t=new Set;for(let r of i3){let n=e[r];if("string"==typeof n&&0!==n.length)try{let e=new URL(n);if("http:"!==e.protocol&&"https:"!==e.protocol)continue;t.add(e.origin.toLowerCase())}catch{}}return Array.from(t)}(l),m),[l,m]),g=(0,v.useMemo)(()=>(function(...e){let t=e.filter(e=>void 0!==e);if(0!==t.length)return 1===t.length?t[0]:e=>t.reduce((e,t)=>t(e),e)})(function(e){let t=oe(e.mobiusApiUrl);if(t)return e=>{if(oe(e.endpoint)!==t)return e;let r=function(e){if(!i7(e))return e;let t=e.criteria;if(!i7(t))return e;let r=null;for(let e of i6){if(!(e in t))continue;let n=t[e],i=i9(n);i!==n&&((r??={...t})[e]=i)}for(let e of i8){if(!(e in t))continue;let n=t[e];if(!Array.isArray(n))continue;let i=!1,o=n.map(e=>{let t=i9(e);return t!==e&&(i=!0),t});i&&((r??={...t})[e]=o)}return r?{...e,criteria:r}:e}(e.body);return r===e.body?e:{...e,body:r}}}(l),function(e){let t=new Set([e.offeringsServiceBaseUrl,e.offeringsSearchApiUrl].map(oe).filter(e=>null!==e));if(0!==t.size)return e=>{if("GET"===e.method)return e;let r=oe(e.endpoint);if(r&&!t.has(r))return e;let n=function(e){if(!i7(e))return e;let t=e.taxonomy;if(!i7(t))return e;let r=null;for(let[e,n]of Object.entries(t)){let i=function(e,t){if(!Array.isArray(e))return e;let r=!1,n=[];for(let t of e)"string"==typeof t&&t.trim().length>0?n.push(t):r=!0;return 0===n.length?i5.has(t)?["general"]:r?void 0:e:r?n:e}(n,e);i!==n&&(r??={...t},void 0===i?delete r[e]:r[e]=i)}return r?{...e,taxonomy:r}:e}(e.body);return n===e.body?e:{...e,body:n}}}(l)),[l]),y=(0,v.useMemo)(()=>(function(...e){let t=e.filter(e=>void 0!==e);if(0!==t.length)return 1===t.length?t[0]:(e,r,n)=>t.reduce((e,t)=>t(e,r,n),e)})(function(e){let t=new Set([e.offeringsServiceBaseUrl,e.offeringsSearchApiUrl].map(of).filter(e=>null!==e));if(0!==t.size)return(e,r,n)=>{if("POST"!==r.method)return e;let i=function(e){if(e.startsWith("/"))return e.split(/[?#]/)[0]??"";try{return new URL(e).pathname}catch{return""}}(r.endpoint);if(i!==rJ&&i!==rX)return e;let o=of(r.endpoint);return o&&!t.has(o)?e:i===rJ?function(e,t){if(!op(e))return e;if(od(e)){let r=oc(e)??"";return ou(e,t,r)}if(op(e.data)&&od(e.data)){let r=oc(e)??oc(e.data)??"",n=ou(e.data,t,r);return n===e.data?e:{...e,data:n}}return e}(e,i):function(e,t,r){if(!op(e)||!Array.isArray(e.data))return e;let n=oc(e)??"",i=e=>ot(e,t,n);if(!r)return{...e,data:e.data.map(i)};let o=[],a=[];for(let t of e.data){var l;op(l=t)&&!0===l.related?a.push(t):o.push(t)}let s={...e,data:o.map(i)};return a.length>0&&(s.related={data:a.map(i)}),s}(e,i,n?.bucketRelated===!0)}}(l),function(e){let t=new Set([e.organizationServiceBaseUrl,e.organizationApiUrl].map(oN).filter(e=>null!==e));if(0!==t.size)return(e,r)=>{var n;if("POST"!==r.method||!((n=function(e){if(e.startsWith("/"))return e.split(/[?#]/)[0]??"";try{return new URL(e).pathname}catch{return""}}(r.endpoint)).startsWith(oA)&&1===n.slice(oA.length).split("/").filter(
1Boolean).length))return e;let i=oN(r.endpoint);if(i&&!t.has(i))return e;if(!oE(e)||!Array.isArray(e.items))return e;let o=!1,a=e.items.map(e=>{let t=function(e){var t,r,n,i;let o,a,l,s,c,d,u,p,f,m,h,g,y,b,v;if(!oE(e))return e;let x=e.marketing;if(!oE(x))return e;let w=oS(x.institutionalStats,og),S=oS(x.institutionalStats,oy),I=(c=[],(d=(o=oE((r=t=x).tags)?r.tags:void 0,a=oE(r.location)?r.location:void 0,l=oj(o?.city)??oj(a?.city),s=oj(o?.state)??oj(a?.state),l&&s?`${l}, ${s}`:l??s??null))&&c.push(d),(g=(u=oE((n=t).additional)?n.additional:void 0,f=(p=oE(n.institutionalStats)?n.institutionalStats:void 0)&&oE(p.institutionLevel)?oj(p.institutionLevel.value):void 0,(m=oj(u?.levelOfInstitution)??f)?(h=m.trim().toLowerCase().replace(/\s+/g," ")).startsWith("less than 2 years")?"<2 year":h.includes("less than 4")?"2 year":h.includes("four or more")?"4 year":/\b(?:2|two)\b/.test(h)?"2 year":/\b(?:4|four)\b/.test(h)?"4 year":null:null))&&c.push(g),(v=(y=oE((i=t).additional)?i.additional:void 0,null===(b=oC(i.institutionalStats,"percentOnlinePrograms")??ok(y?.percentOnlineEnrollment)??oC(i.institutionalStats,"percentOnlineEnrollment"))?null:b>=100?"Online":b<=0?"Campus":"Campus + Online"))&&c.push(v),function(e){let t=oE(e.institutionalStats)?e.institutionalStats:void 0;if(!t)return!1;let r=t.accreditator;return!!oE(r)&&null!==oj(r.value)}(t)&&c.push("Accredited"),c),C=function(e){if(!oE(e))return;let t={};for(let[r,n]of Object.entries(e)){if(!oE(n)||null===n.value||void 0===n.value)continue;let e=oh[r]??("string"==typeof n.label&&n.label.length>0?n.label:r);if("accreditator"===r){let i=oj(n.value);if(null===i)continue;t[r]={label:e,value:"Yes",tooltip:i},t.accreditatorName={label:e,value:i};continue}t[r]={label:e,value:oI(r,n.value)}}return Object.keys(t).length>0?t:void 0}(x.institutionalStats);if(0===w.length&&0===S.length&&0===I.length&&void 0===C)return e;let j={...x};return w.length>0&&(j.stats=w),S.length>0&&(j.details=S),I.length>0&&(j.badges=I),void 0!==C&&(j.statFields=C),{...e,marketing:j}}(e);return t!==e&&(o=!0),t});return o?{...e,items:a}:e}}(l)),[l]),x=lQ(),w=t?x:void 0,S=st(),I=(0,v.useMemo)(()=>nM(i.steps??[])?.subjectLabelFallback,[i.steps]),C=(0,v.useMemo)(()=>{let e=function(e){if(e)try{let t=rS(e);if(0===Object.keys(t).length)return;return rV(t)}catch{return}}(i.flowState),t=function(e){try{let t=window._Cohesion,r={...t?.webContext};if(!r.anonymousId){let e="function"==typeof window.tagular?window.tagular("getAliasSet"):void 0,n=t?.anonymousId||e?.anonymousId;n&&(r.anonymousId=n)}let n=t?.tagular?.writeKey||t?.writeKey;return n&&(r.writeKey=n),e&&(r.correlationId=e),Object.keys(r).length>0?r:void 0}catch{return}}(i.correlationId),o=s?.displayName?.trim(),a=s?.domain?.trim(),l=c||o||a?{...c?{id:c}:{},...o?{name:o}:{},...a?{domain:a}:{}}:void 0;return{...ix(i.flowState,i.steps,i.currentStep,{subjectLabelFallback:I}),...r?{flowType:r}:{},...n?{trafficSource:n}:{},mobiusIdToken:ll,...c?{tenantId:c}:{},...i.headline?{headline:i.headline}:{},...i.params?{params:i.params}:{},...l?{tenant:l}:{},...e?{lead:e}:{},...t?{trackingContext:t}:{},...w?{comparison:w.snapshot}:{},...S?{submissions:S.snapshot}:{}}},[i.flowState,i.steps,i.currentStep,i.headline,i.params,I,r,n,c,s?.displayName,s?.domain,i.correlationId,w?.snapshot,S?.snapshot]),j=(0,v.useMemo)(()=>{let e=function(e,t){let r={};if(!e||!t)return r;for(let n of t){let t=n?.id;if(!t)continue;let i=e[t];if(!i)continue;let o=i.option;if(o){if(!Array.isArray(o)){let e=i.leadFieldAssociated??n.leadFieldAssociated;"string"==typeof e&&e.length>0&&"string"==typeof o.value&&o.value.length>0&&!iA(e,o.value)&&(r[e]=o.value);continue}for(let e of o){let t=e.leadFieldAssociated;!("string"!=typeof t||0===t.length||"string"!=typeof e.value||0===e.value.length||iA(t,e.value))&&(Object.prototype.hasOwnProperty.call(r,t)||(r[t]=e.value))}}}let n=iI(e);n&&!Object.prototype.hasOwnProperty.call(r,"countryCode")&&(r.countryCode=n);let i=ik(e);return i?r.geolocation=i:delete r.geolocation,r}(i.flowState,i.currentStep?[i.currentStep]:[]);return i.schoolId&&!Object.prototype.hasOwnProperty.call(e,"schoolId")&&(e.schoolId=i.schoolId),e},[i.flowState,i.currentStep,i.schoolId]),k=(0,v.useMemo)(()=>eN(e?.data?.content??[]),[e?.data]),E=(0,v.useRef)(i);E.current=i;let A=(0,v.useRef)(k);A.current=k;let N=(0,v.useRef)(void 0);N.current=e?.data?.content;let T=(0,v.useRef)({}),O=(0,v.useRef)(null),P=(0,v.useRef)({}),M=iI(i.flowState);(0,v.useEffect)(()=>{M&&O.current?.("countryCode",M)},[M]);let R=l.organizationServiceBaseUrl??l.organizationApiUrl,L=i.schoolId;(0,v.useEffect)(()=>
1{if(!L||!R)return;let e=L.split(",").map(e=>Number(e.trim())).filter(e=>Number.isFinite(e));if(!e.length)return;let t=!1;return lT(e,R).then(e=>{!t&&e.length&&O.current?.("organizationIds",e.join(","))}),()=>{t=!0}},[L,R]);let F=ik(i.flowState);(0,v.useEffect)(()=>{F&&O.current?.("geolocation",F)},[F]);let U=(0,v.useRef)(w);U.current=w;let $=dy(),_=(0,v.useRef)($);_.current=$;let D="function"==typeof aI.useModalHostOptional?(0,aI.useModalHostOptional)():null,Y=(0,v.useRef)(D);Y.current=D;let B=(0,v.useMemo)(()=>l.externalLinkOrigins??[],[l.externalLinkOrigins]),z=l.leadApiBaseUrl,V=(0,v.useMemo)(()=>s?r2(s):void 0,[s]),H=(0,v.useMemo)(()=>c?{tenantId:c,baseUrl:z,flowType:r,trafficSource:n,getTrackingContext:e=>(function(e={}){try{let t=window._Cohesion,r=t?.webContext,n=t?.anonymousId||r?.anonymousId,i=t?.instanceId||r?.instanceId,o=t?.sessionId||r?.sessionId,a=r?.page?.referrer||("undefined"!=typeof document?document.referrer:"")||"",l=r?.page?.title||("undefined"!=typeof document?document.title:"")||"",s=r?.page?.url||window.location?.href||"",c=r?.userAgent||window.navigator?.userAgent||"",d=t?.tagular?.writeKey||t?.writeKey,u={};a&&(u.referrer=a),l&&(u.title=l),s&&(u.url=s);let p={fromManual:!1};n&&(p.anonymousId=n),i&&(p.instanceId=i),o&&(p.sessionId=o),Object.keys(u).length>0&&(p.page=u),c&&(p.userAgent=c);let f=e.formatType?.trim()||"dexp-offering",m=e.formatSubtype?.trim(),h=e.trackingTenantId?.trim(),g={...h?{tenantId:h}:{},formatType:f,...m?{formatSubtype:m}:{},...d?{writeKey:d}:{},webContext:p};if(!(n||o||i||Object.keys(u).length>0||c))return;return g}catch{return}})({trackingTenantId:V,formatType:"string"==typeof e?.formatType?e.formatType:void 0,formatSubtype:"string"==typeof e?.formatSubtype?e.formatSubtype:void 0})}:void 0,[c,z,r,n,V]),q=(0,v.useMemo)(()=>(function(e){let t={};if(t["navigation.advanceStep"]=()=>e.advanceStep(),e.restartFlow){let r=e.restartFlow;t["navigation.restartFlow"]=()=>{r()}}if(void 0!==e.externalLinkOrigins){let r=e.externalLinkOrigins,n=e.openExternalLink??iG;t["navigation.externalLink"]=e=>{let t=e?.url;if("string"!=typeof t||0===t.length)return void console.warn("[ActionDispatcher] navigation.externalLink called without a `url` param.");let i="string"==typeof e?.target&&e.target.length>0?e.target:"_blank";t.startsWith("/")||!iz(t,r)?console.warn(`[ActionDispatcher] navigation.externalLink blocked URL "${t}" -- not in externalLinkOrigins allowlist.`):n(t,i)}}if(e.linkoutRedirect){let{tenantId:r,baseUrl:n,flowType:i,trafficSource:o}=e.linkoutRedirect,a=e.linkoutRedirect.openLinkout??iW,l=e.linkoutRedirect.getTrackingContext;t["navigation.linkout"]=e=>{let t,s=e?.offeringId;if("string"!=typeof s||0===s.length)return void console.warn("[ActionDispatcher] navigation.linkout called without an `offeringId` param.");let c=e?.tenantId,d="string"==typeof c&&c.length>0?c:r;if(l)try{t=l(e)}catch{t=void 0}
1let u=function(e){let t=e.offeringId?.trim(),r=e.tenantId?.trim();if(!t||!r)return null;let n=new URLSearchParams;n.set("withRedirect","true"),n.set("offeringId",t),n.set("tenantId",r),e.correlationId&&n.set("correlationId",e.correlationId),e.trafficSource&&n.set("trafficSource",e.trafficSource),e.monetizationChannel&&n.set("monetizationChannel",e.monetizationChannel),e.experience&&n.set("experience",e.experience),e.flowType&&n.set("flowType",e.flowType);let i=function(e){if(e&&0!==Object.keys(e).length)try{let t=JSON.stringify(e);if(!t||"{}"===t||t.length>6e3)return;return t}catch{return}}(e.trackingContext);i&&n.set("trackingContext",i);let o=e.anonymousId?.trim();o&&n.set("anonymousId",o);let a=e.sessionId?.trim();a&&n.set("sessionId",a);let l=e.instanceId?.trim();l&&n.set("instanceId",l);let s=e.country?.trim().toUpperCase();s&&n.set("country",s);let c=e.state?.trim().toUpperCase();return c&&n.set("state",c),`${e.baseUrl??""}/api/hen/v1/delivery-service/lead/conversion-init/?${n.toString()}`}({offeringId:s,tenantId:d,correlationId:iQ(e?.correlationId),trafficSource:iQ(e?.trafficSource)??o,monetizationChannel:iQ(e?.monetizationChannel),experience:iQ(e?.experience),flowType:iQ(e?.flowType)??i,trackingContext:t,anonymousId:iQ(e?.anonymousId),sessionId:iQ(e?.sessionId),instanceId:iQ(e?.instanceId),country:iQ(e?.country),state:iQ(e?.state),baseUrl:n});u?a(u):console.warn("[ActionDispatcher] navigation.linkout could not build a redirect URL -- missing offeringId or tenantId.")}}if(e.submitRequestInfo){let r=e.submitRequestInfo;t["submission.requestInfo"]=e=>r(e)}if(e.httpClient){let r=e.httpClient;t["submission.apiCall"]=async e=>{var t;let n=e?.endpoint;if("string"!=typeof n||0===n.length)return void console.warn("[ActionDispatcher] submission.apiCall called without a string `endpoint` param.");let i=e?.method,o="string"==typeof i&&"GET"===i.toUpperCase()?"GET":"POST",a="object"!=typeof(t=e?.headers)||null===t||Array.isArray(t)?void 0:e.headers,l=e?.body;try{await r({endpoint:n,method:o,headers:a,body:l})}catch(e){throw console.warn(`[ActionDispatcher] submission.apiCall to "${n}" failed; DB-2.4 will route the outcome through onAfterDispatch.`,e),e}}}if(e.openLeadFlow){let r=e.openLeadFlow;t["results.openLeadFlow"]=e=>r(e)}if(e.openNamedModal){let r=e.openNamedModal;t["modal.open"]=e=>r(e)}if(e.closeNamedModal){let r=e.closeNamedModal;t["modal.close"]=e=>r(e)}let r=!1;if(t["comparison.toggle"]=t=>{e.toggleComparison?e.toggleComparison(t):r||(r=!0,console.warn("[ActionDispatcher] comparison.toggle dispatched but no ComparisonProvider is wired (DB-2.2 / EDUN-10690)."))},e.goToStep){let r=e.goToStep;t["navigation.goToStep"]=e=>{let t=e?.stepId;if("string"!=typeof t||0===t.length)return void console.warn("[ActionDispatcher] navigation.goToStep called without a `stepId` param.");let n=e?.resetFlowState;r(t,"boolean"==typeof n?{resetFlowState:n}:void 0)}}if(e.goBack){let r=e.goBack;t["navigation.goBack"]=()=>{r()}}if(e.clearFormState){let r=e.clearFormState;t["formState.clear"]=e=>{let t=e?.keys;if(!Array.isArray(t))return void console.warn("[ActionDispatcher] formState.clear called without an array `keys` param; dropping.",e);let n=[];for(let e=0;e<t.length;e++){let r=t[e];"string"==typeof r&&r.length>0&&n.push(r)}0!==n.length&&r(n)}}if(e.extraHandlers){let r=!1;for(let[n,i]of Object.entries(e.extraHandlers))n in t&&!r&&(r=!0,console.warn(`[ActionDispatcher] extraHandlers override built-in handler(s) (first collision: "${n}").`)),t[n]=i}return{has:e=>e in t,dispatch(r,n){let i=t[r];if(!i)return void console.warn(`[ActionDispatcher] No handler registered for action "${r}".`);try{var o;let t=i(n);if(o=t,"object"==typeof o&&null!==o&&"function"==typeof o.then)return void t.then(()=>{e.onAfterDispatch?.(r,n,{ok:!0})},t=>{ne(t instanceof Error?t:Error(String(t)),{source:"ActionDispatcher",action:r,outcome:"rejected"}),e.onAfterDispatch?.(r,n,{ok:!1,error:t})});e.onAfterDispatch?.(r,n,{ok:!0})}catch(t){ne(t instanceof Error?t:Error(String(t)),{source:"ActionDispatcher",action:r,outcome:"threw"}),e.onAfterDispatch?.(r,n,{ok:!1,error:t})}}}})({advanceStep:()=>E.current.handleStepForward?.(),restartFlow:()=>E.current.handleRestart?.(),externalLinkOrigins:B,linkoutRedirect:H,submitRequestInfo:async()=>{await E.current.handleStepForward?.()},openLeadFlow:_.current?e=>{let t=_.current?.openLeadFlow;if(!t)return;let r=e?.result;if(!nu(r))return void console.warn("[ConfigurableStep] results.openLeadFlow ignored â params.result must be a Result with a numeric programId and either a non-empty offeringUuid or the full schoolId, schoolSlug, schoolName, and programName quartet.",e);let n=e?.offeringId;"string"==typeof n&&n.trim().length>0&&O.current?.("selectedOfferingId",n),t(r)}:void 0,openNamedModal:Y.current?e=>{let t=Y.current;t&&iJ(t,"modal.open",e,"ConfigurableStep")}:void 0,closeNamedModal:Y.current?e=>{let t=Y.current;t&&iJ(t,"modal.close",e,"ConfigurableStep")}:void 0,httpClient:async e=>{let t={endpoint:e.endpoint,method:e.method,...e.headers?{headers:e.headers}:{},...void 0!==e.body?{body:e.body}:{}},r=await aY(t,{},{trustedOrigins:h,tenantId:c,coerceRequestBody:g,coerceResponse:y});if("error"===r.status)throw r.error??Error("submission.apiCall failed");return r.data},toggleComparison:U.current?e=>{let t=U.current,r=t?.togglePrograms;if(!t||!r)return;let n=e?.item;if(!nc(n))return void console.warn("[ConfigurableStep] comparison.toggle ignored â params.item must be a Result with a numeric programId.",e);let i=t.isProgramSelected(n.programId),o=r(n),a=t.dslConfigId,l={schoolSlug:n.schoolSlug,viewCorrelationId:n.viewCorrelationId,correlationId:n.productClickedCorrelationId};o&&!i?db(l,!0,a):!o&&i&&db(l,!1,a)}:void 0,goToStep:E.current.handleGoToStep?(e,t)=>E.current.handleGoToStep?.(e,t):void 0,goBack:E.current.handlePrevious?()=>E.current.handlePrevious?.():void 0,clearFormState:e=>{let t=O.current;if(t)for(let r=0;r<e.length;r++)t(e[r],"")}}),[B,H,h,g,y,c,!!w,!!$,!!D]),G=(0,v.useCallback)(e=>{let t=P.current,r=E.current.currentStep?.id;if(!r){P.current=e;return}try{!function(e){let t;if(!e.stepId||!function(e,t){for(let r of Object.keys(t))if(e[r]!==t[r])return!0;for(let r of Object.keys(e))if(!(r in t)&&void 0!==e[r])return!0;return!1}
1(e.prev,e.next))return;let r=[];for(let n of Object.keys(e.next)){let i;try{i=function(e,t,r){var n;let i,o=r.resolveBound(e),a=o?.source?r.resolveSource(o.source):void 0,l=!o?.source&&Object.prototype.hasOwnProperty.call(te,e)&&r.translateDcsValue?r.translateDcsValue(e,t):function(e,t,r){let n=String(e);if(!t?.optionLabelField||!t.optionValueField)return iO(`missing-companion-fields:${t?.formKey??"?"}`),n;let i=r?.data;if(null==i)return iO(`source-not-resolved:${t.source??"?"}`),n;let o=function(e,t,r){let n;if(void 0===t)return Array.isArray(e)?iT(e):[];try{let e=n5(`{{${t}}}`).segments[0];e&&"expression"===e.type&&"path"===e.kind&&(n=e.segments)}catch(e){if(e instanceof n3)return iO(`bad-options-path:${r??"?"}:${t}`),[];throw e}if(!n||0===n.length)return[];let i=n7(e,n);return Array.isArray(i)?iT(i):[]}(i,t.optionsPath,t.source);if(0===o.length)return iO(`source-not-resolved:${t.source??"?"}`),n;let a=t.optionLabelField,l=t.optionValueField;for(let t=0;t<o.length;t++){let r=o[t];if(r&&"object"==typeof r){let t=r[l];if(void 0!==t&&String(t)===e){let e=r[a];if(null!=e)return String(e)}}}return iO(`no-match:${t.source??"?"}:${e}`),n}(t,o,a),s=function(e,t,r){if(!t?.optionValueField)return;let n=r?.data;if(null==n)return;let i=function(e,t){let r;if(void 0===t)return Array.isArray(e)?iP(e):[];try{let e=n5(`{{${t}}}`).segments[0];e&&"expression"===e.type&&"path"===e.kind&&(r=e.segments)}catch(e){if(e instanceof n3)return[];throw e}if(!r||0===r.length)return[];let n=n7(e,r);return Array.isArray(n)?iP(n):[]}(n,t.optionsPath);if(0===i.length)return;let o=t.optionValueField;for(let t=0;t<i.length;t++){let r=i[t];if(r&&"object"==typeof r){let t=r[o];if(void 0!==t&&String(t)===e){let e=r.slug;if("string"==typeof e&&e.length>0)return e;break}}}}(t,o,a),c=o?o.leadFieldAssociated:e,d=o?.customField,u=o?.isArray===!0||void 0;return i={optionId:(n={formKey:e,value:t,label:l,...s?{slug:s}:{},leadFieldAssociated:c,customField:d,isArray:u}).formKey,text:n.label,value:n.value},n.slug&&(i.slug=n.slug),n.leadFieldAssociated&&(i.leadFieldAssociated=n.leadFieldAssociated),n.customField&&(i.customField=n.customField),!0===n.isArray&&(i.isArray=!0),i}(n,e.next[n]??"",e)}catch(e){console.error(`[ConfigurableStep] translateFormStateChange: resolver threw for "${n}"`,e);continue}i&&(r.push(i),!t&&i.leadFieldAssociated&&(t=i.leadFieldAssociated))}if(0===r.length)return;let n=1===r.length?r[0]:r,i=1===r.length?t:void 0;e.commit(e.stepId,{option:n,...i&&{leadFieldAssociated:i}})}({stepId:r,prev:t,next:e,resolveBound:e=>A.current[e]??function(e,t){if(!t||"string"!=typeof t)return;let r=[];if(eT(e,(e,n)=>{e===t&&r.push(eP(t,n))}),0!==r.length)return r.length>1&&console.warn(`[ConfigurableStep] Multiple components share formKey "${t}"; using the first match.`),r[0]}(N.current,e),resolveSource:e=>T.current[e],translateDcsValue:a.current.translateDcsValue,commit:(e,t)=>E.current.updateFlowState?.(e,t)})}finally{P.current=e}},[]),W=d?(0,b.jsxs)(uN,{children:[(0,b.jsx)(uv,{}),(0,b.jsx)(uc,{dslConfig:e,excludedContentTypes:uI}),(0,b.jsx)(ug,{})]}):(0,b.jsx)(uc,{dslConfig:e});return(0,b.jsxs)(lr,{dataSources:f,flowContext:C,initialFormState:j,onFormStateChange:G,trustedOrigins:h,tenantId:c,reportingQueryUrl:m,coerceRequestBody:g,coerceResponse:y,children:[(0,b.jsx)(uE,{sourcesRef:T,updateFormStateRef:O}),d&&(0,b.jsx)(uA,{}),(0,b.jsx)(lc.Provider,{value:q,children:(0,b.jsx)(uT,{children:W})})]})},uk=({dslConfig:e,flowType:t,trafficSource:r})=>{var n;let{currentStep:i}=aS(),o=e?.type==="result",a=(0,v.useMemo)(()=>o?nk(e?.data):void 0,[e?.data,o]),l=a?.comparison,s=uC(t)??im(i)??(n=a,uC(n?.flowType)),c=uC(r)??function(e){let t=ih(e);if(t)return t;let r=rC(window.location?.href??"");return"string"==typeof r&&r.length>0?r:void 0}(i),d=o&&l?.enabled===!0,u=a?.exitStrategy?.studentLoansInline,p=o&&u?.enabled===!0?function(e){let{enabled:t,...r}=e;return{type:"StudentLoansInline",props:{...r,variant:"narrow"}}}(u):void 0,f=a?.exitStrategy?.extraCta,m=o&&f?.enabled===!0?{enabled:!0,...void 0!==f.label?{label:f.label}:{},...void 0!==f.eventName?{eventName:f.eventName}:{}}:void 0,h=(0,b.jsx)(uj,{dslConfig:e,comparisonEnabled:d,flowType:s,trafficSource:c}),g=d?(0,b.jsxs)(lG,{minPrograms:l?.minSelection,maxPrograms:l?.maxSelection,dslConfigId:e?.configId,children:[h,(0,b.jsx)(dJ,{})]}):h,y="function"==typeof aI.ModalHostProvider?(0,b.jsx)(aI.ModalHostProvider,{children:g}):g;return o?(0,b.jsx)(l1,{config:a,children:(0,b.jsx)(se,{children:(0,b.jsx)(dh,{dslConfigId:e?.configId,flowType:s,trafficSource:c,studentLoansInlineContent:p,extraCtaConfig:m,children:y})})}):y},uE=({sourcesRef:e,updateFormStateRef:t})=>{let{sources:r,updateFormState:n}=ln();return e.current=r,t.current=n,null},uA=()=>{let{sources:e}=ln(),t=dy(),r=t?.applyOfferingDetail,n=e.offeringDetail;return(0,v.useEffect)(()=>{r?.(n)},[r,n]),null},uN=({children:e})=>{let{getSource:t}
1=ln(),{shouldShowLoadingInterstitial:r,getLoadingCopy:n}=l4(),i=t("results"),[o,a]=v.useState(!1),l=r&&i&&"pending"===i.status;return((0,v.useEffect)(()=>{if(!l)return void a(!1);let e=window.setTimeout(()=>{a(!0)},1e4);return()=>window.clearTimeout(e)},[l]),l&&!o)?(0,b.jsx)(ux,{...n()}):(0,b.jsx)(b.Fragment,{children:e})},uT=({children:e})=>{let t=l_();return(0,b.jsx)("div",{ref:t?.setEntryRootNode,"data-de-entry-root":!0,children:e})},uO={[L.CAPPEX]:({handlePrevious:e})=>(0,b.jsxs)("div",{className:"relative w-full h-full min-h-[500px] bg-white",children:[(0,b.jsx)("div",{className:"h-full w-full bg-white relative hidden md:block","data-testid":"cappex-background-image",children:(0,b.jsx)("img",{src:"https://res.cloudinary.com/highereducation/image/upload/c_scale,w_1440/v1684422028/Cappex/LandingPage.jpg",alt:"woman in a library holding books to her chest and looking at camera",className:"h-full w-full object-contain"})}),(0,b.jsx)("div",{className:"md:absolute inset-0 flex h-full w-full flex-col items-center justify-center lg:ml-8 xl:ml-60",children:(0,b.jsxs)("section",{className:"md:relative w-full max-w-full flex flex-col p-12 md:gap-2",children:[(0,b.jsxs)("button",{type:"button",className:"flex items-center gap-2 py-1 text-primary-500 text-sm md:text-sm mb-4 md:mb-0",onClick:()=>{e?.()},children:[(0,b.jsx)(aj.X8f,{className:"text-sm md:text-sm"}),"Back to previous question"]}),(0,b.jsx)("h3",{className:"text-primary-500 max-w-full text-2xl md:text-2xl font-medium leading-tight",children:"Continue with Appily to get your best results!"}),(0,b.jsxs)("p",{className:"text-primary-500 mt-3 md:mt-1 max-w-full text-base md:text-lg md:max-w-md leading-relaxed",children:["We're"," ",(0,b.jsx)("b",{className:"text-secondary-700",children:"partnering with Appily"})," to help students like you find the right college for your goals and future. Finish this quiz on their site to get personalized matches."]}),(0,b.jsx)("h6",{className:"text-primary-500 mt-4 md:mt-2 text-lg md:text-lg font-semibold",children:"Find a College in 3 Easy Steps"}),(0,b.jsxs)("ul",{className:"ml-5 mt-2 md:mt-1 text-primary-600 text-base md:text-sm space-y-1",children:[(0,b.jsx)("li",{className:"list-item max-w-full list-disc md:max-w-md leading-relaxed",children:"Continue this quiz on the Appily website"}),(0,b.jsx)("li",{className:"list-item max-w-full list-disc md:max-w-md leading-relaxed",children:"Create your FREE account"}),(0,b.jsx)("li",{className:"list-item max-w-full list-disc md:max-w-md leading-relaxed",children:"Connect with colleges"})]}),(0,b.jsx)("p",{className:"mt-3 md:mt-1 max-w-full text-primary-600 md:max-w-md text-base md:text-sm leading-relaxed",children:"Once you've created your account, you can even view your application status!"}),(0,b.jsx)("a",{"data-testid":"cappex-cta-anchor",children:(0,b.jsxs)("button",{"data-testid":"cappex-cta-button",onClick:()=>{window.open("http://tracking.appily.com/aff_c?offer_id=181&aff_id=2195&aff_sub=PHASE2","_blank")},type:"button",className:"rounded bg-secondary-700 mt-6 md:mt-auto flex items-center justify-center gap-2 py-3 px-6 md:px-3 font-bold text-white text-base md:text-sm",children:["Find Your Match"," ",(0,b.jsx)(aC.aIP,{className:"text-xl md:text-xl text-white"})]})})]})})]})},uP=({componentType:e,currentStep:t,componentProps:r})=>{let{handlePrevious:n}=aS();if(t?.dslConfigId)return e&&console.warn(`[ComponentRenderer] Step "${t.id??"unknown"}" has both componentType "${e}" and dslConfigId "${t.dslConfigId}"; routing through DSL. Payloads should declare exactly one.`),(0,b.jsx)(uk,{dslConfig:t.dslConfig,flowType:t.flowType,trafficSource:t.trafficSource},t.dslConfigId??t.id??"configurable");let i=uO[e];return i?(0,b.jsx)(i,{currentStep:t,handlePrevious:n,...r}):(console.warn(`Component type "${e}" is not registered. Add it to COMPONENT_REGISTRY in ComponentRenderer.tsx`),null)};function uM(e,t){switch(e){case"BANNER_CTA":return L.BANNER_CTA;case"COMPONENT":return t?.componentType||null;default:return null}}let uR=({modal:e,openModal:t})=>{let{handleTCPA:r,handleStepForward:n}=aS();return e?.enable?(0,b.jsx)(aI.Modal,{open:t,onOpenChange:e=>{e||r(!1)},children:(0,b.jsxs)(aI.Modal.Content,{size:"sm",children:[(0,b.jsx)(aI.Modal.Header,{children:(0,b.jsx)(aI.Modal.Title,{children:e?.title||""})}),(0,b.jsx)(aI.Text,{variant:"b5",color:"subtext",className:"de-modal-content px-lg py-md",children:k(e.content||"")}),(0,b.jsx)(aI.Modal.Footer,{children:(0,b.jsx)(aI.Button,{variant:"primaryFill",className:"w-full",onClick:()=>{r(!0),n()},children:e?.buttonText||"Accept"})})]})}):null},uL=e=>e?.type===O.QUESTION||e?.type===O.MULTI_QUESTION,uF=({children:e})=>{let t=v.useRef(null),{currentStep:r,currentStepType:n,styleVariant:i,openModal:o}=aS(),a=r?.modal,l=r?.isTerminal&&r?.isEntry,s=function(){let{steps:e,currentStep:t,navigationHistory:r}=aS(),n=(0,v.useMemo)(()=>(e=>{if(!e||0===e.length)return 5;let t=new Set;for(let r of e)r.type===O.MULTI_QUESTION&&r.stepQuestions?.forEach(e
1=>e.id&&t.add(e.id));let r=new Map;for(let t of e)t.id&&r.set(t.id,t);let n=e.find(e=>e.isEntry)||e[0],i=0,o=new Set,a=n?.id;for(;a&&!o.has(a);){o.add(a);let e=r.get(a);if(!e||(uL(e)&&!t.has(e.id||"")&&i++,e.isTerminal))break;let n=e.branchingLogic?.find(e=>e.condition?.type===M.DEFAULT);if(!n||n.type===R.RESULT)break;a=n.nextId}return Math.max(i,5)})(e),[e]);return(0,v.useMemo)(()=>{if(!t?.id||0===e.length)return 0;let i=new Set;for(let t of e)t.type===O.MULTI_QUESTION&&t.stepQuestions?.forEach(e=>e.id&&i.add(e.id));return Math.round(Math.min(10+r.filter(e=>uL(e)&&!i.has(e.id||"")).length/n*85,95))},[e,t?.id,r,n])}();return n===O.RESULT?(0,b.jsx)("div",{className:"de-experience-container h-full",children:(0,b.jsx)("div",{className:"de-step-container bg-gray-50 h-full",children:e})}):(0,b.jsxs)(aI.Flex,{direction:"column",gap:"lg",className:"de-experience-wrapper md:flex-1 bg-white not-prose p-0",ref:t,children:["default"===i&&!l&&(0,b.jsx)(aI.Progress,{value:s,label:"Your Progress",valueLabel:`${Math.round(s)}% complete`,className:"[&>div]:!bg-secondary-700"}),(0,b.jsx)("div",{className:"de-step-container",children:e}),(0,b.jsx)(uR,{modal:a,openModal:o})]})},uU=({title:e="We have over",statistic:t="300",description:r="potential matches for you. Letâs personalize that list some more."})=>(0,b.jsx)(aI.Card,{className:"w-full",variant:"background-white",children:(0,b.jsx)(aI.Card.Content,{children:(0,b.jsxs)(aI.Flex,{direction:"column",gap:"none",children:[(0,b.jsx)(aI.Brow,{children:e}),(0,b.jsx)(aI.Text,{variant:"d3",weight:"bold",color:"heading",tag:"span",children:t}),(0,b.jsx)(aI.Text,{variant:"b4",color:"subtext",children:k(r)})]})})}),u$=({text:e="Online programs can cut the time it takes to get your degree by 50%.",title:t="Did You Know?"})=>(0,b.jsx)(aI.Card,{className:"w-full",variant:"background-white",children:(0,b.jsxs)(aI.Card.Content,{children:[(0,b.jsx)(aI.Brow,{children:t}),(0,b.jsx)(aI.Text,{variant:"b4",color:"subtext",children:k(e)})]})}),u_=({text:e="Online programs can cut the time it takes to get your degree by 50%.",graphic:t="horizontal",itemNameOne:r="Online",itemNameTwo:n="Traditional",sourceText:i="Source"})=>{let o="horizontal"===t;return(0,b.jsx)(aI.Card,{className:"w-full",variant:"background-white",children:(0,b.jsxs)(aI.Card.Content,{children:[(0,b.jsx)(aI.Text,{variant:"b4",color:"subtext",children:k(e)}),(0,b.jsx)(aI.StatStyles,{style:o?"bars-horizontal":"bars-vertical",bars:[{label:r,value:60,variant:"tertiary"},{label:n,value:100,variant:"primary"}],className:o?void 0:"h-36"}),i&&(0,b.jsx)(aI.Text,{variant:"b5",color:"subtext",className:"font-bold underline",children:k(i)})]})})};function uD(e){return e&&(e.type===O.QUESTION||e.type===O.MULTI_QUESTION)?e.sideRailConfigs??[]:[]}let uY=(0,v.memo)(()=>{let{currentStep:e}=aS(),t=uD(e);return(0,b.jsx)(aI.Card,{variant:"background-gray","data-test":"side-rail",className:"w-full md:self-start md:max-w-96 md:min-w-80 rounded-[32px] gap-8 px-8 py-7",children:t.map(e=>{switch(e.type){case"statisticHighlight":return(0,b.jsx)(uU,{...e.config},e.id);case"textBox":return(0,b.jsx)(u$,{...e.config},e.id);case"graphicCard":return(0,b.jsx)(u_,{...e.config},e.id);default:return null}})})}),uB=({onBack:e,onNext:t,nextLabel:r,showBack:n=!1,isFullPageExp:i=!0,disabled:o=!1})=>(0,b.jsxs)(aI.Flex,{direction:"row",justify:i?"start":"center",align:"start",gap:"xs",className:i?"de-cta-container fixed bottom-0 left-0 right-0 z-50 bg-neutral-50 px-5 py-4 md:static md:bg-transparent md:px-0 md:py-0 md:z-auto":"de-cta-container ",children:[n&&(0,b.jsx)(aI.Button,{"data-test":"back-button",onClick:e,variant:"grayOutline",size:"lg",iconBefore:"arrow-left","aria-label":"Back"}),(0,b.jsx)(aI.Button,{"data-test":"cta-button",onClick:t,variant:"primaryFill",size:"lg",className:i?"flex-1 md:flex-none":void 0,disabled:o,children:r})]}),uz=({step:e,isFullPageExp:t})=>e.preSubHeading?(0,b.jsx)(aI.Text,{"data-test":"step-preSubHeading",variant:t?"b3":"b4",color:"subtext",className:"font-bold",children:e.preSubHeading}):null,uV=({step:e,isFullPageExp:t})=>e.title?(0,b.jsxs)(aI.Flex,{direction:"column",justify:"center",align:"start",ga
1p:"xs",children:[(0,b.jsx)(aI.Heading,{variant:t?"h1":"h3",className:t?"de-step-title text-h3 leading-h3 md:text-h2 md:leading-h2":"de-step-title",children:e.title}),e.subtitle&&(0,b.jsx)(aI.Text,{variant:"b3",color:"default","data-test":"de-step-subtitle",children:e.subtitle})]}):null,uH=({step:e})=>e.tooltip?(0,b.jsx)(aI.FeedbackBox,{children:k(e.tooltip)}):null,uq=({id:e,fieldType:t,options:r,title:n,stepName:i,isMultiQuestionChild:o=!1,variant:a,leadFieldAssociated:l})=>{let{eventContext:s,getStepMetadataById:c}=aS(),{triggerFieldEvents:d}=av(),u=c(e||""),{ref:p}=su([ac({...s,variant:a||t}),ad({...s,fieldName:i||u?.leadFieldAssociated?.toString()||l?.toString()||"",fieldValue:r.map(e=>e.text).join(","),fieldType:t,...o&&{stepId:e,stepName:i||n}},"FieldViewed")]);return{ref:p,triggerFieldInputted:(0,v.useCallback)(r=>{d("FieldInputted",{...s,fieldValue:r,fieldNumber:s?.currentStepIndex||0,fieldName:o?i||"":s?.currentStep?.stepName||"",fieldLabel:o?n:s?.currentStep?.title,fieldType:t,fieldId:o?l?.toString()||e:s?.currentStep?.leadFieldAssociated?.toString()||"",...o&&{stepId:e,stepName:i||n}})},[s,t,e,o,l,i,n,d])}},uG=({count:e=6})=>(0,b.jsx)(aI.Flex,{wrap:"wrap",gap:"md",justify:"center",align:"center",className:"py-6 w-full",children:Array.from({length:e}).map((e,t)=>(0,b.jsx)("div",{className:"animate-pulse rounded-full bg-gray-300 h-10",style:{width:`${120+t%3*40}px`}},t))}),uW=(e,t,r)=>{let n=new Set(e.map(e=>e.optionId)),i=r.filter(e=>!n.has(e.optionId)),o=i.length>0?[...i,...e]:e,a=new Set(o.map(e=>e.optionId));return{displayedOptions:o,searchableOptions:t.filter(e=>!a.has(e.optionId))}},uQ=e=>({value:e.optionId,label:String(e.text)}),uK=({options:e=[],id:t="",leadFieldAssociated:r,maxSelection:n=0,automaticNext:i=!1,showOrderNumber:o=!1,isMultiQuestionChild:a=!1,title:l,stepName:s,variant:c,isOptionsLoading:d=!1,searchBarAllOptions:u,dynamicOptionsError:p})=>{let{updateFlowState:f,getStepMetadataById:m,handleStepForward:h}=aS(),g=(m(t)||{}).option||[],{ref:y,triggerFieldInputted:x}=uq({id:t,fieldType:"multiple_choice",options:e,title:l,stepName:s,isMultiQuestionChild:a,variant:c,leadFieldAssociated:r}),w=!!u?.length,{displayedOptions:S,searchableOptions:I}=(0,v.useMemo)(()=>w?uW(e,u,g):{displayedOptions:e,searchableOptions:[]},[w,e,u,g]),C=e=>{let o;if(g.find(t=>t.optionId===e.optionId))o=g.filter(t=>t.optionId!==e.optionId);else{if(n>0&&g.length>=n)return;o=[...g,e]}x(o.map(e=>e.text).join(",")),f(t,{option:o,leadFieldAssociated:r}),i&&!a&&o.length===n&&h()},j=d&&!p;return(0,b.jsxs)(b.Fragment,{children:[p?(0,b.jsx)(sh,{message:p,className:"w-full justify-center py-2 px-2"}):null,(0,b.jsx)(aI.Flex,{gap:"sm",wrap:"wrap",align:"center",justify:"start",direction:"row",className:"w-full",ref:y,children:j?(0,b.jsx)(uG,{}):S.map(e=>{let t,r=g.some(t=>t.optionId===e.optionId),n=-1!==(t=g.findIndex(t=>t.optionId===e.optionId))?t+1:null,i=o&&r;return(0,b.jsxs)(aI.Button,{size:"sm",type:"button",className:"w-fit",variant:"grayOutline","aria-pressed":r,onClick:()=>C(e),children:[i&&(0,b.jsxs)(aI.Text,{tag:"span",variant:"b5",weight:"semibold",children:[n,"."]}),e.text]},e.optionId)})}),!j&&w&&I.length>0&&(0,b.jsx)(aI.Combobox,{className:"mt-4","aria-label":l||"Search options",options:I.map(uQ),selectedValues:g.map(e=>e.optionId),maxSelectable:n,onSelect:e=>{let t=(u??[]).find(t=>t.optionId===e);t&&C(t)}})]})},uJ=(e,t)=>{if(!e)return"";let r=e;for(let n of Array.from(e.matchAll(/\{\{([^}]+)\}\}/g))){let e=t[n[1]],i="";if(e&&e.option)if(Array.isArray(e.option))i=e.option.map(e=>e.text||e.value).join(", ");else{let t=e.option;i=t.text||t.value}r=r.replace(n[0],i)}return r},uX=({options:e=[],title:t,isMultiQuestionChild:r=!1,id:n="",leadFieldAssociated:i,automaticNext:o=!1,stepName:a,variant:l,isOptionsLoading:s=!1})=>{let{updateFlowState:c,getStepMetadataById:d,handleStepForward:u,flowState:p}=aS(),f=d(n||""),m=f?.option,h=(0,v.useMemo)(()=>t?uJ(t,p):"",[t,p]),{ref:g,triggerFieldInputted:y}=uq({id:n,fieldType:"radio",options:e,title:t,stepName:a,isMultiQuestionChild:r,variant:l,leadFieldAssociated:i}),x=(0,v.useCallback)(t=>{let a=e.find(e=>e.optionId===t);a&&(m&&!Array.isArray(m)&&m.optionId===a.optionId?c(n,{}):c(n,{option:a,leadFieldAssociated:i}),y(a.text),o&&!r&&u())},[e,m,n,i,c,r,y,o,u]),w=e.map(e=>({value:e.optionId||"",label:e.text})),S=m&&!Array.isArray(m)?m.optionId:"";return(0,b.jsxs)(aI.Flex,{direction:r?"row":"column",gap:r?"xs":"md",ref:g,children:[t&&r&&(0,b.jsx)(aI.Heading,{variant:"h6",children:h}),s?(0,b.jsx)(uG,{}):(0,b.jsx)(aI.Radio,{options:w,value:S,onValueChange:x,name:n})]})},uZ=async e=>null,u0=e=>{let{flowState:t}=aS(),[r,n]=(0,v.useState)([]),[i,o]=(0,v.useState)(!0),[a,l]=(0,v.useState)(),s=(0,v.useMemo)(()=>((e,t)=>{if(!e)return{};let r={},n=e=>{if(!e)return e;let r=e;for(let n of Array.from(e.matchAll(/\{\{([^}]+)\}\}/g))){let e=t[n[1]];if(e&&e.option){let t="";if(Array.isArray(e.option))t=e.option.map(e=>e.value||e.text).join(",");else{let r=e.option;t=r.value||r.text}r=r.replace(n[0],t)}}return r};return r.type=n(e.type),r.subject=n(e.subject),r})(e,t),[e,t]),c=e?.filterKey||"subjects",d=`${s.type??""}|${s.subject??""}|${c}`;return(0,v.useEffect)(()=>{let e=!1,t={type:s.type,subject:s.subject};return(async()=>{o(!0),l(void 0);try{let r=await uZ(t);if(e)return;n(((e,t)=>{if(!e)return[];let r=e[t];if(!r)return[];let n=[];return Array.isArray(r)?n=r.filter(e=>"string"==typeof e):"object"==typeof r&&(n=Object.entries(r).sort(([e,t],[r,n])=>n!==t?n-t:e.localeCompare(r)).map(([e])=>e)),n.map(e=>({optionId:e,text:e,value:e}))}
1)(r,c))}catch(t){if(console.error("Error fetching filter options:",t),e)return;l("Failed to load options"),n([])}finally{e||o(!1)}})(),()=>{e=!0}},[d,s.type,s.subject,c]),{dynamicOptions:r,isLoading:i,fetchError:a}},u1=({options:e=[],id:t="",leadFieldAssociated:r,automaticNext:n=!1,isMultiQuestionChild:i=!1,title:o,stepName:a,dynamicOptionsFilters:l,variant:s,isOptionsLoading:c=!1,dynamicOptionsError:d})=>{let u,p,{updateFlowState:f,getStepMetadataById:m,handleStepForward:h}=aS(),g=m(t||""),y=g?.option,[x,w]=(0,v.useState)(""),[S,I]=(0,v.useState)(!1),[,C]=(0,v.useState)([]),j=(0,v.useRef)(null),{dynamicOptions:k,isLoading:E,fetchError:A}=u0(l),{ref:N,triggerFieldInputted:T}=uq({id:t,fieldType:"single_choice",options:e,title:o,stepName:a,isMultiQuestionChild:i,variant:s||"dynamic_single_choice",leadFieldAssociated:r});(0,v.useEffect)(()=>{let e=e=>{j.current&&!j.current.contains(e.target)&&I(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let O=(p=new Set((u=k.slice(0,10)).map(e=>e.optionId)),y&&!p.has(y.optionId)?[y,...u]:u),P=(()=>{if(!x||k.length<=10)return[];let e=new Set(O.map(e=>e.optionId));return k.filter(t=>!e.has(t.optionId)&&t.text.toLowerCase().includes(x.toLowerCase()))})(),M=d??A,R=(E||c)&&!M,L=!E&&!c&&!M&&0===k.length;return(0,b.jsxs)(b.Fragment,{children:[M?(0,b.jsx)(sh,{message:M,className:"w-full justify-center py-2 px-2"}):null,L?(0,b.jsx)("p",{role:"status",className:"w-full text-center text-sm text-gray-500 py-2 px-2",children:"No options found"}):null,(0,b.jsx)("div",{className:"flex flex-wrap gap-4 py-6 font-normal w-full items-center justify-center",ref:N,children:R?Array.from({length:10}).map((e,t)=>(0,b.jsx)("div",{className:"animate-pulse rounded-full bg-gray-300 h-10",style:{width:`${120+t%3*40}px`}},t)):O.map((e,o)=>{let a=y&&!Array.isArray(y)&&y.optionId===e.optionId;return(0,b.jsxs)("button",{className:`mx-0 transition-all duration-200 ease-in-out mb-0 flex w-fit flex-initial cursor-pointer items-center justify-center gap-x-2 rounded-full border-2 px-5 py-2 text-sm hover:border-gray-300 hover:bg-gray-100 ${a?"bg-secondary-800 text-white border-secondary-700":""}`,onClick:()=>{a?(f(t,null),C(t=>t.filter(t=>t.optionId!==e.optionId))):(f(t,{option:e,leadFieldAssociated:r}),n&&!i&&h()),T(e.text)},children:[(0,b.jsx)("svg",{className:`w-[14px] h-[14px] ${a?"block":"hidden"}`,viewBox:"0 0 20 20",fill:"currentColor",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),e.text]},o)})}),R&&(0,b.jsx)("div",{className:"w-full relative mb-6",children:(0,b.jsx)("div",{className:"animate-pulse rounded-lg bg-gray-300 h-11 w-full"})}),!R&&k.length>10&&(0,b.jsxs)("div",{className:"w-full relative mb-6",ref:j,children:[(0,b.jsx)("input",{type:"text",placeholder:"Search options...",value:x,onChange:e=>{w(e.target.value),I(e.target.value.length>0)},onFocus:()=>x.length>0&&I(!0),className:"w-full px-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),S&&P.length>0&&(0,b.jsx)("div",{className:"absolute z-10 w-full mt-1 bg-white border border-gray-300 rounded-xl shadow-lg max-h-60 overflow-y-auto",children:P.map((e,o)=>(0,b.jsx)("button",{onClick:()=>{C(t=>{let r=t.filter(t=>t.optionId!==e.optionId);return[e,...r]}),f(t,{option:e,leadFieldAssociated:r}),T(e.text),w(""),I(!1),n&&!i&&h()},className:"w-full px-4 py-3 text-left hover:bg-gray-100 transition-colors border-b border-gray-200 last:border-b-0 focus:outline-none focus:bg-gray-100 no-underline",children:(0,b.jsx)("div",{className:"font-medium text-gray-900",children:e.text})},o))}),S&&0===P.length&&(0,b.jsx)("div",{className:"absolute z-10 w-full mt-1 bg-white border border-gray-300 rounded-xl shadow-lg px-4 py-3 text-gray-500",children:"No options found"})]})]})},u2="searchbar-option-",u4=({options:e,selectedOptions:t,maxSelection:r=0,onSelect:n,placeholder:i="Search options...",emptyMessage:o="No options foun
1d"})=>{let[a,l]=(0,v.useState)(""),[s,c]=(0,v.useState)(!1),[d,u]=(0,v.useState)(-1),p=(0,v.useRef)(null),f=(0,v.useRef)(null),m=(0,v.useId)();(0,v.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&(c(!1),u(-1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let h=(0,v.useMemo)(()=>{if(!a)return[];let t=a.toLowerCase();return e.filter(e=>String(e.text).toLowerCase().includes(t))},[e,a]);(0,v.useEffect)(()=>{u(-1)},[h]),(0,v.useEffect)(()=>{if(d<0||!f.current)return;let e=h[d]?.optionId;if(!e)return;let t=document.getElementById(`${u2}${e}`);t&&"function"==typeof t.scrollIntoView&&t.scrollIntoView({block:"nearest"})},[d,h]);let g=(0,v.useCallback)(e=>{n(e),l(""),c(!1),u(-1)},[n]),y=(0,v.useCallback)(e=>{if(!s||0===h.length){"Escape"===e.key&&(c(!1),u(-1));return}switch(e.key){case"ArrowDown":e.preventDefault(),u(e=>e<h.length-1?e+1:0);break;case"ArrowUp":e.preventDefault(),u(e=>e>0?e-1:h.length-1);break;case"Enter":if(e.preventDefault(),d>=0&&d<h.length){let e=h[d],n=t.some(t=>t.optionId===e.optionId),i=r>0&&t.length>=r;(n||!i)&&g(e)}break;case"Escape":e.preventDefault(),c(!1),u(-1);break;case"Home":e.preventDefault(),u(0);break;case"End":e.preventDefault(),u(h.length-1)}},[s,h,d,t,r,g]),x=r>0&&t.length>=r,w=d>=0&&h[d]?`${u2}${h[d].optionId}`:void 0;return(0,b.jsxs)("div",{className:"w-full relative",ref:p,children:[(0,b.jsx)(aI.Input,{type:"text",role:"combobox",icon:"search",className:"pl-10","aria-expanded":s,"aria-haspopup":"listbox","aria-controls":m,"aria-activedescendant":w,"aria-autocomplete":"list",placeholder:i,value:a,onChange:e=>{l(e.target.value),c(e.target.value.length>0)},onFocus:()=>a.length>0&&c(!0),onKeyDown:y}),s&&h.length>0&&(0,b.jsx)("div",{id:m,ref:f,role:"listbox",className:"absolute z-10 w-full mt-1 bg-white border border-neutral-200 rounded-sm shadow-sm max-h-60 overflow-y-auto",children:h.map((e,r)=>{let n=t.some(t=>t.optionId===e.optionId),i=r===d;return(0,b.jsx)("button",{id:`${u2}${e.optionId}`,type:"button",role:"option","aria-selected":n,onClick:()=>g(e),disabled:!n&&x,className:`w-full px-xs py-xxs text-left transition-colors duration-fast border-b border-neutral-100 last:border-b-0 focus:outline-none no-underline ${n?"bg-secondary-50 text-secondary-700":x?"bg-neutral-100 text-neutral-200 cursor-not-allowed":i?"bg-neutral-100":"hover:bg-neutral-100 focus:bg-neutral-100"}`,children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[n&&(0,b.jsx)(aI.Icon,{icon:"check",size:"sm","aria-hidden":!0}),(0,b.jsx)(aI.Text,{variant:"b5",children:e.text})]})},e.optionId)})}),s&&a.length>0&&0===h.length&&(0,b.jsx)("div",{id:m,role:"status",className:"absolute z-10 w-full mt-1 bg-white border border-neutral-200 rounded-sm shadow-sm px-xs py-xxs",children:(0,b.jsx)(aI.Text,{variant:"b5",className:"text-subtext",children:o})})]})},u3=({options:e=[],id:t="",leadFieldAssociated:r,maxSelection:n=0,automaticNext:i=!1,isMultiQuestionChild:o=!1,title:a,stepName:l,dynamicOptionsFilters:s,variant:c,isOptionsLoading:d=!1,dynamicOptionsError:u})=>{let{updateFlowState:p,getStepMetadataById:f,handleStepForward:m}=aS(),h=(f(t)||{}).option||[],{dynamicOptions:g,isLoading:y,fetchError:x}=u0(s),{ref:w,triggerFieldInputted:S}=uq({id:t,fieldType:"multiple_choice",options:e,title:a,stepName:l,isMultiQuestionChild:o,variant:c||"dynamic_multiple_choice",leadFieldAssociated:r}),I=(0,v.useMemo)(()=>{let e=g.slice(0,10),t=new Set(e.map(e=>e.optionId)),r=h.filter(e=>!t.has(e.optionId));return r.length>0?[...r,...e]:e},[g,h]),C=(0,v.useMemo)(()=>{let e=new Set(I.map(e=>e.optionId));return g.filter(t=>!e.has(t.optionId))},[g,I]),j=u??x,k=(y||d)&&!j,E=!y&&!d&&!j&&0===g.length;return(0,b.jsxs)(b.Fragment,{children:[j?(0,b.jsx)(sh,{message:j,className:"w-full justify-center py-2 px-2"}):null,E?(0,b.jsx)("p",{role:"status",className:"w-full text-center text-sm text-gray-500 py-2 px-2",children:"No options found"}):null,(0,b.jsx)("div",{className:"flex flex-wrap gap-4 py-6 font-normal w-full items-center justify-center",ref:w,children:k?Array.from({length:10}).map((e,t)=>(0,b.jsx)("div",{className:"animate-pulse rounded-full bg-gray-300 h-10",
1style:{width:`${120+t%3*40}px`}},t)):I.map((e,a)=>{let l,s=h.some(t=>t.optionId===e.optionId),c=-1!==(l=h.findIndex(t=>t.optionId===e.optionId))?l+1:null;return(0,b.jsxs)("button",{type:"button",role:"button",className:`mx-0 transition-all duration-200 ease-in-out mb-0 flex w-fit flex-initial cursor-pointer items-center justify-center gap-x-2 rounded-full border-2 px-5 py-2 text-sm hover:border-gray-300 hover:bg-gray-100 ${s?"bg-secondary-800 text-white border-secondary-700":""}`,onClick:()=>(e=>{let a;if(h.find(t=>t.optionId===e.optionId))a=h.filter(t=>t.optionId!==e.optionId);else{if(n>0&&h.length>=n)return;a=[...h,e]}S(a.map(e=>e.text).join(",")),p(t,{option:a,leadFieldAssociated:r}),i&&!o&&a.length===n&&m()})(e),children:[s&&(0,b.jsxs)("span",{className:"w-5 h-5 flex items-center justify-center",children:[c,"."]}),e.text]},a)})}),k&&(0,b.jsx)("div",{className:"w-full relative mb-6",children:(0,b.jsx)("div",{className:"animate-pulse rounded-lg bg-gray-300 h-11 w-full"})}),!k&&g.length>10&&(0,b.jsx)(u4,{options:C,selectedOptions:h,maxSelection:n,onSelect:e=>{if(h.some(t=>t.optionId===e.optionId)||n>0&&h.length>=n)return;let a=[...h,e];p(t,{option:a,leadFieldAssociated:r}),S(a.map(e=>e.text).join(",")),i&&!o&&a.length===n&&m()}})]})},u5={zip:{field:"zip",minDigits:5,validate:async e=>{let t=await t2(e);return!!t?.validZip},errorMessage:"Please enter a valid ZIP code"},phoneNumber:{field:"phoneNumber",minDigits:10,validate:async e=>{let t=await t1(e);return!!t?.validPhoneNumber},errorMessage:"Please enter a valid phone number"}},u6=({options:e=[],id:t="",leadFieldAssociated:r,isMultiQuestionChild:n,placeholderText:i="Type your answer here...",title:o,stepName:a,variant:l})=>{var s;let c,d,{updateFlowState:u,getStepMetadataById:p,validationErrors:f,clearValidationErrors:m,setValidationErrors:h,eventContext:g}=aS(),y=p(t),x=v.useRef(null),{triggerFieldEvents:w}=av(),S="zip"===r,I="email"===r,C="phoneNumber"===r,j=S||C,k=f.find(e=>e.field===r||e.field===t),E=n?f.some(e=>e.field===r||e.field===t):f.length>0,A=v.useCallback(i=>{let l=i.target.value;if(C?l=sc(l):j&&(l=l.replace(/\D/g,"")),x.current&&(clearTimeout(x.current),x.current=null),""===l.trim())return void u(t,{});let s=e[0]||{optionId:"text-input",group:"text-input",text:"Text Input"},c={optionId:s.optionId,text:s.text||"",value:l,group:s.group};u(t,{option:c,leadFieldAssociated:r}),x.current=setTimeout(()=>{let e={...c,value:l};u(t,{option:e,leadFieldAssociated:r,isDebounced:!0}),w("FieldInputted",{...g,fieldValue:rh(r?.toString()||"",g?.currentStep)?"SANITIZED":e.value,fieldNumber:g?.currentStepIndex||0,fieldName:n?a||"":g?.currentStep?.stepName||"",fieldType:"text",fieldLabel:n?o:g?.currentStep?.title,...n&&{stepId:t,stepName:a||o}})},2e3)},[t,n,o,e,r,u,j,C,g,a,w]),N=y?.option?.value||"";s=r?.toString(),c=(0,v.useRef)(null),d=u5[s?.toString()||""],(0,v.useEffect)(()=>{if(!d)return;let e=N.replace(/\D/g,"");if(0===e.length){c.current=null;return}if(e.length<d.minDigits){c.current=null,h([{field:d.field,message:""}]);return}if(c.current===e)return;let t=!1;return(async()=>{let r=await d.validate(e);t||(c.current=e,r?m():h([{field:d.field,message:d.errorMessage}]))})(),()=>{t=!0}},[d,N,h,m]);let T=j?"numeric":void 0,O=j?"[0-9]*":void 0,P=S?5:C?14:void 0,M=r?({firstName:"given-name",lastName:"family-name",email:"email",phoneNumber:"tel"})[r]:void 0,R=n?{...g,fieldName:a||r?.toString()||"",fieldType:"text",stepId:t,stepName:a||o}:g,{ref:L}=su([ac({...g,variant:l||"text"}),ad(R,"FieldViewed")]);return(0,b.jsx)(aI.Flex,{className:"w-full h-full py-xxs",ref:L,children:(0,b.jsx)(aI.Input,{type:I?"email":"text",inputMode:T,pattern:O,value:N,onChange:A,placeholder:i,maxLength:P,autoComplete:M,name:r?.toString()||t,id:r?.toString()||t,error:E&&!!k?.message,errorMessage:k?.message})})},u8=({options:e=[],id:t="",leadFieldAssociated:r,placeholderText:n="Select an option",automaticNext:i=!1,isMultiQuestionChild:o=!1,title:a,stepName:l,variant:s,isOptionsLoading:c=!1,searchBarAllOptions:d,dynamicOptionsError:u})=>{let{updateFlowState:p,getStepMetadataById:f,handleStepForward:m}=aS(),h=f(t).option,{ref:g,triggerFieldInputted:y}=uq({id:t,fieldType:"dropdown",options:e,title:a,stepName:l,isMultiQuestionChild:o,variant:s,leadFieldAssociated:r}),x=!!d?.length,{displayedOptions:w,searchableOptions:S}=(0,v.useMemo)(()=>x?uW(e,d,h&&!Array.isArray(h)?[h]:[]):{displayedOptions:e,searchableOptions:[]},[x,e,d,h]),I=n=>
1{let a=(d??e).find(e=>e.optionId.toString()===n);a&&(y(a.text),p(t,{option:a,leadFieldAssociated:r}),i&&!o&&m())},C=c&&!u;return(0,b.jsxs)(aI.Flex,{direction:"column",ref:g,children:[u?(0,b.jsx)(sh,{message:u,className:"w-full justify-center py-2 px-2"}):null,C?(0,b.jsx)(uG,{count:4}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aI.Select,{id:t,value:h?.optionId?.toString()||"",placeholder:n,onValueChange:I,children:w.map(e=>(0,b.jsx)(aI.SelectItem,{value:e.optionId.toString(),children:e.text},e.optionId))}),x&&S.length>0&&(0,b.jsx)(aI.Combobox,{className:"mt-4","aria-label":a||"Search options",options:S.map(uQ),selectedValues:h?.optionId?[h.optionId]:[],onSelect:I})]})]})};var u9=r(33296);let u7=({options:e=[],id:t="",leadFieldAssociated:r,automaticNext:n=!1,isMultiQuestionChild:i=!1,title:o,stepName:a,variant:l})=>{let{updateFlowState:s,getStepMetadataById:c,handleStepForward:d}=aS(),u=c(t||""),p=u?.option,f={yes:(0,b.jsx)(u9.HU4,{className:"w-[14px] h-[14px] !block !text-[rgb(34,197,94)]"}),no:(0,b.jsx)(u9.Fl6,{className:"w-[14px] h-[14px] !block !text-[rgb(239,68,68)]"})},{ref:m,triggerFieldInputted:h}=uq({id:t,fieldType:"toggle",options:e,title:o,stepName:a,isMultiQuestionChild:i,variant:l,leadFieldAssociated:r});return(0,b.jsx)(aI.Flex,{gap:"sm",wrap:"wrap",align:"center",direction:"row",justify:"start",className:"font-normal w-full",ref:m,children:e.map((e,o)=>{let a=p&&!Array.isArray(p)&&p?.optionId===e?.optionId;return(0,b.jsxs)(aI.Button,{size:"sm",variant:"grayOutline","aria-pressed":a,className:"w-fit",onClick:()=>{a?s(t,{}):s(t,{option:e,leadFieldAssociated:r}),h(e.text),n&&!i&&d()},children:[f[e?.text?.toLowerCase()],e.text]},o)})})};function pe(e,t){let r=e.flatMap(e=>e?.options).find(e=>e?.nextQuestionId!=null),n=r?.nextQuestionId;if(n){let r=e.find(e=>e?.options?.some(e=>e?.nextQuestionId===n));if(r){let i=t(r.id);if(!(i?.option&&(!Array.isArray(i.option)||i.option.length>0))||!(i.option?Array.isArray(i.option)?i.option:[i.option]:[]).find(e=>e?.nextQuestionId===n))return e.filter(e=>e.id!==n)}}return e}let pt={optionsMap:{},loadingMap:{},errorsByQuestionId:{}},pr=e=>null==e?"":Array.isArray(e)?[...e].map(e=>e.optionId??String(e.value??"")).sort().join(","):String(e.optionId??e.value??""),pn=({stepQuestions:e=[],bulletPoints:t=[],enableDivider:r=!1,groupedQuestions:n,automaticNext:i=!1,tcpaText:o})=>{let{currentStepType:a,currentStep:l,getStepMetadataById:s,updateFlowState:c,handleStepForward:d,flowState:u,steps:p,getCachedOptions:f}=aS(),m=(0,v.useRef)(null),h=(0,v.useRef)(0),g=(0,v.useMemo)(()=>{let t=rM(p??[]);if(!l?.id||a!==O.MULTI_QUESTION||0===e.length)return t;let r=[...t],n=r.findIndex(e=>e.id===l.id),i={...n>=0?r[n]:l,stepQuestions:e};for(let t of(n>=0?r[n]=i:r.push(i),e))t.id&&!r.some(e=>e.id===t.id)&&r.push(t);return r},[p,l,a,e]),{optionsMap:y,loadingMap:x,errorsByQuestionId:w}=((e,t,r,n)=>{let i=(0,v.useMemo)(()=>{let t={};for(let r of e)r.dynamicOptions&&(t[r.id]={id:r.id,dynamicOptions:r.dynamicOptions,question:r});return t},[e]),o=(0,v.useMemo)(()=>Object.keys(i),[i]),[a,l]=(0,v.useState)(pt),s=(0,v.useRef)({}),c=(0,v.useRef)({}),d=(0,v.useMemo)(()=>{let e={};return o.forEach(n=>{let o=i[n];e[n]=oJ(o.question,t,r)}),e},[o,i,t,r]),u=(0,v.useRef)({flowState:t,steps:r});u.current={flowState:t,steps:r};let p=(0,v.useRef)(n);return p.current=n,(0,v.useEffect)(()=>{let e=!1;if(0===o.length)return void l(pt);let t=o.filter(e=>{let t=d[e],r=s.current[e];return!r||r!==t});if(0===t.length)return;let r=[],n=[];for(let e of t){let t,o=i[e],a=d[e],l=p.current;if(l){let e=l(o.question);void 0!==e&&(t=e)}void 0!==t?r.push({questionId:e,options:t,keyAtStart:a}):n.push(e)}if(r.length>0)for(let e of r)s.current={...s.current,[e.questionId]:e.keyAtStart};return l(e=>{let i={...e.errorsByQuestionId};for(let e of t)delete i[e];let o={...e.optionsMap},a={...e.loadingMap};for(let e of r)o[e.questionId]=e.options,a[e.questionId]=!1;for(let e of n)a[e]=!0;return{optionsMap:o,loadingMap:a,errorsByQuestionId:i}}),n.forEach(t=>{let r=i[t],n=d[t];c.current[t]!==n&&(c.current[t]=n,(async()=>{try{let i,o=null,a=null;try{let{flowState:e,steps:t}=u.current;o=await oq(r.dynamicOptions,e,t)}catch(e){a=e instanceof Error?e:Error(String(e))}if(e)return;let{flowState:d,steps:p}=u.current;if(i=r.question,oJ(i,d,p)!==n){e||c.current[t]!==n||l(e=>({...e,loadingMap:{...e.loadingMap,[t]:!1}}));return}a||null==o||(s.current={...s.current,[t]:n}),e||l(e=>{let r={...e.optionsMap},n={...e.loadingMap},i={...e.errorsByQuestionId};return n[t]=!1,a?i[t]=a:null!=o&&(r[t]=o,delete i[t]),{optionsMap:r,loadingMap:n,errorsByQuestionId:i}})}finally{c.current[t]===n&&delete c.current[t]}})())}),()=>{e=!0}},[o,d,i,t,r]),{...a,isAnyLoading:Object.values(a.loadingMap).some(e=>e)}})(e,u,g,f),S=(0,v.useMemo)(()=>{let t={};for(let r of e)if(r.dynamicOptions){let e=oG(r);e.length>0&&(t[r.id]=e)}return t},[e]),I=(0,v.useRef)({}),C=(0,v.useRef)(!1),j=(0,v.useRef)(void 0);(0,v.useEffect)(()=>{let t=l?.id;t!==j.current&&(j.current=t,C.current=!1,I.current={});let r={},n=[];for(let t of e){let e=s(t.id)?.option;r[t.id]=e,pr(I.current[t.id])!==pr(e)&&t.customField&&n.push(t.customField)}if(!C.current){I.current=r,C.current=!0;return}if(I.current=r,0!==n.length)for(let[e,t]of Object.entries(S))t.some(e=>n.includes(e))&&r[e]&&c(e,{})},[l?.id,e,s,c,S]);let k=(0,v.useCallback)(e=>{let t=y[e.id],r=x[e.id]??!1,n=w[e.id];return(0,b.jsx)(ps,{...e,...void 0!==t&&{options:t},isMultiQuestionChild:!0,isOptionsLoading:r&&!!e.dynamicOptions,dynamicOptionsError:n&&e.dynamicOptions?n.message:void 0})},[y,x,w]),E=pe(e,s),A=E.length?E[E.length-1].id:void 0;return(0,v.useEffect)(()=>
1{if(l&&l.id&&a===O.MULTI_QUESTION){let e=E.reduce((e,t)=>{let r=s(t.id);return r.option&&(Array.isArray(r.option)?e.push(...r.option):e.push(r.option)),e},[]),t=s(l.id),r=e.length>0?{option:e}:{},n=JSON.stringify(t)!==JSON.stringify(r);n&&c(l.id,r),E.every(e=>{let t;return!!(t=s(e.id).option)&&(e.questionType===N.MULTIPLE_CHOICE&&e.maxSelection&&Array.isArray(t)?t.length===e.maxSelection:!!t)})&&i&&n&&e.length>0&&d()}},[E,l,a,c,s]),(0,v.useEffect)(()=>{let e=E.length;e>h.current&&e>0&&m.current?.scrollIntoView({behavior:"smooth",block:"center"}),h.current=e},[E]),(0,b.jsxs)(aI.Flex,{direction:"column",children:[t.length>0&&(0,b.jsxs)(aI.Flex,{direction:"column",align:"center",justify:"center",children:[r&&(0,b.jsx)(aI.Separator,{}),(0,b.jsx)(aI.Flex,{direction:"column","direction-md":"row",align:"center",wrap:"wrap",justify:"center",gap:"md",children:t?.map((e,t)=>(0,b.jsxs)(aI.Flex,{direction:"row",align:"center",gap:"xs",children:[(0,b.jsx)(aI.Icon,{icon:"check-circle",size:"sm",color:"secondary","aria-hidden":!0}),(0,b.jsx)(aI.Text,{variant:"b3",color:"subtext",children:e})]},t))})]}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"sm",children:[(0,b.jsx)(aI.Flex,{direction:"column",gap:"sm",children:n?.map((e,t)=>{let r=e.questions.filter(e=>E.some(t=>t.id===e.id));if(0===r.length)return null;let n=r.length>1;return(0,b.jsx)(aI.Flex,{direction:n?"row":"column",gap:"sm",children:r.map(e=>{let t=e.id===A;return(0,b.jsxs)(aI.Flex,{ref:t?e=>{m.current=e}:void 0,direction:"column",justify:"center",align:"stretch","data-question-id":e.id,children:[e.subtitle?.trim()&&(0,b.jsx)(aI.Heading,{variant:"h3",children:uJ(e.subtitle,u)}),k(e)]},e.id)})},t)})}),o&&(0,b.jsx)(aI.Flex,{children:(0,b.jsx)(sa,{html:o,variant:"l1",color:"subtext",className:"!leading-[1.3] [&_p]:!leading-[1.3] [&_li]:!leading-[1.3] [&_ul]:!mb-0"})})]})]})},pi=({options:e=[],id:t="",leadFieldAssociated:r,automaticNext:n=!1,isMultiQuestionChild:i=!1,title:o,stepName:a,variant:l,isOptionsLoading:s=!1})=>{let{updateFlowState:c,getStepMetadataById:d,handleStepForward:u}=aS(),p=d(t||""),{ref:f,triggerFieldInputted:m}=uq({id:t,fieldType:"checkbox",options:e,title:o,stepName:a,isMultiQuestionChild:i,variant:l,leadFieldAssociated:r}),h=(0,v.useCallback)((e,o)=>{o?c(t,{option:e,leadFieldAssociated:r}):c(t,{}),n&&!i&&u(),m(e.text)},[n,u,t,i,r,m,c]);return(0,b.jsx)(aI.Flex,{className:"mt-md",justify:"center",ref:f,gap:"xxs",children:s?(0,b.jsx)(uG,{}):e.map(e=>{let r=(p.option&&!Array.isArray(p.option)&&p.option.optionId===e.optionId)??!1,n=`${t}-${e.optionId}`;return(0,b.jsx)(aI.Flex,{children:(0,b.jsx)(aI.Checkbox,{id:n,label:k(e.text),checked:r,onCheckedChange:t=>h(e,!!t)})},e.optionId)})})},po=({options:e=[],id:t="",leadFieldAssociated:r,automaticNext:n=!1,isMultiQuestionChild:i=!1,title:o,stepName:a,variant:l,isOptionsLoading:s=!1,searchBarAllOptions:c,dynamicOptionsError:d})=>{let{updateFlowState:u,getStepMetadataById:p,handleStepForward:f}=aS(),m=p(t||""),h=m?.option,{ref:g,triggerFieldInputted:y}=uq({id:t,fieldType:"single_choice",options:e,title:o,stepName:a,isMultiQuestionChild:i,variant:l||"single_choice_pills",leadFieldAssociated:r}),x=!!c?.length,w=h&&!Array.isArray(h)?h:void 0,{displayedOptions:S,searchableOptions:I}=(0,v.useMemo)(()=>x?uW(e,c,w?[w]:[]):{displayedOptions:e,searchableOptions:[]},[x,e,c,w]),C=s&&!d;return(0,b.jsxs)(b.Fragment,{children:[d?(0,b.jsx)(sh,{message:d,className:"w-full justify-center py-2 px-2"}):null,(0,b.jsx)(aI.Flex,{gap:"sm",wrap:"wrap",align:"center",justify:"start",direction:"row",className:"w-full",ref:g,children:C?(0,b.jsx)(uG,{}):S.map((e,o)=>{let a=w?.optionId===e.optionId;return(0,b.jsx)(aI.Button,{size:"sm",iconBefore:a?"check":void 0,variant:"grayOutline","aria-pressed":a,className:"w-fit",onClick:()=>{a?u(t,null):(u(t,{option:e,leadFieldAssociated:r}),n&&!i&&f()),y(e.text)},children:e.text},o)})}),!C&&x&&I.length>0&&(0,b.jsx)(aI.Combobox,{className:"mt-4","aria-label":o||"Search options",options:I.map(uQ),selectedValues:w?[w.optionId]:[],onSelect:e=>{let o=(c??[]).find(t=>t.optionId===e);o&&(u(t,{option:o,leadFieldAssociated:r}),n&&!i&&f(),y(o.text))}})]})},pa={TILE:({options:e=[],id:t="",leadFieldAssociated:r,automaticNext:n=!1,isMultiQuestionChild:i=!1,title:o,stepName:a,variant:l,isOptionsLoading:s=!1,searchBarAllOptions:c,dynamicOptionsError:d})=>{let{updateFlowState:u,getStepMetadataById:p,handleStepForward:f}=aS(),m=p(t||""),h=m?.option,{ref:g,triggerFieldInputted:y}=uq({id:t,fieldType:"single_choice",options:e,title:o,stepName:a,isMultiQuestionChild:i,variant:l||"single_choice_tiles",leadFieldAssociated:r}),x=!!c?.length,w=h&&!Array.isArray(h)?h:void 0,{displayedOptions:S,searchableOptions:I}=(0,v.useMemo)(()=>x?uW(e,c,w?[w]:[]):{displayedOptions:e,searchableOptions:[]},[x,e,c,w]),C=s&&!d;return(0,b.jsxs)(b.Fragment,{children:[d?(0,b.jsx)(sh,{message:d,className:"w-full justify-center py-2 px-2"}):null,(0,b.jsx)(aI.Flex,{gap:"lg",wrap:"wrap",justify:"center",direction:"column",className:"pb-2 md:flex-row max-w-full",ref:g,children:C?(0,b.jsx)(uG,{}):S.map(e=>{let o=w?.optionId===e.optionId,a=e.icon;return(0,b.jsx)(aI.SelectionTile,{icon:a,label:e.text,description:e.subtext,isSelected:o,variant:"secondary",alignment:"center",className:"flex-1",onClick:()=>{o?u(t,null):(u(t,{option:e,leadFieldAssociated:r}),n&&!i&&f()),y(e.text)}},e.optionId)})}),!C&&x&&I.length>0&&(0,b.jsx)(aI.Combobox,{className:"mt-4","aria-label":o||"Search options",options:I.map(uQ),selectedValues:w?[w.optionId]:[],onSelect:e=>{let o=(c??[]).find(t=>t.optionId===e);o&&(u(t,{option:o,leadFieldAssociated:r}),n&&!i&&f(),y(o.text))}})]})},PILL:po},pl=function(e){if(!e.variant)return(0,b.jsx)(po,{...e});let t=pa[e.variant]||po;return(0,b.jsx)(t,{...e})},ps=e=>{switch(e.questionType||e.type){case"RADIO_CHOICE":return(0,b.jsx)(uX,{...e});case"DYNAMIC_SINGLE_CHOICE":return(0,b.jsx)(u1,{...e});case"DYNAMIC_MULTIPLE_CHOICE":return(0,b.jsx)(u3,{...e});case"TOGGLE":return(0,b.jsx)(u7,{...e});case"MULTIPLE_CHOICE":return(0,b.jsx)(uK,{showOrderNumber:!0,...e});case"SINGLE_CHOICE":return(0,b.jsx)(pl,{...e});case"CHECKBOX":return(0,b.jsx)(pi,{...e});case"TEXT":return(0,b.jsx)(u6,{...e});case"SELECT":return(0,b.jsx)(u8,{...e});case"MULTI_QUESTION":return(0,b.jsx)(pn,{...e});default:return(0,b.jsx)(uK,{...e})}},pc={options:void 0,isLoading:!1,error:void 0},pd=({step:e,stepType:t})=>{let{options:r,searchBarAllOptions:n,isOptionsLoading:i,dynamicOptionsError:o}=(e=>{let{getCachedOptions:t,isPrefetching:r,flowState:n,steps:i}=aS(),o=(0,v.useMemo)(()=>rM(i),[i]),a=e.type===O.QUESTION?e.dynamicOptions:void 0,l=!!a?.endpointUrl,s=a?.searchBarOptions===!0,c=l&&!s?t(e):void 0,d=void 0!==c,u=(0,v.useMemo)(()=>l?oJ(e,n,o):"",[l,e,n,o]),[p,f]=(0,v.useState)(pc),m=(0,v.useRef)(e);m.current=e;let h=(0,v.useRef)(a);h.current=a;let g=(0,v.useRef)({flowState:n,steps:o});g.current={flowState:n,steps:o};let y=(0,v.useRef)(void 0),b=(0,v.useRef)(void 0),x=(0,v.useRef)(!1);if((0,v.useEffect)(()=>(x.current=!1,()=>{x.current=!0}),[]),(0,v.useEffect)(()=>{let e=h.current;if(!l||!e){f(pc),y.current=void 0,b.current=void 0;return}let t=!0===e.searchBarOptions;!t&&(d||r)||b.current!==u&&y.current!==u&&(y.current=u,f(e=>({...e,isLoading:!0,error:void 0})),(async()=>{try{let{flowState:r,steps:n}=g.current,i=t?{...e,limit:void 0}:e,o=await oq(i,r,n);if(x.current)return;let{flowState:a,steps:l}=g.current;if(oJ(m.current,a,l)!==u)return;b.current=u,f({options:o,isLoading:!1,error:void 0})}catch(r){if(x.current)return;let{flowState:e,steps:t}=g.current;if(oJ(m.current,e,t)!==u)return;b.current=u,f({options:void 0,isLoading:!1,error:r instanceof Error?r.message:String(r)})}finally{y.current===u&&(y.current=void 0)}})())},[l,s,d,r,u]),!l)return{options:void 0,isOptionsLoading:!1};if(s){let e=a?.limit,t=p.options;return t&&e?{options:t.slice(0,e),searchBarAllOptions:t,isOptionsLoading:p.isLoading,dynamicOptionsError:p.error}:{options:t,isOptionsLoading:p.isLoading,dynamicOptionsError:p.error}}return d?{options:c,isOptionsLoading:!1}:r?{options:void 0,isOptionsLoading:!0}:{options:p.options,isOptionsLoading:p.isLoading,dynamicOptionsError:p.error}})(e);return t!==O.QUESTION&&t!==O.MULTI_QUESTION?null:(0,b.jsx)(ps,{...e,...void 0!==r&&{options:r},...void 0!==n&&{searchBarAllOptions:n},isOptionsLoading:i,dynamicOptionsError:o})};function pu(e,t=!1){return!t&&!!e&&!!e.option&&(Array.isArray(e.option)?e.option:[e.option]).some(e=>e&&(void 0!==e.value&&null!==e.value&&""!==e.value||void 0!==e.text&&null!==e.text&&""!==e.text))}let pp=async e=>{try{let t=Y().offeringsSearchApiUrl??"";
1if(!t)throw Error("Offerings base URL is not set");let r=tv(E()),n=new e7({baseUrl:t,defaultHeaders:r});return await n.getSearchOfferings(e)}catch(e){throw console.error("Get Search failed:",e),e}},pf=async e=>{let t=[],r={},n=await pp(e);return n.data.length>0||e.flexibility&&(t.push("flexibility"),(n=await pp({...e,flexibility:void 0,subType:void 0,...r})).data.length>0)||e.level&&(t.push("level"),(n=await pp({...e,level:void 0,flexibility:void 0,subType:void 0,...r})).data.length>0)?{data:n.data,relaxedFilters:t}:{data:(n=await pp({subjects:e.subjects,skills:e.skills,limit:e.limit,offset:e.offset,...r})).data,relaxedFilters:t}},pm=(e,t,r)=>{let n=t.find(t=>t.stepName===e);if(!n?.id)return{option:void 0,values:[]};let i=r[n.id];if(!i?.option)return{option:void 0,values:[]};let o=(Array.isArray(i.option)?i.option:[i.option]).map(e=>e.value).filter(e=>"string"==typeof e);return{option:i.option,values:o}};function ph(){let{steps:e,flowState:t,handleGoToStep:r}=aS(),{subject:n,skills:i,flexibility:o,level:a,subType:l,flexibilityLabel:s,levelLabel:c}=(0,v.useMemo)(()=>{let r=pm("flexibility",e,t),n=pm("level",e,t),i=r.option,o=n.option,a=r.values[0]||"",l="cohort_paced"===a;return{subject:pm("subject",e,t).values[0]||"",skills:pm("skills",e,t).values,flexibility:l?"instructor_paced":a,level:n.values[0]||"",subType:l?"Executive Education":void 0,flexibilityLabel:i?.text.toLowerCase()||"",levelLabel:o?.text.toLowerCase()||""}},[e,t]),{offerings:d,loading:u,relaxedFilters:p,error:f}=(e=>{let[t,r]=(0,v.useState)([]),[n,i]=(0,v.useState)(!1),[o,a]=(0,v.useState)(null),[l,s]=(0,v.useState)([]);return(0,v.useEffect)(()=>{let t=!1;return(async()=>{i(!0),a(null),s([]);try{let n=await pf(e);if(t)return;r(n.data),s(n.relaxedFilters)}catch(e){if(t)return;console.error("Error fetching offerings:",e),a(e),r([]),s([])}finally{if(t)return;i(!1)}})(),()=>{t=!0}},[e.query,JSON.stringify(e.subjects),JSON.stringify(e.skills),e.level,e.flexibility,e.type,e.subType,e.limit,e.offset]),{offerings:t,loading:n,error:o,relaxedFilters:l}})((0,v.useMemo)(()=>({subjects:n?[n]:[],skills:i,flexibility:o,level:a,subType:l,limit:4}),[n,i,o,a,l])),m=(0,v.useMemo)(()=>{if(0===p.length)return"";let e=p.map(e=>"flexibility"===e?s:c).filter(Boolean);if(0===e.length)return"";let t=e.join(" and ");return`We didn't find an exact match. To provide you with the best options available, we've broadened your search outside of ${t}.`},[p,s,c]),h=e.find(e=>e.isEntry),g=!!(h&&h.id&&r);return(0,b.jsxs)("section",{className:"bg-accent-300 p-8 rounded-xl flex flex-col gap-4 w-full shadow-lg",children:[(0,b.jsx)("div",{className:"mx-auto",children:(0,b.jsx)("h1",{children:"Mocked Offerings Results Page For Testing"})}),(0,b.jsx)("div",{className:"flex flex-col md:flex-row gap-2.5 items-center w-full",children:g&&(0,b.jsx)("button",{type:"button",onClick:()=>{r&&h&&h.id&&r(h.id,{resetFlowState:!0})},className:"bg-white px-5 py-2 rounded-full flex items-center justify-center shrink-0 no-underline hover:bg-gray-50 transition-colors",children:(0,b.jsx)("span",{className:"text-primary-700 text-base font-bold leading-[25.2px] whitespace-nowrap",children:"Edit your goal"})})}),u?(0,b.jsx)(aI.Spinner,{}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:m||"Explore the options below to find the best path for you."}),(0,b.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 w-full",children:d?.slice(0,4).map(e=>(0,b.jsx)("article",{children:(0,b.jsx)("h3",{children:e.name})},e.id))})]}),!!f&&(0,b.jsx)("p",{children:"failed to fetch offerings"})]})}var pg=((y={}).PROGRAM_SELECT="PROGRAM_SELECT",y.PII_CONFIRMATION="PII_CONFIRMATION",y.ADDITIONAL_QUESTIONS="ADDITIONAL_QUESTIONS",y.EXIT_STRATEGY="EXIT_STRATEGY",y.SUBMISSION="SUBMISSION",y);let py=async e=>{let t=await dn(e);return{exactResults:t.exactResults,relatedResults:t.relatedResults,recommendedResults:t.recommendedResults,spotlightResults:t.spotlightResults,qualified:t.qualified?.map(e=>e.id)??[],unqualified:t.unqualified?.map(e=>e.id)??[],locationInference:t.locationInference}},pb=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),pv=new Map,px=["Affordability","Tuition","Program length","Passion","Helping others","Career goals","Salary potential","Accredited","Accreditation","License","Licensure","Faculty credentials","Research","Clinical experience","Clinical opportunities","Internships","Internship rates","Licensure rates","nonprofit","not-for-profit","no GRE scores","no GRE scores required","no GRE required","CSWE Accredited","CSWE","certified school counselors","certification","clinical training","board certified","career development","No SAT or A
1CT scores required","future counselors","innovative research","advance your human services career","psychological research","set you apart from the competition","100% online program","wide variety of career paths","effect positive change","five specialized tracks","top ranked for return on investment","earn higher salaries","work as certified school counselors","real-world training","interactive online classes","fit your state's requirements","interdisciplinary curriculum","board certified","60 credit hour","foundation in psychological domains","specialized knowledge","prepare you for a career","advanced doctoral training","board certified behavior analyst","18-month online MA in Psychology","helps prepare you to work","optional internship","apply classroom studies to real-world situations","meets the Guidelines for Education and Training","one of the oldest and best of its kind","specialized online bachelor's","expand your expertise","National Certified Addiction Counselor (NCAC)","emphasis in Clinical Counseling","real-world field experience","two to four years","flexible online format","field experience","advance your career","solve social problems","without disrupting their professional lives and other commitments","improves health and wellness","diverse career paths","dual credit opportunity","strong foundation","No SAT or ACT scores required","build expert skills","apply psychological research and theory","virtual classroom","make a positive impact","hands-on experiences","passion to help people","industry-current","American Psychological Association","100% online","transfer up to 90 previous credit hours","prepare for graduate studies","transform lives","Christian worldview","critical and creative thinking","mental health concentration","wide range of professional applications","flexibility and convenience","pursue a career","improve health and wellness","passion to help people","two applied concentration tracks","interdisciplinary degree","prevent marginalization and improve equality","overcome health and wellness challenges","connections between human behavior and organizational performance","ideal fit for busy professionals","15 months","direct path to certification","Board Certified Behavior Analyst","12 months","Board Certified Behavior Analyst (BCBA)","improve their lives","BSBA","Build a well-rounded foundation","support society's most vulnerable populations","designed for students seeking a flexible option","flexible","online degree program","pursue licensure","seek employment","Licensed Mental Health Counselor","in as short as 2 years","Channel your passion","best for your schedule","small cohort model","experienced faculty","helping people face addiction","top-15 school","GRE scores are not required","as few as 24 months","No GRE is required","prepare you to work in therapeutic settings","recognized both nationally and internationally","broaden and deepen their knowledge behavioral health administration and care","Eighteen (18) credit hours","prepare you to assume leadership positions","become a visionary leader","online coursework","offline practicum","as few as 32 months","impact higher education","helping young learners succeed","assessing learning abilities and needs","wide variety of potential career pathways","examine psychology from various aspects","pursue an impactful career","broad-based education","as little as one year","interdisciplinary business skills","leadership & management skills","Financial aid is available","no-cost digital materials","managerial expertise","ACBSP-accredited","eight concentrations","earn skills","fully online","prepare yourself for a path to graduate school","technical knowledge","critical thinking skills","business administration skills","problem solving and communication","ACBSP","define your competitive edge","career-focused concentrations","based on sound business fundamentals","hundreds of adult students","advance their careers","International Business","grow and thrive as a leader","build administrative skills","advancing your degree","mobile-friendly curriculum","business fundamentals","emphasis on ethical leadership","industry-focused concentration","professional success","top faculty","convenient online classroom","on your schedule","tuition-free","variety of industries and organizations","seeking a managerial role","ethical leader","small class","responsive faculty","transfer credit policies","seamlessly switch from online study to in-person learning","effective teamwork","motivate people","master your decision-making and problem-solving skills","ensure long-term sustainability","concentration in entrepreneurship","online classroom","complete your degree at your pace","Learn how to start and run your own business","work one-on-one with an entrepreneur","excel in the world of finance","as few as 2.5 years","No residencies or standardized test scores (SAT/ACT) required.","Advance a service or manufacturing operations management career","use your skills in the business field","Develop technical skills and accounting knowledge","accounting careers in all industries","Demand for accounting graduates continues to be strong","even during economic downturns","A
1ccountants are vital","entirely online","prepare for the CPA exam","effective accounting professional","as few as 16 months","business analyst","financial planner","actuary","apply practical accounting principles","foundational knowledge of tax planning","affordable","succeed in the information industry","build a repository of skills","develop knowledge and skills in computer-based systems","Prepare for leadership roles in information system management","strategically manage and utilize technology","management accounting","specialized bachelor's degree","management-level role","12 optional concentrations/built-in certificates","lead your teams with confidence","No GRE/GMAT required","Flexibly designed for full-time professionals","top-ranked MBA degree","just 16 months","$21K","No GMAT required","earn two credentials for less time and money","part-time program","individualized career services","largest conferrer of MBAs in the state","gives students the ultimate flexibility","designed for busy professionals","personalized instruction from experienced experts","45 credit hours","specialized expertise","AACSB-accredited","tailor your degree","full suite of career services","as few as two and a half years","achieve your goals","designed for working professionals","maximum flexibility","specialize your skills","as little as two years","flexibility","IACBE-accredited","aligns with the Forbes brand","fits both your professional and personal life","accelerated 1 year MBA program","no GRE/GMAT required","No application fee required","dual degree","part-time program","total of 30 hours","lead in the modern workplace","CCNE-accredited","provide holistic health care","greater flexibility","personal fulfillment","higher salary","increased opportunities","Designed for working nurses","100% online coursework","clinical placement support","ideal option for practicing nurses","Designed for graduates of a bachelor's degree program","100% online didactic classes","flexible scheduling","Earn two master's degrees","maintain flexibility","valuable nursing credential","multiple concentrations","Flexible 12- or 24-month track","No GRE required","An internship and capstone experience are required","improve healthcare","senior management roles in health care","gives students ultimate flexibility","online CSWE-accredited","flexibility of online learning","real-world skills","supervised field experience","3.0 GPA or better","Advanced Standing option","faster and at a lower overall cost","accredited by the Council on Social Work Education (CSWE)","CSWE accredited","strong liberal arts base","diverse populations","bachelor's in human services","flexible online courses","100% Online","120 credit hours","highly-ranked","CSWE-accredited","Comprehensive curriculum","field experience hours","Pending accreditation by the Council on Social Work Education (CSWE)","social services","alleviate poverty and oppression","generalist practice","graduate in 2-4 years","political and cultural change","organizational dynamics","eligible to sit for the LBSW exam","optional concentrations","notable faculty","advocacy","problem-solving","consultation","15 months","four specialized courses of study","Individualized Course of Study","Online MSW program","local field education","pursue licensure","including LCSW","Accredited by the CSWE","No GRE scores required","Full-time","part-time","and accelerated tracks top-ranked school of social work","two online MSW tracks","traditional and advanced standing","earn an MSW in as few as 18 months","GRE scores are not required","concentration in Mental Health and Trauma","advanced standing program track knowledge and skills","diverse funding sources","influence policy","supervise staff","develop and administer programs competencies from the Council on Social Work Education (CSWE)","Foundational Track","Advanced Standing Track","experiential learning opportunities","clinical and non-clinical settings","child welfare agencies","non-profit agencies","medical facilities","correctional settings 100% Online","3 starts a year","highly-ranked","CSWE-accredited","social justice","stronger communities unique skills","significant difference","values of the Sisters of Mercy","sit for licensure","professional social worker online Master of Social Work (MSW)","clinical social work","licensure exams","innovative solutions","complex mental health and social issues affordable","CSWE-accredited","expert faculty","hands-on field work","licensed social worker clinical social work","change agents","Clinical Advocacy focus","community resources","accredited by the C
1ouncil on Social Work Education's (CSWE) Board of Accreditation (BOA)","CSWE competencies social work leader","and global issues","mental health","substance abuse","child and youth services","accelerated","one-year program generalist clinical social work practice","CSWE accredited","five specializations","MBA or MPA dual degree options 100% online","CSWE accredited","No GRE required","positive change","leadership and effective collaboration","specialization in integrative social work","five specialized tracks","accredited by the Council on Social Work Education (CSWE) licensure in Missouri or select Midwestern states","meaningful impact on society trauma-informed curriculum","culturally informed assessment","advance justice and social change","flexibility","prepare for licensure Diverse Group of Faculty & Students","Accessible and Rigorous MSW Degree","nation's best Online MSW Programs","no GRE/GMAT required 100% Online","60 credit hours","career preparation","professional growth","counseling modalities","essential policy knowledge","ethical practitioner","advocate for social change","online RN to BSN program","Applicants must already hold an RN","seamlessly take classes","complete in-person requirements","without disrupting professional responsibilities","pre-licensure bachelor degree in nursing","evidence-based client/patient care","liberal arts education core","clinical judgment","critical thinking skills","diverse populations","lifelong learning","integrated throughout the curriculum","theoretical instruction","clinical experience","24.00 semester credit hours of block credit","nursing leadership and management","quality improvement","patient safety","promote health and prevent disease","lifelong learning","continuous professional development","critical thinking","conceptual level","mathematical analysis","scientific method","Bachelor of Science in Nursing","broader professional responsibilities","career opportunities","online Bachelor of Science in Nursing completion program","specialized nursing","nursing management","critical thinking skills","clinical judgment","accredited by the Commission on Collegiate Nursing Education","Bachelor of Science in Nursing","broader professional responsibilities","career opportunities","online Bachelor of Science in Nursing completion program","specialized nursing","nursing management","critical thinking skills","clinical judgment","accredited by the Commission on Collegiate Nursing Education","1 year","online RN to BSN program","real-life situations","evidence-based practice","100% Online","8 week terms","Up to 30 credits tuition-free","ADN required","Mercy principles and ethics","CCNE-accredited RN-BSN degree","leaders in their chosen specialty areas","Graduate in just 11 months","CCNE-accredited online RN to BSN","100% online coursework","complete in as little as one year","dedicated faculty","real-world curriculum","fast and flexible online RN to BSN","completed in 14 months","CCNE-accredited","no in-person practicum","up to 95 transfer credits","highly regarded faculty","100% online Bachelor of Science in Nursing","full-time working adult student","Transfer up to 90 credits","ASN","active unencumbered RN licensure","top-ranked","advance your health care career","foundation for further graduate studies","critical thinking","practice skills","clinical management","constantly changing health care environment","BSN online","accredited by the Arizona State Board of Nursing","Commission on Collegiate Nursing Education","notable faculty","expand nursing competencies","regionally accredited","adult learner RN","experts in their respective fields","clinical patient care","health care management","professional nursing practice and leadership","nurse competencies","management and leadership","health assessment","statistics","research","ethical decision-making","public health","spirituality in health care","effective leaders in the nursing profession","preparation in many areas","criminal justice system","investigation","prosecution","Supreme Court","Constitution","degree completion program","transfer a large number of college credits","core and elective Criminal Justice courses","law enforcement","surveillance","homeland security","social service","criminal justice degree","Online coursework","criminal law","ethics","research methods","solid foundation in criminal justice","broad liberal arts education","faculty with years of experience","crime scene investigation","forensic psychology","homeland security","juvenile justice","law enforcement","earn credit for eligible prior learning","new career opportunities","solid foundation in criminal justice","broad liberal arts education","faculty with years of experience","crime scene investigation","forensic psychology","homeland security","juvenile justice","law enforcement","earn credit for eligible prior learning","new career opportunities","change lives","enhance communities","fair and just treatment","expertise in criminality and procedure","100% Online","transfer in your associate degree","60 credit hours","20 courses","working knowledge","justice process","enhance your knowledge","criminal justice","law enforcement","crime prevention","interagency collaboration","real-world issues","accredited state university","enhance your knowledge","criminal justice","law enforcement","crime prevention","interagency collaboration","real-world issues","accredited state university","start or advance your career","law enforcement","online BS in Criminal Justice","pure academics","seasoned practitioners","online B.S. in criminal justice administration","entry-level and seasoned professionals","rational decisions","informed responses","law enforcement","courts and corrections","online Bachelor of Arts in Criminal Justice Policy","five start dates per year","fully digital format","complete within 2 years","advance your career","solid foundation","theoretical knowledge","practical application","juvenile justice","law enforcement","homeland security","governmental positions","online B.S. in Criminal Justice","flexible online program","real-world social and criminal justice issues","transfer up to 75 credits","degree completion program","fully online BA","real-life experiences","national security","local/state/federal law enforcement","investigate a rewarding career","Bachelor of Science in Criminal Justice Administration","law enforcement careers","private security employment","administration of justice","foundational insights and theories","opportunities within the field of criminal justice","flexible","customizable","online program","policing","critical thinking","resilience","cultural engagement","personalized support services","vibrant online community","BS in criminology and criminal justice - policing","notable faculty","policing strategies","reducing crime","criminal justice principles","practice orientation","global perspective","specialty coursew
1ork","law enforcement","criminal courts","corrections","36 credit hour program","entirely online","CPA certification","career in accountancy","complete the program in 12 months","industry leaders in accounting","strategic overview","competitive advantage","all course materials included","laptop computer","first course FREE of charge","course credit for professional training/certifications","Master's in Accounting","Certified Public Accountant (CPA)","corporate accountant","auditor","financial analyst","high-level positions","banking","taxation","insurance","financial division","unique competitive advantage","enhanced analytical skills","latest technology","financial analysis methods","no GMAT or GRE required","online or on campus","concentrations in Auditing","Forensics Accounting","Taxation","accounting leadership","online Master of Science in Accounting","Certified Public Accountant (CPA) partners","Chief Financial Officers (CFO)","communication","ethical leadership","strategic management","critical thinking","problem-solving skills","mid- to senior-level positions","auditing","cost accounting","financial accounting","elective courses","certification examinations","Certified Internal Auditor (CIA)","Certified Management Accountant (CMA)","concentrations: audit","finance","government","tax","ACBSP accredited","solid MBA","accounting expertise","online coursework","no GRE/GMAT required","Master of Accountancy","apply principles of accounting","solve real-world problems","graduate degree specialization","three courses","nine credits","greater responsibilities","accounting role","transition into accounting","CPA credential","high-quality educational experience","tailored to working professionals","career-focused skills","master's degree in management","focus in accounting","mid-career professionals","comptroller","managing partner","senior accountant","Master of Business Administration","emphasis in Accounting","advanced management positions","corporate or public accounting","financial accounting and reporting","regulation","specialized accounting topics","organizational decision making","transformational leadership","interpersonal skills","diverse cultures","critical thinkers","decision makers","accelerated evening or online","Master of Science in Accounting (MSA)","Certified Public Accountant's credentials","Uniform CPA Exam","two capstone courses","bachelor's degree in accounting","bridge program","teacher licensure","early childhood","Interstate Teaching Assessment and Support Consortium (InTASC)","National Association for the Education of Young Children (NAEYC)","common core standards","child development","cultural diversity","verified field experiences","student teaching","educational theory","experiential learning opportunities","effective teachers","public and private elementary schools","Christian worldview","diverse learner needs","servant-leadership","small class sizes","individualized learning","direct access to professors","early childhood development","leader in the early childhood field","operating or owning their own early childhood program","managing an early childhood agency or organization","online bachelor's degree","ranked No.1 in Oregon","non-licensure degree program","teaching advancement","policy-making","hybrid BA in Early Childhood Education","mainly online coursework","fieldwork","two practicums","Curriculum Alignment Project Eight (CAP 8)","strategies for resilience","crisis and trauma","educational career paths","ECE experience","train educators and administrators","preschool to early elementary","safe","dynamic","and compassionate settings","BAE in educational studies - early childhood studies","care of children from birth to age five","school readiness","future educational success","initial teacher licensure","early childhood education programs","universal preschool education","expertise in early childhood","instructional strategies","teaching methodologies","assessment techniques","theories of early childhood growth","embedded practicum experiences","student teaching component","teaching credential in Arizona","internship experiences in a K-3 classroom","motivate","develop and educate children from birth to Grade 3","real estate market rebounds","career opportunities","right skills and training","foundations of real estate","sales","market analysis","finance","ethics","law","national real estate or broker license exams","online pathway","Bachelor of Science in Nursing (BSN)","minimum GPA requirement","nursing education","earn an associate degree","qualify for entry","pre-licensure BSN program","general education classes","associate degree","career flexibility","Associate of Science degree","Medical Administrative Billing and Coding","accurate medical co
1des","diagnostic procedures","clerical and administrative functions","insurance claims","compliance","reimbursement","specialization in information assurance","programming","computer forensics","information security","artificial intelligence","computer science capstone experience","Bachelor of Science in Computer Science (BSCS)","strong academic foundation","design and implementation projects","ABET-accredited","employment in the computer industry","implement software-based solutions","computer science professionals","dynamic BS in Computer Science","hands-on curriculum","technical challenges","societal and ethical responsibilities","BS in computer science online","renowned faculty","specific training","career goals","operating environments","testing platforms","computer systems analysts","applications and software developers","B.S. in Computer Science","analyze problems","design solutions","interpersonal skills","accredited state university","computer systems","software engineering principles","analytics","emerging technology","AI","Cisco","wireless networking","cloud computing","network administration","network technology","career-ready skills","cutting-edge computer applications","Association for Computing Machinery (ACM) guidelines","computer programming","coding","software development","data analysis","technical skills","fast-paced field","new types of technology","innovative computer solutions","Associate of Science online degree","Medical Assisting","preparing examination rooms","taking vital signs","minor surgical procedures","giving injections","performing venipuncture","laboratory operations","taking x-rays","administering electrocardiograms","administrative capacity","patient communications","maintaining patient records","scheduling appointments","processing insurance claims","practical clinical experience","Registered Medical Assistant","hands-on patient care","taking blood pressure","drawing blood","medical history","administrative and clerical duties","scheduling appointments","concentrations health information management","patient safety and quality","aligned with AUPHA","solid foundation","core disciplines","health care administration and management","supervisory roles","day-to-day operations","earn college credit","up to 48 credit hours tuition free","100% online","flex or term enrollment options","administrative leadership roles","business principles","ethics of professional standards","leadership styles","AUPHA-certified","rigorous curriculum","internship opportunity","competitive edge","experienced faculty","leadership skills","healthcare knowledge","Christian worldview","ethical considerations","quality of life issues","Christian values","real-world skills","career-boosting connections","career change","career advancement","communication","management","expert faculty","business mindset","passion for helping others","hands-on experience","internship","coordinate medical and health services","maintain patient records","healthcare laws","manage teams","leadership and practical management skills","diverse healthcare settings","ACBSP-accredited","specialized skills","oversee operations","healthcare ethics","health information systems","health services manager","health information manager","records manager","policies & procedures","U.S. health care system","administrative roles","entry-level supervisory roles","health care organizations","career entry","advance from clinical or technical roles","conceptual and analytical skills","contemporary health care organizations","master's degree","senior health care executive positions","project management","in-depth understanding","strategic management","decision-making","human resources","information management","quality improvement","public policy","administrative positions","long-term care","outpatient facilities","physician offices","mental health organizations","insurance companies","public health agencies","framework of general education courses","foundational knowledge","challenging health industry","legal and ethical parameters","risk and quality management","expand professional opportunities","aligned to the Society of Human Resource Management (SHRM)","management-level positions","advanced human resource management skills","communication and negotiation skills","legal and ethical principles","strategic HR program development","global and cultural context","no GMAT/GREs","fully online","MBA - Human Resource Management","private industry and public sector","organizational performance and productivity","36-hour","accelerated online program","completed in 12 months","practical application","practitioner-scholars","executive-level experience","all course materials included","laptop computer","first course FREE of charge","course credit for professional training/certifications","key organizational role","curriculum al
1igned with SHRM","up-to-date expertise","100% Online","8 week terms","5 starts per year","knowledge and skills","SHRM-aligned curriculum","ultimate flexibility","personalized instruction","SHRM certified","national SHRM exam","100% online","flexible 12- or 24-month track","no GRE required","strategic role","HR leaders","maximize employee engagement","cultural","regulatory","and behavioral issues","strategic partner","workforce capabilities","problem-solving","data-driven decision-making","strategic management skills","competitive in a global marketplace","strategic partner","HR management","evaluation and analysis","interpersonal competencies","critical thinking","ethical reasoning","globally connected and diverse world","strategic partner","HR management","corporate","nonprofit","municipal organizations","evaluation and analysis","complex HR laws","interpersonal competencies","critical thinking","ethical reasoning","successful HR manager","globally connected and diverse world","Master of Business Administration","Emphasis in Strategic Human Resource Management","Society for Human Resource Management's critical competencies","human resource competencies","senior human resources specialists","general managers","strategic HR acumen","human resources concentration","employment practices","personnel administration","employee training","aligns with SHRM's HR Curriculum Guidebook","human resources expertise","improve your company's culture","SHRM & HRCI","prepare for PHR","SPHR","SHRM-CP exams","leadership and management skills","human resources","bachelor's degree in business management","Human Resource Management specialization","transfer credits","human resource manager","specialist","consultant","business economics","strategic human resources planning","technology management","transfer up to 90 approved credits","library and writing center","broad knowledge","managing human resources","recruitment","selection","retention","compensation and benefits","training and talent development","legal compliance","diversity","equity","inclusion","Human Resource Management degree program","HR functional areas","employee development","employment law","compensation and benefits","core HR systems","principles of management","SHRM Certification Prep","Labor & Management Relations","Managerial Accounting","Bachelor of Arts in Organizational Leadership","globally competitive environment","critical thinking","collaborative","strategic leadership skills","open minded","creative solutions","leading with integrity","leadership development","analytical thinking","collaborative relationships","BA in business - human resources online","current & relevant curriculum","notable faculty","rewarding employees","financial and analytical knowledge","bachelor's degree","accredited state university","prepare for CMA and CFP exams","financial expertise","online Bachelor of Science in business administration","concentration in finance","leadership skills","manage funds","loss prevention managers","management analysts","investment fund managers","financial planning degree","four-year undergraduate degree","evaluating risk","investments","taxes","diversification","ethics","financial advisor roles","financial managers","financial health","practical and theoretical training","financial decision-making","creation of wealth","managing financial resources","Bachelor of Business Administration in Finance","100% online study","certified financial planner","in-demand roles","six start dates per year","IACBE-accredited","Bachelor of Arts in Finance","long-range financial planning","efficient use of financial resources","Bachelor of Science in Finance","online","8-week accelerated modules","Corporate Finance","Personal Finance","management accounting","specialized bachelor's degree","Accounting Information Systems","Controllership","Financial Statement Analysis/Business Valuation","Data Analytics for Financial Professionals","BA in business - financial planning","portfolio","tax","insurance","estate management","problem-solving","data analysis strategies","online business administration bachelor's degree","government organization","technical knowledge","critical-thinking skills","corporate finance","banking","real estate","financial markets","investment management","wealth management","accelerated Master of Science in Finance (MSF)","portfolio manager","financial analyst","online associate degree in accounting","foundation in accounting principles","cost accounting","taxation","business law","Associate of Applied Science in Accounting","knowledge of accounting theories","communicate effectively","network with people","entry-level opportunities","ACBSP accredited","teaching excellence","continuous quality improvement","online Associate of Science in Accounting","traditional accounting jobs","practice-based environment","public accounting","corporate income taxation","accounting information systems","auditing","law enforcement","education","online Master of Health Administration","earn your master's degree in as few as 24 months","health care leader","Bachelor's degree required","No GRE/GMAT scores required","Master of Science in Healthcare Administration","advanced healthcare education","AUPHA","CAHME","HLA","key business and leadership skills","accredited by NEASC","CCNE","ACBSP","no GMAT or GRE required","earn your degree in as few as 15 months","2 courses per term","radical changes","medical and health services managers","complex new developments","leadership and management positions","nonprofit","private organizations","MBA in Healthcare Administration","36 credit hour program","entirely online","complete the program in 12 months","executive-level business principles","all course materials included","first course FREE of charge","course credit for professional training/certifications","accredited degree programs","collaborative learning","industry insights","professional network","healthcare leaders","master's in healthcare administration","and manage healthcare operations","100 percent online coursework","innovative","strategic business skills","healthcare industry","rising costs","aging population","projected 30+ percent growth","advance your healthcare career","master's degree in health care administration online","Master of Health Administration","complex healthcare industry","real-world experiences","high-impact management roles","Master of Science in Health Care Administration","improve quality and efficie
1ncy","control costs","innovative change agents","organizational improvement","conceptual","analytical","and application skills","health sciences","contemporary health care","hospitals","long-term care facilities","outpatient facilities","physician offices","mental health agencies","insurance companies","public health agencies","Master of Health Administration (MHA)","dynamic and ever-changing health care industry","critically examine and evaluate","global health care system","quality improvement","strategic planning","specialization options","gerontology","informatics","management/administrative background","BSN to MSN-NP tracks","Psychiatric Mental Health NP","Pediatric NP","Family NP","Adult-Gerontology Primary Care NP","MSN Nurse Educator","MSN/MBA dual degree programs","master's degree in nursing","accredited by the Commission on Collegiate Nursing Education","study online","career advancement","faculty","staff development roles","practicum","clinical practice experience","executive leader","nurse educator","adult-gerontology primary care nurse practitioner","family nurse practitioner","Nursing@Simmons","aspiring FNPs","MSN online","board pass rate","clinical placements","RN required","Family Nurse Practitioner Program","health and well being","cutting-edge science","primary care settings","holistic approach","RN to MSN program","Family Nurse Practitioner","clinical practice","online","flexible pacing","on-campus immersion","mentored practicum","$7.5k MSN-FNP grant","CCNE-accredited Nursing MS degree","nursing leadership","nursing education","family nurse practitioner","research-backed curriculum","expert faculty","practicums","leadership abilities","CCNE-accredited online MSN","leadership position","comprehensive online coursework","practical experience","MSN - MBA dual degree","low-residency program","leadership and education","business expertise","leadership positions","healthcare nursing education","management","healthcare administration","health care quality and patient safety","Master of Science in Nursing","quality improvement measures","clinical decision-making","patient safety","CCNE accredited","complete in 2.3 years","online MSN - Adult-Gerontology Primary Care Nurse Practitioner","treat adolescents through to older adult patients","innovative approach","devoted faculty","Master of Science in Nursing","accredited by the Commission on Collegiate Nursing Education","enhance knowledge and skills","leadership roles","practice and educational settings","advanced nursing content","leadership skills","Masters in Corporate Finance Concentration","career opportunities","corporate finance jobs","finance and corporate finance courses","managerial accounting","capital budgeting","fiscal and monetary policies","36-credit-hour","Investments and Securities","MS in Finance","online or on campus","financial analysis","quantitative skills","leader in the field","Ranked #2 in the nation","Georgetown's MSF","rising industry leaders","McDonough School of Business","world-class curriculum","online learning platform","Master of Science in Finance","maximize your career potential","firsthand industry knowledge","financial analysis","financial planning","knowledge and skills","MBA@UNC","quality and flexibility","top-ranked UNC Kenan-Flagler","innovative technologies","real-world immersion","interactive communication","global immersions","financial operations expertise","executive-level skills","UMGC","accredited state university","IIA recognized IAEP program school","financial operations expertise","in-demand executive-level skills","UMGC","accredited state university","IIA recognized IAEP program school","online MBA","focus in finance","international finance","capital markets","risk management","commercial banking","real estate","investment services","corporate posts","Master of Science in Finance","leader in finance","strategic financial management","financial analytics","business goals","financial industry","greater responsibilities","accounting role","CPA credential","high-quality educational experience","securities analysis","portfolio management","data analysis","financial modeling","MA in Economics","PhD","high-level government","NGO","private-sector careers","microeconomics","macroeconomics","econometrics","quantitative concepts","customizable program","Master of Business Administration","emphasis in Finance","global economy","organizational decision making","corporate financial management","investments","corporate solvency","profitability","efficie
1ncy","Associate of Arts with a concentration in Business Fundamentals","fundamental business principles","Associate of Arts degree in Business Administration","basic business administration skills","computer skills","software applications","business administration methods","management skills","Associate of Science in Business Administration","general education","elective courses","faith-based liberal arts education","business administration foundation courses","online associate degree in business administration","foundational knowledge","accounting","business law","human resource management","marketing","Associate of Applied Science in Business Administration","career opportunities","accounting","microcomputer skills","managerial techniques","decision-making","problem-solving skills","entrepreneurship","event planning","sales","retail management","ACBSP accredited","associate of arts in Business Administration","variety of careers","2-year Business Administration Associate Degree","fast-track program","basic business skills","employability","professional profile","Bachelor in Business Administration (BBA) degree","Associate of Arts degree in Health Services Administration","basic health services administration skills","computer skills","software applications","healthcare business environment","business law","management and marketing principles","medical anatomy","physiology","terminology","front office management","online A.S. in emergency medical services","foundational aspects","EMS","academic groundwork","paramedicine","clinical skills","EMS operational practices","legal issues","Associate Degree in Occupational Health and Safety (AOHS)","job-essential aspects","occupational health and safety","further undergraduate study","OHS career","accredited by the Province of New Brunswick","Board of Canadian Registered Safety Professionals (BCRSP)","Master of Education degree","Special Education","characteristics and needs","individuals qualifying for services","IDEA/IDEIA","Autism Spectrum Disorders (ASD)","growing demand","special education services","higher graduation standards","master's degree in autism spectrum disorders","licensed special education teachers","educator's responsibility","online MSEd in Special Education","practical experience","latest breakthroughs","students with special needs","special education master's","graduate certificate programs","Autism Spectrum Disorder","Applied Behavioral Analysis","M.Ed. in Special Education","unique learning abilities","teaching methods","ethical and legal considerations","behavior modification","cultural diversity","responsive teaching","100% of graduates hold teaching positions","Master of Arts in Special Education","meaningful learning experiences","exceptional students","design and implement curricula","collaborate with families","cultivate learning","nationwide shortage","special education educators","instruct K-12 students","interagency collaboration","trends related to educating exceptional students","Master's in Teaching degree","special education credential","teach in California","moderate to severe disabilities","fast-track pathway","California Commission on Teacher Credentialing (CTC)","Teacher Performance Expectations","Free credential test preparation","online master's of education (MEd)","early childhood special education","Master of Arts in Education/Special Education","teacher licensure","student teaching","pedagogical skills","effective special education educators","Master of Public Health","two-year","100 percent online degree","public health practitioner","curriculum shaped by public health experts","in-depth fieldwork","impact the health of your community","education that crosses geographical and cultural borders","online Master of Public Health","population health leadership and management","expert faculty","create real change","CEPH-accredited online Master of Public Health","global health practitioner","public health practice concentration","200 practicum hours","Certified in Public Health (CPH) examination","online Master of Public Health (MPH) degree","promote health of large populations","create programs","systems","policies","MS in Public Health (MPH)","high-growth leadership roles","career-focused specializations","CHES and MCHES certifications","complete in 18 months","Bridge (Master of Science in Nursing with an Emphasis in Public Health)","experienced RN's","MSN public health degree","public health analysis","planning and implementation","six-course program","asse
1ss learning needs","innovate prevention","interpret statistics","conduct research","disseminate nursing-related information","demand for public health professionals","health care reform","environmental health concerns","disease prevention","community health","evaluation of health programs","principles of epidemiology and biostatistics","environmental public health concepts","public health administration systems","economic factors","practicum and capstone project","web-based MPH@GW","national and global health practice","interdisciplinary teaching","core competencies","biostatistics and epidemiology","cultural competency","health communication","implementation and evaluation methods","public health biology","systems thinking","part-time or full-time","control disease outbreaks","develop wellness programs","policy change","Master of Science in Public Health","36 credit program","scientific basis of public health","health and wellness trends","national and global health policy","ASPPH competencies","WHO core functions","complete in 15 months","Master of Public Health","leadership and managerial positions","private organizations","professional skills","public health principles","UNC's Gillings School","No. 1-ranked public school of public health","online Master of Public Health","MPH@UNC","earn your MPH in as few as 24 months","part- and full-time options","GRE","GMAT or MCAT required","Doctor of Business Administration in Leadership and Organizational Development","100% online program","professional administrators","executives","leaders","practical application of research","leadership challenges","organizational development","positive social impact","real-world knowledge creation","executive-level problem-solving","thought-leadership","applied research","executive and/or administrative roles","Ranked one of the top education schools","Vanderbilt University's Peabody College","Doctor of Education (Ed.D.) in leadership and learning in organizations","experienced midcareer professionals","practical skills","systemic change","organizational growth","Doctor of Business Administration Degree","experienced business professionals","academia","business/management theories","global environment","Doctorate of Marriage and Family Therapy (DMFT)","Systemic Organizational Leadership","critical thinking","research skills","practical application","culturally sensitive","leadership role","non-clinical specialization","practicum and internship","systemic leadership","Doctor of Management in Organizational Leadership","professional master's degree","personal readiness","leadership literature","current organizational environments","global environment","advanced decision-making","leadership skills","lifelong learning","ethical decision-making","effective communication","sustainability","information technologies","Marketing","Global Management","Global Business","Doctor of Business Administration program","self-design option","multidisciplinary","100% online program","professional administrators","executives","leaders","public and private industry","specialization coursework","positive social impact","real-world knowledge creation","executive-level problem-solving","thought-leadership","applied research","online DBA in Business Intelligence","higher-order thinking","research skills","applied research","actionable research","agility","data-driven decision-making","real-world problems","Doctor of Business Administration (DBA) degree program","professional master's degree","personal readiness","leadership in management professions","business administration literature","current business environments","Doctor of Philosophy in Educational Leadership","reflective scholars","improve schools","lifelong learning","ethical decision-making","diversity","program evaluation","effective communication","curriculum development","instructional design","course delivery","online learning management systems","instructional design methodologies","educational media","Doctor of Education (EdD)","practitioner doctoral program","educational leadership","administration","innovative curriculum","transformational leadership","Leadership Foundations","Organizational Dynamics and Change","Strategic Planning","executive-level skill set","educational institutions","online doctorate of education (EdD)","educational leadership","Doctor of Education in Educational Leadership (Ed.D.)","transformational leaders","strategically manage","lead complex educational organizations","analytical thinking","critical thinking","innovative thinking","applied research","educational environments","Associate of Science (A.S.) in Healthcare Administration","general education","healthcare administration and management","healthcare terminology","healthcare delivery systems","role of spirituality and ethics","healthcare human resources","solid foundational understanding","health care environment","entry-level administrative positions","health care management","health care operations and policy","privacy and conflict","health services administrator","department administrative assistant","administrative clerk","operations assistant","Associate of Science in health information science/health care administration","entry-level administrative positions","managing situations","health care facilities","business principles","ethical impl
1ications","health care administrative responsibilities","improve efficiencies and quality","Associate of Arts degree in Health Services Administration","basic health services administration skills","business law","management and marketing principles","medical anatomy","physiology and terminology","front office management","Master of Education degree","Early Childhood Education","assess educational potential","create instructional programs","coordinate learning activities","manage early childhood classrooms","MAE","early childhood education programs","fiscal planning","leadership skills","innovative curricula","evaluate programs","NAEYC standards","program management","master's degree in early childhood education leadership","100% online","flexible and accelerated classes","advanced early childhood education leadership","opportunities in and out of the classroom","online master's degree","design","implement and evaluate educational services","children from birth through age 8","Master of Education in Early Childhood Education","knowledge and expertise","early childhood development and teaching","NAEYC standards","instructional strategies","teaching methodologies","assessment techniques","theories of early childhood growth","family and cultural diversity","Associate of Arts degree in Paralegal Studies","support attorneys","transactional and litigation fields","legal research","document drafting","case management","evidence gathering","litigation procedure","trial assistance","dispute resolution","real estate documents","wills","trusts","contracts","corporate matters","law office investigations","Master of Education in Educational Administration","initial teacher licensure","educational administrators","administrative certificate","K-12 setting","regionally accredited program","school leadership","administrative foundations","organizational theory","K-12 legal issues","public school finance","curriculum development","instructional leadership","educational administration","principal-ship","school improvement","observational and practice-based experiences","administrative internship","certified teaching experience","informed and effective educational administrators","Master of Arts in Education/Administration and Supervision","principal licensure","standards-based program","instructional leadership","organizational management","technology management","data-driven decision-making","administrative internship","school administration and supervision","Master of Education degree","specialization in Instructional Leadership","analyze instructional capacity","improve student achievement","teacher leadership skills","assessment and improvement strategies","K-12 educational settings","Master of Science in Higher Education Administration","analytical skills","leading within an institution of higher education","empirical research","data-centric decision-making","analytical problem-solving","effectiveness of initiatives","data-based conclusions","real world problems","institutional research","strategic planning","institutions of higher education","comprehensive student services program","measure student learning","evaluate academic programs","accreditation procedures","standards for online programs","CTC-approved Preliminary Administrative Services Credential","MAE in Educational Administration","online coursework","theory with practical situations","problem solving","conflict resolution","diverse individuals","Master of Education in Educational Administration","initial teacher licensure","educational administrators","administrative certificate","K-12 setting","regionally accredited program","school leadership","administrative foundations","organizational theory","K-12 legal issues","public school finance","curriculum development","instructional leadership","educational administration","principal-ship","school improvement","observational and practice-based experiences","administrative internship","certified teaching experience","informed and effective educational administrators","39-hour","no application fee"],pw=({isRecommender:e=!1,schoolName:t,schoolId:r,schoolSlug:n,programName:i,city:o,state:a,programId:l,capId:s,snippet:c,levelOfInstitution:d,accreditator:u,roiPercentileRank:p,percentOnlineEnrollment:f,isOnline:m,isPublic:h,forProfit:g,notForProfit:y,onProductClick:x,onNextStepsClick:w,isProgramSubmitted:S=!1,applicationCtaLabel:I,applicationCtaURL:C,applicationCtaFieldMap:j,applicationCtaStaticParams:k,applicationCtaMissingValue:A,lead:N,partnerIdentifiers:T,showComparisonCheckbox:O=!1,location:P=U.PAGE,audience:M,degreeSlug:R,categorySlug:L,subjectSlug:F,position:$,listId:_,isUserRequested:D=!0,showPopupExperience:Y=!1,offeringId:B,offeringUuid:z,organizationId:V,tcpa:H=""})=>{let{createAppViewConversion:q}=up(),G=(0,v.useRef)(null),W=(0,v.useRef)(!1),{triggerProductLoadedEvent:Q,triggerProductClickedEvent:K,eventContext:J}=av(),X=P===U.EMBEDDED_RECOMMENDER,Z=cZ({applicationCtaURL:C,applicationCtaFieldMap:j,applicationCtaStaticParams:k,applicationCtaMissingValue:A},{lead:N,partnerIdentifiers:T}),ee=(0,v.useRef)(E()).current,et=(0,v.useRef)(E()).current,{setNodes:er,entries:en}=lO(),ei=en[0]?.isIntersecting??!1;(0,v.useEffect)(()=>{G.current&&er([G.current])},[er]);let eo=sd({eventContext:J,listId:_,presets:{degree:R||null,category:L||null,subject:F||null},location:P,productClickedCorrelationId:et,viewCorrelationId:ee,brand:n,position:$,capId:s,programId:l,outboundUrl:C,isProgramSubmitted:S,isUserRequested:D});(0,v.useEffect)(()=>
1{if(!W.current&&(X?ei&&!Y:ei)){let e=aa({...eo});ab(e.name,e.payload),W.current=!0,er([])}},[ei,Y]);let ea=(0,v.useMemo)(()=>({schoolName:t,schoolId:r??"",schoolSlug:n,city:o,state:a,programId:l,capId:s,programName:i,snippet:c,levelOfInstitution:d||"",accreditator:u||"",percentOnlineEnrollment:f||null,roiPercentileRank:p,isOnline:m||!1,isPublic:h,forProfit:g,notForProfit:y||!1,applicationCtaLabel:I||"",applicationCtaURL:C||"",programFlow:[],tcpa:H,productClickedCorrelationId:et,offeringId:B,offeringUuid:z,organizationId:V,audience:M}),[t,r,n,o,a,l,s,i,c,d,u,f,p,m,h,g,y,I,C,et,B,z,V,M,H]);(0,v.useEffect)(()=>{Q({...eo})},[]);let el=(0,v.useCallback)(()=>{K({...eo,outboundUrl:S?r6(Z,j):C});let e={viewCorrelationId:ee,productClickedCorrelationId:et};S&&Z?(q(ea),window.open(Z,"_blank","noopener,noreferrer")):S&&!Z&&w?w(e):x&&x(e)},[K,eo,S,Z,C,w,x,q,ea,ee,et,j]),es=Z?I||"Start Your Application":"Next Steps",ec=S?e?"Submitted":es:"Explore Program",ed=`https://simple-storage-server.highereducation.com/${n}.png?w=130&h=80`,eu=[o,a].map(e=>e.trim()).filter(Boolean).join(", ")||void 0,ep=(0,v.useMemo)(()=>dH({levelOfInstitution:d,accreditator:u,roiPercentileRank:p,percentOnlineEnrollment:f,isOnline:m,isPublic:h,forProfit:g,notForProfit:y}).map(({flag:e})=>e.value),[d,u,p,f,m,h,g,y]),ef=dP(ea,{position:$,viewCorrelationId:eo.viewCorrelationId,correlationId:eo.productClickedCorrelationId}),em=(0,v.useMemo)(()=>c?(function(e){if(!e)return[];let t=e.split(/(?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|\?|!)\s/).map(e=>e.trim()).filter(Boolean);if(t.length<=1){let t=e.split(/;\s*|,\s+/).map(e=>e.trim()).filter(Boolean);if(t.length>1)return t}return t})(c).map(e=>e.trim()).filter(Boolean).map((e,t)=>{let r=((e="",t)=>{let r;if(!e)return[];if(!t||0===t.length)return[{text:e,bold:!1}];let n=(e=>{let t=e.join("|"),r=pv.get(t);if(r)return r;let n=RegExp(`\\b(${e.map(pb).join("|")})\\b`,"gi");return pv.set(t,n),n})(t);n.lastIndex=0;let i=[],o=0;for(;null!==(r=n.exec(e));)r.index>o&&i.push({text:e.slice(o,r.index),bold:!1}),i.push({text:r[0],bold:!0}),o=n.lastIndex;return o<e.length&&i.push({text:e.slice(o),bold:!1}),i})(e,px).map((e,t)=>e.bold?(0,b.jsx)("b",{children:e.text},t):e.text);return(0,b.jsx)("span",{children:r},`${t}-${e.slice(0,24)}`)}):[],[c]),eh=!!(O&&l&&ef.compare),eg=(0,v.useCallback)(e=>{let t=e.target;t.closest("[data-degree-card-footer]")||t.closest("button[aria-controls]")||el()},[el]),ey=(0,v.useCallback)(e=>{e.stopPropagation(),el()},[el]);return(0,b.jsx)(aI.DegreeCardDetailed,{ref:G,border:"stroke",readMoreBehavior:"expand",schoolLogo:ed,schoolName:t,schoolDetails:eu,degreeTitle:i,tags:ep.length>0?ep:void 0,description:c,listHeading:em.length>0?"Why Consider This Program":void 0,listItems:em.length>0?em:void 0,ctaLabel:ec,onCtaClick:ey,compare:eh,compareChecked:!!eh&&ef.compareChecked,compareDisabled:!!eh&&ef.compareDisabled,onCompareChange:eh?ef.onCompareChange:void 0,footerLayout:eh?"stackUntilSm":"row",className:so("not-prose h-full w-full min-w-0 max-w-full min-h-[376px] cursor-pointer",e?"rounded-lg border-t-8 pt-3":"rounded-sm border-t-4 pt-3"),onClick:eg})},pS=({results:e,header:t,subheader:r,showSponsoredResultsPopover:n=!0,showComparisonCheckbox:i=!0,onProgramClick:o,onNextStepsClick:a,submittedResults:l=[],showPopupExperience:s=!1,lead:c,partnerIdentifiers:d})=>{let u=l3(),p=u?.getRecommenderModalCopy(),f=t?.trim()??"",m=r?.trim()??"",h=!!f||!!m,g=e?.length??0,y=1===g?"1 sponsored result":`${g} sponsored results`,v=h||n;return(0,b.jsxs)(aI.Flex,{direction:"column",gap:"none",width:"full",className:"not-prose mx-auto mb-6",children:[v&&(0,b.jsxs)(aI.Flex,{className:"mb-6",direction:"column","direction-md":"row",justify:h?"between":"end",align:"start",gap:"md",children:[h&&(0,b.jsx)(aI.Flex,{direction:"column",gap:"none",className:"min-w-0 flex-1",children:(0,b.jsx)(aI.SectionHeader,{size:"h2",title:f||m,subtext:f&&m?m:void 0})}),n&&(0,b.jsxs)(aI.Flex,{direction:"row",align:"center",gap:"sm",wrap:"wrap",className:h?void 0:"w-full md:w-auto",children:[(0,b.jsx)(aI.Badge,{variant:"light",size:"sm",children:y}),(0,b.jsx)(ud,{spanText:"Learn More About Our Partners",disclosureTitle:p?.disclosureTitle,disclosureContent:p?.disclosureContent})]})]}),(0,b.jsx)(aI.Grid,{columns:1,"columns-md":2,gap:"lg",className:"pb-6 [&>*]:min-w-0",children:e?.map((e,t)=>{let r=l.some(t=>t.programId===e.programId);return(0,b.jsx)(pw,{onProductClick:t=>o({...e,...t}),onNextStepsClick:a?t=>a({...e,...t}):void 0,schoolName:e.schoolName,schoolId:e.schoolId,schoolSlug:e.schoolSlug,programName:e.programName,city:e.city,state:e.state,snippet:e.snippet,levelOfInstitution:e.levelOfInstitution,accreditator:e.accreditator,percentOnlineEnrollment:e.percentOnlineEnrollment??void 0,isOnline:e.isOnline,isPublic:e.isPublic,forProfit:e.forProfit,notForProfit:e.notForProfit,audience:e.audience,position:t+1,showComparisonCheckbox:i,isProgramSubmitted:r,applicationCtaLabel:e.applicationCtaLabel||"",applicationCtaURL:e.applicationCtaURL||"",applicationCtaFieldMap:e.applicationCtaFieldMap,applicationCtaStaticParams:e.applicationCtaStaticParams,applicationCtaMissingValue:e.applicationCtaMissingValue,lead:c,partnerIdentifiers:d,location:U.PAGE,degreeSlug:e.degreeSlug,categorySlug:e.categorySlug,subjectSlug:e.subjectSlug,capId:e.capId,programId:e.programId,offeringId:e.offeringId,offeringUuid:e.offeringUuid,organizationId:e.organizationId,tcpa:e.tcpa,listId:e.listId,isUserRequested:e.isUserRequested,showPopupExperience:s},`${e.programId}-${e.schoolName}-${e.programName}`)})})]})}
1,pI=({firstName:e,schoolName:t,schoolSlug:r,programName:n,valueProps:i,applicationCtaUrl:o,applicationCtaLabel:a,onCloseExperience:l,extraCta:s,lead:c,partnerIdentifiers:d})=>{let u=r?`https://simple-storage-server.highereducation.com/${r}.png?w=130&h=80`:void 0,p=()=>{if(s?.enabled!==!0||!s.destination?.url)return;let e=cG({baseUrl:s.destination.url,staticParams:s.destination.staticParams,fieldMap:s.destination.fieldMap,missingValue:s.destination.missingValue,sources:{lead:c,partnerIdentifiers:d}});return"href"in e?e.href:void 0},f=p(),m=s?.label??s?.destination?.label??"Learn more";return(0,b.jsxs)(aI.Section,{variant:"default",padding:"none",gap:null,className:"relative flex flex-col lg:flex-row overflow-hidden rounded-2xl",children:[l&&(0,b.jsx)(aI.Button,{type:"button",variant:"iconOnly",size:"sm",iconBefore:"x","aria-label":"Close",className:"absolute right-4 top-4 z-20",onClick:l}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"lg",className:"lg:w-2/5 bg-white px-8 py-7 shrink-0",children:[u&&(0,b.jsx)(aI.LogoBox,{src:u,alt:t??""}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"xs",className:"min-w-0",children:[(0,b.jsx)(aI.Heading,{variant:"h4",className:"truncate",children:t}),n&&(0,b.jsx)(aI.Text,{variant:"b4",color:"subtext",children:n})]}),(0,b.jsxs)(aI.Badge,{variant:"light",size:"lg",className:"gap-2 self-start",children:[(0,b.jsx)(aI.Icon,{icon:"clock",size:"sm","aria-hidden":!0}),"Now Accepting New Students."]}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"md",children:[(0,b.jsx)(aI.Heading,{variant:"h6",children:"Next Steps"}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"sm",children:[o&&(0,b.jsx)(aI.Button,{variant:"primaryFill",size:"lg",className:"w-full !h-auto min-h-10",onClick:e=>{e.preventDefault(),window.open(o,"_blank","noopener,noreferrer")},children:a||"Start Your Application"}),f&&(0,b.jsx)(aI.Button,{variant:"primaryFill",size:"lg",className:"w-full !h-auto min-h-10",onClick:e=>{e.preventDefault();let t=p();t&&window.open(t,"_blank","noopener,noreferrer")},children:m}),(0,b.jsx)(aI.Button,{variant:"primaryOutline",size:"lg",className:"w-full",onClick:l,children:"Continue Browsing Programs"})]})]}),(0,b.jsx)(aI.Text,{variant:"b5",color:"subtext",children:"Your information will never be shared with a school without your consent."})]}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"lg",className:"lg:w-3/5 bg-secondary-50 px-8 py-7 flex-1",children:[(0,b.jsxs)(aI.Flex,{direction:"column",gap:"xs",children:[(0,b.jsxs)(aI.Heading,{variant:"h3",children:["Congratulations",e?`, ${e}`:"","!"]}),(0,b.jsx)(aI.Text,{variant:"b4",color:"subtext",children:"What's next?"})]}),(0,b.jsx)(aI.Card,{variant:"background-white",rounded:"lg",children:(0,b.jsxs)(aI.Card.Content,{children:[(0,b.jsx)(aI.Heading,{variant:"h5",children:"What to expect from the Advisor"}),(0,b.jsxs)(aI.List,{bulletStyle:"bullet",children:[(0,b.jsx)(aI.ListItem,{children:"Hands-on assistance with your application process"}),(0,b.jsx)(aI.ListItem,{children:"Help applying for financial aid"}),(0,b.jsx)(aI.ListItem,{children:"Answers to any question you have"})]})]})}),i&&i.length>0&&(0,b.jsx)(aI.Card,{variant:"background-white",rounded:"lg",children:(0,b.jsxs)(aI.Card.Content,{children:[(0,b.jsxs)(aI.Heading,{variant:"h5",children:[t," offers"]}),(0,b.jsx)(aI.List,{bulletStyle:"bullet",children:i.map(e=>(0,b.jsx)(aI.ListItem,{children:e.title},e.title))})]})})]})]})},pC=({results:e,selectedResult:t,startTime:r,onCloseExperience:n,step:i,programSelectComponent:o,PiiConfirmationComponent:a,AdditionalQuestionsComponent:l,ExitStrategyComponent:s,SubmissionComponent:c,onBackButtonClick:d,firstName:u,lastName:p,email:f,phone:m,formErrors:h,onProgramClick:g,onProgramSubmit:y,setFirstName:v,setLastName:x,setEmail:w,setPhone:S,setFormErrors:I,canSubmit:C,isLoading:j,leadSubmissionStatus:k,setLeadSubmissionStatus:E,piiLeadErrors:A,productClickedCorrelationId:N,questions:T,editMode:O,setEditMode:P,submittedResults:M,partnerIdentifiers:R,extraCtaConfig:L})=>{let F={PROGRAM_SELECT:o,PII_CONFIRMATION:a,ADDITIONAL_QUESTIONS:l,EXIT_STRATEGY:s,SUBMISSION:c}[i];if(!F)return null;let U={firstName:u,lastName:p,email:f,phoneNumber:m},$={isLoading:j,canSubmit:C,selectedResult:t,introText:t?.confirmationShortIntroText||"",valueProps:t?.valueProps,programName:t?.programName||"",schoolName:t?.schoolName||"",schoolSlug:t?.schoolSlug||"",city:t?.city,state:t?.state,applicationCtaUrl:cZ(t,{lead:U,partnerIdentifiers:R}),applicationCtaLabel:t?.applicationCtaLabel,applicationCtaFieldMap:t?.applicationCtaFieldMap,startTime:r,onBackButtonClick:d,onProgramClick:g,onProgramSubmit:y,importantFactors:[],results:e,piiLeadErrors:A||[],editMode:O,setEditMode:P,setPiiLeadErrors:()=>{},setFirstName:v,setLastName:x,setEmail:w,setPhone:S,firstName:u,lastName:p,email:f,phone:m,formErrors:h,setFormErrors:I,onCloseExperience:n,leadSubmissionStatus:k,setLeadSubmissionStatus:E,productClickedCorrelationId:N||"",questions:T,onFormError:()=>{},formCorrelationId:"",tcpa:t?.tcpa||"",programFlow:t?.programFlow||[],tcpaSecondParagraph:t?.tcpaSecondParagraph||"",submittedResults:M,extraCta:L?{enabled:L.enabled,label:L.label,destination:t?.postLeadCta}:void 0,partnerIdentifiers:R,...L&&t?.postLeadCta?.url||t?.applicationCtaFieldMap?{lead:U}:{}};return(0,b.jsx)(F,{...$})},pj=()=>(0,b.jsx)(aI.Flex,{align:"center",justify:"center",className:"not-prose relative h-full min-h-[60vh] w-full rounded-2xl bg-white",children:(0,b.jsx)(aI.LoadingDots,{label:"Submitting request",color:"secondary"})}),pk=e=>(0,b.jsx)(pC,{AdditionalQuestionsComponent:cJ,programSelectComponent:um,PiiConfirmationComponent:sx,SubmissionComponent:pj,ExitStrategyComponent:pI,...e}),pE=({results:e,subject:t,onProgramClick:r,submittedResults:n=[],showPopupExperience:i=!1,showComparisonCheckbox:o=!0,lead:a,partnerIdentifiers:l})=>{let s=l3(),c=s?.getRecommenderModalCopy();if(!e||0===e.length)return null;let d=`Your Top Matches For ${t}`;return(0,b.jsx)(aI.Section,{as:"section",variant:"default",padding:"none",rounded:"lg",className:"not-prose mb-2xl border-2 border-tertiary-400 bg-tertiary-50",children:(0,b.jsxs)(aI.Flex,{direction:"column",gap:"lg",width:"full",className:"p-md md:p-xl",children:[(0,b.jsxs)(aI.Flex,{direction:"column","direction-lg":"row",justify:"between",align:"start",ga
1p:"md",width:"full",children:[(0,b.jsx)(aI.SectionHeader,{size:"h2",title:d,className:"min-w-0 flex-1"}),(0,b.jsx)(ud,{spanText:"Learn More About Our Partners",disclosureTitle:c?.disclosureTitle,disclosureContent:c?.disclosureContent})]}),(0,b.jsx)(aI.Grid,{columns:1,"columns-lg":2,gap:"lg",className:"w-full",children:e.slice(0,2).map((e,t)=>{let s=n.some(t=>t.programId===e.programId&&t.schoolId===e.schoolId);return(0,b.jsx)(pw,{onProductClick:t=>r({...e,...t}),schoolName:e.schoolName,schoolId:e.schoolId,programName:e.programName,schoolSlug:e.schoolSlug,city:e.city,state:e.state,position:t+1,snippet:e.snippet,location:U.EMBEDDED_RECOMMENDER,isProgramSubmitted:s,applicationCtaLabel:e.applicationCtaLabel,applicationCtaURL:e.applicationCtaURL,applicationCtaFieldMap:e.applicationCtaFieldMap,applicationCtaStaticParams:e.applicationCtaStaticParams,applicationCtaMissingValue:e.applicationCtaMissingValue,lead:a,partnerIdentifiers:l,showPopupExperience:i,showComparisonCheckbox:o,degreeSlug:e.degreeSlug,categorySlug:e.categorySlug,subjectSlug:e.subjectSlug,capId:e.capId,programId:e.programId,offeringId:e.offeringId,offeringUuid:e.offeringUuid,organizationId:e.organizationId,tcpa:e.tcpa,listId:e.listId,isUserRequested:e.isUserRequested},`${e.programId}-${e.schoolName}-${e.programName}`)})})]})})},pA=({illustration:e})=>(0,b.jsxs)(aI.Flex,{className:"mx-auto max-w-4xl px-4 py-16 md:gap-12","data-testid":"no-results",direction:"column","direction-md":"row",align:"center",gap:"2xl",children:[e,(0,b.jsxs)(aI.Flex,{className:"w-full md:w-auto",direction:"column",gap:"sm",children:[(0,b.jsx)(aI.Heading,{variant:"h2",children:"We couldn't find a direct match for your search"}),(0,b.jsx)(aI.Text,{variant:"b4",color:"default",children:"Try updating or clearing all of your selected filters."})]})]}),pN=({header:e,desktopSubheader:t,mobileSubheader:r,listItem1:n,listItem2:i,listItem3:o,imageUrl:a,showImage:l})=>(0,b.jsxs)(aI.Flex,{direction:"column","direction-lg":"row",align:"start",gap:"lg",width:"full",className:"not-prose mx-auto w-full max-w-screen-2xl px-lg py-xl lg:items-center lg:justify-between",children:[(0,b.jsxs)(aI.Flex,{direction:"column",gap:"md",width:"full",className:l?"lg:max-w-[43%] lg:shrink-0":void 0,children:[(0,b.jsx)(aI.Heading,{variant:"h1",className:"overflow-hidden text-ellipsis",children:e}),(0,b.jsx)(aI.Text,{variant:"b3",className:"hidden lg:block",children:t}),(0,b.jsx)(aI.Text,{variant:"b3",className:"lg:hidden",children:r})]}),l?(0,b.jsxs)(aI.Flex,{direction:"row",align:"center",gap:"sm",width:"full",className:"min-w-0 w-full flex-1 justify-start lg:justify-end md:gap-md",children:[(0,b.jsx)("div",{className:"-mr-section-break aspect-square w-editorial-listing-branding shrink-0 overflow-hidden rounded-lg",children:(0,b.jsx)(aI.Image,{src:a,alt:"Woman smiling in a cozy living room looking at her phone and laptop",className:"h-full w-full object-cover"})}),(0,b.jsx)("ul",{className:"flex min-w-0 flex-1 list-none flex-col items-end gap-xxs p-0 text-end max-w-72",children:[{icon:"landmark",label:n},{icon:"clipboard-check",label:i},{icon:"mouse-pointer-click",label:o}].map(({icon:e,label:t})=>(0,b.jsx)("li",{children:(0,b.jsx)(aI.ValueProp,{size:"sm",icon:e,children:(0,b.jsx)(aI.Text,{variant:"b5",color:"subtext",weight:"semibold",children:t})})},e))})]}):null]});function pT(e){return e.replace(/&/gi,"&").replace(/�*38;/gi,"&").replace(/�*26;/gi,"&")}function pO(e,t){let r,n=RegExp(t.source,"gi");for(;null!==(r=n.exec(e));){let t=r.index;if(0===t||!/[\w-]/.test(e[t-1]))return!0}return!1}function pP(e){if(!e||"string"!=typeof e)return!1;let t=pT(e).trim();return!!/^business-management$/i.test(t)||pO(t.toLowerCase(),/business\s*(&|and)\s*management/)}let pM=({resultsAreLoading:e,exactResults:t,relatedResults:r,recommendedResults:n,spotlightResults:i,selectedResult:o,title:a,subtitle:l,startTime:s,subject:c,category:d,firstName:u,lastName:p,email:f,phone:m,setFirstName:h,setLastName:g,setEmail:y,setPhone:x,formErrors:w,setEditMode:S,editMode:I,piiLeadErrors:C,onPopupProgramClick:j,onPopupProgramSubmit:k,popupExperienceStep:A,closePopupExperience:N,showPopupExperience:T,showSpotlight:O,goToPopupProgramSelect:P,openProgramSlideoutExperience:M,onNextStepsClick:R,singleSubmissionExperienceStep:L,showSlideoutExperience:F,closeSlideoutExperience:U,onSlideoutProgramSubmit:$,goToSlideoutPiiConfirmation:_,canSubmitLead:D,isHeclidLoading:Y,leadSubmissionStatus:B,setLeadSubmissionStatus:z,additionalQuestions:V,onAdditionalQuestionsSubmit:H,lead:q,submittedPrograms:G,submittedResults:W,onViewNextSteps:Q,partnerIdentifiers:K})=>{let J=(({category:e,firstName:t})=>(0,v.useMemo)(()=>{let r=pP(e),n=function(e){if(!e||"string"!=typeof e)return!1;let t=pT(e).trim();return!!/^psychology-counseling$/i.test(t)||pO(t.toLowerCase(),/psychology\s*(&|and)\s*counseling/)}(e);return{header:r||n?"Welcome to your results!":t?`Hi, ${t}!`:"Hi!",desktopSubheader:r?"Pick your favorite school, set up a call with an admissions administrator, and start your application â all in one place.":"Select a program and connect with an advisor for more details about accreditation, faculty, internships, and more.",mobileSubheader:"Connect with an advisor for info on accreditation, faculty and internships.",listItem1:n?"Compare psych programs.":"Compare online programs.",listItem2:"Connect with your top choice.",listItem3:n?"Start your psych degree.":"Start your online degree.",imageUrl:"https://res.cloudinary.com/highereducation/image/upload/v1739214820/BME/Voyager_Psych_Banner.png",showImage:!r}},[e,t]))({category:d,firstName:u}),X=(({category:e,subject:t})=>(0,v.useMemo)(()=>{let r=pP(e);return{header:r?"More Matches For You":"",subheader:r?`These schools match your interests in ${t}.`:""}},[e,t]))({category:d,subject:c}),{getComparisonBounds:Z}=l4(),{minItems:ee,maxItems:et}=Z();if(e)return(0,b.jsx)(ux,{});let er=O?i:n,en=O&&A===pg.PROGRAM_SELECT;return(0,b.jsxs)(lG,{minPrograms:ee,maxPrograms:et,children:[(0,b.jsxs)(aI.Flex,{direction:"column",gap:"none",width:"full",className:"px-2 md:px-8 max-w-[1536px] mx-auto",children:[(0,b.jsx)(pN,{header:a||J.header,desktopSubheader:l||J.desktopSubheader,mobileSubheader:l||J.mobileSubheader,listItem1:J.listItem1,listItem2:J.listItem2,listItem3:J.listItem3,imageUrl:J.imageUrl,showImage:J.showImage}),(0,b.jsx)(aI.Modal,{open:T,onOpenChange:e=>{e||N()},children:(0,b.jsxs)(aI.Modal.Content,{size:"xl",className:"max-w-5xl p-0 max-h-[95vh] overflow-y-auto rounded-2xl bg-transparent border-0 shadow-none",children:[(0,b.jsx)(aI.Modal.Header,{className:"sr-only",children:(0,b.jsx)(aI.Modal.Title,{children:O?"Spotlight program":"Recommended programs"})}),en?(0,b.jsx)(uu,{results:i,firstName:u,productClickedCorrelationId:o?.productClickedCorrelationId,onProgramClick:j,onCloseExperience:N}):(0,b.jsx)(pk,{selectedResult:o,canSubmit:D,isLoading:Y,onBackButtonClick:P,onProgramClick:j,onProgramSubmit:e=>{A===pg.ADDITIONAL_QUESTIONS?H(e):k()},onCloseExperience:N,results:er,step:A,firstName:u,lastName:p,email:f,phone:m,setFirstName:h,set
1LastName:g,setEmail:y,setPhone:x,formErrors:w,setEditMode:S,editMode:I,piiLeadErrors:C,startTime:s,setFormErrors:()=>{},leadSubmissionStatus:B,setLeadSubmissionStatus:z,questions:V,productClickedCorrelationId:o?.productClickedCorrelationId,submittedResults:W,partnerIdentifiers:K})]})}),(0,b.jsx)(c2,{open:F,onClose:U,children:o&&(0,b.jsx)(c1,{onCloseExperience:U,selectedResult:o,step:L,startTime:s,piiLeadErrors:C,setEditMode:S,editMode:I,setFirstName:h,setLastName:g,setEmail:y,setPhone:x,formErrors:[],setFormErrors:()=>{},formHeading:"Confirm your contact details:",formSubHeading:"",onBackButtonClick:_,onProgramSubmit:e=>{L===si.ADDITIONAL_QUESTIONS?H(e):$()},firstName:u,lastName:p,email:f,phone:m,leadSubmissionStatus:B,setLeadSubmissionStatus:z,canSubmit:D,isLoading:Y,questions:V,productClickedCorrelationId:o?.productClickedCorrelationId||E(),partnerIdentifiers:K})})]}),(0,b.jsx)(ub,{submissions:G,firstName:u,onViewNextSteps:Q}),(0,b.jsxs)(aI.Flex,{direction:"column",gap:"none",width:"full",className:"px-2 md:px-8 max-w-[1536px] mx-auto",children:[n&&(0,b.jsx)(pE,{results:n,subject:c,onProgramClick:M,submittedResults:W,showPopupExperience:T,lead:q,partnerIdentifiers:K}),!!t?.length&&(0,b.jsx)(pS,{header:X.header,subheader:X.subheader,onProgramClick:M,onNextStepsClick:R,results:t,submittedResults:W,lead:q,partnerIdentifiers:K}),!t?.length&&!n?.length&&!r?.length&&(0,b.jsx)(pA,{}),!!r?.length&&(0,b.jsx)(pS,{onProgramClick:M,onNextStepsClick:R,results:r,header:"Other School Programs You Might Like",subheader:`These schools offer similar programs to ${c}.`,submittedResults:W,lead:q,partnerIdentifiers:K})]}),(0,b.jsx)(dD,{}),(0,b.jsx)(dK,{squareButtons:!0,onProductClick:M,submittedResults:W})]})};function pR(e,t){if(!t)return null;let r=parseInt(e.schoolId);if(!t.includes(r)||!e.linkoutUrl)return null;let n=e.productClickedCorrelationId||E(),i=JSON.stringify({webContext:window?._Cohesion?.webContext,formatSubtype:"dexp-results",formatType:"dexp-offering"});return e.linkoutUrl+(e.linkoutUrl.includes("?")?"&":"?")+`correlationId=${encodeURIComponent(n)}&trackingContext=${encodeURIComponent(i)}`}let pL=({linkoutConfig:e,title:t,subtitle:r})=>{let n=ro(),i=aS(),{triggerElementLoadedEvent:o,triggerElementViewedEvent:a}=av(),l=ry(i.steps,i.flowState),s=rv("degree",i.flowState),c=rv("category",i.flowState),d=rv("subject",i.flowState),u=rS(i.flowState),p=u.firstName?.value?.toString()||"",f=u.lastName?.value?.toString()||"",m=u.email?.value?.toString()||"",h=u.phoneNumber?.value?.toString()||"",g=c9(),y=c7(),[x,w]=(0,v.useState)(),[S,I]=(0,v.useState)([]),[C,j]=(0,v.useState)([]),[k,A]=(0,v.useState)([]),[N,T]=(0,v.useState)([]),[O,P]=(0,v.useState)(!0),[M,R]=(0,v.useState)([]),[L,F]=(0,v.useState)([]),[$,_]=(0,v.useState)(),[D,Y]=(0,v.useState)(p),[B,z]=(0,v.useState)(f),[V,H]=(0,v.useState)(m),[q,G]=(0,v.useState)(h),[W,Q]=(0,v.useState)(!1),K={...$?.stateAbbr?{state:{key:"state",value:$.stateAbbr}}:{},...u,...!u.country?{country:{key:"country",value:$?.countryCode||"US"}}:{},firstName:{key:"firstName",value:D},lastName:{key:"lastName",value:B},email:{key:"email",value:V},phoneNumber:{key:"phoneNumber",value:q}},J=rV(K),X=(0,v.useRef)(J);(0,v.useEffect)(()=>{X.current=J},[J]);let Z=!D||!B||!V||!q;(0,v.useEffect)(()=>{(async()=>{P(!0);try{let t=await py({lead:J,publisherToken:n?.identityToken,trackingContext:{anonymousId:window?._Cohesion?.anonymousId},degree:s,category:c,subject:d,presentationUrl:window.location.href,forceLinkoutSchoolIds:e&&e.schoolIds?e.schoolIds:void 0});I(t.exactResults.map(e=>({...e,isUserRequested:!0}))),A(t.recommendedResults.map(e=>({...e,isUserRequested:!0}))),j(t.relatedResults.map(e=>({...e,isUserRequested:!1}))),T(t.spotlightResults.map(e=>({...e,isUserRequested:!0}))),R(t.qualified),F(t.unqualified),t.locationInference&&_(t.locationInference)}catch(e){console.error("Error fetching qualified results:",e)}finally{P(!1)}})()},[]);let[ee,et]=(0,v.useState)([]),[er,en]=(0,v.useState)(!1),[ei,eo]=(0,v.useState)(null),{duplicatePrograms:ea,duplicateProgramsLoading:el}=da({duplicateResult:ei,leadRef:X,degree:s,category:c,forceLinkoutSchoolIds:e?.schoolIds,qualifiedIds:M,unqualifiedIds:L}),[es,ec]=(0,v.useState)(void 0),[ed,eu]=(0,v.useState)([]),[ep,ef]=(0,v.useState)(void 0),em=(0,v.useCallback)(e=>{ef(l9(e))},[]),eh=(0,v.useCallback)(e=>{w(e);let t=ed.some(t=>t.programId===e.programId);ec(t?l8.SUBMITTED:void 0),t||ef(void 0)},[ed]),eg=(0,v.useCallback)(()=>{ec(void 0)},[]),ey=(0,v.useMemo)(()=>es!==l8.SUBMITTING&&!!x&&!Z,[es,x,D,B,V,q]),eb=x?.productClickedCorrelationId||E(),ev=(0,v.useMemo)(()=>
1{if(x)return{school:{id:x.schoolId,slug:x.schoolSlug,name:x.schoolName},program:{id:x.programId,leadSource:l.leadSource}}},[x,l]),{showAdditionalQuestions:ex,additionalQuestions:ew,isLoadingQuestions:eS,checkForAdditionalQuestionsAndSubmit:eI,submitWithAdditionalData:eC}=c8({lead:J,needsActiveProspectToken:(0,v.useMemo)(()=>!!x?.schoolId&&dl.includes(Number(x.schoolId)),[x?.schoolId]),activeProspectToken:g||"",jornayaToken:y,programId:x?.programId.toString()||"",selectedResult:x,productClickedCorrelationId:eb,inputs:K,record:ev,applicationCtaURL:x?.applicationCtaURL||"",onLeadSubmitted:em}),{showPopupExperience:ej,closePopupExperience:ek,showSpotlight:eE,showRecommender:eA,popupExperienceStep:eN,gotToPopupPiiConfirmation:eT,goToPopupAdditionalQuestions:eO,goToPopupExitStrategy:eP,goToPopupProgramSelect:eM,goToPopupSubmission:eR}=(({recommendedResults:e,spotlightResults:t,productClickedCorrelationId:r})=>{let[n,i]=(0,v.useState)(pg.PROGRAM_SELECT),{triggerElementClickedEvent:o}=av(),{eventContext:a}=aS(),l=t?.length>0,s=!l&&e?.length>0,[c,d]=(0,v.useState)(!1),u=(0,v.useCallback)(()=>{d(!1),o({...a,productClickedCorrelationId:r,elementType:"dexp-popup-close",name:"dexp-popup-close-button",text:"X",location:U.POPUP})},[r,a,o]),p=(0,v.useCallback)(()=>i(pg.PROGRAM_SELECT),[]),f=(0,v.useCallback)(()=>i(pg.PII_CONFIRMATION),[]),m=(0,v.useCallback)(()=>i(pg.ADDITIONAL_QUESTIONS),[]),h=(0,v.useCallback)(()=>i(pg.EXIT_STRATEGY),[]),g=(0,v.useCallback)(()=>i(pg.SUBMISSION),[]);return(0,v.useEffect)(()=>{d(t.length>0||e.length>0)},[t,e]),{showPopupExperience:c,closePopupExperience:u,showSpotlight:l,showRecommender:s,popupExperienceStep:n,goToPopupProgramSelect:p,gotToPopupPiiConfirmation:f,goToPopupAdditionalQuestions:m,goToPopupExitStrategy:h,goToPopupSubmission:g}})({recommendedResults:k,spotlightResults:N,productClickedCorrelationId:eb}),eL=(0,v.useCallback)(t=>{eh(t);let r=pR(t,e?.schoolIds);r?window.open(r,"_blank","noopener,noreferrer"):eT()},[eT,eh]),eF=(0,v.useCallback)(e=>{e&&(eu(t=>t.some(t=>t.programId===e.programId)?t:[...t,{programId:e.programId,schoolId:e.schoolId}]),et(t=>t.some(t=>t.program.id===e.programId)?t:[...t,{program:{id:e.programId,name:e.programName},school:{name:e.schoolName,slug:e.schoolSlug},applicationCtaLabel:e.applicationCtaLabel,applicationCtaUrl:e.applicationCtaURL}]))},[]),eU=(0,v.useCallback)(async()=>{try{ec(l8.SUBMITTING);let{hasQuestions:e}=await eI();e?(ec(l8.PENDING),eO()):(ec(l8.SUBMITTING),eR(),await new Promise(e=>setTimeout(e,1e3)),eF(x),ec(l8.SUBMITTED),await new Promise(e=>setTimeout(e,1500)),ec(void 0),eP())}catch(e){console.error("Error submitting lead:",e),ec(ds(e))}},[x,eI,eO,eP,eR,eF]),{showSlideoutExperience:e$,closeSlideoutExperience:e_,openSlideoutExperience:eD,singleSubmissionExperienceStep:eY,goToSlideoutPiiConfirmation:eB,goToSlideoutAdditionalQuestions:ez,goToSlideoutExitStrategy:eV}=c4({productClickedCorrelationId:eb}),eH=(0,v.useCallback)(()=>{e_()},[e_]),eq=(0,v.useCallback)((t,r=!1)=>{if(ed.some(e=>e.programId===t.programId)){eh(t),eg(),eD(),eV();return}if(!r&&ed.some(e=>e.schoolId===t.schoolId)){eo(t),en(!0);return}eh(t);let n=pR(t,e?.schoolIds);n?window.open(n,"_blank","noopener,noreferrer"):(eB(),eD())},[eD,eh,eg,ed,eB,eV]),eG=(0,v.useCallback)(async()=>{try{ec(l8.SUBMITTING);let{hasQuestions:e}=await eI();e?(ec(l8.PENDING),ez()):(ec(l8.SUBMITTING),await new Promise(e=>setTimeout(e,1e3)),eF(x),ec(l8.SUBMITTED),await new Promise(e=>setTimeout(e,1500)),ec(void 0),eV())}catch(e){console.error("Error submitting lead:",e),ec(ds(e))}},[x,eI,ez,eV,eF]),eW=(0,v.useCallback)(async e=>{try{ec(l8.SUBMITTING),await eC(e),eF(x),ec(l8.SUBMITTED),await new Promise(e=>setTimeout(e,1500)),ec(void 0),e$&&eV(),ej&&eP()}catch(e){console.error("Error submitting lead with additional data:",e),ec(ds(e))}},[eC,e$,ej,eV,eP,eF,x]),{correlationId:eQ}=aS();(0,v.useEffect)(()=>{eQ&&(o({correlationId:eQ,elementType:U.PAGE,name:U.PAGE,location:U.PAGE}),a({correlationId:eQ,elementType:U.PAGE,name:U.PAGE,location:U.PAGE}))},[]);let eK=(0,v.useCallback)(e=>{let t=[...k,...S,...C,...N].find(t=>t.programId===e.program.id);t&&(eh(t),eg(),eD(),eV())},[k,S,C,N,eh,eg,eD,eV]),eJ=(0,v.useCallback)(e=>{eh(e),eg(),eD(),eV()},[eh,eg,eD,eV]),eX=(0,v.useCallback)(()=>{en(!1),eo(null)},[]),eZ=(0,v.useCallback)(()=>
1{if(!ei)return void eX();let e=ed.find(e=>e.schoolId===ei.schoolId),t=e?.programId,r=[...k,...S,...C,...N].find(e=>e.programId===t);eX(),r&&eJ(r)},[eX,ei,S,eJ,k,C,N,ed]),e0={showSlideoutExperience:e$,closeSlideoutExperience:eH,openProgramSlideoutExperience:eq,onNextStepsClick:eJ,singleSubmissionExperienceStep:eY,onSlideoutProgramSubmit:eG,goToSlideoutPiiConfirmation:eB,goToSlideoutExitStrategy:eV,popupExperienceStep:eN,onPopupProgramClick:eL,showRecommender:eA,showSpotlight:eE,showPopupExperience:ej,closePopupExperience:ek,onPopupProgramSubmit:eU,goToPopupProgramSelect:eM,resultsAreLoading:O,exactResults:S,relatedResults:C,recommendedResults:k,spotlightResults:N,selectedResult:x,subject:d,category:c,firstName:D,lastName:B,email:V,phone:q,setFirstName:Y,setLastName:z,setEmail:H,setPhone:G,setFormErrors:()=>{},formErrors:[],setEditMode:Q,editMode:W,piiLeadErrors:[],setPiiLeadErrors:()=>{},...{startTime:parseInt(l?.startDate)},canSubmitLead:ey,isHeclidLoading:!1,leadSubmissionStatus:es,setLeadSubmissionStatus:ec,showAdditionalQuestions:ex,additionalQuestions:ew,isLoadingQuestions:eS,onAdditionalQuestionsSubmit:eW,lead:J,submittedPrograms:ee,submittedResults:ed,onViewNextSteps:eK,partnerIdentifiers:ep,title:t,subtitle:r};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(pM,{...e0}),er&&(0,b.jsx)(sn,{result:ei,otherPrograms:ea,isLoading:el,onClose:eX,onViewNextSteps:eZ})]})};function pF(e){if(e.dslConfigId)return e.resultType&&console.warn(`[Results] Step "${e.id??"unknown"}" has both resultType "${e.resultType}" and dslConfigId "${e.dslConfigId}"; routing through DSL. Payloads should declare exactly one.`),(0,b.jsx)(uk,{dslConfig:e.dslConfig,flowType:e.flowType,trafficSource:e.trafficSource},e.dslConfigId??e.id??"configurable-result");switch(e.resultType){case A.CUSTOM_RESULTS_PAGE:return(0,b.jsx)("h1",{children:"Custom Results Page"});case A.OFFERINGS:return(0,b.jsx)(ph,{});default:return(0,b.jsx)(pL,{variant:e.variant,title:e.title,subtitle:e.subtitle})}}let pU={[lJ.INFO]:"info",[lJ.WARNING]:"triangle-alert"},p$={[lJ.INFO]:{container:"border-info-500 bg-info-100",icon:"text-info-500"},[lJ.WARNING]:{container:"border-warning-500 bg-warning-100",icon:"text-warning-500"}},p_=({title:e,message:t,icon:r,flowState:n,eventContext:i})=>{let o=n?((e,t)=>{if(!e||!t)return e;let{degree:r,subject:n,category:i,career:o}={degree:rv("degree",t)||"",subject:rv("subject",t)||"",category:rv("category",t)||"",career:rv("career",t)||""};return e.replace(/\{\{degree\}\}/gi,r).replace(/\{\{subject\}\}/gi,n).replace(/\{\{category\}\}/gi,i).replace(/\{\{career\}\}/gi,o)})(t,n):t,{ref:a}=su(i?[{name:"ElementViewed",payload:{correlationId:i.elementLoadedCorrelationId,webElement:{elementType:"dexp-flow-banner",htmlId:"info-banner",name:e||"info-banner",location:i.placement||"",text:o||""}}}]:[]),l=pU[r]??pU[lJ.INFO],s=p$[r]??p$[lJ.INFO];return(0,b.jsxs)(aI.Flex,{ref:a,className:`w-full rounded-md border px-4 py-3 gap-3 mb-6 ${s.container}`,align:"center",children:[(0,b.jsx)("div",{className:`shrink-0 w-5 h-5 ${s.icon}`,children:(0,b.jsx)(aI.Icon,{icon:l,size:"sm","aria-hidden":!0})}),(0,b.jsxs)("div",{className:"flex flex-col gap-1 text-left",children:[e&&(0,b.jsx)(aI.Text,{variant:"l1",color:"heading",weight:"semibold",children:e}),o&&(0,b.jsx)(aI.Text,{variant:"l1",color:"subtext",children:k(o)})]})]})},pD=({componentProps:e,onResult:t})=>{let{currentStep:r,currentStepType:n,currentStepIndex:i}=aS(),o=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(!r)return;let e=Date.now(),t=o.current;o.current=e;let a=r.flowId??"unknown",l=n??"unknown";r7("addPageAction",["deStepView",r9({flowId:a,stepId:r.id??"unknown",stepType:l,stepIndex:i??-1,componentType:uM(l,r)??"none",...null!==t&&{msSincePreviousStep:e-t}})]);var s=`DE/${a}/${l}`;let c=r8("interaction",[s]);if(c)try{let e=c.interaction?.();e?.setName?.(s)?.save?.()}catch(e){console.error("New Relic Action Error: interaction",s,e)}},[r?.id,n]);let a=r?.dslConfigId,l=r?.id??"__no-step__";return(0,b.jsx)(lU,{dslConfigId:a,children:(0,b.jsx)(pY,{componentProps:e,onResult:t})},l)},pY=({componentProps:e,onResult:t})=>{let r=(0,v.useRef)(null),{steps:n,currentStep:i,currentStepType:o,navigationHistory:a,isFullPageExp:l,styleVariant:s,handlePrevious:c,handleStepForward:d,buttonText:u,getStepMetadataById:p,validationErrors:f,eventContext:m,flowState:h}=aS(),g=l_(),y=g?.setEntryRootNode,x=a.length>1,w=i?.id,S=(0,v.useMemo)(()=>rg(h),[h]),I=i?.id?p(i.id):void 0,{visibleInfoBanners:C}=(({currentStep:e,currentStepData:t,allSelectedOptions:r})=>({visibleInfoBanners:(0,v.useMemo)(()=>
1{if(!e||e.type!==O.QUESTION&&e.type!==O.MULTI_QUESTION)return[];let n=[];return(e.type===O.MULTI_QUESTION?e.stepQuestions&&e.stepQuestions.forEach(e=>{e.infoBannerConfigs&&e.infoBannerConfigs.forEach(e=>{n.push(e)})}):e.infoBannerConfigs&&e.infoBannerConfigs.forEach(e=>{n.push(e)}),0===n.length)?[]:(({configs:e,selectedOptions:t,stepData:r})=>{if(0===e.length)return[];let n=e.filter(e=>!e.condition||e.condition.type===M.DEFAULT),i=e.filter(e=>e.condition&&e.condition.type!==M.DEFAULT).filter(e=>!!e.condition&&0!==t.length&&rm({type:R.NEXT_STEP,nextId:"",condition:e.condition},r??{},t));return i.length>0?i:n.length>0?n.slice(0,1):[]})({configs:n,selectedOptions:r.filter(t=>{if(e.type===O.MULTI_QUESTION){if(e.stepQuestions)return e.stepQuestions.some(e=>e.options?.some(e=>e.optionId===t.optionId))}else if(e.type===O.QUESTION&&(e.options?.some(e=>e.optionId===t.optionId)||t.leadFieldAssociated&&t.leadFieldAssociated===e.leadFieldAssociated))return!0;return!1}),stepData:t})},[e,t,r])}))({currentStep:i,currentStepData:I,allSelectedOptions:S}),j=C.some(e=>e.config),k=(0,v.useRef)(t);if((0,v.useEffect)(()=>{k.current=t}),(0,v.useEffect)(()=>{o!==O.RESULT||!i||k.current&&k.current(i,{flowState:h,steps:n})},[o,i?.id]),(0,v.useEffect)(()=>{l&&w&&window.scrollTo({top:0,behavior:"smooth"})},[w,l]),(0,v.useEffect)(()=>{if(!i||o!==O.COMPONENT&&o!==O.DCS&&o!==O.BANNER_CTA)return;let e=uM(o,i),t=i.dslConfigId;e||t||ne(Error("Step rendered nothing: no componentType or dslConfigId"),{source:"Experience",stepType:o,stepId:i.id??"unknown",flowId:i.flowId??"unknown",configKeys:Object.keys(i).sort().join(",")})},[w,o]),!i)return null;if(o===O.COMPONENT||o===O.DCS||o===O.BANNER_CTA){let t=uM(o,i),r=i.dslConfigId;if(!t&&!r)return null;let n=o!==O.COMPONENT;return(0,b.jsx)("div",{className:"de-dynamic-experience col-span-full w-full","data-step-type":o,ref:n?y:void 0,children:(0,b.jsx)(uP,{componentType:t??"",currentStep:i,componentProps:e})})}if(o===O.RESULT)return t?null:(0,b.jsx)(aI.Flex,{direction:"column",className:"flex-1",children:(0,b.jsx)(pF,{...i})});let E=i?.required??!1,A=f.length>0,N=o===O.MULTI_QUESTION?!i.stepQuestions||pe(i.stepQuestions,p).every(e=>!e.required||pu(p(e.id),A)):o!==O.QUESTION||pu(p(i.id||""),A),T=l&&uD(i).length>0;return(0,b.jsxs)("div",{className:`de-experience bg-white flex flex-col md:flex-row w-full md:justify-start md:items-stretch ${T?"gap-6 md:gap-section-break":"gap-section-break"} ${l?"":"px-4 lg:px-16 pt-8 md:pt-14 pb-14 md:pb-28"}`,ref:y,children:[(0,b.jsx)(uF,{contentRef:r,children:(0,b.jsxs)(aI.Flex,{direction:"column",gap:"md",className:`de-question-container md:gap-lg ${l?"":"p-4"} ${"alt"===s?"de-alt-variant":""}`,ref:r,children:[(0,b.jsx)(uz,{step:i,isFullPageExp:l}),(0,b.jsx)(uV,{step:i,isFullPageExp:l}),(0,b.jsx)(uH,{step:i}),(0,b.jsx)(pd,{step:i,stepType:o}),j&&(0,b.jsx)("div",{className:"flex flex-col gap-3",children:C.map(e=>e.config?(0,b.jsx)(p_,{...e.config,flowState:h,eventContext:m},e.id):null)}),(0,b.jsx)(uB,{onBack:c,onNext:d,nextLabel:u,showBack:x,isFullPageExp:l,disabled:E&&!N})]})}),T&&(0,b.jsx)(uY,{})]})},pB={desktop:300,mobile:630},pz={desktop:400,mobile:400};function pV(e,t){return{desktop:e?.desktop??t.desktop,mobile:e?.mobile??t.mobile}}let pH=({placementId:e,children:t,needsPlaceholder:r=!0,contentLoaded:n=!1,scoped:i=!1,portalContainer:o})=>{let a=ro(),{desktop:l,mobile:s}=(0,v.useMemo)(()=>(function(e,t){if(!e)return pB;let r=t?.multitenant,n=r?.slotPlacement?.[e]?.defaultMinHeight;if(n?.desktop!=null||n?.mobile!=null)return pV(n,pB);let i=r?.layout?.slotPlacementMinHeight;return i?.desktop!=null||i?.mobile!=null?pV(i,pB):"belowTheFold"===e?pz:pB})(e,a?.configs),[e,a?.configs]),[c,d]=(0,v.useState)(null),u=i?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{ref:d,"data-de-portal":!0}),(0,b.jsx)(aI.PortalContainerProvider,{value:o??c,children:t})]}):t;return(0,b.jsx)("div",{"data-de":!0,"data-placement-id":e,className:r?n?"col-span-full w-full":"col-span-full w-full min-h-[--placement-min-mobile] md:min-h-[--placement-min-desktop]":"",style:{"--placement-min-mobile":`${s}px`,"--placement-min-desktop":`${l}px`},children:u})},pq={aboveTheFold:"personalized-dcs-v2-dsl",belowTheFold:"editorial-listings-only-dsl"},pG=Object.keys(te),pW=({placement:e="",forcedFlowId:t="",experienceType:r,jumpToStepId:n="",entryStepId:i="",fromStepIndex:o=1,dcs:a,forwardedContext:l,schoolId:s,headline:c,params:d,isFullPageExp:u=!1,styleVariant:p="default",debugResult:f=!1,needsPlaceholder:m=!0,awaitingFlowId:h=!1,componentProps:g,environment:y="prod",tenantId:x,tenant:w,siteConfigs:S,customDimensions:I,onError:C,onFallbackShouldRender:j,slotName:k,slotVariant:A,experienceName:N,scoped:T=!1,portalContainer:O,onResult:P,taxonomySeed:M,initialSteps:R})=>{let L=(0,v.useMemo)(()=>({api:{...rt(y),leadApiBaseUrl:function(e,{affiliate:t=!1}={}){return t7(e,t)}(y,{affiliate:!!w.affiliate}),locationInferenceApiUrl:function(e,{affiliate:t=!1}={}){return t7(e,t)}(y,{affiliate:!!w.affiliate})},tenantId:x,tracking:{dynamicFlowEventFlag:!1,tagularSourceKey:w.tagularSourceKey},site:{tenantId:x,domain:w.domain,displayName:w.displayName,affiliate:w.affiliate,appExperienceUrl:w.appExperienceUrl,identityToken:w.identityToken,tagularSourceKey:w.tagularSourceKey,tagularApiKey:w.tagularApiKey,c
1onfigs:S}}),[y,x,w,S]),[F,U]=(0,v.useState)(R??null),[$,_]=(0,v.useState)(M),[D]=(0,v.useState)(null),[Y,B]=(0,v.useState)(null),[z,V]=(0,v.useState)(!R),[H]=(0,v.useState)(()=>E()),[q]=(0,v.useState)(()=>E());return((0,v.useEffect)(()=>{if(R||h)return;let n=!1;return(async()=>{var i;V(!0),B(null);let o=L.site?.tagularSourceKey,l=(i=L.tenantId,o?.trim()||i?.trim()||"default"),s=t||(e?pq[e]??`default-${e}`:"default");try{o||console.warn(`[DynamicExperience] Missing tenant.tagularSourceKey; falling back to "${l}" for flow resolution. The tenant-scoped flow will not load â verify the tenant config exposes cohesion.tagular.sourceKey.`),t||L.tracking?.tagularSourceKey,nt("flowId",s),r&&nt("experienceType",r);let e=await en(l,s);if(e.error)throw Error(e.error);if(e.data){let t=e.data,r=M,i=nR(a,nM(t));if(void 0===M&&L.api.offeringsServiceBaseUrl&&function(e,t){if(!t)return!1;let r=e.find(e=>!0===e.isEntry)??e[0],n=r?.dslConfig;if(n?.type!=="entry")return!1;let i=eN(n.data?.content);return pG.some(e=>!!t[e]&&!i[e]?.source)}(t,i))try{r=await tn(L.api.offeringsServiceBaseUrl,{scope:"dcs"})}catch{r=[]}if(n)return;_(r),U(t)}}catch(t){if(n)return;let e=t instanceof Error?t:Error("Failed to fetch flow data");B(e),ne(e,{source:"DynamicExperience",phase:"fetchFlow",flowId:s??"unresolved",tenantId:l}),console.error("Error fetching dynamic experience data:",e),C?.(e)}finally{n||V(!1)}})(),()=>{n=!0}},[R,h,t,r,e,L.tenantId,L.tracking?.tagularSourceKey,L.api.offeringsServiceBaseUrl,a?.degree,a?.category,a?.subject,M,C]),Y)?j?.({reason:"no-flow"})??null:h||z||!F||0===F.length?(0,b.jsx)(rn,{config:L,children:(0,b.jsx)(pH,{placementId:e,needsPlaceholder:m,scoped:T,portalContainer:O,children:(0,b.jsx)(b.Fragment,{})})}):(0,b.jsx)(rn,{config:L,children:(0,b.jsx)(ta,{seed:$,children:(0,b.jsx)(aw,{steps:F,correlationId:H,placementId:e,jumpToStepId:n,dcs:a,forwardedContext:l,schoolId:s,headline:c,params:d,entryStepId:i,isFullPageExp:u,audienceIntent:D,styleVariant:p,fromStepIndex:o,elementLoadedCorrelationId:q,debugResult:f,customDimensions:I,slotName:k,slotVariant:A,experienceName:N,children:(0,b.jsx)(pH,{needsPlaceholder:m,placementId:e,scoped:T,portalContainer:O,contentLoaded:!0,children:(0,b.jsx)(pD,{componentProps:g,onResult:P})})})})})},pQ=new Map,pK=/^(\d{4})(80)$/,pJ=/^Fall (\d{4})$/,pX=/^F(\d{2})$/;var pZ={id:"term",parse(e){let t=function(e){if("string"!=typeof e||0===e.length)return null;let t=pX.exec(e);if(t)return`Fall 20${t[1]}`;if(pJ.test(e))return e;let r=pK.exec(e);return r?`Fall ${r[1]}`:null}(e);if(!t)return null;let r=pJ.exec(t);if(r)return{year:Number(r[1]),season:"Fall"};let n=pK.exec(t);return n?{year:Number(n[1]),season:"Fall"}:null},step:(e,t)=>Number.isInteger(t)?{year:e.year+t,season:"Fall"}:null,format:e=>`${e.season} ${e.year}`,anchors(e){return function(e,t){let r=e.parse(t);if(null===r)return null;let n=e.step(r,-1);if(null===n)return null;let i=e.step(n,-1);return null===i?null:{self:e.format(r),prior:e.format(n),priorPrior:e.format(i)}}(this,e)}};if(pQ.has(pZ.id))throw Error(`OrderedSequence "${pZ.id}" is already registered`);pQ.set(pZ.id,pZ)},65324:()=>{}}]); 2//# sourceMappingURL=6605-86d5dc1be958edbc.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.