PageSourceSearch

https://io.google/2026/puzzle/assets/DateRevealO-Csf3xLfu.js

js io.google collected 2026-09-24 08:29:54 UTC 10,383 bytes, 1 lines download raw bytes

1import{r as c,j as f}from"./vendor-core-BfsIZGLM.js";import{p as ot}from"./main-Cznl0eY3.js";import"./vendor-animation-C5u8yPkK.js";import"./vendor-three-DWQGnPeS.js";const ct=({className:y})=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:y,children:f.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}),at=({className:y})=>f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:y,children:[f.jsx("circle",{cx:"12",cy:"12",r:"3"}),f.jsx("path",{d:"M3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0",opacity:"0.4"}),f.jsx("path",{d:"M12 3a9 9 0 0 1 9 9"})]}),it=({state:y,currentStatus:g,onStart:N,onStop:P})=>{const R=y==="PLAYING";return f.jsx("div",{className:"absolute inset-0 z-10 pointer-events-none ",children:f.jsxs("div",{className:"fixed bottom-[136px] flex flex-col justify-center items-center gap-6 w-full",children:[f.jsxs("div",{className:`flex items-center gap-10 transition-all duration-700 ${R?"opacity-100 translate-y-0":"opacity-0 translate-y-4 pointer-events-none"}`,children:[f.jsxs("div",{className:"flex items-center justify-center gap-2",children:[f.jsx("div",{className:g.stability<.2?"text-[#EA4335] animate-pulse":"text-[#9BA0A6]",children:f.jsx(ct,{className:"w-5 h-5"})}),f.jsxs("span",{className:"text-[18px] font-medium text-white",children:[Math.floor(g.stability*100),"%"]})]}),f.jsxs("div",{className:"flex items-center justify-center gap-2",children:[f.jsx(at,{className:"w-5 h-5 text-[#9BA0A6]"}),f.jsx("span",{className:"text-[18px] font-medium text-white",children:g.orbits})]})]}),f.jsx("div",{className:"text-[#9BA0A6] font-medium",children:"Drag to move the star and pull the planets into orbit"})]})})},K=8e-4,Q=12e5,tt=.99992,lt=30,B=24,et=256,ut=14,ht=150,ft=1.2,dt=45,rt=.01875,nt=.01,yt=2,U=["#4285F4","#EA4335","#FBBC05","#34A853"],xt=({isActive:y,onGameOver:g,onStatusUpdate:N})=>{const P=c.useRef(null),R=c.useRef(void 0),l=c.useRef({x:0,y:0}),T=c.useRef({x:0,y:0}),d=c.useRef(B),m=c.useRef([]),S=c.useRef([]),v=c.useRef([]),D=c.useRef(0),A=c.useRef(0),W=c.useRef(0),F=c.useRef(0),x=c.useRef(!1),p=c.useRef(!1),u=c.useRef(null),q=c.useRef(Date.now()+1e4+Math.random()*1e4),_=c.useCallback((i,a,t,e,s=!1)=>({id:Math.random().toString(36).substr(2,9),position:{x:i,y:a},velocity:{x:t,y:e},radius:s?1+Math.random()*2:2+Math.random()*4,color:s?"#ffffff":U[Math.floor(Math.random()*U.length)],history:[],isOrbiting:!1,stability:1}),[]),st=(i,a)=>{for(let e=0;e<700;e++){const s=Math.random()*Math.PI*2,o=Math.random()*35+8;S.current.push({position:{x:i,y:a},velocity:{x:Math.cos(s)*o,y:Math.sin(s)*o},life:1.5+Math.random(),color:e%8===0?"#ffffff":U[Math.floor(Math.random()*U.length)]})}},O=c.useCallback(()=>{const i=P.current;if(!i)return;const a=i.width,t=i.height;l.current.x===0&&l.current.y===0&&(l.current={x:a/2,y:t/2},T.current={x:a/2,y:t/2});const e=[];d.current=B,x.current=!1,p.current=!1,S.current=[],v.current=[],u.current=null,q.current=Date.now()+1e4+Math.random()*15e3;for(let s=0;s<ht;s++){const o=Math.random()*Math.PI*2,h=100+Math.random()*Math.max(a,t)*.4,L=a/2+Math.cos(o)*h,n=t/2+Math.sin(o)*h,r=Q*(d.current/B),M=Math.sqrt(K*r/h)*(.8+Math.random()*.4),E=-Math.sin(o)*M,G=Math.cos(o)*M;e.push(_(L,n,E,G))}m.current=e,D.current=Date.now(),A.current=0,W.current=0,F.current=0},[_]);c.useEffect(()=>{O()},[O]),c.useEffect(()=>{y&&O()},[y,O]);const Y=c.useCallback((i,a,t=!1)=>{const e=Math.floor(Math.random()*4);let s=0,o=0;e===0?(s=Math.random()*i,o=-50):e===1?(s=i+50,o=Math.random()*a):e===2?(s=Math.random()*i,o=a+50):(s=-50,o=Math.random()*a);const h=l.current.x+(Math.random()-.5)*200,L=l.current.y+(Math.random()-.5)*200,n=h-s,r=L-o,M=Math.sqrt(n*n+r*r),E=t?4+Math.random()*4:.8+Math.random()*2.5,G=n/M*E,b=r/M*E;m.current.push(_(s,o,G,b,t))},[_]),H=c.useCallback(i=>{const a=P.current;if(!a)return;const t=a.getContext("2d");if(t){if(y){l.current.x+=(T.current.x-l.current.x)*.05,l.current.y+=(T.current.y-l.current.y)*.05;const s=(Date.now()-D.current)/1e3;if(!u.current&&Date.now()>q.current&&!x.current){const n=["SURGE","SHOWER","NEBULA"],r=n[Math.floor(Math.random()*n.length)];u.current={type:r,startTime:Date.now(),duration:r==="SHOWER"?4e3:r==="NEBULA"?12e3:6e3,data:r==="NEBULA"?{x:Math.random()*a.width,y:Math.random()*a.height,vx:(Math.random()-.5)*.5,vy:(Math.random()-.5)*.5,radius:150+Math.random()*200}:null}}if(u.current&&(Date.now()-u.current.startTime>u.current.duration?(u.current=null,q.current=Date.now()+15e3+Math.random()*2e4):u.current.type==="SHOWER"&&Math.random()>.8?Y(a.width,a.height,!0):u.current.type==="NEBULA"&&(u.current.data.x+=u.current.data.vx,u.current.data.y+=u.current.data.vy)),!x.current&&!p.current){const n=Math.max(.01,.25-s/120);A.current+=.016,A.current>n&&(Y(a.width,a.height),A.current=0)}!x.current&&d.current>=et&&(x.current=!0,u.current=null,st(l.current.x,l.current.y),setTimeout(()=>{y&&O()},3500));let o=0;const h=[];let L=Q*Math.pow(d.current/B,1.8);if(u.current?.type==="SURGE"&&(L*=2.5),!x.current&&!p.current&&s>10){let n=0;for(const r of m.current)r.isOrbiting&&n++;n<3&&(p.current=!0)}p.current&&!x.current&&(L*=dt,d.current+=.6),v.current.forEach(n=>
1{n.radius+=yt,n.life-=.012}),v.current=v.current.filter(n=>n.life>0);for(let n=0;n<m.current.length;n++){const r=m.current[n],M=l.current.x-r.position.x,E=l.current.y-r.position.y,G=M*M+E*E,b=Math.sqrt(G);if(!x.current&&b<d.current+r.radius){d.current+=ft,F.current++,v.current.push({x:l.current.x,y:l.current.y,radius:d.current,maxRadius:d.current+300,life:1});continue}if(!x.current){const I=Math.max(G,d.current*d.current*.8),w=K*(u.current?.type==="SURGE"?1.5:1)*L/I,k=M/b*w,C=E/b*w;r.velocity.x+=k,r.velocity.y+=C}if(r.velocity.x*=p.current?.94:tt,r.velocity.y*=p.current?.94:tt,v.current.forEach(I=>{const j=r.position.x-I.x,w=r.position.y-I.y,k=Math.sqrt(j*j+w*w);if(Math.abs(k-I.radius)<40){const C=I.life,V=j/k,$=w/k,X=-$,Z=V,J=r.velocity.x*X+r.velocity.y*Z>=0?1:-1;r.velocity.x+=X*J*rt*C,r.velocity.y+=Z*J*rt*C;const z=r.velocity.x*V+r.velocity.y*$;z<0&&(r.velocity.x-=V*z*nt*C,r.velocity.y-=$*z*nt*C)}}),p.current)r.isOrbiting=!1;else{const I=d.current*ut;if(!r.isOrbiting&&b<I){const j=Math.sqrt(r.velocity.x**2+r.velocity.y**2),w=(r.velocity.x*M+r.velocity.y*E)/b;Math.abs(w)<j*.6&&(r.isOrbiting=!0)}}r.position.x+=r.velocity.x,r.position.y+=r.velocity.y,r.history.unshift({x:r.position.x,y:r.position.y}),r.history.length>lt&&r.history.pop(),r.isOrbiting&&o++,b<5e3&&h.push(r)}if(S.current.forEach(n=>{n.position.x+=n.velocity.x,n.position.y+=n.velocity.y,n.velocity.x*=.98,n.velocity.y*=.98,n.life-=.007}),S.current=S.current.filter(n=>n.life>0),m.current=h,W.current=Math.max(W.current,o),N){const n=Math.min(1,(d.current-B)/(et-B));N({stability:p.current?0:1-n,orbits:o})}}if(t.clearRect(0,0,a.width,a.height),u.current?.type==="NEBULA"){const{x:e,y:s,radius:o}=u.current.data,h=t.createRadialGradient(e,s,0,e,s,o);h.addColorStop(0,"rgba(100, 100, 255, 0.15)"),h.addColorStop(.5,"rgba(50, 50, 150, 0.05)"),h.addColorStop(1,"rgba(0, 0, 0, 0)"),t.fillStyle=h,t.fillRect(0,0,a.width,a.height)}if(t.lineCap="round",m.current.forEach(e=>{if(e.history.length>2){t.beginPath(),t.moveTo(e.history[0].x,e.history[0].y);for(let s=1;s<e.history.length;s++){const o=(1-s/e.history.length)*(p.current?.8:.4);t.strokeStyle=e.color+Math.floor(o*255).toString(16).padStart(2,"0"),t.lineWidth=e.radius*.3,t.lineTo(e.history[s].x,e.history[s].y),t.stroke(),t.beginPath(),t.moveTo(e.history[s].x,e.history[s].y)}}}),m.current.forEach(e=>{t.beginPath(),t.arc(e.position.x,e.position.y,e.radius,0,Math.PI*2),t.fillStyle=e.color,t.fill()}),v.current.forEach(e=>{t.beginPath(),t.arc(e.x,e.y,e.radius,0,Math.PI*2),t.strokeStyle=`rgba(255, 255, 255, ${e.life*.15})`,t.lineWidth=1,t.stroke()}),!x.current){if(t.beginPath(),t.arc(l.current.x,l.current.y,d.current,0,Math.PI*2),t.fillStyle="#ffffff",t.fill(),u.current?.type==="SURGE"){const e=Math.sin(i/100)*10;t.beginPath(),t.arc(l.current.x,l.current.y,d.current+e,0,Math.PI*2),t.strokeStyle="rgba(255, 255, 255, 0.2)",t.lineWidth=2,t.stroke()}p.current&&(t.beginPath(),t.arc(l.current.x,l.current.y,d.current*.9,0,Math.PI*2),t.fillStyle=`rgba(255, ${200-Math.sin(i/50)*50}, ${200-Math.sin(i/50)*50}, 1)`,t.fill())}if(u.current&&!x.current){const e=Date.now()-u.current.startTime,s=Math.sin(e/200)*.5+.5;t.font="9px Inter",t.letterSpacing="3px",t.fillStyle=`rgba(255, 255, 255, ${s*.4})`,t.textAlign="center";const o=u.current.type==="SURGE"?"GRAVITATIONAL SURGE":u.current.type==="SHOWER"?"METEOR SWARM":"NEBULA DRIFT";t.fillText(o,a.width/2,40),t.textAlign="left"}S.current.forEach(e=>{t.beginPath(),t.arc(e.position.x,e.position.y,4*e.life,0,Math.PI*2),t.fillStyle=e.color,t.globalAlpha=Math.min(1,e.life),t.fill(),t.globalAlpha=1}),R.current=requestAnimationFrame(H)}},[y,O,Y,N]);return c.useEffect(()=>{const i=P.current;if(!i)return;const a=o=>{const h=i.getBoundingClientRect();T.current={x:o.clientX-h.left,y:o.clientY-h.top}},t=o=>{if(o.touches[0]){const h=i.getBoundingClientRect();T.current={x:o.touches[0].clientX-h.left,y:o.touches[0].clientY-h.top},o.preventDefault()}},e=()=>{if(i.parentElement){const o=i.parentElement.clientWidth,h=i.parentElement.clientHeight;i.width=o,i.height=h}},s=new ResizeObserver(e);return i.parentElement&&s.observe(i.parentElement),e(),window.addEventListener("mousemove",a),window.addEventListener("touchmove",t,{passive:!1}),R.current=requestAnimationFrame(H),()=>{window.removeEventListener("mousemove",a),window.removeEventListener("touchmove",t),s.disconnect(),R.current&&cancelAnimationFrame(R.current)}},[H]),f.jsx("canvas",{ref:P,className:"absolute top-0 left-0 w-full h-full"})},gt=()=>{const[y,g]=c.useState("INTRO"),[N,P]=c.useState({score:0,maxOrbits:0,duration:0,totalCaptured:0}),[R,l]=c.useState({stability:1,orbits:0}),[T,d]=c.useState(""),m=c.useCallback(async A=>{P(A),g("GAMEOVER")},[]),S=c.useCallback(A=>{l(A)},[]),v=()=>{g("PLAYING"),d("")},D=()=>{g("INTRO"),d(""),l({stability:1,orbits:0})};return c.useEffect(()=>
1{v(),ot("LetterO")},[]),f.jsxs("div",{className:"relative w-full h-full bg-transparent overflow-hidden",children:[f.jsx(xt,{isActive:y==="PLAYING",onGameOver:m,onStatusUpdate:S}),f.jsx(it,{state:y,stats:N,currentStatus:R,summary:T,isLoadingSummary:!1,onStart:v,onStop:D})]})};export{gt as default};

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.