PageSourceSearch

https://cymbiose.health/assets/ROICalculator-bhUPfczC.js

js cymbiose.health collected 2026-10-09 22:56:24 UTC 16,718 bytes, 20 lines download raw bytes

1import{a3 as i,a9 as ve,a0 as e,U as H,s as Y,a8 as K,V as be,aa as ye,M as ee,af as we,W as je,ad as Pe,Q as ke,f as X}from"./index-imerjpjS.js";var te=["PageUp","PageDown"],ne=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],se={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},B="Slider",[G,Ne,De]=be(B),[oe]=je(B,[De]),[Me,O]=oe(B),re=i.forwardRef((t,n)=>{const{name:s,min:o=0,max:a=100,step:d=1,orientation:r="horizontal",disabled:c=!1,minStepsBetweenThumbs:m=0,defaultValue:w=[o],value:g,onValueChange:l=()=>{},onValueCommit:u=()=>{},inverted:v=!1,form:b,...S}=t,p=i.useRef(new Set),h=i.useRef(0),k=r==="horizontal"?Re:Ce,[f=[],E]=ve({prop:g,defaultProp:w,onChange:j=>{[...p.current][h.current]?.focus(),l(j)}}),A=i.useRef(f);function $(j){const R=Ve(f,j);D(j,R)}function I(j){D(j,h.current)}function V(){const j=A.current[h.current];f[h.current]!==j&&u(f)}function D(j,R,{commit:L}={commit:!1}){const x=Ke(d),_=Be(Math.round((j-o)/d)*d+o,x),N=ee(_,[o,a]);E((P=[])=>{const y=Ee(P,N,R);if(He(y,m*d)){h.current=y.indexOf(N);const M=String(y)!==String(P);return M&&L&&u(y),M?y:P}else return P})}return e.jsx(Me,{scope:t.__scopeSlider,name:s,disabled:c,min:o,max:a,valueIndexToChangeRef:h,thumbs:p.current,values:f,orientation:r,form:b,children:e.jsx(G.Provider,{scope:t.__scopeSlider,children:e.jsx(G.Slot,{scope:t.__scopeSlider,children:e.jsx(k,{"aria-disabled":c,"data-disabled":c?"":void 0,...S,ref:n,onPointerDown:H(S.onPointerDown,()=>{c||(A.current=f)}),min:o,max:a,inverted:v,onSlideStart:c?void 0:$,onSlideMove:c?void 0:I,onSlideEnd:c?void 0:V,onHomeKeyDown:()=>!c&&D(o,0,{commit:!0}),onEndKeyDown:()=>!c&&D(a,f.length-1,{commit:!0}),onStepKeyDown:({event:j,direction:R})=>{if(!c){const _=te.includes(j.key)||j.shiftKey&&ne.includes(j.key)?10:1,N=h.current,P=f[N],y=d*_*R;D(P+y,N,{commit:!0})}}})})})})});re.displayName=B;var[ae,ie]=oe(B,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Re=i.forwardRef((t,n)=>{const{min:s,max:o,dir:a,inverted:d,onSlideStart:r,onSlideMove:c,onSlideEnd:m,onStepKeyDown:w,...g}=t,[l,u]=i.useState(null),v=K(n,k=>u(k)),b=i.useRef(void 0),S=ye(a),p=S==="ltr",h=p&&!d||!p&&d;function T(k){const f=b.current||l.getBoundingClientRect(),E=[0,f.width],$=J(E,h?[s,o]:[o,s]);return b.current=f,$(k-f.left)}return e.jsx(ae,{scope:t.__scopeSlider,startEdge:h?"left":"right",endEdge:h?"right":"left",direction:h?1:-1,size:"width",children:e.jsx(le,{dir:S,"data-orientation":"horizontal",...g,ref:v,style:{...g.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:k=>{const f=T(k.clientX);r?.(f)},onSlideMove:k=>{const f=T(k.clientX);c?.(f)},onSlideEnd:()=>{b.current=void 0,m?.()},onStepKeyDown:k=>{const E=se[h?"from-left":"from-right"].includes(k.key);w?.({event:k,direction:E?-1:1})}})})}),Ce=i.forwardRef((t,n)=>{const{min:s,max:o,inverted:a,onSlideStart:d,onSlideMove:r,onSlideEnd:c,onStepKeyDown:m,...w}=t,g=i.useRef(null),l=K(n,g),u=i.useRef(void 0),v=!a;function b(S){const p=u.current||g.current.getBoundingClientRect(),h=[0,p.height],k=J(h,v?[o,s]:[s,o]);return u.current=p,k(S-p.top)}return e.jsx(ae,{scope:t.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:e.jsx(le,{"data-orientation":"vertical",...w,ref:l,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:S=>{const p=b(S.clientY);d?.(p)},onSlideMove:S=>{const p=b(S.clientY);r?.(p)},onSlideEnd:()=>{u.current=void 0,c?.()},onStepKeyDown:S=>{const h=se[v?"from-bottom":"from-top"].includes(S.key);m?.({event:S,direction:h?-1:1})}})})}),le=i.forwardRef((t,n)=>{const{__scopeSlider:s,onSlideStart:o,onSlideMove:a,onSlideEnd:d,onHomeKeyDown:r,onEndKeyDown:c,onStepKeyDown:m,...w}=t,g=O(B,s);return e.jsx(Y.span,{...w,ref:n,onKeyDown:H(t.onKeyDown,l=>{l.key==="Home"?(r(l),l.preventDefault()):l.key==="End"?(c(l),l.preventDefault()):te.concat(ne).includes(l.key)&&(m(l),l.preventDefault())}),onPointerDown:H(t.onPointerDown,l=>{const u=l.target;u.setPointerCapture(l.pointerId),l.preventDefault(),g.thumbs.has(u)?u.focus():o(l)}),onPointerMove:H(t.onPointerMove,l=>{l.target.hasPointerCapture(l.pointerId)&&a(l)}),onPointerUp:H(t.onPointerUp,l=>{const u=l.target;u.hasPointerCapture(l.pointerId)&&(u.releasePointerCapture(l.pointerId),d(l))})})}
1),ce="SliderTrack",de=i.forwardRef((t,n)=>{const{__scopeSlider:s,...o}=t,a=O(ce,s);return e.jsx(Y.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...o,ref:n})});de.displayName=ce;var q="SliderRange",ue=i.forwardRef((t,n)=>{const{__scopeSlider:s,...o}=t,a=O(q,s),d=ie(q,s),r=i.useRef(null),c=K(n,r),m=a.values.length,w=a.values.map(u=>xe(u,a.min,a.max)),g=m>1?Math.min(...w):0,l=100-Math.max(...w);return e.jsx(Y.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...o,ref:c,style:{...t.style,[d.startEdge]:g+"%",[d.endEdge]:l+"%"}})});ue.displayName=q;var Q="SliderThumb",me=i.forwardRef((t,n)=>{const s=Ne(t.__scopeSlider),[o,a]=i.useState(null),d=K(n,c=>a(c)),r=i.useMemo(()=>o?s().findIndex(c=>c.ref.current===o):-1,[s,o]);return e.jsx(Te,{...t,ref:d,index:r})}),Te=i.forwardRef((t,n)=>{const{__scopeSlider:s,index:o,name:a,...d}=t,r=O(Q,s),c=ie(Q,s),[m,w]=i.useState(null),g=K(n,T=>w(T)),l=m?r.form||!!m.closest("form"):!0,u=we(m),v=r.values[o],b=v===void 0?0:xe(v,r.min,r.max),S=Ie(o,r.values.length),p=u?.[c.size],h=p?_e(p,b,c.direction):0;return i.useEffect(()=>{if(m)return r.thumbs.add(m),()=>{r.thumbs.delete(m)}},[m,r.thumbs]),e.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${b}% + ${h}px)`},children:[e.jsx(G.ItemSlot,{scope:t.__scopeSlider,children:e.jsx(Y.span,{role:"slider","aria-label":t["aria-label"]||S,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...d,ref:g,style:v===void 0?{display:"none"}:t.style,onFocus:H(t.onFocus,()=>{r.valueIndexToChangeRef.current=o})})}),l&&e.jsx(fe,{name:a??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},o)]})});me.displayName=Q;var Ae="RadioBubbleInput",fe=i.forwardRef(({__scopeSlider:t,value:n,...s},o)=>{const a=i.useRef(null),d=K(a,o),r=Pe(n);return i.useEffect(()=>{const c=a.current;if(!c)return;const m=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(m,"value").set;if(r!==n&&g){const l=new Event("input",{bubbles:!0});g.call(c,n),c.dispatchEvent(l)}},[r,n]),e.jsx(Y.input,{style:{display:"none"},...s,ref:d,defaultValue:n})});fe.displayName=Ae;function Ee(t=[],n,s){const o=[...t];return o[s]=n,o.sort((a,d)=>a-d)}function xe(t,n,s){const d=100/(s-n)*(t-n);return ee(d,[0,100])}function Ie(t,n){return n>2?`Value ${t+1} of ${n}`:n===2?["Minimum","Maximum"][t]:void 0}function Ve(t,n){if(t.length===1)return 0;const s=t.map(a=>Math.abs(a-n)),o=Math.min(...s);return s.indexOf(o)}function _e(t,n,s){const o=t/2,d=J([0,50],[0,o]);return(o-d(n)*s)*s}function Fe(t){return t.slice(0,-1).map((n,s)=>t[s+1]-n)}function He(t,n){if(n>0){const s=Fe(t);return Math.min(...s)>=n}return!0}function J(t,n){return s=>{if(t[0]===t[1]||n[0]===n[1])return n[0];const o=(n[1]-n[0])/(t[1]-t[0]);return n[0]+o*(s-t[0])}}function Ke(t){return(String(t).split(".")[1]||"").length}function Be(t,n){const s=Math.pow(10,n);return Math.round(t*s)/s}var pe=re,$e=de,Le=ue,Ue=me;const ge=i.forwardRef(({className:t,...n},s)=>e.jsxs(pe,{ref:s,className:ke("relative flex w-full touch-none select-none items-center",t),...n,children:[e.jsx($e,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:e.jsx(Le,{className:"absolute h-full bg-primary"})}),e.jsx(Ue,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));ge.displayName=pe.displayName;const Ye=()=>{const[t,n]=i.useState("solo"),[s,o]=i.useState(170),[a,d]=i.useState(55),[r,c]=i.useState(25),[m,w]=i.useState(180),[g,l]=i.useState(5e4),[u,v]=i.useState(100),[b,S]=i.useState(3),[p,h]=i.useState(85),[T,k]=i.useState(25),[f,E]=i.useState(12),[A,$]=i.useState(2),I=i.useMemo(()=>{const N=12+m*.6,P=r*N/60,y=P*52/8,M=Math.floor(P*52*60/a),U=Math.floor(M/47),W=s/(a/60),z=P*52*W;return{hoursPerWeek:P.toFixed(1),workdaysPerYear:y.toFixed(1),additionalSessions:M,newClients:U,totalAnnualImpact:z.toLocaleStr
1ing("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0})}},[s,a,r,m]),V=i.useMemo(()=>{const N=6/Math.sqrt(b),P=b*N,y=Math.round(P*160),M=y*u,U=M*.3,W=2500,z=Math.log10(g/1e4+1),Z=W*z*12,he=Math.round(N*4),Se=M+U+Z;return{devHoursSaved:y,personMonthsSaved:Math.round(P),weeksToMarketFaster:he,annualInfraSaved:Z.toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}),totalAnnualSavings:Se.toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0})}},[g,u,b]),D=i.useMemo(()=>{const x=T*.5,N=f*4*x/60,P=f*A*.2,y=N+P,M=y*52,U=M*p,W=Math.floor(y/A),z=Math.floor(y*60/50);return{hoursPerWeek:y.toFixed(1),hoursPerYear:Math.round(M).toLocaleString(),additionalTrainees:W,additionalSessions:z,totalAnnualValue:U.toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0})}},[p,T,f,A]),j=x=>x>=1e6?`${(x/1e6).toFixed(1)}M`:x>=1e3?`${(x/1e3).toFixed(0)}K`:x.toString(),R=[{key:"solo",label:"Mental Health Clinicians"},{key:"training",label:"Training Programs"},{key:"digital",label:"Digital Health"}],L={solo:"Reclaim revenue and reduce admin burden",training:"Reclaim faculty time and expand training capacity",digital:"Increase efficiency and unify outcomes"};return e.jsxs("div",{className:"grid md:grid-cols-2 gap-8 items-start",children:[e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"md:hidden",children:[e.jsx("label",{className:"sr-only",htmlFor:"practice-type",children:"Practice type"}),e.jsx("select",{id:"practice-type",value:t,onChange:x=>
1n(x.target.value),className:"w-full rounded-full bg-foreground/10 text-foreground px-4 py-3 text-sm font-medium border border-foreground/15 focus:outline-none focus:ring-2 focus:ring-primary/40 appearance-none bg-[url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22white%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22><polyline points=%226 9 12 15 18 9%22/></svg>')] bg-no-repeat bg-[right_1rem_center] pr-10",children:R.map(x=>e.jsx("option",{value:x.key,className:"bg-background text-foreground",children:x.label},x.key))})]}),e.jsx("div",{className:"hidden md:flex flex-wrap bg-foreground/10 rounded-full p-1 w-fit gap-1",children:R.map(x=>e.jsx("button",{onClick:()=>n(x.key),className:`px-4 py-2 rounded-full text-sm font-medium transition-colors ${t===x.key?"bg-foreground text-background":"text-foreground/70 hover:text-foreground"}`,children:x.label},x.key))}),e.jsx("h3",{className:"text-2xl md:text-3xl font-normal tracking-tight leading-tight text-foreground animate-fade-in",children:L[t]},t),t==="solo"&&e.jsxs(e.Fragment,{children:[e.jsx(C,{label:"Average fee per session ($)",value:s,setValue:o,min:50,max:400,step:5,display:`$${s}`}),e.jsx(C,{label:"Session duration (min)",value:a,setValue:d,min:30,max:90,step:5,display:`${a}`}),e.jsx(C,{label:"Sessions per week",value:r,setValue:c,min:5,max:50,step:1,display:`${r}`}),e.jsx(C,{label:"Admin & planning time per session (min)",value:m,setValue:w,min:0,max:300,step:5,display:`${m}`})]}),t==="digital"&&e.jsxs(e.Fragment,{children:[e.jsx(C,{label:"Monthly API calls",value:g,setValue:l,min:1e3,max:5e5,step:1e3,display:j(g)}),e.jsx(C,{label:"Developer hourly rate",value:u,setValue:v,min:50,max:200,step:5,display:`$${u}`}),e.jsx(C,{label:"Team size (developers)",value:b,setValue:S,min:1,max:20,step:1,display:`${b}`})]}),t==="training"&&e.jsxs(e.Fragment,{children:[e.jsx(C,{label:"Hourly cost (faculty / supervisor)",value:p,setValue:h,min:30,max:200,step:5,display:`$${p}`}),e.jsx(C,{label:"Active trainees",value:f,setValue:E,min:1,max:50,step:1,display:`${f}`}),e.jsx(C,{label:"Supervision time per trainee (hours/week)",value:A,setValue:$,min:.5,max:5,step:.5,display:`${A}`})]})]}
1),e.jsxs("div",{className:"bg-foreground/5 backdrop-blur-sm rounded-2xl p-6 md:p-8 border border-foreground/10",children:[t==="solo"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h3",{className:"text-foreground/70 text-sm font-medium mb-3 tracking-wide uppercase",children:"Total annual impact"}),e.jsx("div",{className:"bg-foreground/10 rounded-xl px-6 py-4",children:e.jsx("span",{className:"text-4xl md:text-5xl font-semibold text-foreground",children:I.totalAnnualImpact})})]}),e.jsx(F,{heading:"Time Back",left:{value:I.hoursPerWeek,label:`Hours saved
2per week`},right:{value:I.workdaysPerYear,label:`Workdays
3reclaimed
4per year`},separator:e.jsx(X,{className:"text-foreground/40 w-6 h-6"})}),e.jsx(F,{heading:"Increased capacity",left:{value:I.additionalSessions,label:`Additional
5client sessions
6per year`},right:{value:I.newClients,label:`New clients
7brought
8into care`},separator:e.jsx("span",{className:"text-foreground/40 text-sm",children:"or"})})]}),t==="digital"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h3",{className:"text-foreground/70 text-sm font-medium mb-3 tracking-wide uppercase",children:"Total annual savings"}
8),e.jsx("div",{className:"bg-foreground/10 rounded-xl px-6 py-4",children:e.jsx("span",{className:"text-4xl md:text-5xl font-semibold text-foreground",children:V.totalAnnualSavings})})]}),e.jsx(F,{heading:"Development Efficiency",left:{value:V.devHoursSaved.toLocaleString(),label:`Dev hours
9saved`},right:{value:V.personMonthsSaved,label:`Person-months
10of dev work
11avoided`},separator:e.jsx(X,{className:"text-foreground/40 w-6 h-6"})}),e.jsx(F,{heading:"Business Impact",left:{value:V.weeksToMarketFaster,label:`Weeks faster
12to market`},right:{value:V.annualInfraSaved,label:`Infrastructure
13costs saved
14per year`},separator:e.jsx("span",{className:"text-foreground/40 text-sm",children:"+"})})]}),t==="training"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("h3",{className:"text-foreground/70 text-sm font-medium mb-3 tracking-wide uppercase",children:"Total annual impact"}),e.jsx("div",{className:"bg-foreground/10 rounded-xl px-6 py-4",children:e.jsx("span",{className:"text-4xl md:text-5xl font-semibold text-foreground",children:D.totalAnnualValue})})]}),e.jsx(F,{heading:"Time Back",left:{value:D.hoursPerWeek,label:`Hours saved
15per week`},right:{value:D.hoursPerYear,label:`Hours reclaimed
16per year`},separator:e.jsx(X,{className:"text-foreground/40 w-6 h-6"})}),e.jsx(F,{heading:"Program Capacity",left:{value:D.additionalTrainees,label:`Additional
17trainees
18supported`},right:{value:D.additionalSessions,label:`More supervised
19sessions
20delivered`},separator:e.jsx("span",{className:"text-foreground/40 text-sm",children:"or"})})]})]})]})},C=({label:t,value:n,setValue:s,min:o,max:a,step:d,display:r})=>e.jsxs("div",{className:"space-y-3",children:[e.jsx("label",{className:"text-foreground/80 text-sm font-medium leading-snug block",children:t}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(ge,{value:[n],onValueChange:c=>s(c[0]),min:o,max:a,step:d,className:"flex-1"}),e.jsx("span",{className:"text-foreground font-semibold text-lg w-16 text-right",children:r})]})]}),F=({heading:t,left:n,right:s,separator:o})=>e.jsxs("div",{className:"mb-6 last:mb-0",children:[e.jsx("h4",{className:"text-foreground/60 text-xs font-semibold tracking-[0.18em] uppercase mb-4 pb-2 border-b border-foreground
20/15",children:t}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-3xl md:text-4xl font-semibold text-foreground",children:n.value}),e.jsx("p",{className:"text-foreground/60 text-sm mt-1 whitespace-pre-line leading-snug",children:n.label})]}),o,e.jsxs("div",{className:"text-right",children:[e.jsx("span",{className:"text-3xl md:text-4xl font-semibold text-glow-green",children:s.value}),e.jsx("p",{className:"text-foreground/60 text-sm mt-1 whitespace-pre-line leading-snug",children:s.label})]})]})]});export{Ye as R};

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.