1/* © 2024-2026 MeTool.online. All rights reserved. Unauthorized copying or redistribution is prohibited. */ 2import{G as At,a as _t}from"./GameShareDialog.BcU-hiee.js";import{d as Ie,o as Bt,I as Ct,q as k,v as S,y as p,J as Pt,c as oe,z as ae,B as z,C as ne,G as te,a1 as Le,F as Rt,D as qt,P as $e,E as De,A as Lt,e as y,f as we}from"./vue.BHwQAC8Z.js";import{G as $t}from"./GameShareIconButton.MaXfr9Av.js";import{f as ze,_ as Et,r as Gt,o as Wt,y as Ot,C as Vt}from"./entry.q2vg8f26.js";import"./AppSiteFooterBar.DaI0tcoG.js";import"./ToolBreadcrumb.W6i9Er2k.js";import"./AppIcon.kB3f-rsX.js";import"./iconLibrary.DB9GK0r4.js";import"./FavoriteStarButton.DO1P1yzW.js";import"./useUserLibrary.GGsQQArI.js";import"./useFeedback.Dr-ufl2w.js";import"./FeedbackBoard.Cymm3wDa.js";import"./McpRobotBadge.BEno9mQJ.js";import"./enabledPages.generated.XTfMY2ra.js";import"./FeedbackItem.CJlWzvMS.js";import"./FeedbackStatusBadge.C241fylf.js";import"./useToolPageRef.DiCFXJE6.js";import"./useToolGa4.HZ1kdNPy.js";import"./useToolGroup.D6DXaJBJ.js";import"./useGameTools.Cea25uJs.js";import"./useImageTools.DnXsyVeV.js";import"./useMagicTools.CMgTWyzO.js";import"./useDocTools.M0St8VTC.js";import"./brandSvgs.3qwNwPst.js";
2import"./useMarkdownTools.MAZnT9yn.js";import"./use3DTools.B2gNq-E_.js";import"./useDevTools.Du8khQc-.js";import"./useVideoTools.wfF_hwIl.js";import"./useAISkillTools.DxAcHgjm.js";import"./useLatexTools.CNuf4UvK.js";import"./useHtmlTools.eon9ygLT.js";import"./datetime.BZOVVxYr.js";import"./FeedbackFlowDiagram.x0-i03m6.js";import"./FeedbackSubmitForm.CWaGJF1f.js";import"./ImagePreviewModal.hZok-81e.js";import"./TurnstileWidget.CKVAXgA9.js";import"./cosFeedbackUpload.DAGAjSUC.js";import"./AuthLoginPanel.6BO_3-aa.js";import"./useReadQueryParam.d9oDta5j.js";import"./safeRedirect.ChHJvCig.js";import"./ToolFAQSection.DnMByl9i.js";import"./ToolArticleSection.C-jF13aY.js";import"./ArticleImageLightbox.BBWuunJm.js";import"./useShareChain.DAaPApmT.js";import"./ToolRelatedArticlesSection.CqA7QVWD.js";import"./BlogCard.LzNShGVa.js";import"./useBlog.Berx1qpe.js";import"./_index.generated.Cngq438q.js";import"./useRelatedTools.DFXR-u5P.js";import"./useGameShare.BhlITz07.js";import"./browser.DhZUQ6or.js";const It={class:"flex flex-col h-full select-none"},Dt={key:0,class:"absolute inset-0 flex flex-col items-center justify-center gap-3 pointer-events-none px-6 text-center"},zt={class:"text-white font-black text-2xl md:text-3xl tracking-tight drop-shadow-[0_2px_8px_rgba(0,0,0,0.8)]"},Nt={class:"mt-1 text-white/60 text-sm drop-shadow max-w-xs"},Ht={key:0,class:"absolute inset-x-0 bottom-[18%] flex items-center justify-center pointer-events-none"},Xt={class:"text-white/70 text-xs md:text-sm font-medium bg-black/30 px-3 py-1 rounded-full animate-pulse"},jt={key:0,class:"absolute top-2 inset-x-0 flex flex-col items-center gap-1 pointer-events-none z-10"},Ft={class:"text-2xl md:text-3xl font-black tabular-nums tracking-wider select-none",style:{color:"#fff","text-shadow":"0 2px 0 #000,0 0 16px rgba(0,0,0,0.5)"}},Kt={class:"flex items-center gap-1"},Ut={class:"absolute top-3 right-3 z-10 flex items-center gap-2 pointer-events-auto"},Yt={key:0,class:"w-4.5 h-4.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Jt={key:1,class:"w-4.5 h-4.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Qt={key:0,class:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},Zt={key:1,class:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},eo={key:2,class:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},Ee=.7,to=620,Ge=840,We="metool.breakout.best",Oe=3,oo=8,u=10,ao=68,ye=4,Ve=6,no=.16,so=1.5,ro=12e3,io=.4,lo=Ie({__name:"BreakoutGame",emits:["ready"],setup(Ne,{emit:m}){const N=m,{t:b,locale:se}=ze(),c=()=>se.value==="zh",i=y("idle"),T=y(0),_=y(3),R=y(0),re=y(!1),C=y(!0),E=y(!1),A=y(!0),B=y(null),H=y(null),G=y(null),xe=y(420),ke=y(600);let f=400,v=600;const be=[{fill:"#ef4444",glow:"rgba(239,68,68,0.55)",points:7,tier:"red"},{fill:"#ef4444",glow:"rgba(239,68,68,0.55)",points:7,tier:"red"},{fill:"#f97316",glow:"rgba(249,115,22,0.5)",points:5,tier:"orange"},{fill:"#f97316",glow:"rgba(249,115,22,0.5)",points:5,tier:"orange"},{fill:"#22c55e",glow:"rgba(34,197,94,0.45)",points:3,tier:"green"},{fill:"#22c55e",glow:"rgba(34,197,94,0.45)",points:3,tier:"green"},{fill:"#eab308",glow:"rgba(234,179,8,0.4)",points:1,tier:"yellow"},{fill:"#eab308",glow:"rgba(234,179,8,0.4)",points:1,tier:"yellow"}];let W=[],O=[],q=[],h=0,g=0,X=40,ie=16;const n={x:0,y:0,w:100,baseW:100,h:13,vx:0},w={x:0,y:0,vx:0,vy:0,r:7};let x=[],j=0,F=0;const He=[1,1.15,1.32,1.55];let K=!1,U=!1;const Me=["multi","expand"];let Y=0,le=0,ue=0,J=!1,L=0,V=null,I=!1;const Xe=we(()=>{const e=T.value,t=i.value==="over"&&_.value>0&&g>=h&&h>0,o=h>0?g/h:0;if(i.value!=="over"&&g===0&&e===0)return{gameName:b("meta.games.breakout.title"),gameEmoji:"ð§±",isWin:!1,playerTitle:c()?"ð§± æç åææ":"ð§± Breakout Challenge",heroTitle:c()?"å¤å» 1976 å¹´é
è¾¾å©ç»å
¸ï¼æ¥ççä½ è½æ¿å¤å°åï¼":"A faithful recreation of the 1976 Atari classic â see how high you can score!",primaryLabel:c()?"æé«å":"Best Score",primaryValue:String(R.value),isNewRecord:!1,secondaryStats:[],shareText:c()?"ä¸èµ·æ¥ MeTool ç©ç»å
¸æç å Breakoutï¼":"Come play classic Breakout on MeTool!",gameRoute:"/games/breakout/",gameTagline:c()?"å¤å» 1976 é
è¾¾å©ç»å
¸è¡æº · é®ç/é¼ æ /触å±é½è½ç©":"Faithful 1976 Atari classic · Keyboard, mouse & touch"};let a,s;return t?(a=c()?"ð éå
³å¤§å¸":"ð Breakout Master",s=c()?`䏿¡å½æ¸
空å
¨é¨ ${h} åç ï¼æ¿ä¸ ${e} åï¼`:`Cleared all ${h} bricks with ${e} points!`):o>=.75?(a=c()?"ðª ç¢å¢å
é":"ðª Wall Breaker",s=c()?`æç¢äº ${g}/${h} åç ï¼åªå·®ä¸ç¹å°±éå
³ï¼`:`Smashed ${g}/${h} bricks â so close!`):o>=.4?(a=c()?"ð¹ï¸ è¡æºèå°":"ð¹ï¸ Arcade Veteran",s=c()?`æç¢äº ${g}/${h} åç ï¼å¾å° ${e} åã`:`Smashed ${g}/${h} bricks for ${e} points.`):o>=.15?(a=c()?"ð æ¡æ¿æ°ç§":"ð Paddle Rookie",s=c()?`åä¸æï¼æç¢äº ${g} åç ã`:`Just getting started â ${g} bricks down.`):(a=c()?"ð
æéå¾
ç»":"ð
Needs Practice",s=c()?"çè¿æ²¡æ¥ç¨³å°±æ¼äºâ¦åè¯ä¸æ¬¡ï¼":"Missed the ball before it even started... try again!"),{gameName:b("meta.games.breakout.title"),gameEmoji:"ð§±",isWin:t,playerTitle:a,heroTitle:s,primaryLabel:c()?"å¾å":"Score",primaryValue:String(e),bestLabel:c()?"æé«":"Best",bestValue:String(R.value),isNewRecord:re.value,secondaryStats:[{label:c()?"ç¢ç ":"Bricks",value:`${g}/${h}`}],shareText:t?c()?`æå¨ Breakout æç åééå
³äºï¼æ¿ä¸ ${e} åï¼`:`I cleared Breakout with ${e}
2 points!`:c()?`æå¨ Breakout æç åéæ¿ä¸äº ${e} åï¼`:`I scored ${e} points in Breakout!`,gameRoute:"/games/breakout/",gameTagline:c()?"å¤å» 1976 é
è¾¾å©ç»å
¸è¡æº · é®ç/é¼ æ /触å±é½è½ç©":"Faithful 1976 Atari classic · Keyboard, mouse & touch"}});function je(){const e=B.value;e&&(G.value=ve(e)),E.value=!0}function Fe(){const e=i.value==="over";E.value=!1,e&&de()}const Ke=we(()=>i.value==="over"?b("pages.games.breakout.retry"):i.value==="idle"?b("pages.games.breakout.startCta"):b("pages.games.breakout.continueCta"));function Ue(){const e=i.value==="over";E.value=!1,e?de():i.value==="idle"&&(pe(),D())}let $=null;function P(){if(!$)try{$=new AudioContext}catch{return null}return $.state==="suspended"&&$.resume(),$}function Q(e,t,o="square",a=.12){if(!C.value)return;const s=P();if(!s)return;const r=s.currentTime,l=s.createOscillator(),d=s.createGain();l.type=o,l.frequency.setValueAtTime(e,r),d.gain.setValueAtTime(a,r),d.gain.exponentialRampToValueAtTime(1e-4,r+t),l.connect(d),d.connect(s.destination),l.start(r),l.stop(r+t+.02)}function ce(){Q(520,.06,"square",.08)}function Ye(){Q(300,.08,"square",.12)}function Je(e){const t=380+e*60;Q(t,.1,"triangle",.14)}function Qe(){if(!C.value)return;const e=P();if(!e)return;const t=e.currentTime,o=e.createOscillator(),a=e.createGain();o.type="sawtooth",o.frequency.setValueAtTime(220,t),o.frequency.exponentialRampToValueAtTime(60,t+.35),a.gain.setValueAtTime(.16,t),a.gain.exponentialRampToValueAtTime(1e-4,t+.4),o.connect(a),a.connect(e.destination),o.start(t),o.stop(t+.42)}function Ze(e){if(!C.value)return;const t=P();if(!t)return;(e?[523,659,784,1047]:[392,330,261]).forEach((a,s)=>{const r=t.currentTime+s*.12,l=t.createOscillator(),d=t.createGain();l.type="triangle",l.frequency.setValueAtTime(a,r),d.gain.setValueAtTime(.14,r),d.gain.exponentialRampToValueAtTime(1e-4,r+.2),l.connect(d),d.connect(t.destination),l.start(r),l.stop(r+.22)})}function Se(e){if(!C.value)return;const t=P();if(!t)return;(e==="multi"?[440,660,880]:[520,780]).forEach((a,s)=>{const r=t.currentTime+s*.07,l=t.createOscillator(),d=t.createGain();l.type="triangle",l.frequency.setValueAtTime(a,r),d.gain.setValueAtTime(.13,r),d.gain.exponentialRampToValueAtTime(1e-4,r+.15),l.connect(d),d.connect(t.destination),l.start(r),l.stop(r+.17)})}function M(e,t,o){return Math.max(t,Math.min(o,e))}function et(e,t){let o=Math.min(e,to),a=o/Ee;return(a>t||a>Ge)&&(a=Math.min(t,Ge),o=a*Ee),{w:Math.max(240,Math.round(o)),h:Math.max(320,Math.round(a))}}function tt(){const t=M(Math.round((f-u*2)/52),6,14);ie=M(Math.round(v*.032),13,22),X=(f-u*2-ye*(t-1))/t,W=[];for(let o=0;o<oo;o++)for(let a=0;a<t;a++)W.push({x:u+a*(X+ye),y:ao+o*(ie+ye),w:X,h:ie,alive:!0,row:o});h=W.length,g=0}function ot(){n.baseW=M(Math.round(f*.16),64,150),n.w=n.baseW,n.h=13,n.x=(f-n.w)/2,n.y=v-Math.max(32,Math.round(v*.06)),n.vx=0,Y=0}function at(e){const o=e<Y?n.baseW*so:n.baseW;if(o!==n.w){const a=n.x+n.w/2;n.w=o,n.x=M(a-n.w/2,u,f-u-n.w)}}function Z(){return M(Math.hypot(f,v)*.0062,4.2,8)*He[F]}function Te(){w.r=M(Math.round(Math.min(f,v)*.014),6,9),w.x=n.x+n.w/2,w.y=n.y-n.h/2-w.r-1,w.vx=0,w.vy=0,x=[],A.value=!0}function D(){if(!A.value)return;A.value=!1;const e=Z(),t=Math.random()*.5-.25+Math.PI/2,o=Math.random()<.5?-1:1;x=[{x:w.x,y:w.y,vx:e*Math.cos(t)*o,vy:-Math.abs(e*Math.sin(t)),r:w.r}];const a=P();a&&a.state==="suspended"&&a.resume(),Q(660,.06,"square",.1)}function fe(e={}){const t=n.x;tt(),ot(),e.keepPaddlePosition&&(n.x=M(t,u,f-u-n.w)),x=[],q=[],Te(),j=0,F=0,O=[],L=0,V=null,I=!1}function de(){T.value=0,_.value=Oe,re.value=!1,E.value=!1,G.value=null,J=!1,i.value="idle",fe()}function pe(){i.value="playing",T.value=0,_.value=Oe,fe({keepPaddlePosition:!0})}function nt(e){const t=B.value;if(!t)return n.x;const o=t.getBoundingClientRect();return e-o.left-n.w/2}function Ae(e){n.vx=0,n.x=M(nt(e),u,f-u-n.w)}function st(e){const t=P();t&&t.state==="suspended"&&t.resume();try{e.target.setPointerCapture?.(e.pointerId)}catch{}Ae(e.clientX),i.value==="idle"?(pe(),D()):A.value&&D()}function rt(e){i.value!=="over"&&Ae(e.clientX)}function _e(e){if(e.code==="ArrowLeft"||e.code==="KeyA")K=!0,e.preventDefault();else if(e.code==="ArrowRight"||e.code==="KeyD")U=!0,e.preventDefault();else if(e.code==="Space"||e.code==="ArrowUp"){e.preventDefault();const t=P();t&&t.state==="suspended"&&t.resume(),i.value==="idle"?(pe(),D()):i.value==="over"?de():A.value&&D()}}function Be(e){e.code==="ArrowLeft"||e.code==="KeyA"?K=!1:(e.code==="ArrowRight"||e.code==="KeyD")&&(U=!1)}function me(e){F<e&&(F=e)}function it(e){const t=M((e.x-(n.x+n.w/2))/(n.w/2),-1,1),o=Math.PI/3,a=t*o,s=Z();e.vx=s*Math.sin(a),e.vy=-Math.abs(s*Math.cos(a)),e.y=n.y-n.h/2-e.r-.5,Ye()}function lt(e,t){const o=e.x+e.w/2,a=e.y+e.h/2;for(let s=0;s<7;s++)O.push({x:o,y:a,vx:(Math.random()-.5)*4.5,vy:(Math.random()-.5)*4.5-.5,life:1,maxLife:1,color:t,size:2+Math.random()*2.5})}function ut(e){if(Math.random()>no)return;const t=Me[Math.floor(Math.random()*Me.length)];q.push({x:e.x+e.w/2,y:e.y+e.h/2,vy:Math.max(1.6,v*.0028),type:t,w:Math.max(28,X*.62),h:16})}function ct(){if(x.length===0||x.length>=Ve)return;const e=x[0],t=Z(),o=Math.atan2(e.vy,e.vx);for(const a of[-.5,.5]){if(x.length>=Ve)break;const s=o+a;x.push({x:e.x,y:e.y,vx:t*Math.cos(s),vy:t*Math.sin(s),r:e.r})}Se("multi")}function ft(){Y=performance.now()+ro,Se("expand")}function dt(e){const t=n.y-n.h/2;
2q=q.filter(o=>(o.y+=o.vy*e,o.y+o.h/2>=t&&o.y-o.h/2<=t+n.h&&o.x+o.w/2>n.x&&o.x-o.w/2<n.x+n.w?(o.type==="multi"?ct():ft(),!1):o.y-o.h/2<=v))}function pt(e,t){e.alive=!1,g++;const o=be[e.row];T.value+=o.points,j++,lt(e,o.fill),Je(o.points),ut(e),j>=4&&me(1),j>=12&&me(2),(o.tier==="orange"||o.tier==="red")&&me(3),!V&&!I&&h>0&&g/h>=io&&(I=!0);const a=t.x+t.r-e.x,s=e.x+e.w-(t.x-t.r),r=t.y+t.r-e.y,l=e.y+e.h-(t.y-t.r),d=Math.min(a,s),ge=Math.min(r,l);d<ge?t.vx*=-1:t.vy*=-1}function mt(){_.value--,Qe(),L=.5,q=[],_.value<=0?Ce(!1):Te()}function Ce(e){if(i.value==="playing"&&(i.value="over",e&&V?G.value=V:J=!0,Ze(e),T.value>R.value)){R.value=T.value,re.value=!0;try{localStorage.setItem(We,String(R.value))}catch{}}}function vt(e,t){const o=Math.hypot(e.vx,e.vy)||t;e.vx=e.vx/o*t,e.vy=e.vy/o*t}function ht(e,t){e.x+=e.vx*t,e.y+=e.vy*t,e.x-e.r<u?(e.x=u+e.r,e.vx=Math.abs(e.vx),ce()):e.x+e.r>f-u&&(e.x=f-u-e.r,e.vx=-Math.abs(e.vx),ce()),e.y-e.r<u&&(e.y=u+e.r,e.vy=Math.abs(e.vy),ce());const o=n.y-n.h/2;if(e.vy>0&&e.y+e.r>=o&&e.y+e.r<=o+n.h+8&&e.x+e.r>n.x&&e.x-e.r<n.x+n.w&&it(e),e.y-e.r>v)return!0;for(const a of W)if(a.alive&&e.x+e.r>a.x&&e.x-e.r<a.x+a.w&&e.y+e.r>a.y&&e.y-e.r<a.y+a.h){pt(a,e);break}return g>=h&&i.value==="playing"&&Ce(!0),!1}function gt(){A.value&&(w.x=n.x+n.w/2,w.y=n.y-n.h/2-w.r-1)}function yt(e){if(dt(e),A.value)return;const t=Z();for(const a of x)vt(a,t);const o=[];for(const a of x){if(i.value!=="playing"){o.push(a);continue}const s=t*e,r=Math.max(1,Math.min(8,Math.ceil(s/Math.max(3,a.r))));let l=!1;for(let d=0;d<r;d++){if(ht(a,e/r)){l=!0;break}if(i.value!=="playing")break}l||o.push(a)}x=o,x.length===0&&i.value==="playing"&&mt()}function wt(e){const t=e.createRadialGradient(f/2,v*.35,10,f/2,v*.35,Math.max(f,v)*.8);t.addColorStop(0,"#1a1030"),t.addColorStop(.6,"#0d0a1c"),t.addColorStop(1,"#060410"),e.fillStyle=t,e.fillRect(0,0,f,v)}function xt(e){e.save(),e.strokeStyle="rgba(148,163,184,0.35)",e.lineWidth=u,e.beginPath(),e.moveTo(u/2,v+4),e.lineTo(u/2,u/2),e.lineTo(f-u/2,u/2),e.lineTo(f-u/2,v+4),e.stroke(),e.restore()}function ee(e,t,o,a,s,r){e.beginPath(),e.moveTo(t+r,o),e.arcTo(t+a,o,t+a,o+s,r),e.arcTo(t+a,o+s,t,o+s,r),e.arcTo(t,o+s,t,o,r),e.arcTo(t,o,t+a,o,r),e.closePath()}function kt(e){for(const t of W){if(!t.alive)continue;const o=be[t.row];e.save(),e.shadowColor=o.glow,e.shadowBlur=8,e.fillStyle=o.fill,ee(e,t.x,t.y,t.w,t.h,3),e.fill(),e.restore(),e.fillStyle="rgba(255,255,255,0.18)",ee(e,t.x+1.5,t.y+1.5,t.w-3,Math.max(2,t.h*.3),2),e.fill()}}function bt(e){const t=n.x,o=n.y-n.h/2,a=performance.now()<Y;e.save(),e.shadowColor=a?"rgba(34,211,238,0.8)":"rgba(56,189,248,0.7)",e.shadowBlur=12;const s=e.createLinearGradient(t,o,t,o+n.h);a?(s.addColorStop(0,"#a5f3fc"),s.addColorStop(1,"#22d3ee")):(s.addColorStop(0,"#7dd3fc"),s.addColorStop(1,"#0ea5e9")),e.fillStyle=s,ee(e,t,o,n.w,n.h,n.h/2),e.fill(),e.restore()}function Mt(e){const t=A.value?[w]:x;for(const o of t)e.save(),e.shadowColor="rgba(255,255,255,0.9)",e.shadowBlur=10,e.fillStyle="#f8fafc",e.beginPath(),e.arc(o.x,o.y,o.r,0,Math.PI*2),e.fill(),e.restore()}function St(e){for(const t of q){const o=t.x-t.w/2,a=t.y-t.h/2;e.save(),e.shadowColor=t.type==="multi"?"rgba(244,114,182,0.7)":"rgba(34,211,238,0.7)",e.shadowBlur=9,e.fillStyle=t.type==="multi"?"#f472b6":"#22d3ee",ee(e,o,a,t.w,t.h,t.h/2),e.fill(),e.restore(),e.fillStyle="#0f172a",e.font=`bold ${Math.round(t.h*.72)}px sans-serif`,e.textAlign="center",e.textBaseline="middle",e.fillText(t.type==="multi"?"M":"E",t.x,t.y+1)}}function Tt(e,t){for(let o=O.length-1;o>=0;o--){const a=O[o];if(a.x+=a.vx*t,a.y+=a.vy*t,a.vy+=.12*t,a.life-=.045*t,a.life<=0){O.splice(o,1);continue}e.globalAlpha=a.life,e.fillStyle=a.color,e.fillRect(a.x-a.size/2,a.y-a.size/2,a.size*a.life,a.size*a.life)}e.globalAlpha=1}function ve(e){const t=Math.max(e.width,e.height),o=document.createElement("canvas");o.width=t,o.height=t;const a=o.getContext("2d");if(!a)return o;a.fillStyle="#0d0a1c",a.fillRect(0,0,t,t);const s=Math.min(t/e.width,t/e.height),r=e.width*s,l=e.height*s;return a.drawImage(e,(t-r)/2,(t-l)/2,r,l),o}function Pe(e){ue=requestAnimationFrame(Pe);const t=B.value;if(!t)return;const o=t.getContext("2d");if(!o)return;const a=Math.min(32,e-le)/16.67;if(le=e,wt(o),xt(o),kt(o),i.value==="playing"&&(n.vx=K&&!U?-Re():U&&!K?Re():0,n.vx!==0&&(n.x=M(n.x+n.vx*a,u,f-u-n.w)),at(e),yt(a)),gt(),St(o),Tt(o,a),bt(o),Mt(o),I){I=!1;const s=B.value;
2s&&(V=ve(s))}if(J){J=!1;const s=B.value;s&&(G.value=ve(s))}L>0&&(o.fillStyle=`rgba(255,80,80,${L})`,o.fillRect(0,0,f,v),L=Math.max(0,L-.05*a))}function Re(){return M(f*.025,5,20)}function qe(){const e=B.value,t=H.value;if(!e||!t)return;const{w:o,h:a}=et(t.clientWidth,t.clientHeight);xe.value=o,ke.value=a,f=o,v=a;const s=window.devicePixelRatio||1;e.width=f*s,e.height=v*s;const r=e.getContext("2d");r&&r.setTransform(s,0,0,s,0,0);const l=i.value==="playing",d=T.value,ge=_.value;fe(),l&&(T.value=d,_.value=ge)}let he=null;return Bt(()=>{try{R.value=parseInt(localStorage.getItem(We)??"0",10)||0}catch{}qe(),he=new ResizeObserver(()=>qe()),H.value&&he.observe(H.value),window.addEventListener("keydown",_e),window.addEventListener("keyup",Be),le=performance.now(),ue=requestAnimationFrame(Pe),N("ready")}),Ct(()=>{cancelAnimationFrame(ue),he?.disconnect(),window.removeEventListener("keydown",_e),window.removeEventListener("keyup",Be);try{$?.close()}catch{}}),(e,t)=>(k(),S("div",It,[p("div",{ref_key:"gameAreaRef",ref:H,class:"flex-1 min-h-0 relative overflow-hidden flex items-center justify-center"},[p("div",{class:"relative cursor-none rounded-2xl overflow-hidden ring-1 ring-white/10 shadow-2xl shadow-black/50",style:Pt({width:xe.value+"px",height:ke.value+"px"})},[p("canvas",{ref_key:"canvasRef",ref:B,class:"block touch-none w-full h-full",onPointerdown:st,onPointermove:rt},null,544),oe(Le,{name:"bo-overlay"},{default:ae(()=>[i.value==="idle"?(k(),S("div",Dt,[t[3]||(t[3]=p("div",{class:"text-4xl mb-1"},"ð§±",-1)),p("div",zt,z(ne(b)("pages.games.breakout.tapToStart")),1),p("div",Nt,z(ne(b)("pages.games.breakout.controlsHint")),1)])):te("",!0)]),_:1}),oe(Le,{name:"bo-overlay"},{default:ae(()=>[i.value==="playing"&&A.value?(k(),S("div",Ht,[p("div",Xt,z(ne(b)("pages.games.breakout.launchHint")),1)])):te("",!0)]),_:1}),i.value==="playing"?(k(),S("div",jt,[p("div",Ft,z(T.value),1),p("div",Kt,[(k(!0),S(Rt,null,qt(_.value,o=>(k(),S("span",{key:o,class:"w-2.5 h-2.5 rounded-full bg-orange-400 shadow-[0_0_6px_rgba(251,146,60,0.8)]"}))),128))])])):te("",!0),p("div",Ut,[p("button",{class:"w-9 h-9 flex items-center justify-center rounded-full bg-black/30 text-white/80 hover:bg-black/50 transition",onClick:t[0]||(t[0]=$e(o=>C.value=!C.value,["stop"]))},[C.value?(k(),S("svg",Yt,[...t[4]||(t[4]=[p("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},null,-1),p("path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07"},null,-1)])])):(k(),S("svg",Jt,[...t[5]||(t[5]=[p("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},null,-1),p("line",{x1:"23",y1:"9",x2:"17",y2:"15"},null,-1),p("line",{x1:"17",y1:"9",x2:"23",y2:"15"},null,-1)])]))]),i.value!=="over"?(k(),De($t,{key:0,"theme-class":"bg-black/30 text-white/80 hover:bg-black/50",onClick:t[1]||(t[1]=$e(o=>je(),["stop"]))})):te("",!0)])],4)],512),oe(At,{show:i.value==="over"||E.value,achievement:Xe.value,"thumbnail-source":G.value??B.value,onClose:Fe},{actions:ae(()=>[p("button",{class:"inline-flex items-center gap-1.5 px-5 py-2 rounded-xl text-sm font-bold transition-all active:scale-95 bg-orange-400 text-slate-900 hover:bg-orange-300 shadow-lg shadow-orange-400/25",onClick:t[2]||(t[2]=o=>Ue())},[i.value==="over"?(k(),S("svg",Qt,[...t[6]||(t[6]=[p("polyline",{points:"1 4 1 10 7 10"},null,-1),p("path",{d:"M3.51 15a9 9 0 1 0 .49-4.9"},null,-1)])])):i.value==="idle"?(k(),S("svg",Zt,[...t[7]||(t[7]=[p("polygon",{points:"5 3 19 12 5 21 5 3"},null,-1)])])):(k(),S("svg",eo,[...t[8]||(t[8]=[p("polyline",{points:"20 6 9 17 4 12"},null,-1)])])),Lt(" "+z(Ke.value),1)])]),_:1},8,["show","achievement","thumbnail-source"])]))}}),uo=Object.assign(Et(lo,[["__scopeId","data-v-a73decd9"]]),{__name:"GamesBreakoutGame"}),la=Ie({__name:"breakout",setup(Ne){const{t:m}=ze(),N=y(!1);Gt({title:m("meta.games.breakout.title"),description:m("meta.games.breakout.description"),keywords:m("meta.games.breakout.keywords")});const b=[{question:m("pages.games.breakout.faq1q"),answer:m("pages.games.breakout.faq1a")},{question:m("pages.games.breakout.faq2q"),answer:m("pages.games.breakout.faq2a")},{question:m("pages.games.breakout.faq3q"),answer:m("pages.games.breakout.faq3a")},{question:m("pages.games.breakout.faq4q"),answer:m("pages.games.breakout.faq4a")},{question:m("pages.games.breakout.faq5q"),answer:m("pages.games.breakout.faq5a")}],{steps:se}=Wt("games/breakout");return Ot({name:m("meta.games.breakout.title"),description:m("meta.games.breakout.description"),category:"GameApplication",howToSteps:we(()=>Vt(se.value)),faqs:b}),(c,i)=>(k(),De(_t,{"tool-id":"breakout",title:ne(m)("meta.games.breakout.shortName"),faqs:b,"is-ready":N.value,"game-bg-style":"radial-gradient(ellipse at 50% 40%, #1a1030 0%, #0d0a1c 60%, #060410 100%)","overlay-bg-class":"bg-slate-900/80 backdrop-blur-sm","overlay-text-class":"text-slate-200"},{default:ae(()=>[oe(uo,{class:"flex-1 min-h-0",onReady:i[0]||(i[0]=T=>N.value=!0)})]),_:1},8,["title","is-ready"]))}});
2export{la 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.