1"use strict";(self.webpackChunkwindows=self.webpackChunkwindows||[]).push([[275],{66275:(e,t,a)=>{a.r(t),a.d(t,{default:()=>h});var n=a(65043),r=a(81929),o=a.n(r),s=a(6720),i=a(60184),l=a(82639),c=a(70579);const h=e=>{let{isAppOpen:t,toggleDesktopDestroyer:a,bounds:r,isActive:h=!1,bringToFront:d,isMinimized:u=!1,minimizeWindow:f}=e;const m=(0,n.useRef)(null),g=(0,n.useRef)(null),M=(0,n.useRef)(null),x=(0,n.useRef)(null),p=(0,n.useRef)(null),y=(0,n.useRef)(null),b=(0,n.useRef)(0),[w,v]=(0,n.useState)(null),[k,P]=(0,n.useState)(!1),[z,S]=(0,n.useState)({x:0,y:0}),C=(0,n.useRef)({x:0,y:0}),I=(0,n.useRef)(0),R=(0,n.useRef)([]),j=(0,n.useRef)([]),T=(0,n.useRef)(null),F=(0,n.useRef)([]),N=(0,n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(["fire","chainsaw","lightning","paintgun","eraser"].includes(e))t?y.current&&!y.current.paused||(y.current=new Audio("".concat("","/audio/destroyer/").concat(e,".mp3")),y.current.volume=.3,y.current.loop=!0,y.current.play().catch((e=>console.log("Audio play failed:",e)))):y.current&&(y.current.pause(),y.current.currentTime=0,y.current=null);else{const t=Date.now();if(t-b.current<100)return;b.current=t;const a=new Audio("".concat("","/audio/destroyer/").concat(e,".mp3"));a.volume=.3,a.play().catch((e=>console.log("Audio play failed:",e)))}}),[]);(0,n.useEffect)((()=>{if(t&&g.current&&M.current&&x.current){const e=g.current,t=M.current,a=x.current;e.width=window.innerWidth,e.height=window.innerHeight,t.width=window.innerWidth,t.height=window.innerHeight,a.width=window.innerWidth,a.height=window.innerHeight;let n=performance.now();const r=()=>{const e=performance.now(),t=Math.min((e-n)/1e3,.1);n=e;const o=a.getContext("2d");o.clearRect(0,0,a.width,a.height),R.current=R.current.filter((e=>(e.update(t),e.life>0&&(e.draw(o),!0)))),F.current.forEach((e=>{e.update(t)&&(j.current.push({type:"eaten",x:e.x,y:e.y,size:3+3*Math.random(),timestamp:Date.now()}),B()),e.draw(o)})),T.current=requestAnimationFrame(r)};return r(),()=>{T.current&&cancelAnimationFrame(T.current),y.current&&(y.current.pause(),y.current.currentTime=0,y.current=null)}}}),[t]),(0,n.useEffect)((()=>{y.current&&(y.current.pause(),y.current.currentTime=0,y.current=null)}),[w]);const E=(0,n.useCallback)((function(e,t,a,n){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return{x:e,y:t,vx:a,vy:n,life:r.life||1,maxLife:r.life||1,size:r.size||5,color:r.color||"#fff",rotation:r.rotation||0,rotationSpeed:r.rotationSpeed||0,gravity:void 0!==r.gravity?r.gravity:.3,friction:r.friction||.99,alpha:r.alpha||1,fadeRate:r.fadeRate||.02,shape:r.shape||"circle",bounce:r.bounce||0,ringThickness:r.ringThickness||2,expandRate:r.expandRate||0,update(e){const t=60*e;this.vy+=this.gravity*t,this.vx*=this.friction,this.vy*=this.friction,this.x+=this.vx*t,this.y+=this.vy*t,this.rotation+=this.rotationSpeed*t,this.life-=this.fadeRate,this.alpha=this.life/this.maxLife,this.expandRate>0&&(this.size+=this.expandRate*t),this.bounce>0&&this.y>window.innerHeight-80&&(this.y=window.innerHeight-50,this.vy*=-this.bounce,this.vx*=.8)},draw(e){switch(e.save(),e.globalAlpha=this.alpha,e.translate(this.x,this.y),e.rotate(this.rotation),this.shape){case"circle":default:e.fillStyle=this.color,e.beginPath(),e.arc(0,0,this.size,0,2*Math.PI),e.fill();break;case"square":e.fillStyle=this.color,e.fillRect(-this.size/2,-this.size/2,this.size,this.size);break;case"spark":e.strokeStyle=this.color,e.lineWidth=2,e.shadowBlur=10,e.shadowColor=this.color,e.beginPath(),e.moveTo(-this.size,0),e.lineTo(this.size,0),e.stroke(),e.shadowBlur=0;break;case"ring":e.strokeStyle=this.color,e.lineWidth=this.ringThickness,e.beginPath(),e.arc(0,0,this.size,0,2*Math.PI),e.stroke()}e.restore()}}}),[]),A=(0,n.useCallback)(((e,t,a)=>{for(let n=0;n<a;n++){const a=Math.random()*Math.PI*2,n=4*Math.random()+1.5,r=Math.cos(a)*n,o=Math.sin(a)*n,s=Math.floor(139+50*Math.random()),i=Math.floor(69+40*Math.random());R.current.push(E(e,t,r,o,{size:5*Math.random()+2,color:"rgb(".concat(s,", ").concat(i,", ").concat(Math.floor(30*Math.random()+19),")"),shape:"square",life:1*Math.random()+.6,gravity:.25,fadeRate:.015,rotationSpeed:.15*(Math.random()-.5),bounce:.1}))}}),[E]),D=(0,n.useCallback)(((e,t,a)=>{for(let n=0;n<a;n++){const a=-Math.PI/2+.9*(Math.random()-.5),n=5*Math.random()+2.5,r=Math.cos(a)*n,o=Math.sin(a)*n,s=Math.random();let i;i=s<.25?"rgb(".concat(255,", ",Math.floor(80+40*Math.random()),", ").concat(Math.floor(20*Math.random()),")"):s<.5?"rgb(".concat(255,", ",Math.floor(140+60*Math.random()),", ").concat(Math.floor(30*Math.random()),")"):s<.75?"rgb(".concat(255,", ",Math.floor(200+45*Math.random()),", ").concat(Math.floor(60*Math.random()),")"):"rgb(".concat(255,", ",Math.floor(230+25*Math.random()),", ").concat(Math.floor(100+100*Math.random()),")"),R.current.push(E(e,t,r,o,{size:14*Math.random()+5,color:i,shape:"circle",life:.7*Math.random()+.4,gravity:-.35,fadeRate:.025,friction:.97}))}}),[E]),W=(0,n.useCallback)(((e,t,a)=>{for(let n=0;n<20;n++){const n=-Math.PI/2+1.2*(Math.random()-.5),r=8*Math.random()+4,o=Math.cos(n)*r,s=Math.sin(n)*r;R.current.push(E(e,t,o,s,{size:5*Math.random()+2,color:a,shape:"circle",life:1.5*Math.random()+1,gravity:.4,fadeRate:.008,bounce:.3,friction:.98}))}j.current.push({type:"paint",x:e,y:t,size:25+20*Math.random(),color:a,drips:Array.from({length:6},(()=>({x:50*(Math.random()-.5),length:20*Math.random()+10}))),splatters:Array.from({length:12},(()=>({angle:Math.random()*Math.PI*2,dist:20*Math.random()+5,size:4*Math.random()+2}))),timestamp:Date.now()})}),[E]),L=(0,n.useCallback)(((e,t)=>{for(let a=0;a<8;a++){const a=Math.random()*Math.PI*2,n=4*Math.random()+2;R.current.push(E(e,t,Math.cos(a)*n,Math.sin(a)*n,{size:3*Math.random()+1,color:"#FFAA00",shape:"circle",life:.1,gravity:0,fadeRate:.05,bounce:0}))}R.current.push(E(e-20,t,-3,-2,{size:4,color:"#FFD700",shape:"square",life:1,gravity:.5,fadeRate:.01,bounce:.4,rotationSpeed:.3}));for(let a=0;a<5;a++)R.current.push(E(e,t,2*(Math.random()-.5),2*-Math.random(),{size:8*Math.random()+4,color:"rgba(100, 100, 100, ".concat(.3+.2*Math.random(),")"),shape:"circle",life:.8,gravity:-.05,fadeRate:.015,bounce:0}));j.current.push({type:"bullethole",x:e,y:t,size:6,cracks:Array.from({length:8},((e,t)=>({angle:2*Math.PI*t/8+.3*(Math.random()-.5),length:8+10*Math.random(),offset:3*(Math.random()-.5)}))),secondaryCracks:Array.from({length:12},(()=>({angle:Math.random()*Math.PI*2,length:3+5*Math.random()}))),residue:Array.from({length:6},((e,t)=>({angle:2*Math.PI*t/6,dist:11+8*Math.random(),size:3+3*Math.random()}))),debris:Array.from({length:4},(()=>({angle:Math.random()*Math.PI*2,dist:6+6*Math.random(),width:1+Math.random(),height:1+Math.random()}))),timestamp:Date.now()})}),[E]),q=(0,n.useCallback)(((e,t)=>({x:e,y:t,vx:2*(Math.random()-.5),vy:2*(Math.random()-.5),size:4,color:"rgb(".concat(100+40*Math.random(),", ").concat(60+20*Math.random(),", ").concat(20+10*Math.random(),")"),eatTimer:0,eatInterval:.3+.5*Math.random(),update(e){this.vx+=.3*(Math.random()-.5),this.vy+=.3*(Math.random()-.5);const t=Math.sqrt(this.vx*this.vx+this.vy*this.vy);return t>3&&(this.vx=this.vx/t*3,this.vy=this.vy/t*3),this.x+=this.vx,this.y+=this.vy,this.x<0&&(this.x=window.innerWidth),this.x>window.innerWidth&&(this.x=0),this.y<0&&(this.y=window.innerHeight),this.y>window.innerHeight&&(this.y=0),this.eatTimer+=e,this.eatTimer>
1=this.eatInterval&&(this.eatTimer=0,!0)},draw(e){e.save(),e.fillStyle=this.color,e.beginPath(),e.arc(this.x,this.y,this.size,0,2*Math.PI),e.fill(),e.strokeStyle=this.color,e.lineWidth=1,e.beginPath(),e.moveTo(this.x-2,this.y-3),e.lineTo(this.x-4,this.y-6),e.moveTo(this.x+2,this.y-3),e.lineTo(this.x+4,this.y-6),e.stroke(),e.restore()}})),[]),B=(0,n.useCallback)((()=>{const e=M.current;if(!e)return;const t=e.getContext("2d");t.clearRect(0,0,e.width,e.height);[...j.current].sort(((e,t)=>(e.timestamp||0)-(t.timestamp||0))).forEach((e=>{switch(e.type){case"sawcut":t.save(),t.translate(e.x,e.y),t.rotate(e.angle),t.strokeStyle="#222",t.lineWidth=e.width||10,t.lineCap="round",t.beginPath(),t.moveTo(-e.length/2,0),t.lineTo(e.length/2,0),t.stroke(),t.strokeStyle="#111",t.lineWidth=.6*(e.width||10),t.beginPath(),t.moveTo(-e.length/2,0),t.lineTo(e.length/2,0),t.stroke(),t.restore();break;case"scorch":const a=t.createRadialGradient(e.x,e.y,0,e.x,e.y,e.size);a.addColorStop(0,"rgba(10, 10, 10, ".concat(e.intensity,")")),a.addColorStop(.3,"rgba(30, 25, 20, ".concat(.7*e.intensity,")")),a.addColorStop(.6,"rgba(50, 40, 30, ".concat(.4*e.intensity,")")),a.addColorStop(1,"transparent"),t.fillStyle=a,t.beginPath(),t.arc(e.x,e.y,e.size,0,2*Math.PI),t.fill();break;case"eaten":t.fillStyle="rgba(0, 0, 0, 0.8)",t.beginPath(),t.arc(e.x,e.y,e.size,0,2*Math.PI),t.fill(),t.strokeStyle="rgba(139, 69, 19, 0.6)",t.lineWidth=1,t.stroke();break;case"burn":const n=t.createRadialGradient(e.x,e.y,0,e.x,e.y,e.size);n.addColorStop(0,"rgba(0, 0, 0, ".concat(e.intensity,")")),n.addColorStop(.3,"rgba(40, 25, 15, ".concat(.8*e.intensity,")")),n.addColorStop(.6,"rgba(80, 50, 30, ".concat(.5*e.intensity,")")),n.addColorStop(1,"transparent"),t.fillStyle=n,t.beginPath(),t.arc(e.x,e.y,e.size,0,2*Math.PI),t.fill();break;case"paint":t.fillStyle=e.color,t.beginPath(),t.arc(e.x,e.y,e.size,0,2*Math.PI),t.fill(),e.drips.forEach((a=>{t.fillRect(e.x+a.x,e.y+e.size,2,a.length)})),e.splatters.forEach((a=>{t.beginPath(),t.arc(e.x+Math.cos(a.angle)*(e.size+a.dist),e.y+Math.sin(a.angle)*(e.size+a.dist),a.size,0,2*Math.PI),t.fill()}));break;case"bullethole":t.save();const r=t.createRadialGradient(e.x,e.y,0,e.x,e.y,e.size);r.addColorStop(0,"rgba(0, 0, 0, 1)"),r.addColorStop(.6,"rgba(10, 10, 10, 0.95)"),r.addColorStop(1,"rgba(20, 20, 20, 0.8)"),t.fillStyle=r,t.beginPath(),t.arc(e.x,e.y,e.size,0,2*Math.PI),t.fill(),e.cracks.forEach(((a,n)=>{t.strokeStyle=n%2===0?"rgba(15, 15, 15, 0.9)":"rgba(25, 25, 25, 0.7)",t.lineWidth=n%2===0?2:1,t.beginPath(),t.moveTo(e.x,e.y);const r=e.x+Math.cos(a.angle)*a.length*.5,o=e.y+Math.sin(a.angle)*a.length*.5;t.lineTo(r+a.offset,o+a.offset),t.lineTo(e.x+Math.cos(a.angle)*a.length,e.y+Math.sin(a.angle)*a.length),t.stroke()})),t.strokeStyle="rgba(30, 30, 30, 0.5)",t.lineWidth=.5,e.secondaryCracks.forEach((a=>{t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(e.x+Math.cos(a.angle)*a.length,e.y+Math.sin(a.angle)*a.length),t.stroke()})),t.fillStyle="rgba(35, 35, 35, 0.3)",e.residue.forEach((a=>{t.beginPath(),t.arc(e.x+Math.cos(a.angle)*a.dist,e.y+Math.sin(a.angle)*a.dist,a.size,0,2*Math.PI),t.fill()})),t.fillStyle="rgba(40, 40, 40, 0.6)",e.debris.forEach((a=>{t.fillRect(e.x+Math.cos(a.angle)*a.dist,e.y+Math.sin(a.angle)*a.dist,a.width,a.height)})),t.restore()}}))}),[]),H=(0,n.useCallback)(((e,t,a)=>{if(w)switch(w){case"hammer":{a.save();const n=x.current.getContext("2d");for(let a=0;a<3;a++)R.current.push(E(e,t,0,0,{size:15+10*a,color:"rgba(255, 255, 255, 0.6)",shape:"ring",life:.3,gravity:0,fadeRate:.05,friction:1,ringThickness:2,expandRate:2+.5*a}));for(let a=0;a<20;a++){const a=Math.random()*Math.PI*2,n=6*Math.random()+3;R.current.push(E(e,t,Math.cos(a)*n,Math.sin(a)*n,{size:4*Math.random()+2,color:"rgba(".concat(200+55*Math.random(),", ").concat(220+35*Math.random(),", ").concat(240+15*Math.random(),", ").concat(.7+.3*Math.random(),")"),shape:"square",life:.8+.4*Math.random(),gravity:.3,fadeRate:.015,friction:.96,bounce:.4,rotationSpeed:.3*(Math.random()-.5)}))}n.save(),n.globalAlpha=.8,n.shadowBlur=30,n.shadowColor="#ffffff",n.fillStyle="#ffffff",n.beginPath(),n.arc(e,t,18,0,2*Math.PI),n.fill(),n.restore(
1);const r=a.createRadialGradient(e,t,0,e,t,15);r.addColorStop(0,"rgba(255, 255, 255, 0.5)"),r.addColorStop(.5,"rgba(200, 200, 200, 0.3)"),r.addColorStop(1,"rgba(150, 150, 150, 0.1)"),a.fillStyle=r,a.beginPath(),a.arc(e,t,15,0,2*Math.PI),a.fill();const o=15+Math.floor(5*Math.random());for(let s=0;s<o;s++){const n=2*Math.PI*s/o+.3*(Math.random()-.5),r=30+50*Math.random(),i=s%3===0?2.5:s%2===0?1.8:1.2;a.strokeStyle="rgba(0, 0, 0, 0.8)",a.lineWidth=i,a.lineCap="round",a.shadowBlur=3,a.shadowColor="rgba(0, 0, 0, 0.5)",a.beginPath(),a.moveTo(e,t);let l=e,c=t;const h=3+Math.floor(2*Math.random());for(let e=0;e<h;e++){const t=r/h,o=12*(Math.random()-.5),s=l,i=c;if(l+=Math.cos(n)*t+o,c+=Math.sin(n)*t+o,a.lineTo(l,c),Math.random()>.5&&e<h-1){const e=n+(Math.random()-.5)*(Math.PI/3),r=t*(.3+.4*Math.random());a.moveTo(s,i),a.lineTo(s+Math.cos(e)*r,i+Math.sin(e)*r),a.moveTo(l,c)}}a.stroke()}a.strokeStyle="rgba(255, 255, 255, 0.15)",a.lineWidth=1,a.shadowBlur=0;for(let s=0;s<o;s+=2){const n=2*Math.PI*s/o,r=30+50*Math.random();a.beginPath(),a.moveTo(e,t),a.lineTo(e+Math.cos(n)*r,t+Math.sin(n)*r),a.stroke()}a.restore();break}case"chainsaw":{const a=Date.now();if(a-I.current<10)return;I.current=a;let n=Math.random()*Math.PI*2;if(null!==C.current.x&&null!==C.current.y){const a=e-C.current.x,r=t-C.current.y;0===a&&0===r||(n=Math.atan2(r,a))}j.current.push({type:"sawcut",x:e,y:t,angle:n,length:80,width:5,timestamp:Date.now()}),A(e,t,12),B();break}case"fire":D(e,t,8),j.current.push({type:"burn",x:e,y:t,size:20+15*Math.random(),intensity:.6+.3*Math.random(),timestamp:Date.now()}),B();break;case"lightning":{const a=Date.now();if(a-I.current<25)return;I.current=a;const n=x.current.getContext("2d"),r=function(e,t,a,o,s){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i>4||o<8)return;const l=.6*(Math.random()-.5),c=e+Math.cos(a+l)*o,h=t+Math.sin(a+l)*o;n.save(),n.shadowBlur=15,n.shadowColor="#00e5ff",n.strokeStyle="#ffffff",n.lineWidth=s,n.lineCap="round",n.beginPath(),n.moveTo(e,t),n.lineTo(c,h),n.stroke(),n.strokeStyle="#00d4ff",n.lineWidth=s+2,n.shadowBlur=25,n.globalAlpha=.5,n.beginPath(),n.moveTo(e,t),n.lineTo(c,h),n.stroke(),n.restore();const d=Math.floor(o/15);for(let n=0;n<d;n++){const a=n/d,r=e+(c-e)*a,o=t+(h-t)*a,s=Math.random()*Math.PI*2,i=3*Math.random()+1;R.current.push(E(r,o,Math.cos(s)*i,Math.sin(s)*i,{size:3*Math.random()+1,color:Math.random()>.5?"#ffffff":"#00e5ff",shape:"spark",life:.2+.2*Math.random(),gravity:.05,fadeRate:.04,friction:.95}))}const u=0===i?2+Math.floor(3*Math.random()):Math.random()>.4?1:2;for(let n=0;n<u;n++)if(Math.random()>.3){const n=.3+.5*Math.random(),l=e+(c-e)*n,d=t+(h-t)*n,u=a+(Math.random()-.5)*(Math.PI/2),f=o*(.5+.4*Math.random()),m=Math.max(1,s-.5);r(l,d,u,f,m,i+1)}i<3&&r(c,h,a+.4*(Math.random()-.5),.7*o,Math.max(1,s-.5),i+1)},o=3+Math.floor(3*Math.random());for(let s=0;s<o;s++){const a=2*Math.PI*s/o+.8*(Math.random()-.5),n=40+50*Math.random();r(e,t,a,n,3,0)}n.save(),n.shadowBlur=40,n.shadowColor="#00e5ff",n.fillStyle="#ffffff",n.beginPath(),n.arc(e,t,8,0,2*Math.PI),n.fill(),n.globalAlpha=.3,n.shadowBlur=60,n.fillStyle="#00d4ff",n.beginPath(),n.arc(e,t,20,0,2*Math.PI),n.fill(),n.restore();for(let s=0;s<25;s++){const a=Math.random()*Math.PI*2,n=6*Math.random()+3;R.current.push(E(e,t,Math.cos(a)*n,Math.sin(a)*n,{size:4*Math.random()+2,color:Math.random()>.3?"#ffffff":"#00e5ff",shape:"spark",life:.3+.3*Math.random(),gravity:.1,fadeRate:.035,friction:.94}))}j.current.push({type:"scorch",x:e,y:t,size:25+20*Math.random(),intensity:.85,timestamp:Date.now()}),B();break}case"termites":F.current.push(q(e,t));break;case"eraser":{const n=100/2;for(let a=0;a<15;a++){const a=Math.random()*Math.PI*2,n=4*Math.random()+1.5;R.current.push(E(e,t,Math.cos(a)*n,Math.sin(a)*n,{size:5*Math.random()+2,color:"rgba(255, 255, 255, 0.9)",shape:"square",life:.6,gravity:.15,fadeRate:.02,friction:.96}))}const r=n*n;j.current=j.current.filter((a=>{const n=a.x-e,o=a.y-t;return n*n+o*o>r})),F.current=F.current.filter((a=>{const n=a.x-e,o=a.y-t;return n*n+o*o>r})),B(),a.save(),a.globalCompositeOperation="destination-out",a.fillStyle="rgba(0,0,0,1)",a.beginPath(),a.arc(e,t,n,0,2*Math.PI),a.fill(),a.restore(
1);const o=x.current.getContext("2d");o.save(),o.strokeStyle="rgba(255, 105, 180, 0.7)",o.lineWidth=3,o.setLineDash([5,5]),o.beginPath(),o.arc(e,t,n,0,2*Math.PI),o.stroke(),o.strokeStyle="rgba(255, 255, 255, 0.5)",o.lineWidth=2,o.setLineDash([3,3]),o.beginPath(),o.arc(e,t,n-5,0,2*Math.PI),o.stroke(),o.restore();break}case"paintgun":{const a=Date.now();if(a-I.current<20)return;I.current=a;const n=["#FF0000","#00FF00","#0000FF","#FFFF00","#FF00FF","#00FFFF","#FFA500","#FF1493"],r=n[Math.floor(Math.random()*n.length)];W(e,t,r),B();break}case"gun":if(L(e,t),Math.random()>.33){const a=2+Math.floor(3*Math.random());for(let n=0;n<a;n++){const a=Math.PI/2+.6*(Math.random()-.5),n=3*Math.random()+2,r=Math.cos(a)*n,o=Math.sin(a)*n;R.current.push(E(e-10+5*Math.random(),t-5+5*Math.random(),r,o,{size:3*Math.random()+2,color:"#FFD700",shape:"square",life:1.5+.5*Math.random(),gravity:.4,fadeRate:.008,bounce:.3,rotationSpeed:.4*(Math.random()-.5)}))}}B()}}),[w,A,D,W,L,B,q,E]);(0,n.useEffect)((()=>{const e=g.current;if(!e||!t)return;const a=e.getContext("2d");document.body.style.cursor=w?"none":"default";const n=e=>{if(S({x:e.clientX,y:e.clientY}),!k||!w)return;if(e.target.closest(".destroyer-window"))return;const t=e.clientX,n=e.clientY;if(["fire","chainsaw","lightning","paintgun"].includes(w)){const e=t-C.current.x,r=n-C.current.y;Math.sqrt(e*e+r*r)>8&&(H(t,n,a),C.current={x:t,y:n})}"eraser"===w&&H(t,n,a)},r=e=>{if(e.target.closest(".destroyer-window")||!w)return;P(!0);const t=e.clientX,n=e.clientY;C.current={x:t,y:n},H(t,n,a);["fire","chainsaw","lightning","paintgun","eraser"].includes(w)&&y.current&&!y.current.paused||N(w,!0)},o=()=>{P(!1),N(w,!1)};return document.addEventListener("mousemove",n),document.addEventListener("mousedown",r),document.addEventListener("mouseup",o),()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mousedown",r),document.removeEventListener("mouseup",o),document.body.style.cursor="default"}}),[t,k,w,H,N]);const G=()=>{const e=g.current,t=M.current,a=x.current;if(e){e.getContext("2d").clearRect(0,0,e.width,e.height)}if(t){t.getContext("2d").clearRect(0,0,t.width,t.height)}if(a){a.getContext("2d").clearRect(0,0,a.width,a.height)}j.current=[],R.current=[],F.current=[]};(0,n.useEffect)((()=>{t||G()}),[t]),(0,n.useEffect)((()=>{if(!t)return;const e=e=>{const t=e.key.toLowerCase(),a={1:"hammer",2:"chainsaw",3:"fire",4:"lightning",5:"termites",6:"eraser",7:"paintgun",8:"gun"};a[t]?(v(a[t]),N(a[t])):"c"===t&&G()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[t,N]);const K=[{name:"hammer",icon:i.Kni,label:"Hammer",sound:"crack",key:"1"},{name:"chainsaw",icon:l.Mhx,label:"Chainsaw",sound:"chainsaw",key:"2"},{name:"fire",icon:i.Lxr,label:"Fire",sound:"fire",key:"3"},{name:"lightning",icon:i.lHQ,label:"Lightning",sound:"zap",key:"4"},{name:"termites",icon:i.KRc,label:"Termites",sound:"eat",key:"5"},{name:"eraser",icon:i.iOG,label:"Eraser",sound:"erase",key:"6"},{name:"paintgun",icon:l.WcA,label:"Paint Gun",sound:"paint",key:"7"},{name:"gun",icon:l.WcA,label:"Gun",sound:"shot",key:"8"}];return(0,c.jsxs)(c.Fragment,{children:[t&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("canvas",{ref:g,className:"fixed inset-0 select-none",style:{zIndex:50,pointerEvents:"none",userSelect:"none"}}),(0,c.jsx)("canvas",{ref:M,className:"fixed inset-0 select-none",style:{zIndex:50,pointerEvents:"none",userSelect:"none"}}),(0,c.jsx)("canvas",{ref:x,className:"fixed inset-0 select-none",style:{zIndex:50,pointerEvents:"none",userSelect:"none"}}),w&&"gun"===w&&(0,c.jsx)("img",{ref:p,src:"".concat("","/images/cursors/gun.png"),alt:"",className:"fixed pointer-events-none select-none transition-transform duration-75",style:{left:z.x,top:z.y,transform:k?"translate(50%, 30%)":"translate(50%, 30%) rotate(-5deg)",zIndex:9999,width:"120px"}}),w&&"hammer"===w&&(0,c.jsx)("img",{src:"".concat("","/images/cursors/hammer.png"),alt:"",className:"fixed pointer-events-none select-none transition-transform duration-100",style:{left:z.x,top:z.y,transform:k?"translate(-10%, -40%)":"translate(-10%, -40%) rotate(20deg)",animationDuration:k?"0.1s":"0.3s",zIndex:9999,width:"200px"}}),w&&"chainsaw"===w&&(0,c.jsx)("img",{src:"".concat("","/images/cursors/chainsaw.png"),alt:"",className:"fixed pointer-events-none select-none ".concat(k?"chainsaw-shake":""),style:{left:z.x,top:z.y,transform:"translate(-10%, -20%)",zIndex:9999,width:"120px"}}),w&&"fire"===w&&(0,c.jsx)("img",{src:"".concat("","/images/cursors/fire.png"),alt:"",className:"fixed pointer-events-none select-none",style:{left:z.x,top:z.y,transform:"translate(-90%, 0%)",zIndex:9999,width:"90px"}}),w&&"lightning"===w&&(0,c.jsx)("img",{src:"".concat("","/images/cursors/lightning.png"),alt:"",className:"fixed pointer-events-none select-none",style:{left:z.x,top:z.y,transform:"translate(-50%, -50%)",zIndex:9999,width:"100px"}}),w&&"termites"===w&&(0,c.jsx)("img",{src:"".concat("","/images/cursors/termites.png"),alt:"",className:"fixed pointer-events-none select-none",style:{left:z.x,top:z.y,transform:"translate(-40%, 60%)",rotate:"70deg",zIndex:9999,width:"80px"}}),w&&"eraser"===w&&(0,c.jsx)("img",{src:"".concat("","/images/cursors/eraser.png"),alt:"",className:"fixed pointer-events-none select-none",style:{left:z.x,top:z.y,transform:"translate(-50%, -50%)",zIndex:9999,width:"80px"}}),w&&"paintgun"===w&&(0,c.jsx)("img",{src:"".concat("","/images/cursors/paintgun.png"),alt:"",className:"fixed pointer-events-none select-none transition-transform duration-75",style:{left:z.x,top:z.y,transform:"translate(0%, -40%)",zIndex:9999,rotate:k?"10deg":"0deg",width:"100px"}})]}),(0,c.jsx)("div",{className:"".concat(t&&!u?"":"hidden"," ").concat(h?"z-40":"z-30"," w-full h-screen pointer-events-none absolute transition-none select-none"),children:(0,c.jsx)(o(),{handle:".title-bar",nodeRef:m,bounds:r,children:(0,c.jsxs)("div",{ref:m,className:"destroyer-window window bg-neutral-900 h-[500px] w-96 rounded-xl overflow-hidden border-neutral-700 border-[1.5px] pointer-events-auto",onMouseDown:d,children:[(0,c.jsxs)("div",{className:"title-bar bg-neutral-800 text-white h-9 flex justify-between items-center select-none",children:[(0,c.jsx)("div",{className:"ml-4 font-normal",children:"Desktop Destroyer"}),(0,c.jsxs)("div",{className:"flex",children:[(0,c.jsx)("button",{className:"hover:bg-neutral-700
1w-11 h-9 flex justify-center items-center text-xl",onClick:f,"aria-label":"Minimize",children:(0,c.jsx)(s.cxF,{})}),(0,c.jsx)("button",{className:"hover:bg-neutral-700 w-11 h-9 flex justify-center items-center text-sm","aria-label":"Maximize",children:(0,c.jsx)(s.Dnq,{})}),(0,c.jsx)("button",{className:"hover:bg-red-700 w-12 h-9 flex justify-center items-center text-xl",onClick:a,"aria-label":"Close",children:(0,c.jsx)(s.m6K,{})})]})]}),(0,c.jsxs)("div",{className:"content text-white p-3 select-none overflow-hidden h-[calc(100%-36px)] bg-gradient-to-br from-neutral-900 via-neutral-900 to-neutral-800 flex flex-col",children:[(0,c.jsx)("div",{className:"text-center mb-2 text-[10px] text-neutral-400 font-medium",children:"Press 1-8 to switch tools"}),(0,c.jsx)("div",{className:"grid grid-cols-2 gap-2 flex-1",children:K.map((e=>{let{name:t,icon:a,label:n,key:r}=e;return(0,c.jsxs)("button",{onClick:()=>v(t),className:"group relative p-2.5 rounded-lg flex flex-col items-center gap-1.5 transition-all duration-200 border-2 ".concat(w===t?"bg-gradient-to-br from-blue-500 via-blue-600 to-blue-700 text-white border-blue-400 shadow-lg shadow-blue-500/40 scale-105":"bg-neutral-800/80 hover:bg-neutral-750 border-neutral-700/50 hover:border-neutral-600 hover:scale-102"),children:[(0,c.jsx)("div",{className:"absolute top-1 right-1.5 text-[9px] font-bold opacity-50",children:r}),(0,c.jsx)("img",{src:"".concat("","/images/cursors/").concat(t,".png"),alt:n,className:"w-8 h-8 object-contain ".concat(w===t?"animate-pulse":"group-hover:scale-110 transition-transform")}),(0,c.jsx)("span",{className:"text-[10px] font-semibold tracking-wide",children:n}),w===t&&(0,c.jsx)("div",{className:"absolute inset-0 rounded-lg bg-blue-400/10 animate-pulse"})]},t)}))}),(0,c.jsx)("div",{className:"mt-2 text-center text-[9px] text-yellow-400/80 font-medium",children:"\u26a0\ufe0f May cause lag with excessive destruction"}),(0,c.jsxs)("button",{onClick:G,className:"relative w-full mt-2 p-2.5 bg-gradient-to-r from-red-500 via-red-600 to-red-700 hover:from-red-600 hover:via-red-700 hover:to-red-800 rounded-lg font-bold text-xs tracking-wide transition-all duration-200 shadow-lg shadow-red-500/30 hover:shadow-xl hover:shadow-red-500/40 border-2 border-red-400/50 hover:scale-102 active:scale-98",children:[(0,c.jsx)("span",{className:"absolute top-1.5 right-2.5 text-[9px] font-bold opacity-50",children:"C"}),"\ud83e\uddf9 Clear All Destruction"]})]})]})})})]})}}}]); 2//# sourceMappingURL=275.17d88adb.chunk.js.map
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.