1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4757],{14757:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(54568),r=n(7620),o=n(48442),i=n(21524),s=n(74952),l=n(65083),u=n(60628),d=n(80013);let{component:m}=(0,o.T)("sn-deposit-calculator-component");function c({name:e,disabled:t,texts:n,state:o,prefix:f,onCalculate:p,className:g}){let v=n.savingsGoal?.label,h=n.depositDuration?.label,b=n.monthlyDeposit?.label;if(!v&&!h)throw Error("Deposit Calculator is missing texts for either savings goal or deposit duration");if(v&&h)throw Error("Deposit Calculator can't have both savings goal and deposit duration");let{formats:x}=(0,d.A)(),D=e=>(0,u.g)(o?.[e],n[e]?.range,n[e]?.defaultValue),[y,A]=(0,r.useState)(D("depositAmount")),[E,C]=(0,r.useState)(D("monthlyDeposit")),[S,V]=(0,r.useState)(h?D("depositDuration"):void 0),[j,k]=(0,r.useState)(v?D("savingsGoal"):void 0);(0,r.useEffect)(()=>{A(D("depositAmount"))},[o?.depositAmount]),(0,r.useEffect)(()=>{C(b?D("monthlyDeposit"):void 0)},[o?.monthlyDeposit]),(0,r.useEffect)(()=>{V(h?D("depositDuration"):void 0)},[o?.depositDuration]),(0,r.useEffect)(()=>{k(v?D("savingsGoal"):void 0)},[o?.savingsGoal]),(0,r.useEffect)(()=>{if((S||j)&&p){let e=n.isDurationInMonths;return Promise.delay(100).then(()=>{p(y??0,E,S?e?S:12*S:void 0,j)}).cancel}},[y,S,E,j]);let w=n.depositAmount.range.min<n.depositAmount.range.max?n.depositAmount.range:{min:n.depositAmount.range.min,max:n.depositAmount.range.min+1e-5},R=n.monthlyDeposit&&b?n.monthlyDeposit.range.min<n.monthlyDeposit.range.max?n.monthlyDeposit.range:{min:n.monthlyDeposit.range.min,max:n.monthlyDeposit.range.min+1e-5}:void 0,N=n.depositDuration&&h?n.depositDuration.range.min<n.depositDuration.range.max?n.depositDuration.range:{min:n.depositDuration.range.min,max:n.depositDuration.range.min+1}:void 0,G=(0,r.useMemo)(()=>{if(!n.savingsGoal||!v)return;let e={...n.savingsGoal.range};return e.min=Math.max(e.min,y??0),e.min>=e.max&&(e.max=e.min+1e-5),e},[y,v,n.savingsGoal]);return(0,a.jsxs)(i.A,{name:e,className:m(g),noPadding:!0,children:[(0,a.jsx)(s.A,{disabled:t??n.depositAmount.range.min>=n.depositAmount.range.max,prefix:f,name:l.L.DepositAmount,value:y,texts:{...n.depositAmount,format:{...x.money,...n.depositAmount.format},range:w},onValueChange:A,customValueChangeMode:"blur",allowCustomValue:!0}),v&&n.savingsGoal&&G&&(0,a.jsx)(s.A,{disabled:t??n.savingsGoal.range.min>=n.savingsGoal.range.max,prefix:f,name:l.L.SavingsGoal,value:j,texts:{...n.savingsGoal,format:{...x.money,...n.savingsGoal.format},range:G},onValueChange:k,customValueChangeMode:"blur",allowCustomValue:!0}),b&&n.monthlyDeposit&&R&&(0,a.jsx)(s.A,{disabled:t??n.monthlyDeposit.range.min>=n.monthlyDeposit.range.max,prefix:f,name:l.L.MonthlyDeposit,value:E,texts:{...n.monthlyDeposit,format:{...x.money,...n.monthlyDeposit.format},range:R},onValueChange:C,customValueChangeMode:"blur",allowCustomValue:!0}),h&&n.depositDuration&&N&&(0,a.jsx)(s.A,{disabled:t??n.depositDuration.range.min==n.depositDuration.range.max,prefix:f,name:l.L.DepositDuration,value:S,texts:{...n.depositDuration,format:{...x.integer,...n.depositDuration.format},range:N},onValueChange:V,customValueChangeMode:"blur",allowCustomValue:!0})]})}},74952:(e,t,n)=>{n.d(t,{A:()=>y});var a=n(54568),r=n(38247),o=n(7620),i=n(48442),s=n(5697),l=n(48533),u=n(86353),d=n(32528),m=n(45997);let c=({animate:e,behaviour:t="tap",clickablePips:n,connect:r,direction:i,disabled:s,keyboardSupport:l,padding:u,snap:d,orientation:c,tooltips:f,...p})=>{let g=(0,o.useRef)(null),v=()=>(g.current||{}).noUiSlider;(0,o.useEffect)(()=>{let{instanceRef:e}=p,t=e&&Object.prototype.hasOwnProperty.call(e,"current");return e&&e instanceof Function&&e(g.current),t&&(e.current=g.current),()=>{t&&(e.current=null)}},[g]);let h=e=>{let t=e.currentTarget;if(!(t instanceof HTMLElement))return;let n=Number(t.getAttribute("data-value")),a=v();a&&a.set(n)},b=e=>{let t=g.current;t&&(e?t.setAttribute("disabled","true"):t.removeAttribute("disabled"))},{onUpdate:x,onChange:D,onSlide:y,onStart:A,onEnd:E,onSet:C}=p,S=e=>{A&&(e.off("start"),e.on("start",A)),y&&(e.off("slide"),e.on("slide",y)),x&&(e.off("update"),e.on("update",x)),D&&(e.off("change"),e.on("change",D)),C&&(e.off("set"),e.on("set",C)),E&&(e.off("end"),e.on("end",E))},V=()=>
1{if(n){let e=g.current;[...e?.querySelectorAll(".noUi-value")??[]].forEach(e=>{e.style.cursor="pointer",e.addEventListener("click",h)})}};(0,o.useEffect)(()=>{let a=g.current;return a&&(b(s),S(m.Ay.create(g.current,{animate:e,behaviour:t,clickablePips:n,connect:r,direction:i,disabled:s,keyboardSupport:l,padding:u,snap:d,orientation:c,tooltips:f,...p})),V(),a=g.current),()=>{let e=v()??a?.noUiSlider;e&&e.destroy(),a&&[...a.querySelectorAll(".noUi-value")].forEach(e=>{e.removeEventListener("click",h)})}},[]);let{start:j,range:k,step:w,margin:R,limit:N,pips:G}=p;(0,o.useEffect)(()=>{let t=v();t&&(t.updateOptions({range:k,step:w,padding:u,margin:R,limit:N,pips:G,snap:d,animate:e}),t.set(j),V()),b(s)},[j,s,k,w,R,u,N,G,d,e]),(0,o.useEffect)(()=>{let e=v();e&&S(e)},[x,D,y,A,E,C]);let{id:M,className:L,style:I}=p;return(0,a.jsx)("div",{id:M,className:L,ref:g,style:I})};var f=n(48024);let{component:p,element:g}=(0,i.T)("sn-slider"),v=(0,o.forwardRef)(function({id:e,name:t,value:n=0,step:r,range:i,format:l,disabled:u,pipMarks:d,onSlide:m,onChange:v,onFocus:h,onBlur:b},x){let D=(0,o.useRef)(null),[y,A]=(0,o.useState)(s.sH.getValueInRange(n,i)),E=(0,o.useRef)(null),C=(0,o.useRef)(null),S=e=>{C.current?.focus(),h?.(e)},V=(0,o.useMemo)(()=>l&&{mode:"positions",values:[0,100],format:{to:e=>s.sH.format(e,l)}},[l]),[j]=(0,f.A)(D,S),[k,w]=(0,f.z)(D,S,b);return(0,o.useEffect)(()=>{let e=E.current?.noUiSlider,t=s.sH.getValueInRange(n,i);e&&e.updateOptions({start:t,range:i}),n!==t&&v?.(t,!0),A(t)},[n,i]),(0,o.useEffect)(()=>{let e=E.current?.noUiSlider;if(e)return e.on("change",e=>{let t=parseInt(e[0]);y!==t&&(A(t),v?.(t))}),()=>e.off("change")},[v,y]),(0,o.useEffect)(()=>{let e=E.current?.noUiSlider;if(e)return e.on("slide",e=>{m?.(parseInt(e[0]))}),()=>e.off("slide")},[m]),(0,o.useEffect)(()=>{C.current=E.current?.querySelector(".noUi-handle")??null},[E]),(0,o.useEffect)(()=>(C.current?.addEventListener("focus",k),C.current?.addEventListener("blur",w),t&&C.current?.setAttribute("aria-labelledby",`${e??t}-label`),()=>{C.current?.removeEventListener("focus",k),C.current?.removeEventListener("blur",w)})),(0,a.jsx)("div",{ref:x,className:p("",{"no-pip-marks":!d}),"data-component":"Slider","data-id":t,tabIndex:-1,onFocus:j,children:(0,a.jsx)(c,{animate:!0,range:i,start:y,className:g("slider"),connect:[!0,!1],step:r,pips:V,disabled:u,instanceRef:E})})});v.displayName="Slider";var h=n(81892);let{component:b,element:x}=(0,i.T)("sn-numeric-slider"),D=(0,o.forwardRef)(function({id:e,name:t,label:n,sublabel:r,help:i,message:m,valid:c,value:f,step:p,range:g,format:D,disabled:y,pipMarks:A,allowCustomValue:E,customValueChangeMode:C="change",className:S,onValueChange:V,onFocus:j,onBlur:k,...w},R){let N,G,M=(0,o.useMemo)(()=>(g.max+g.min)/2,[g]),L=(0,o.useRef)(!0),[I,U]=(0,o.useState)(f),[H,F]=(0,o.useState)(f??M),q=(0,o.useRef)(null),O=(0,o.useRef)(null),P=(0,o.useMemo)(()=>({...D,...D?.slider}),[D]);(0,o.useEffect)(()=>(L.current=!0,()=>{L.current=!1}),[]);(0,o.useEffect)(()=>{E&&O?.current===document.activeElement||U(f),F(f??M)},[f,M,E,O]);let T=e??t;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(d.A,{label:n,sublabel:r,help:i,message:m,valid:c,className:b(S),disabled:y,"data-component":"NumericSlider",id:e,name:t,"data-id":t,rightLabel:(N={...D,...D?.value},G=s.sH.isNumeric(I)?s.sH.format(I,N):"",E?(0,a.jsx)(h.A,{ref:O,className:x("numeric-input"),disabled:y,value:I,format:N,onValueChange:e=>{if(!L.current||e===I)return;let t=s.sH.getValueInRange(e??g.min,g);U(e),"change"===C&&(t!==H&&F(t),t!==f&&V?.(t,{validate:!0}))},onBlur:()=>{let e=s.sH.getValueInRange(I??g.min,g);e!==I&&U(e),"change"!==C&&(e!=H&&F(e),e!=f&&V?.(e,{validate:!0}))},onClick:e=>e.stopPropagation(),onKeyDown:e=>{let t=e.key||e.code,n=e.target,a=p||1,r=I?I%a:0;switch(t){case"ArrowUp":I&&U(I-r+a);break;case"ArrowDown":I&&U(I-(0===r?a:r));break;case"Enter":n.blur();break;case"Escape":U(H)}},id:T+"-numeric-input",name:t+"-numeric-input",min:g.min,max:g.max,valid:c,"aria-labelledby":`${T}-label`,hideCheckmark:!0,clampRange:!0}):(0,a.jsx)("span",{id:T,children:G})),labelFor:E?T+"-numeric-input":T,onClick:e=>{q?.current&&(e.preventDefault(),q?.current.focus())},onFocusInside:j,onBlurOutside:k,...(0,u.r8)(w),children:(0,a.jsx)(v,{...(0,u.Qf)(w),ref:(0,l.P)(R,q),id:e,name:t,disabled:y,step:p,value:H,range:g,format:P,pipMarks:A,onSlide:e=>
1{L.current&&(U(e),H===e&&H!==f&&V?.(e,{validate:!0,touched:!0}))},onChange:(e,t)=>{L.current&&(void 0===f&&t||V?.(e,{validate:!0,touched:!0}))}})})})});function y({name:e,texts:t,prefix:n,dependentFields:o,required:i,valid:s,validate:l,value:u,...d}){return(0,a.jsx)(r.A,{required:i&&(t.errors?.required??!0),dependentFields:o,valid:s,validate:{min:e=>void 0!=e&&e>=t.range.min||(t.errors?.min??!1),max:e=>void 0!=e&&e<=t.range.max||(t.errors?.max??!1),...l},children:(0,a.jsx)(D,{label:t.label,sublabel:t.sublabel,help:t.help,range:t.range,step:t.step,name:`${n?n+".":""}${e}`,"data-name":e,format:t.format,value:u,...d})})}D.displayName="NumericSlider"}}]);
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.