import"./hoisted.yFz1BYXO.js";const M=document.getElementById("hero-canvas"),t=M.getContext("2d");let n=0,l=0,w=[],b=[],g=[],S=[],y=0;const P="#0a1628",T="#132744",v="#1e3a5f",k="#0f2744",C="#091a2e";function u(){const a=Math.min(window.devicePixelRatio||1,2);n=M.clientWidth,l=M.clientHeight,M.width=n*a,M.height=l*a,t.setTransform(a,0,0,a,0,0),$()}function $(){const a=l*.55;S=[];for(let i=0;i<(n<640?40:80);i++)S.push({x:Math.random()*n,y:Math.random()*a*.7,r:Math.random()*1.2+.3,twinkle:Math.random()*Math.PI*2,speed:.01+Math.random()*.03});w=[];const e=n<640?4:7;for(let i=0;in+e.w&&(e.x=-e.w*1.5),t.fillStyle=`rgba(140, 165, 200, ${e.opacity})`,t.beginPath(),t.ellipse(e.x,e.y,e.w*.5,e.h*.5,0,0,Math.PI*2),t.fill(),t.beginPath(),t.ellipse(e.x-e.w*.25,e.y+e.h*.1,e.w*.35,e.h*.4,0,0,Math.PI*2),t.fill(),t.beginPath(),t.ellipse(e.x+e.w*.2,e.y+e.h*.05,e.w*.3,e.h*.35,0,0,Math.PI*2),t.fill()}function W(a){const e=l*.55;for(const o of b){t.fillStyle=o.color;const h=e-o.bh;t.fillRect(o.x+1,h,o.bw-2,o.bh);const r=2,i=5;let c=0;for(let s=h+4;s.2?1:.3;t.fillStyle=`rgba(255, 220, 140, ${.4*f})`,t.fillRect(d,s,r,r)}c++}}t.strokeStyle="rgba(80, 110, 150, 0.15)",t.lineWidth=1;for(const o of b)t.beginPath(),t.moveTo(o.x+1,e),t.lineTo(o.x+1,e-o.bh),t.lineTo(o.x+o.bw-1,e-o.bh),t.lineTo(o.x+o.bw-1,e),t.stroke()}function q(a){const e=l*.55,o=t.createLinearGradient(0,e,0,l);o.addColorStop(0,k),o.addColorStop(1,C),t.fillStyle=o,t.fillRect(0,e,n,l-e),y+=.3,t.strokeStyle="rgba(100, 150, 200, 0.04)",t.lineWidth=1;for(let i=e+8;in+o.size*3&&(o.x=-o.size*3),o.sailPhase+=.008;const h=e+20+o.x/n*(l*.2)+Math.sin(o.sailPhase*3)*10,r=Math.sin(a*.002+o.sailPhase)*1.5,i=Math.sin(o.sailPhase)*.05;t.save(),t.translate(o.x,h+r),t.rotate(i),t.fillStyle=o.hull,t.beginPath(),t.moveTo(-o.size,0),t.quadraticCurveTo(-o.size*.8,o.size*.4,o.size*.3,o.size*.3),t.lineTo(o.size,0),t.closePath(),t.fill(),t.strokeStyle="rgba(180, 190, 200, 0.6)",t.lineWidth=1,t.beginPath(),t.moveTo(0,0),t.lineTo(0,-o.size*1.8),t.stroke();const c=Math.sin(o.sailPhase)*o.size*.15;t.fillStyle=o.sail,t.beginPath(),t.moveTo(0,-o.size*1.7),t.quadraticCurveTo(o.size*.5+c,-o.size*.8,0,-o.size*.1),t.closePath(),t.fill(),t.fillStyle=`rgba(200, 210, 225, ${.3+Math.sin(o.sailPhase+1)*.1})`,t.beginPath(),t.moveTo(0,-o.size*1.5),t.quadraticCurveTo(-o.size*.4-c*.5,-o.size*.7,-o.size*.1,-o.size*.1),t.closePath(),t.fill(),t.restore(),t.strokeStyle="rgba(150, 180, 210, 0.08)",t.lineWidth=1,t.beginPath();for(let s=0;s{u()}),requestAnimationFrame(x)}O();