import{t as e}from"/assets/animate/rolldown-runtime.Dh6celcD.mjs";import{A as t,C as n,D as r,P as i,c as a,l as o,o as s,x as c}from"/assets/animate/react.D20wc1Tc.mjs";import{S as l,X as u,Y as d,Z as f,t as p}from"/assets/animate/motion.BZLBZ-91.mjs";import{O as m,o as h,q as g}from"/assets/animate/nocodexport.DUs19SCZ.mjs";function _(e){let t=Math.min(1,Math.max(0,e));return t*t*t*(t*(t*6-15)+10)}function v({char:e,d:t,progress:n,band:r,dimmedOpacity:i}){let o=f(n,e=>{if(t===null)return i;let n=_((e*(1+r)-t)/r);return i+(1-i)*n});return a(l.span,{"data-char":``,style:{opacity:o,display:`inline-block`},children:e===` `?`\xA0`:e})}function y(e){let{content:n,paragraphGap:s,tag:l,font:p,color:m,textAlign:h,textTransform:g,textWrap:_,angle:y,softness:b,dimmedOpacity:x,smoothing:S,scrollStart:C,scrollEnd:w}=e,T=r(null),[E,D]=i([]),{scrollYProgress:O}=d({target:T,offset:[`start end`,`end start`]}),k=u(f(O,[C,w],[0,1],{clamp:!0}),{stiffness:220-S*1.6,damping:40,mass:.6}),A=Math.max(.05,b/100),j=t(()=>n?n.split(/\n?\s*---\s*\n?/).map(e=>e.trim()).filter(e=>e.length>0).map(e=>e.split(/\s+/)):[],[n]);c(()=>{let e=T.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect(),n=e.querySelectorAll(`[data-char]`);if(!n.length)return;let r=y*Math.PI/180,i=Math.sin(r),a=-Math.cos(r),o=[];n.forEach(e=>{let n=e.getBoundingClientRect(),r=n.left+n.width/2-t.left,s=n.top+n.height/2-t.top;o.push(r*i+s*a)});let s=Math.min(...o),c=Math.max(...o)-s||1;D(o.map(e=>(e-s)/c))};t(),document.fonts?.ready&&document.fonts.ready.then(t);let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[n,y,p,g,_,s,l]);let M=l||`div`,N={margin:0,padding:0,color:m,textAlign:h,textTransform:g,textWrap:_,...p},P=-1;return a(`div`,{ref:T,style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,gap:`${s}px`},children:j.map((e,t)=>a(M,{style:N,children:e.map((t,n)=>o(`span`,{style:{display:`inline-block`,whiteSpace:`nowrap`},children:[t.split(``).map((e,t)=>(P++,a(v,{char:e,d:E[P]??null,progress:k,band:A,dimmedOpacity:x},t))),n{s(),g(),p(),n(),y.defaultProps={content:`Great founders changing the world deserve a presence as powerful as what they're building. Most founders we work with are building something significant but their presence doesn't show it yet. --- That gap costs more than revenue. It costs the certainty that your brand is finally being understood.`,paragraphGap:32,tag:`h2`,color:`#F1EBDD`,textAlign:`left`,textTransform:`none`,textWrap:`balance`,angle:105,softness:35,dimmedOpacity:.12,smoothing:50,scrollStart:.1,scrollEnd:.7},m(y,{content:{type:h.String,title:`Content`,displayTextArea:!0,description:`Use --- on a new line to start a new paragraph`},paragraphGap:{type:h.Number,title:`Gap`,min:0,max:200,step:1,unit:`px`,defaultValue:32},tag:{type:h.Enum,title:`Tag`,options:[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`p`,`span`,`div`],optionTitles:[`H1`,`H2`,`H3`,`H4`,`H5`,`H6`,`P`,`Span`,`Div`],defaultValue:`h2`},font:{type:h.Font,title:`Font`,controls:`extended`,defaultFontType:`sans-serif`,defaultValue:{fontSize:64,variant:`Bold`,lineHeight:`1.1em`,letterSpacing:`-0.02em`}},color:{type:h.Color,title:`Color`,defaultValue:`#F1EBDD`},textAlign:{type:h.Enum,title:`Align`,options:[`left`,`center`,`right`],optionTitles:[`Left`,`Center`,`Right`],displaySegmentedControl:!0,defaultValue:`left`},textTransform:{type:h.Enum,title:`Transform`,options:[`none`,`uppercase`,`lowercase`,`capitalize`],optionTitles:[`None`,`AA`,`aa`,`Aa`],displaySegmentedControl:!0,defaultValue:`none`},textWrap:{type:h.Enum,title:`Wrap`,options:[`wrap`,`balance`,`pretty`,`nowrap`],optionTitles:[`Default`,`Balance`,`Pretty`,`No Wrap`],defaultValue:`balance`},angle:{type:h.Number,title:`Reveal Angle`,min:0,max:360,step:1,unit:`°`,defaultValue:105},softness:{type:h.Number,title:`Softness`,description:`How many characters are mid-fade at once`,min:5,max:100,step:1,unit:`%`,defaultValue:35},dimmedOpacity:{type:h.Number,title:`Dimmed Opacity`,min:0,max:1,step:.01,defaultValue:.12},smoothing:{type:h.Number,title:`Smoothing`,description:`How much the reveal lags/glides behind scroll`,min:0,max:100,step:1,defaultValue:50},scrollStart:{type:h.Number,title:`Scroll Start`,min:0,max:1,step:.01,defaultValue:.1},scrollEnd:{type:h.Number,title:`Scroll End`,min:0,max:1,step:.01,defaultValue:.7}})}));export{b as n,y as t}; //# sourceMappingURL=Text_effect.WpOu55Zm.mjs.map