1import{r as f,j as o,bj as v,B as I,R as u,m as h,h as b,cw as R}from"./redirect-95747236.js";import{e as w,s as n,bz as x,dl as E,T as N}from"./dynamic_import-2e51ff91.js";import{o as a,d as T}from"./external_accounts_actions-749370e7.js";import{a as c,t as k}from"./transfer_flow-c3084031.js";import"./_sentry-release-injection-file-3f4e48d2.js";import{M}from"./modal-3ad65990.js";import{S as j}from"./signup_flow_button-5b92d3bc.js";import"./errors-42ecb38f.js";import"./loading-8c1cb0b6.js";import"./announcements-ff61cc20.js";import"./http_client-be792547.js";import"./wealthfront_accounts_actions-593e0302.js";import"./rails_client-70421323.js";import"./wealthfront_accounts_http_client-6b602a86.js";import"./navigation-763ae5c9.js";import"./global_wrapper-0db86085.js";import"./requirement_helpers-31123303.js";import"./linkedin_pixel_tracking-9d535a5c.js";import"./index-f8ca169a.js";import"./wf_app_router-b5174f1d.js";import"./___vite-browser-external_commonjs-proxy-a20f1868.js";import"./users_actions-86d2a2f1.js";import"./growth_tracker-d39f2a4d.js";import"./react_lazy_retry-0186b7b8.js";import"./voyager-navigate-ce5f38f6.js";import"./use_stock_investing_eligibility-d4255701.js";import"./stock_investing_experiment_helper-c93a964a.js";import"./index-9c62a712.js";import"./component_stub-7302b9e1.js";import"./router_root_builder-39a4d445.js";import"./index-e9249ee8.js";import"./plan-eddbce22.js";import"./PortalWithState-faff521d.js";import"./PortalCompat-d3d8abd7.js";import"./with_custom_error_boundary-dc881fa9.js";import"./CSSTransition-cde470e5.js";try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f945df6f-87c0-4244-823c-37d818b4a7c5",t._sentryDebugIdIdentifier="sentry-dbid-f945df6f-87c0-4244-823c-37d818b4a7c5")}catch{}{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t._sentryModuleMetadata=t._sentryModuleMetadata||{},t._sentryModuleMetadata[new t.Error().stack]=Object.assign({},t._sentryModuleMetadata[new t.Error().stack],{"_sentryBundlerPluginAppKey:sentry-wealthfront-sfe":!0})}class A extends f.Component{componentDidMount(){c.trackImpressionEvent("transfer-college-success-modal","transfer-college-success-modal")}render(){return o.jsx(M,{flex:!0,closeOnEsc:!1,closeButton:!1,closeOnBackdropClick:!1,onClose:this.props.onClose,ariaLabelId:"flows-transfer-college-plan-modal-component-header",children:o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"margin--bottom",children:o.jsx("div",{className:"image-size-5 img-email"})}),o.jsx("div",{className:v("h4 strong","flows-transfer-college-plan-modal-component-paragraph-wrapper"),id:"flows-transfer-college-plan-modal-component-header",children:"Weâve emailed you a partially prefilled form for your 529 Plan rollover."}),o.jsx("div",{className:"padding--top",children:o.jsx(I,{as:"button",onClick:this.props.onClose,variant:"primary",children:"Go to dashboard"})})]})})}}const m=k.stepTrackingNames.transferCollegePlan,g=class d extends f.Component{constructor(){super(...arguments),this.state={options:this.props.collegeRolloverInstitutions,modalOpen:!1,isError:!1},this.handlePlanModalClose=()=>{u.goTo(h.buildPath("global"))},this.handleSendEmailClick=async()=>{c.trackSubmitEvent(m,"submit-button",{accountId:this.props.collegeRolloverAccountId,selectedCollegeRolloverInstitution:this.props.selectedCollegeRolloverInstitution}),await this.props.handleEmailFormClick(this.props.collegeRolloverExternalizedAccountId,this.props.selectedCollegeRolloverInstitution),this.setState({modalOpen:!0})},this.handleSubmitClick=async()=>{const{accountRequestId:e,accountRequest:s,handleSubmitClick:l,isReviewing:r,selectedCollegeRolloverInstitution:p}=this.props;c.trackSubmitEvent(m,"submit-button",{accountRequestId:e,selectedCollegeRolloverInstitution:p});try{const{success:i}=await l(e,p);if(!i){this.setState({isError:!0});return}const y=r?null:x.APPLICATION_FUNDING,{nextStep:C}=await T(s,y);return u.goTo(h.buildPath(C,null,{accountRequestId:e}))}catch(i){b(i)}},this.handleTypeaheadInputChange=e=>{this.props.handleInputChange(d._DEFAULT),e.length>0?this.resetOptions(this.props.collegeRolloverInstitutions):this.resetOptions()},this.handleOptionSelect=e=>{this.props.handleInputChange(e.value),this.resetOptions()},this.resetOptions=e=>{this.setState({options:e})},this.isValid=()=>this.props.selectedCollegeRolloverInstitution&&this.props.selectedCollegeRolloverInstitution!==d._DEFAULT&&!this.props.isLoading,this.displayOption=e=>e.displayName,this.filterMethod=(e,s)=>s.displayName.toLowerCase().indexOf(e.toLowerCase())!==-1,this.renderSubmitBtn=()=>{const e=!!this.props.accountRequestId,s=e?"Continue opening my account":"Email form",l=e?this.handleSubmitClick:this.handleSendEmailClick;return o.jsx(j,{as:"button",ref:r=>{this.refSubmitBtn=r},variant:"primary",className:"flows-card-component-btn",disabled:!this.isValid(),onClick:l,children:s})},this.renderSuccessModal=()=>{if(this.state.modalOpen)return o.jsx(A,{onClose:this.handlePlanModalClose})},this.renderTypeahead=()=>o.jsx("div",{className:"flows-transfer-college-plan-component-typeahead-wrapper",children:o.jsx(E,{placeholder:"Search by plan name or state",maxVisibleResults:10,options:this.state.options,filterMethod:this.filterMethod,toTextMethod:this.displayOption,displayMethod:this.displayOption,onOptionSelect:this.handleOptionSelect,onInputChange:this.handleTypeaheadInputChange})}),this.renderOptions=()=>this.props.collegeRolloverInstitutions.map(this.renderInstitutionOption),this.renderInstitutionOption=(e,s)=>o.jsx("option",{value:e.value,className:"flows-transfer-college-plan-component-select-option",children:e.displayName},s)}render(){return o.jsxs("div",{children:[this.renderSuccessModal(),o.jsxs("div",{className:"flows-flex-container",children:[o.jsx("div",{className:"flows-card-component-title",children:"Where is your current 529 Plan?"}),o.jsx("p",{className:"text-medium",children:"To roll over your 529 plan, youâll need to contact your 529 administrator directly (ugh, we know). To make things easier, weâll email you a partially prefilled rollover request form once your account is o
1pen. Just complete and sign the form, then mail it to your 529 administrator."}),this.renderTypeahead(),o.jsx("div",{className:"margin-double--bottom",children:o.jsx(R,{children:"Keep in mind: the IRS only allows one rollover for each beneficiary in a 12-month period."})}),this.state.isError&&o.jsx(N,{})]}),this.renderSubmitBtn()]})}};g._DEFAULT="DEFAULT";let S=g;function O(t){const e=n.transfer.getAccountRequestId(t);return{accountRequestId:e,accountRequest:e?n.accountRequests.getAccountRequest(t,e):null,collegeRolloverAccountId:n.transfer.getCollegeRolloverAccountId(t),collegeRolloverExternalizedAccountId:n.transfer.getCollegeRolloverExternalizedAccountId(t),collegeRolloverInstitutions:n.transfer.getCollegeRolloverInstitutions(t),isLoading:n.transfer.getIsLoading(t),isReviewing:n.transfer.getIsReviewing(t),selectedCollegeRolloverInstitution:n.transfer.getSelectedCollegeRolloverInstitution(t)}}function P(t){return{handleInputChange:e=>{t(a.updateCollegeRolloverInstitution(e))},handleEmailFormClick:(e,s)=>t(a.sendCollegeRolloverEmailForm(e,s)),handleSubmitClick:(e,s)=>t(a.saveAccountRequestRolloverInstitution(e,s))}}const ye=w(O,P)(S);export{ye as default};
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.