1const P=.008333333333333333,yt=.075,at=3e3,ft=.024,ut=.03,I=170,it=3e3,ct=3,wt=46,b=7,lt=w=>getComputedStyle(document.documentElement).getPropertyValue(w).trim();function dt(w){const R=w.replace("#","").trim(),i=R.length===3?R.split("").map(y=>y+y).join(""):R,M=parseInt(i||"ea580c",16);return[M>>16&255,M>>8&255,M&255]}const vt=()=>document.documentElement.classList.contains("dark");function ht(w,R){let i=w*374761393+R*668265263>>>0;return i=(i^i>>>13)*1274126177>>>0,((i^i>>>16)>>>0)/4294967296}function pt(w,{animate:R=!0}={}){const i=document.createElement("canvas");i.style.position="absolute",i.style.inset="0",i.style.width="100%",i.style.height="100%";const M=i.getContext("2d");if(!M)return null;w.appendChild(i);let y=vt(),Q=dt(lt(y?"--color-brand-400":"--color-brand-600")),O=0,g=0,c=0,F=0,x=40,E=new Float32Array(0),L=new Float32Array(0),d=new Float32Array(0),v=new Float32Array(0),D=new Float32Array(0),G=new Float32Array(0),K=new Float32Array(0),V=new Float32Array(0),_=null;function q(){const e=w.getBoundingClientRect();O=Math.max(1,Math.round(e.width)),g=Math.max(1,Math.round(e.height));const o=Math.min(2,window.devicePixelRatio||1);i.width=Math.round(O*o),i.height=Math.round(g*o),M.setTransform(o,0,0,o,0,0),x=40,c=Math.ceil(O/x)+3,F=Math.ceil(g/x)+3;const s=c*F;E=new Float32Array(s),L=new Float32Array(s),d=new Float32Array(s),v=new Float32Array(s),D=new Float32Array(s),G=new Float32Array(s),K=new Float32Array(s),V=new Float32Array(s);const p=(O-(c-1)*x)/2,h=(g-(F-1)*x)/2,l=yt*x*2;for(let f=0;f<F;f++)for(let m=0;m<c;m++){const u=f*c+m;E[u]=p+m*x+(ht(m,f)-.5)*l,L[u]=h+f*x+(ht(m+911,f+557)-.5)*l}const n=M.createLinearGradient(0,0,0,g),T=Math.min(.48,wt/g);n.addColorStop(0,"rgba(0,0,0,1)"),n.addColorStop(T,"rgba(0,0,0,0)"),n.addColorStop(1-T,"rgba(0,0,0,0)"),n.addColorStop(1,"rgba(0,0,0,1)"),_=n}const a={x:0,y:0,vx:0,vy:0,active:!1,t:0},U=e=>{const o=i.getBoundingClientRect(),s=e.clientX-o.left,p=e.clientY-o.top,h=performance.now(),l=a.active?Math.max(.008,(h-a.t)/1e3):0;l>0&&l<.2&&(a.vx=(s-a.x)/l,a.vy=(p-a.y)/l),a.x=s,a.y=p,a.t=h,a.active=s>-I&&p>-I&&s<o.width+I&&p<o.height+I},H=()=>{a.active=!1,a.vx=a.vy=0};let z=0;function X(e){z+=e;const o=z*.7,s=z*.55;for(let h=1;h<F-1;h++)for(let l=1;l<c-1;
1l++){const n=h*c+l,T=d[n-1]+d[n+1]+d[n-c]+d[n+c]-4*d[n],f=v[n-1]+v[n+1]+v[n-c]+v[n+c]-4*v[n];let m=625*T-14*d[n],u=625*f-14*v[n];const t=E[n]*ft,r=L[n]*ut;if(m+=at*Math.sin(t+o)*Math.cos(r-s),u+=at*.85*Math.cos(t-s)*Math.sin(r+o),a.active){const A=E[n]+d[n]-a.x,S=L[n]+v[n]-a.y,C=Math.hypot(A,S);if(C<I){const W=1-C/I,j=W*W;C>.001&&(m+=A/C*j*it,u+=S/C*j*it),m+=a.vx*j*ct,u+=a.vy*j*ct}}K[n]=m,V[n]=u}const p=Math.exp(-1.5*e);for(let h=1;h<F-1;h++)for(let l=1;l<c-1;l++){const n=h*c+l;D[n]=(D[n]+K[n]*e)*p,G[n]=(G[n]+V[n]*e)*p,d[n]+=D[n]*e,v[n]+=G[n]*e}a.vx*=Math.exp(-6*e),a.vy*=Math.exp(-6*e)}function k(){const e=M;e.setTransform(Math.min(2,window.devicePixelRatio||1),0,0,Math.min(2,window.devicePixelRatio||1),0,0),e.clearRect(0,0,O,g),e.globalCompositeOperation=y?"lighter":"source-over",e.lineCap="round";const o=y?.07:.055,s=y?.3:.24,p=y?.16:.13,h=y?.5:.42,[l,n,T]=Q,f=[];for(let t=0;t<b;t++)f.push(new Path2D);const m=(t,r)=>{const A=E[t]+d[t],S=L[t]+v[t],C=E[r]+d[r],W=L[r]+v[r],j=Math.abs(Math.hypot(C-A,W-S)-x)/x,mt=Math.min(b-1,Math.min(1,j*2.6)*b|0),st=f[mt];st.moveTo(A,S),st.lineTo(C,W)};for(let t=0;t<F;t++)for(let r=0;r<c-1;r++)m(t*c+r,t*c+r+1);for(let t=0;t<F-1;t++)for(let r=0;r<c;r++)m(t*c+r,(t+1)*c+r);e.lineWidth=1;for(let t=0;t<b;t++){const r=o+t/(b-1)*s;e.strokeStyle=`rgba(${l},${n},${T},${r.toFixed(3)})`,e.stroke(f[t])}const u=[];for(let t=0;t<b;t++)u.push(new Path2D);for(let t=0;t<E.length;t++){const r=Math.min(1,Math.hypot(d[t],v[t])/26),A=Math.min(b-1,r*b|0),S=1.1+r*1.3;u[A].moveTo(E[t]+d[t]+S,L[t]+v[t]),u[A].arc(E[t]+d[t],L[t]+v[t],S,0,Math.PI*2)}for(let t=0;t<b;t++){const r=p+t/(b-1)*h;e.fillStyle=`rgba(${l},${n},${T},${r.toFixed(3)})`,e.fill(u[t])}_&&(e.globalCompositeOperation="destination-out",e.fillStyle=_,e.fillRect(0,0,O,g),e.globalCompositeOperation="source-over")}if(q(),!R){for(let o=0;o<240;o++)X(P);k();const e=new ResizeObserver(()=>{q();for(let o=0;o<240;o++)X(P);k()});return e.observe(w),{destroy(){e.disconnect(),i.remove()}}}k();let Y=0,B=0,$=0,Z=!1;const tt=e=>{Y=requestAnimationFrame(tt);const o=B?Math.min(.05,(e-B)/1e3):P;B=e,$+=o;let s=0;for(;$>=P&&s<8;)X(P),$-=P,s++;$>P&&($=0),k()},N=e=>{e!==Z&&(Z=e,e?(B=0,$=0,Y=requestAnimationFrame(tt)):cancelAnimationFrame(Y))};window.addEventListener("pointermove",U,{passive:!0}),window.addEventListener("pointerleave",H),window.addEventListener("blur",H);const et=new ResizeObserver(()=>{q(),k()});et.observe(w);const nt=new MutationObserver(e=>{if(!e.some(s=>s.attributeName==="class"))return;const o=vt();o!==y&&(y=o,Q=dt(lt(y?"--color-brand-400":"--color-brand-600")))});nt.observe(document.documentElement,{attributes:!0});const ot={onScreen:!0},J=()=>N(ot.onScreen&&!document.hidden),rt=new IntersectionObserver(([e])=>{ot.onScreen=e.isIntersecting,J()},{threshold:0});return rt.observe(w),document.addEventListener("visibilitychange",J),N(!0),{destroy(){N(!1),et.disconnect(),nt.disconnect(),rt.disconnect(),document.removeEventListener("visibilitychange",J),window.removeEventListener("pointermove",U),window.removeEventListener("pointerleave",H),window.removeEventListener("blur",H),i.remove()}}}export{pt as startHeroMesh};
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.