!function(M){var j={};function t(L){if(j[L])return j[L].exports;var N=j[L]={i:L,l:!1,exports:{}};return M[L].call(N.exports,N,N.exports,t),N.l=!0,N.exports}t.m=M,t.c=j,t.d=function(M,j,L){t.o(M,j)||Object.defineProperty(M,j,{enumerable:!0,get:L})},t.r=function(M){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})},t.t=function(M,j){if(1&j&&(M=t(M)),8&j)return M;if(4&j&&"object"==typeof M&&M&&M.__esModule)return M;var L=Object.create(null);if(t.r(L),Object.defineProperty(L,"default",{enumerable:!0,value:M}),2&j&&"string"!=typeof M)for(var N in M)t.d(L,N,function(j){return M[j]}.bind(null,N));return L},t.n=function(M){var j=M&&M.__esModule?function(){return M.default}:function(){return M};return t.d(j,"a",j),j},t.o=function(M,j){return Object.prototype.hasOwnProperty.call(M,j)},t.p="",t(t.s=88)}([function(M,j,t){"use strict";function L(M,j){return{x:M,y:j}}function N(M){return L(M.x,M.y)}t.d(j,"u",(function(){return L})),t.d(j,"c",(function(){return N})),t.d(j,"g",(function(){return i})),t.d(j,"d",(function(){return e})),t.d(j,"f",(function(){return u})),t.d(j,"a",(function(){return I})),t.d(j,"t",(function(){return D})),t.d(j,"e",(function(){return a})),t.d(j,"m",(function(){return g})),t.d(j,"o",(function(){return y})),t.d(j,"n",(function(){return n})),t.d(j,"p",(function(){return o})),t.d(j,"q",(function(){return c})),t.d(j,"k",(function(){return T})),t.d(j,"l",(function(){return A})),t.d(j,"j",(function(){return r})),t.d(j,"b",(function(){return S})),t.d(j,"r",(function(){return z})),t.d(j,"h",(function(){return s})),t.d(j,"i",(function(){return x})),t.d(j,"s",(function(){return l}));const i=()=>L(0,0);function e(M,j){return 0==j?i():L(M.x/j,M.y/j)}function u(M){return L(-M.x,-M.y)}function I(...M){let j=0,t=0;for(let L of M)j+=L.x,t+=L.y;return L(j,t)}function D(M,j){return L(M.x-j.x,M.y-j.y)}function a(M,j){return L(M.x*j,M.y*j)}const g=r(3),y=r(5),n=(r(10),r(30)),o=r(50),c=(r(60),r(90)),T=r(130),A=(r(150),r(180));function r(M){return M*Math.PI/180}function S(M,j){let t=Math.atan2(M.y,M.x)-Math.atan2(j.y,j.x);return t>Math.PI?t-=2*Math.PI:t<=-Math.PI&&(t+=2*Math.PI),t}function z(M,j){const t=Math.cos(j),N=Math.sin(j);return L(M.x*t-M.y*N,M.x*N+M.y*t)}function s(M){return Math.sqrt(M.x**2+M.y**2)}function x(M){return e(M,s(M))}function l(M,j){const t=M.x-j.x,L=M.y-j.y;return Math.sqrt(t*t+L*L)}},function(M,j,t){"use strict";t.d(j,"m",(function(){return L})),t.d(j,"l",(function(){return N})),t.d(j,"d",(function(){return i})),t.d(j,"e",(function(){return e})),t.d(j,"h",(function(){return u})),t.d(j,"f",(function(){return I})),t.d(j,"b",(function(){return D})),t.d(j,"i",(function(){return a})),t.d(j,"k",(function(){return g})),t.d(j,"a",(function(){return y})),t.d(j,"n",(function(){return n})),t.d(j,"c",(function(){return o})),t.d(j,"j",(function(){return c})),t.d(j,"g",(function(){return T}));const L=4,N=100,i=1.5,e=5,u=3,I=15,D=7,a=2,g=17,y=9.81,n=1e3,o=80,c=8,T=60},function(M,j,t){"use strict";t.d(j,"a",(function(){return L}));class L{constructor(M,j,t,L=1,N=window.devicePixelRatio||1){this.width=j,this.height=t,this.scale=L,this.dpr=N,this.width*=this.scale,this.height*=this.scale,this.canvas=document.createElement("canvas"),this.canvas.width=this.width*this.dpr,this.canvas.height=this.height*this.dpr;const i=new Image;i.onload=()=>{this.canvas.getContext("2d").drawImage(i,0,0,this.width*this.dpr,this.height*this.dpr)},i.src=M}drawMiddle(M){M.drawImage(this.canvas,-this.width/2,-this.height/2,this.width,this.height)}draw(M){M.drawImage(this.canvas,0,0,this.width,this.height)}}j.b={pointerUp:new L(t(27),12,6),pointerDown:new L(t(28),12,6),bullet:new L(t(29),5,5),plane1:new L(t(30),36,22),plane2:new L(t(31),36,22),pilot:new L(t(32),8,11),puff:new L(t(33),10,8),explosion:[new L(t(34),20,21),new L(t(35),42,40),new L(t(36),86,72),new L(t(37),130,120),new L(t(38),173,137),new L(t(39),100,95),new L(t(40),94,84),new L(t(41),86,78),new L(t(42),76,69)],ground:new L(t(43),192,32),groundObjects:[new L(t(44),36,25),new L(t(45),43,28)],clouds:[new L(t(46),310,100),new L(t(47),169,81),new L(t(48),459,119),new L(t(49),214,111),new L(t(50),272,165),new L(t(51),385,177),new L(t(52),508,148),new L(t(53),187,99),new L(t(54),213,133)],groundhit:[new L(t(55),30,31),new L(t(56),30,31),new L(t(57),30,31),new L(t(58),30,31),new L(t(59),30,31),new L(t(60),30,31),new L(t(61),30,31),new L(t(62),30,31),new L(t(63),30,31),new L(t(64),30,31),new L(t(65),30,31),new L(t(66),30,31)],missile:new L(t(67),17,9),missileFire:[new L(t(68),5,6),new L(t(69),5,5)],barn:new L(t(70),100,42,2),forest:new L(t(71),1367,392,1,1),forest2:new L(t(72),1367,392,1,1),cow:new L(t(26),66,62,.3),cowRunning:[new L(t(73),68,59,.3),new L(t(74),67,62,.3),new L(t(75),68,65,.3),new L(t(76),73,59,.3)],cowDead:new L(t(77),70,40,.3),ui:{targetMark:new L(t(78),16,16),skull:new L(t(79),16,16)},parachute:new L(t(80),53,36),angel:new L(t(81),13,11)}},function(M,j,t){"use strict";t.d(j,"h",(function(){return N})),t.d(j,"i",(function(){return i})),t.d(j,"g",(function(){return e})),t.d(j,"d",(function(){return u})),t.d(j,"f",(function(){return D})),t.d(j,"a",(function(){return a})),t.d(j,"c",(function(){return g})),t.d(j,"e",(function(){return y})),t.d(j,"b",(function(){return n}));var L=t(0);function N(){return window.performance&&window.performance.now?window.performance.now():Date.now()}function i(M,j){return M-j?M:0}function e(M,j){let t;const L=()=>{M(),t=null};return function(){t||(t=window.setTimeout(L,j))}}function u(M,j,t){if(M.x\n\n \n \n \n \n \n ${j?'':""}\n \n \n \n \n \n \n \n \n \n \n`);return new L.a(t,36,22)}var i=t(16),e=t(1),u=t(0);class I extends i.a{constructor(M){super(N(M),Object(u.u)(0,-1),Object(u.u)(0,-1)),this.lastSmoke=0,this.elevator=0,this.thrust=0,this.landed=!1,this.life=e.h,this.missiles=e.i,this.maxMissiles=e.i,this.ammo=0,this.maxAmmo=0,this.gunReloading=!1,this.missileReloading=!1,this.color="black",this.color=M,this.thrust=0,this.radius=20,this.circles=[{v:Object(u.u)(-12,-9),r:2},{v:Object(u.u)(-8,-9),r:2},{v:Object(u.u)(-5,-9),r:2},{v:Object(u.u)(-10,0),r:5},{v:Object(u.u)(-5,0),r:5},{v:Object(u.u)(0,0),r:4.5},{v:Object(u.u)(0,-5),r:3},{v:Object(u.u)(6,0),r:3.5},{v:Object(u.u)(10,-1),r:3.5},{v:Object(u.u)(15,-2),r:3},{v:Object(u.u)(14,-5),r:4},{v:Object(u.u)(-9,8),r:2.5}]}get player(){return this._player}set player(M){this._player=M,this.team=null==M?void 0:M.team}catapultPilot(){this._player=void 0,this.thrust=0,this.elevator=0,this.sprite=N(this.color,!1)}}},function(M,j,t){"use strict";t.d(j,"g",(function(){return I})),t.d(j,"f",(function(){return D})),t.d(j,"d",(function(){return a})),t.d(j,"e",(function(){return g})),t.d(j,"a",(function(){return y})),t.d(j,"b",(function(){return n})),t.d(j,"c",(function(){return o}));var L=t(1),N=t(10),i=t(2),e=t(3),u=t(0);function I(M,j){const t=Object(e.h)();if(t-j.lastSmoke>80){j.lastSmoke=t;let L=1;5==j.life&&(L=.05),4==j.life&&(L=.1),3==j.life&&(L=.2),2==j.life&&(L=.4),1==j.life&&(L=.7);const e=new N.f(i.b.puff);e.position=Object(u.c)(j.position),e.velocity=Object(u.a)(j.velocity,Object(u.e)(Object(u.f)(Object(u.i)(j.forward)),20)),e.angle=2*Math.PI*Math.random(),e.scale=1+.5*Math.random(),e.opacity=L+.2*Math.random(),M.particles.add(e)}}function D(M,j){const t=new N.f(i.b.puff);let L=Object(u.t)(j.position,j.previous),e=Object(u.h)(L);for(L=Object(u.i)(L);e>0;)t.position=Object(u.a)(j.previous,Object(u.e)(L,.1),Object(u.e)(j.forward,-10)),t.velocity=Object(u.e)(Object(u.f)(Object(u.i)(j.forward)),10),t.angle=2*Math.PI*Math.random(),t.scale=1+.5*Math.random(),t.scaleRate=.3,t.opacity=.5+.2*Math.random(),t.opacityRate=.1,M.particles.add(t),e-=1}function a(M,j,t=!1){const L=new N.a(i.b.explosion);return L.frameDuration=50,L.position=Object(u.u)(j.position.x,t?M.ground:j.position.y),L.velocity=t?Object(u.u)(0,-2):Object(u.e)(j.velocity,.5),M.particles.add(L),L}function g(M,j){const t=new N.a(i.b.groundhit);t.frameDuration=50,t.position=Object(u.u)(j.position.x,M.ground-15),M.particles.add(t)}function y(M,j){function t(t=-5,L=1){const i=new N.e;i.position=Object(u.c)(j.position),i.position.x+=j.sprite.width/2,i.velocity=Object(u.r)(Object(u.u)(0,-5),Math.PI/L/2-Math.random()*Math.PI/L),i.color="#d80004",i.size=1+Math.floor(3*Math.random()),M.particles.add(i)}let L=20;for(;L-- >0;)t();const i=setInterval(()=>t(-20,30),300);setTimeout(()=>clearInterval(i),1e4)}function n(M,j){function t(t=-5,L=1){const i=new N.e;i.position=Object(u.c)(j.position),i.position.x+=j.sprite.width/2,i.velocity=Object(u.r)(Object(u.u)(0,-5),Math.PI/L/2-Math.random()*Math.PI/L),i.velocity=Object(u.a)(i.velocity,j.velocity),i.color="#d80004",i.size=1+Math.floor(3*Math.random()),M.particles.add(i)}let L=20;for(;L-- >0;)t()}function o(M,j){const t=new N.c(i.b.angel);t.duration=2*L.n,t.position=Object(u.u)(j.position.x,j.position.y),t.velocity=Object(u.u)(0,-8),M.particles.add(t)}},function(M,j,t){"use strict";t.d(j,"b",(function(){return L})),t.d(j,"a",(function(){return I}));var L,N=t(2),i=t(0),e=t(3),u=t(16);!function(M){M[M.Left=0]="Left",M[M.Right=1]="Right"}(L||(L={}));class I extends u.a{constructor(){super(N.b.cow),this.t2=0,this.frame=0,this.running=!1,this.direction=Math.random()>.5?L.Left:L.Right,this.dead=!1,this.landed=!1,this.angle=0,this.radius=10,this.mass=20,this.circles=[{v:Object(i.u)(-5,-1),r:6},{v:Object(i.u)(5,-1),r:6}]}draw(M){const j=Object(e.h)();j-this.t2>100&&(this.frame++,this.t2=j),M.save(),this.direction==L.Left&&M.scale(-1,1),this.dead?N.b.cowDead.drawMiddle(M):this.running?N.b.cowRunning[this.frame%N.b.cowRunning.length].drawMiddle(M):this.sprite.drawMiddle(M),M.restore()}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return e}));var L=t(16),N=t(2),i=t(0);class e extends L.a{constructor(M){super(N.b.missile,Object(i.u)(-1,0),Object(i.u)(0,-1)),this.source=M,this.elevator=0,this.thrust=0,this.justDeployed=!0,this.radius=8,this.mass=.1,this.circles=[{v:Object(i.u)(-5,0),r:2},{v:Object(i.u)(-2,0),r:2},{v:Object(i.u)(2,0),r:2},{v:Object(i.u)(5,0),r:2}]}}},function(M,j,t){"use strict";function L(M){try{return localStorage.getItem(M)}catch(M){return null}}function N(M,j){try{return localStorage.setItem(M,j)}catch(M){return null}}t.d(j,"a",(function(){return L})),t.d(j,"b",(function(){return N})),t.d(j,"c",(function(){return i}));let i={bullets:0,missiles:0,killed:0,deaths:0,cowKilled:0};try{let M=JSON.parse(L("stats")||"{}");i=Object.assign(Object.assign({},i),M)}finally{}setInterval(()=>{N("stats",JSON.stringify(i))},1e3)},function(M,j,t){"use strict";t.d(j,"g",(function(){return u})),t.d(j,"i",(function(){return I})),t.d(j,"h",(function(){return D})),t.d(j,"f",(function(){return a})),t.d(j,"b",(function(){return g})),t.d(j,"a",(function(){return y})),t.d(j,"d",(function(){return o})),t.d(j,"c",(function(){return c})),t.d(j,"j",(function(){return z})),t.d(j,"e",(function(){return s}));var L=t(1),N=t(2),i=t(8),e=t(3);function u(M,j){j.sort((M,j)=>M.points()-j.points());for(let t=0;t{M.font="bold 22px monospace",M.fillStyle=""+j.color,M.fillText(j.points.toString(),20+t,10)};L(j,10),L(t,60);const i=(j,t=0)=>{j.members.sort((M,j)=>j.points()-M.points());for(let L=0;L{for(let L=0;L{M.classList.add("hide")},7e3),setTimeout(()=>{M.parentElement.removeChild(M)},7300)}function o(M,j,t='
'){const L=document.createElement("div");L.innerHTML=`${M.html()} ${t} ${j.html()}`,Object(e.a)(".log").appendChild(L),n(L),j.team&&j.team==M.team||M==j?M.kills--:M.kills++,j.deaths++,M.isHuman&&i.c.killed++,j.isHuman&&i.c.deaths++}function c(M){const j=document.createElement("div");j.innerHTML=`${g} ${M.html()}`,Object(e.a)(".log").appendChild(j),n(j),M.deaths++,M.isHuman&&i.c.deaths++}let T,A,r,S;function z(M){const j=r.offsetHeight-S.offsetHeight;if(2==M.maxMissiles){let j=[...A.querySelectorAll(".missile")];for(let t=0;tL.f)T.innerText=""+M.ammo;else{let j=[...T.querySelectorAll(".ammo")];for(let t=0;t{T=Object(e.a)(".ammo-capacity"),A=Object(e.a)(".missile-capacity"),r=Object(e.a)(".thrust"),S=Object(e.a)(".thrust-level")})},function(M,j,t){"use strict";t.d(j,"e",(function(){return e})),t.d(j,"f",(function(){return u})),t.d(j,"b",(function(){return I})),t.d(j,"d",(function(){return D})),t.d(j,"a",(function(){return a})),t.d(j,"c",(function(){return g})),t.d(j,"g",(function(){return y}));var L=t(0),N=t(3),i=t(1);class e{constructor(){this.color="#000000",this.size=1,this.position=Object(L.g)(),this.velocity=Object(L.g)()}getX(){return this.position.x}getY(){return this.position.y}}class u extends e{constructor(M){super(),this.sprite=M,this.angle=0,this.opacity=1,this.scale=1,this.scaleRate=.8,this.opacityRate=.3,this.size=0}}class I extends e{constructor(M){super(),this.sprite=M}}class D extends e{constructor(M){super(),this.sprite=M}}class a extends e{constructor(M){super(),this.sprites=M,this.frame=0,this.frameDuration=100,this.size=0,this.timeSinceFrameShown=Object(N.h)()}}class g extends e{constructor(M){super(),this.sprite=M,this.duration=i.n,this.size=0,this.createdAt=Object(N.h)()}}function y(M,j){for(let t of M.particles){const e=Object(L.u)(0,t.size);t.velocity.x+=i.m*e.x*j,t.velocity.y+=i.m*e.y*j,t.position.x+=i.m*t.velocity.x*j,t.position.y+=i.m*t.velocity.y*j,t instanceof u&&(t.angle+=j,t.scale+=i.m*t.scaleRate*j,t.opacity-=i.m*t.opacityRate*j,t.opacity<0&&M.particles.delete(t)),t instanceof a&&Object(N.h)()-t.timeSinceFrameShown>=t.frameDuration&&(t.frame++,t.timeSinceFrameShown=Object(N.h)(),t.frame>=t.sprites.length&&M.particles.delete(t)),t instanceof g&&Object(N.h)()-t.createdAt>=t.duration&&M.particles.delete(t),t.position.x<0&&(t.position.x=M.width),t.position.x>M.width&&(t.position.x=0),t.position.y>M.ground&&M.particles.delete(t)}}},function(M,j,t){"use strict";t.d(j,"b",(function(){return e})),t.d(j,"a",(function(){return u}));var L=t(16),N=t(2),i=t(0);class e extends L.a{constructor(M){super(N.b.pilot,Object(i.u)(0,-1),Object(i.u)(0,-1)),this.plane=M,this.landed=!1,this.color="black",this.mass=.5,this.hasParachute=!0,this.radius=5,this.circles=[{v:Object(i.u)(0,0),r:3},{v:Object(i.u)(0,3),r:2}]}deployParachute(M){this.hasParachute&&!this.landed&&(this.hasParachute=!1,this.parachute=new u(this),this.updateParachute(),M.add(this.parachute))}updateParachute(){this.parachute&&(this.parachute.move(Object(i.a)(this.position,Object(i.u)(this.velocity.x>0?-1:1,-22))),this.parachute.angle=this.velocity.x>0?-i.m:i.m)}}class u extends L.a{constructor(M){super(N.b.parachute,Object(i.u)(0,-1),Object(i.u)(0,-1)),this.load=M,this.radius=25,this.circles=[{v:Object(i.u)(0,-8),r:9},{v:Object(i.u)(-10,-8),r:8},{v:Object(i.u)(10,-8),r:8},{v:Object(i.u)(-20,-5),r:6},{v:Object(i.u)(20,-5),r:6}]}}},function(M,j,t){"use strict";t.d(j,"b",(function(){return e})),t.d(j,"a",(function(){return u}));var L=t(11),N=t(4),i=t(1);class e{constructor(M){this.color=M,this.name="",this.members=[],this.startingPosition=0,this.points=100,this.count=6}}class u{constructor(M,j,t){this.name=M,this.color=j,this.object=t,this.kills=0,this.deaths=0,this.maxAmmo=i.f,this.maxMissiles=i.i,this.number=0,this.isHuman=!1,this.disableAI=()=>{}}join(M){this.team=M,M.members.push(this)}toString(){return this.name}html(){return`${this.name}`}points(){return this.kills}control(M){this.object=M,M.player=this}hasPlane(){if(this.object&&this.object instanceof N.a)return this.object}hasPilot(){if(this.object&&this.object instanceof L.b)return this.object}inGame(){return void 0!==this.object}detach(){this.object=void 0}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return n})),t.d(j,"c",(function(){return o})),t.d(j,"d",(function(){return A})),t.d(j,"e",(function(){return r})),t.d(j,"b",(function(){return S}));var L=t(24),N=t(1),i=t(15),e=t(7),u=t(11),I=t(4),D=t(8),a=t(9),g=t(3),y=t(0);function n(M,j,t,L){let i=Object(g.g)(()=>{let M=j.hasPlane();M&&Object(a.j)(M)},30),e=!1,u=!1,I=!1,y=!1,n=!1;return setInterval(()=>{var t;let a=j.hasPlane();if(a)e&&(A(M,a,null!==(t=null==L?void 0:L.moreBullets)&&void 0!==t&&t),D.c.bullets++,i()),u&&(a.thrust-=2,a.thrust<0&&(a.thrust=0),i()),I&&(a.thrust+=2,a.thrust>N.k&&(a.thrust=N.k),i()),a.elevator=y&&!n?-1:!y&&n?1:0;else{const M=j.hasPilot();M&&(M.landed&&(y&&!n?M.velocity.x=-10:!y&&n&&(M.velocity.x=10)),M.parachute&&(y&&!n?M.velocity.x=-20:!y&&n&&(M.velocity.x=20)),M.landed&&I&&(M.landed=!1,M.velocity.y=-10))}},N.c),document.addEventListener("keydown",N=>{var a;if(t.thrustLevers.up.includes(N.code))I=!0;else if(t.thrustLevers.down.includes(N.code))u=!0;else if(t.elevator.up.includes(N.code))y=!0;else if(t.elevator.down.includes(N.code))n=!0;else if(N.code===t.fire)e=!0;else if(N.code===t.missile){let t=j.hasPlane();t&&(r(M,t,null!==(a=null==L?void 0:L.explodingMissiles)&&void 0!==a&&a),D.c.missiles++,i())}else{if(N.code!==t.catapult)return;if(j.hasPlane())S(M,j);else{let t=j.hasPilot();t&&t.deployParachute(M)}}N.preventDefault()},!0),document.addEventListener("keyup",M=>{if(t.thrustLevers.up.includes(M.code))I=!1;else if(t.thrustLevers.down.includes(M.code))u=!1;else if(t.elevator.up.includes(M.code))y=!1;else if(t.elevator.down.includes(M.code))n=!1;else{if(M.code!==t.fire)return;e=!1}M.preventDefault()},!0),function(M){j=M}}function o(M,j){for(let t of M)t instanceof I.a?c(t,j):t instanceof e.a&&T(t,j)}function c(M,j){const t=Object(y.h)(M.velocity);let L=1-t/(N.l*N.d);t>N.l&&(L=1-1/N.d),M.angle+=L*N.e*M.elevator*j,M.angle<0&&(M.angle+=2*Math.PI),M.angle>2*Math.PI&&(M.angle-=2*Math.PI)}function T(M,j){const t=Object(y.h)(M.velocity);let L=1-t/(N.l*N.d);t>N.l&&(L=1-1/1.5),M.angle+=10*L*M.elevator*j}function A(M,j,t=!1){if(M.has(j)){if(j.ammo>0)if(j.ammo--,t)for(let t=0;t<35;t++){const t=z(j);t.position=Object(y.a)(t.position,Object(y.e)(j.normal,30*Math.random()-15)),t.velocity=Object(y.r)(t.velocity,.5*Math.random()-.25),M.add(t)}else M.add(z(j));0!==j.ammo||j.gunReloading||(j.gunReloading=!0,j.setTimeout(()=>{j.ammo=j.maxAmmo,j.gunReloading=!1},3*N.n))}}function r(M,j,t=!1){if(M.has(j)){if(j.missiles>0){j.missiles--;const i=function(M){const j=new e.a(M);return j.move(Object(y.a)(M.position,Object(y.e)(M.normal,-12))),j.angle=M.angle,j.velocity=Object(y.a)(Object(y.c)(M.velocity),Object(y.e)(M.normal,-20)),j.forward=Object(y.c)(M.forward),j.normal=Object(y.c)(M.normal),j}(j);j.timeout(N.n,()=>i.justDeployed=!1),Object(L.a)(M,i,t),M.add(i)}0!==j.missiles||j.missileReloading||(j.missileReloading=!0,j.setTimeout(()=>{j.missiles=j.maxMissiles,j.missileReloading=!1},10*N.n))}}function S(M,j){let t=j.hasPlane();if(t){t.catapultPilot();let L=new u.b(t);L.color=j.color,L.player=j,L.move(Object(y.a)(t.position,Object(y.e)(t.normal,5))),L.velocity=Object(y.a)(t.velocity,Object(y.r)(Object(y.e)(t.normal,20),y.n)),M.add(L),j.control(L)}}function z(M){const j=new i.a(M);return j.move(Object(y.a)(M.position,Object(y.e)(M.forward,M.radius+5))),j.velocity=Object(y.a)(Object(y.c)(M.velocity),Object(y.e)(M.forward,120)),j}},function(M,j,t){"use strict";function L(M,j){const t=j.getContext("2d"),L={offsetX:0,offsetY:0,width:j.width,height:j.height,cameraScale:M};function N(){let M=(window.devicePixelRatio||1)/L.cameraScale,{width:N,height:i}=j.getBoundingClientRect();N*=L.cameraScale,i*=L.cameraScale,j.width=N*M,j.height=i*M,L.width=N,L.height=i,t.scale(M,M)}return N(),window.addEventListener("resize",N,!1),window.addEventListener("orientationchange",N,!1),[L,t]}function N(M,j,t,L){const N=Math.floor(M.width/2),i=Math.floor(M.height/2),e=t.hasPlane()||t.hasPilot();if(!e)return;const u=e.getX(L),I=e.getY(L);u>M.offsetX+M.width-N&&(M.offsetX=u-M.width+N),uM.offsetY+i&&(M.offsetY=I-i),Ij.width&&(M.offsetX=j.width-M.width),M.offsetY+M.height>j.height&&(M.offsetY=j.height-M.height)}t.d(j,"b",(function(){return L})),t.d(j,"a",(function(){return N}))},function(M,j,t){"use strict";t.d(j,"a",(function(){return e}));var L=t(16),N=t(2),i=t(0);class e extends L.a{constructor(M){super(N.b.bullet,Object(i.u)(1,0),Object(i.u)(0,1)),this.source=M,this.radius=2.5,this.circles=[{v:Object(i.u)(0,0),r:2.5}]}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return N}));var L=t(0);class N{constructor(M,j=Object(L.u)(1,0),t=Object(L.u)(0,1)){this.sprite=M,this.forward=j,this.normal=t,this.mass=1,this.angle=0,this.radius=1,this.previous=Object(L.g)(),this.position=Object(L.g)(),this.velocity=Object(L.g)(),this.force=Object(L.g)(),this.circles=[],this.timeouts=[],this.intervals=[]}move(M){this.position=M,this.previous=Object(L.c)(M)}getX(M){return this.position.x*M+this.previous.x*(1-M)}getY(M){return this.position.y*M+this.previous.y*(1-M)}setTimeout(M,j){const t=window.setTimeout(M,j);return this.timeouts.push(t),t}timeout(M,j){return this.setTimeout(j,M)}setInterval(M,j){const t=window.setInterval(M,j);return this.intervals.push(t),t}interval(M,j){return this.setInterval(j,M)}destroy(){for(let M of this.timeouts)clearTimeout(M);for(let M of this.intervals)clearInterval(M)}}},function(M,j,t){"use strict";t.d(j,"b",(function(){return g})),t.d(j,"a",(function(){return y}));var L=t(10),N=t(2),i=t(0),e=t(4),u=t(6);function I(M,j){let t;j.setInterval(()=>{t=function(t){let L,N=t;for(let t of M)if(t instanceof e.a){const M=Object(i.s)(j.position,t.position);M{t||(j.running=Math.random()<.1)},1e3+2e3*Math.random()),j.setInterval(()=>{t||(j.direction=Math.random()<.5?u.b.Left:u.b.Right)},1e3+4e3*Math.random())}var D=t(1),a=t(5);function g(M){for(let j=0;j<120;j++){const t=new L.b(N.b.clouds[j%9]);let e=M.height;for(;e>M.height-500;)e=M.height*Math.random();let u=1e3;t.position=Object(i.u)((u+M.width)*Math.random()-u/2,e),M.clouds.push(t)}for(let j=0,t=10;t=0;M--)j();M.onCowKill=t=>{if(t.dead)return;t.destroy(),t.dead=!0;let i=new L.d(N.b.cowDead);i.position=t.position,i.position.y=M.ground-i.sprite.height+2,M.groundObjects.add(i),setTimeout(j,10*D.n),setTimeout(()=>M.groundObjects.delete(i),30*D.n),Object(a.a)(M,t)}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return I}));var L=t(16),N=t(1),i=t(2),e=t(0),u=t(4);class I extends L.a{constructor(M,j){super(i.b.barn,Object(e.u)(1,0),Object(e.u)(0,1)),this.radius=100,this.circles=[{v:Object(e.u)(0,50),r:90}],this.move(Object(e.u)(M,j-this.sprite.height/2+2))}newPlane(M,j){j.waitingForPlane||(j.waitingForPlane=window.setTimeout(()=>{let t=j.player;if(!M.has(j))return;if(!t)return;const L=new u.a(t.color);L.life=N.h,L.ammo=L.maxAmmo=t.maxAmmo,L.missiles=L.maxMissiles=t.maxMissiles,L.landed=!0,L.move(Object(e.u)(j.position.x,M.ground)),j.player=void 0,j.destroy(),M.delete(j),t.control(L),M.add(L)},N.n))}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return e}));var L=t(15),N=t(18),i=t(11);class e{constructor(M){this.players=[],this.bodies=new Set,this.pilots=new Set,this.bullets=new Set,this.barns=new Set,this.particles=new Set,this.clouds=[],this.groundObjects=new Set,this.onCrash=M=>{},this.onCowKill=M=>{},this.width=M.width,this.height=M.height,this.ground=M.ground,this.stratosphere=M.stratosphere}*[Symbol.iterator](){yield*this.barns,yield*this.bodies,yield*this.bullets,yield*this.pilots}add(M){M instanceof L.a?this.bullets.add(M):M instanceof i.b?this.pilots.add(M):M instanceof N.a?this.barns.add(M):this.bodies.add(M)}has(M){return M instanceof L.a?this.bullets.has(M):M instanceof i.b?this.pilots.has(M):M instanceof N.a?this.barns.has(M):this.bodies.has(M)}delete(M){M instanceof L.a?this.bullets.delete(M):M instanceof i.b?this.pilots.delete(M):this.bodies.delete(M),M.destroy()}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return Q}));var L=t(13),N=t(10),i=t(6),e=t(7),u=t(4),I=t(2),D=t(3),a=t(0);function g(M,j,t,L,g){var o;let c=t.stratosphere-j.offsetY;c<0?c=0:(M.fillStyle="#1f4752",M.fillRect(0,0,j.width,c)),M.fillStyle="#9be2fe",M.fillRect(0,c,j.width,j.height),function(M,j,t){if(t.stratosphere>j.offsetY){let L=900;const N=-j.offsetY-L+t.stratosphere+4;M.save(),M.translate(0,N);let i=M.createLinearGradient(0,0,0,L);i.addColorStop(0,"#1f4752"),i.addColorStop(1,"#9be2fe"),M.fillStyle=i,M.fillRect(0,0,j.width,L),M.restore()}}(M,j,t),y(M,j,t,I.b.forest2,1.05,50),y(M,j,t,I.b.forest,1.02,100),function(M,j,t){for(let L of t.groundObjects){const t=L.position.x-j.offsetX,N=L.position.y-j.offsetY;t+L.sprite.width<0||t-L.sprite.width>j.width||(M.save(),M.translate(t,N),L.sprite.draw(M),M.restore())}}(M,j,t),function(M,j,t){const L=t.height-j.offsetY-I.b.ground.height;if(L0;)I.b.ground.draw(M),M.translate(I.b.ground.width-1,0);M.restore()}}(M,j,t),function(M,j,t){for(let L of t.clouds){const t=L.position.x-j.offsetX,N=L.position.y-j.offsetY;t+L.sprite.width<0||t-L.sprite.width>j.width||(M.save(),M.translate(t,N),M.globalAlpha=.8,L.sprite.draw(M),M.restore())}}(M,j,t);for(let N of t){const t=N.getX(L)-j.offsetX,D=N.getY(L)-j.offsetY;if(!(t+N.radius<0||t-N.radius>j.width)){if(M.save(),D+N.radius<0)(N instanceof u.a||N instanceof e.a)&&(M.translate(Math.floor(t),3),I.b.pointerUp.drawMiddle(M));else if(D-N.radius>j.height)(N instanceof u.a||N instanceof e.a)&&(M.translate(Math.floor(t),j.height-3),I.b.pointerDown.drawMiddle(M));else{if(M.translate(t,D),M.rotate(N.angle),N instanceof i.a?N.draw(M):N.sprite.drawMiddle(M),window.showCircles){for(let{v:j,r:t}of N.circles)M.beginPath(),M.fillStyle="rgba(255,45,247,0.5)",M.arc(j.x,j.y,t,0,2*Math.PI),M.fill();M.beginPath(),M.arc(0,0,N.radius,0,2*Math.PI),M.stroke()}if(window.showVectors&&(M.save(),M.rotate(-N.angle),M.beginPath(),M.moveTo(0,0),M.lineTo(20*N.forward.x,20*N.forward.y),M.strokeStyle="blue",M.stroke(),M.beginPath(),M.moveTo(0,0),M.lineTo(20*N.normal.x,20*N.normal.y),M.strokeStyle="green",M.stroke(),M.restore()),N instanceof e.a&&N.thrust>0&&(M.translate(10,0),I.b.missileFire[Math.random()<.5?0:1].drawMiddle(M)),window.showTarget&&N instanceof u.a&&void 0!==(null===(o=N.player)||void 0===o?void 0:o.target)){M.save(),M.rotate(-N.angle);let j=Object(a.t)(N.player.target.position,N.position);j=Object(a.t)(j,Object(a.e)(Object(a.i)(j),N.player.target.radius)),M.strokeStyle="#ff0101",M.lineWidth=2,n(M,0,0,j.x,j.y),M.restore()}if(N instanceof u.a&&void 0!==N.pointTo){M.save(),M.rotate(-N.angle);let j=Object(a.t)(N.pointTo.position,N.position);j=Object(a.t)(j,Object(a.e)(Object(a.i)(j),N.pointTo.radius)),M.strokeStyle="#009a04",M.lineWidth=2,n(M,0,0,j.x,j.y),M.restore()}}M.restore()}}for(let L of t.particles){const t=L.getX()-j.offsetX,i=L.getY()-j.offsetY;M.save(),M.translate(t,i),L instanceof N.f?(M.rotate(L.angle),M.globalAlpha=L.opacity,M.scale(L.scale,L.scale),L.sprite.drawMiddle(M)):L instanceof N.a?L.sprites[L.frame].drawMiddle(M):L instanceof N.b?L.sprite.drawMiddle(M):L instanceof N.c?(M.globalAlpha=1-Math.min(1,Math.abs((Object(D.h)()-L.createdAt)/L.duration)),L.sprite.drawMiddle(M)):(M.fillStyle=L.color,M.fillRect(0,0,L.size,L.size)),M.restore()}g(M)}function y(M,j,t,L,N,i){const e=t.height-j.offsetY-L.height+i;if(e0;)L.draw(M),M.translate(L.width,0);M.restore()}}function n(M,j,t,L,N){M.beginPath();const i=L-j,e=N-t,u=Math.atan2(e,i);M.moveTo(j,t),M.lineTo(L,N),M.lineTo(L-10*Math.cos(u-Math.PI/6),N-10*Math.sin(u-Math.PI/6)),M.moveTo(L,N),M.lineTo(L-10*Math.cos(u+Math.PI/6),N-10*Math.sin(u+Math.PI/6)),M.stroke()}Object.assign(window,{showCircles:!1,showVectors:!1,showTarget:!1});var o=t(5),c=t(15),T=t(11),A=t(8),r=t(9);function S(M,j){const t=Object(a.h)(j.velocity);if(j.landed)t>45&&(j.landed=!1);else if(s(j,M.ground)){const t=j.angle;if(j.velocity.y<40&&(t=j)return!0;return!1}function x(M,j){if(l(M.position,M.radius,j.position,j.radius))for(let{v:t,r:L}of M.circles){t=Object(a.a)(Object(a.r)(t,M.angle),M.position);for(let{v:M,r:N}of j.circles)if(M=Object(a.a)(Object(a.r)(M,j.angle),j.position),l(t,L,M,N))return!0}return!1}function l(M,j,t,L){const N=j+L,i=M.x-t.x,e=M.y-t.y;return N*N>i*i+e*e}var w=t(1),O=t(23);const C=globalThis[O.a[0]+O.a[1]][O.a[2]+O.a[3]],E=[D.b.letters.join(""),D.b.numbers.join(".")];function d(M,j){!function(M){var j;for(let j of M)if(j.position.y+j.radius>=M.ground){if(j instanceof u.a){S(M,j);continue}if(s(j,M.ground)){if(j instanceof c.a){Object(o.e)(M,j),M.delete(j);continue}if(j instanceof e.a){Object(o.d)(M,j,!0),M.delete(j);continue}j instanceof i.a&&(j.landed=!0),j instanceof T.b&&(j.landed=!0,Object(a.h)(j.velocity)>40?(Object(o.e)(M,j),Object(o.c)(M,j),M.onCrash(j),M.delete(j),j.player&&Object(r.c)(j.player)):j.parachute&&(M.delete(j.parachute),j.parachute=void 0)),j instanceof T.a&&M.delete(j)}}for(let j of M.bodies)for(let L of M.bodies)j!==L&&x(j,L)&&(t(j,L)||t(L,j));function t(j,t){var L,N,I,D;if(j instanceof e.a&&t instanceof e.a)return Object(o.d)(M,j),Object(o.d)(M,t),M.delete(j),M.delete(t),!0;if(j instanceof u.a&&t instanceof e.a)return(!t.justDeployed||t.source!==j)&&((!t.justDeployed||void 0===(null===(L=t.source.player)||void 0===L?void 0:L.team)||void 0===(null===(N=j.player)||void 0===N?void 0:N.team)||t.source.player.team!==j.player.team)&&(z(M,j),M.delete(t),t.source.player&&j.player&&Object(r.d)(t.source.player,j.player,r.a),!0));if(j instanceof u.a&&t instanceof i.a)return(null===(I=j.player)||void 0===I?void 0:I.isHuman)&&A.c.cowKilled++,M.onCowKill(t),M.delete(t),!0;if(j instanceof e.a&&t instanceof i.a)return(null===(D=j.source.player)||void 0===D?void 0:D.isHuman)&&A.c.cowKilled++,Object(o.d)(M,t),M.onCowKill(t),M.delete(j),M.delete(t),!0;if(j instanceof T.a){if(t instanceof u.a&&j.load.plane!==t)return M.delete(j),j.load.parachute=void 0,!0;if(t instanceof e.a)return M.delete(j),j.load.parachute=void 0,!0}return!1}let L=[...M.bullets];for(let M=0;M0){let t=2*N*u/(j.mass+M.mass);j.velocity.x-=t*M.mass*i.x,j.velocity.y-=t*M.mass*i.y,M.velocity.x+=t*j.mass*i.x,M.velocity.y+=t*j.mass*i.y}j.position=Object(a.a)(j.position,Object(a.e)(i,j.radius/2)),M.position=Object(a.a)(M.position,Object(a.e)(i,-M.radius/2))}}for(let t of M.bullets){for(let L of M.bodies)x(t,L)&&(L instanceof u.a&&(L.life-=1,0==L.life&&(z(M,L),t.source.player&&L.player&&Object(r.d)(t.source.player,L.player)),M.bullets.delete(t)),L instanceof e.a&&(Object(o.d)(M,L),M.delete(t),M.delete(L)),L instanceof i.a&&((null===(j=t.source.player)||void 0===j?void 0:j.isHuman)&&A.c.cowKilled++,M.onCowKill(L),M.delete(t),M.delete(L)),L instanceof T.a&&(M.delete(L),L.load.parachute=void 0));for(let j of M.pilots)x(t,j)&&(M.onCrash(j),M.delete(t),M.delete(j),Object(o.b)(M,j),Object(o.c)(M,j),t.source.player&&j.player&&Object(r.d)(t.source.player,j.player))}for(let j of M.barns)for(let t of M.pilots)x(j,t)&&j.newPlane(M,t);for(let j of M.pilots)for(let t of M.bodies)x(j,t)&&(t instanceof u.a&&j.plane!==t&&!t.landed&&(M.onCrash(j),M.delete(j),Object(o.b)(M,j),Object(o.c)(M,j),t.player&&j.player&&Object(r.d)(t.player,j.player,r.b)),t instanceof e.a&&(Object(o.d)(M,t),M.onCrash(j),M.delete(j),M.delete(t),Object(o.b)(M,j),Object(o.c)(M,j),t.source.player&&j.player&&Object(r.d)(t.source.player,j.player,r.a)))}(M);for(let t of M){if(t.forward=Object(a.u)(Math.sin(-t.angle-Math.PI/2),Math.cos(-t.angle-Math.PI/2)),t.normal=Object(a.u)(Math.sin(-t.angle+Math.PI),Math.cos(-t.angle+Math.PI)),t instanceof e.a&&(m(t,M),t.thrust>0&&Object(o.f)(M,t)),t instanceof u.a&&(h(t,M),t.lifeM.width&&(t.previous.x=t.position.x=0)}}function m(M,j){const t=Object(a.h)(M.velocity),L=Object(a.u)(0,M.mass*w.a),N=Object(a.e)(M.forward,M.thrust),i=Object(a.e)(Object(a.i)(Object(a.f)(M.velocity)),2**(t-1.2*w.l));M.force=Object(a.a)(L,N,i)}function h(M,j){const t=Object(a.h)(M.velocity),L=Object(a.b)(M.forward,M.velocity),N=Object(a.u)(0,M.mass*w.a);let i=Object(a.e)(M.forward,M.thrust),e=Object(a.e)(M.normal,t*Object(D.i)(L,Object(a.j)(50))),u=Object(a.e)(Object(a.i)(Object(a.f)(M.velocity)),2**(t-w.l));M.position.y.25&&(c=.25),a=o,I+=c,Object(L.c)(t,c);I>=y;)d(t,y),I-=y;Object(N.g)(t,y);const T=I/y;i(M,T),g(j,M,t,T,e)}(),function(){cancelAnimationFrame(u)}}},function(M,j,t){"use strict";t.d(j,"a",(function(){return o})),t.d(j,"b",(function(){return T}));var L=t(1),N=t(13),i=t(15),e=t(18),u=t(7),I=t(11),D=t(4),a=t(3),g=t(0),y=t(6);const n={missileChance:.03};function o(M,j,t={}){let i=Object.assign(Object.assign({},n),t),I=[],o=[];const r=(M,j)=>{let t=window.setTimeout(j,M);return I.push(t),t},S=(M,j)=>{let t=window.setInterval(j,M);return o.push(t),t};let z=!0;const s=M=>{const t=j.hasPlane();t&&z&&(t.elevator=M)},x=Object(a.g)(()=>{const t=j.hasPlane();t&&Object(N.e)(M,t)},1.5*L.n);function l(){j.target=void 0;const M=j.hasPlane();M&&(M.elevator=0)}function w(M){M.velocity.y=-10,M.landed=!1}let O,C;return S(L.c,()=>{var t,L,I;const y=j.hasPilot();if(y){let j;M.ground-y.position.y<300&&y.deployParachute(M);for(let t of M.barns)(!j||Math.abs(j.position.x-y.position.x)>Math.abs(t.position.x-y.position.x))&&(j=t);y.landed&&j&&(y.position.xj.position.x?(y.velocity.x=-10,Math.random()<.02&&w(y)):y.velocity.x=0)}const n=j.hasPlane();if(n){if(1==n.life&&M.barns.size>0){let t,L=1/0;for(let j of M.barns){let M=Object(g.s)(j.position,n.position);Mg.m&&s(Math.sign(L)>0?1:-1),j.target instanceof e.a)return;if(j.target instanceof D.a&&L0||A(t,j.team)||Object(N.d)(M,n)}n.ammo<=3&&Object(N.d)(M,n),j.target instanceof u.a&&0===j.target.thrust&&l()}else l();else{let N=c(M,n,M=>A(M,j.team));if(N){const M=Object(g.b)(Object(g.t)(N.position,n.position),n.forward),t=Object(g.s)(n.position,N.position);(Math.abs(M)0?1:-1)}}}}),S(2*L.n,()=>{const t=j.hasPlane();if(!t)return;let N=S(L.c,()=>{if(void 0!==j.target){let L=c(M,t,M=>A(M,j.team));if(L){const M=Object(g.b)(Object(g.t)(L.position,t.position),t.forward),N=Object(g.s)(t.position,L.position),i=Object(g.s)(t.position,j.target.position);(Math.abs(M)clearInterval(N))}),S(10*L.n,()=>{var t,L,N;if(j.hasPlane()&&(!(null===(L=null===(t=j.team)||void 0===t?void 0:t.leader)||void 0===L?void 0:L.hasPlane())||(null===(N=j.team)||void 0===N?void 0:N.leader)===j)&&void 0===j.target){if(j.object instanceof y.a)return;let t=c(M,j.object,M=>A(M,j.team),M.width);t&&(j.target=t)}}),S(5*L.n,()=>{var t,N,i;if(!j.object)return;let e=j.object;if((void 0===(null===(N=null===(t=j.team)||void 0===t?void 0:t.leader)||void 0===N?void 0:N.object)||(null===(i=j.team)||void 0===i?void 0:i.leader)===j)&&void 0===j.target){let j=Object(g.u)(Math.floor(Math.random()*M.width),Math.floor(Math.random()*(M.ground-100))),t=S(30,()=>{const M=Object(g.b)(Object(g.t)(j,e.position),e.forward);Math.abs(M)>g.m&&s(Math.sign(M)>0?1:-1)});r(2*L.n,()=>{clearInterval(t)})}}),S(30,()=>{const t=j.hasPlane();t&&(Object(g.a)(t.position,Object(g.e)(t.velocity,4)).y>M.ground&&(s(Math.sign(t.forward.x)>0?-1:1),clearTimeout(O),O=r(200,()=>t.elevator=0)),t.position.y>M.ground-30&&(s(Math.sign(t.forward.x)>0?-1:1),clearTimeout(C),C=r(200,()=>t.elevator=0)),t.landed&&(t.elevator=0,t.thrust=L.k,z&&(z=!1,r(L.n,()=>z=!0))),0===t.thrust&&(t.thrust=L.k))}),function(){for(let M of I)clearTimeout(M);for(let M of o)clearInterval(M)}}function c(M,j,t,L=2e3){let N;if(void 0!==j){for(let i of M)if(i!==j&&!(i instanceof u.a&&i.source===j)&&!t(i)&&(i instanceof D.a||i instanceof I.b||i instanceof u.a&&i.target===j&&i.thrust>0)){const M=Object(g.s)(j.position,i.position);MM instanceof i.a)){let e,u=L;for(let L of M){if(L===j)continue;if(N(L))continue;const M=Object(g.s)(j.position,L.position),i=Object(g.b)(Object(g.t)(L.position,j.position),j.forward);M{clearInterval(M),j.thrust=0},12*L.n)}()}function y(){var L,a;if(M.has(j))if(void 0!==j.target)if(M.has(j.target)){const L=Object(i.d)(j.position,j.target.position,M),e=Object(N.b)(Object(N.t)(L,j.position),j.forward);if(j.elevator=Math.sign(e)>0?1:-1,Object(N.a)(j.position,Object(N.e)(j.velocity,4)).y>M.ground&&(j.elevator=Math.sign(j.forward.x)>0?-1:1),t&&Object(N.s)(j.position,j.target.position)<180){const t=30;for(let L=0;L{const L=Object(N.r)(j.forward,Object(N.j)(360*i/t)),e=Object(u.d)(M,j);e.position=Object(N.a)(j.position,Object(N.e)(L,160*Math.random())),e.velocity=Object(N.a)(j.velocity,Object(N.e)(L,60*Math.random()))},220*Math.random())}Object(u.d)(M,j),M.delete(j);const L=500;for(let t=0;t=0&&g.splice(j,1)}function A(M){var j=document.createElement("style");if(void 0===M.attrs.type&&(M.attrs.type="text/css"),void 0===M.attrs.nonce){var L=function(){0;return t.nc}();L&&(M.attrs.nonce=L)}return r(j,M.attrs),c(M,j),j}function r(M,j){Object.keys(j).forEach((function(t){M.setAttribute(t,j[t])}))}function S(M,j){var t,L,N,i;if(j.transform&&M.css){if(!(i="function"==typeof j.transform?j.transform(M.css):j.transform.default(M.css)))return function(){};M.css=i}if(j.singleton){var e=a++;t=D||(D=A(j)),L=x.bind(null,t,e,!1),N=x.bind(null,t,e,!0)}else M.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(t=function(M){var j=document.createElement("link");return void 0===M.attrs.type&&(M.attrs.type="text/css"),M.attrs.rel="stylesheet",r(j,M.attrs),c(M,j),j}(j),L=w.bind(null,t,j),N=function(){T(t),t.href&&URL.revokeObjectURL(t.href)}):(t=A(j),L=l.bind(null,t),N=function(){T(t)});return L(M),function(j){if(j){if(j.css===M.css&&j.media===M.media&&j.sourceMap===M.sourceMap)return;L(M=j)}else N()}}M.exports=function(M,j){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(j=j||{}).attrs="object"==typeof j.attrs?j.attrs:{},j.singleton||"boolean"==typeof j.singleton||(j.singleton=e()),j.insertInto||(j.insertInto="head"),j.insertAt||(j.insertAt="bottom");var t=o(M,j);return n(t,j),function(M){for(var L=[],N=0;N{t=function(t){let L,N=t;for(let t of M)if(t instanceof y.a){const M=Object(A.s)(j.position,t.position);M{Math.random()<.1&&C(M,j,A.q)},1e3+L),j.setInterval(()=>{t||(j.running=Math.random()<.1)},1e3+2e3*Math.random()),j.setInterval(()=>{t||(j.direction=Math.random()<.5?z.b.Left:z.b.Right)},1e3+4e3*Math.random())}function C(M,j,t){if(!M.has(j))return;const L=function(M,j){const t=new w.a(M);t.move(Object(A.a)(M.position,Object(A.e)(M.normal,10))),M.direction===z.b.Right?(t.move(Object(A.a)(t.position,Object(A.e)(M.forward,20))),t.forward=Object(A.r)(t.forward,A.p),t.normal=Object(A.r)(t.normal,A.p),t.angle=A.p):(t.move(Object(A.a)(t.position,Object(A.e)(M.forward,-20))),t.forward=Object(A.r)(t.forward,A.k),t.normal=Object(A.r)(t.normal,A.k),t.angle=A.k);j&&(t.forward=Object(A.r)(Object(A.c)(M.forward),j),t.normal=Object(A.r)(Object(A.c)(M.normal),j),t.angle=j);return t.velocity=Object(A.e)(M.normal,20),t.thrust=8,t}(j,t);j.timeout(u.n,()=>L.justDeployed=!1),Object(l.a)(M,L,!1,!1),M.add(L)}Object(S.c)((function(){if(c.c.killed>1&&c.c.deaths>1&&c.c.cowKilled>1){document.querySelector(".stats").innerHTML=`\n You fired ${c.c.bullets.toLocaleString()} bullets \n and ${c.c.missiles.toLocaleString()} missiles\n and destroyed ${c.c.killed.toLocaleString()} planes,\n and unfortunately died ${c.c.deaths.toLocaleString()} times.
\n Also inadvertently you killed ${c.c.cowKilled.toLocaleString()} cow cows. \n `}let M=document.getElementsByName("nickname")[0];M.value=Object(c.a)("nickname")||"",M.addEventListener("keyup",j=>Object(c.b)("nickname",M.value));let j=location.search.match(/mode=([\w-]+)/);if(j){let M=j[1],t=document.getElementsByName("mode");for(let j=0,L=t.length;j{const t=j.player;if(!t)return;const L=new y.a(t.color);L.life=u.h,L.ammo=L.maxAmmo=t.maxAmmo,L.landed=!0,L.ammo=0,L.move(Object(A.u)(M.width/2+(1200*Math.random()-600),M.ground)),t.control(L),M.add(L)},2e3)},Object(g.b)(M);let j=Object(N.b)();for(let t=0;t{Object(e.a)(j,M,M.players[0],t)},M=>{});return function(){c();for(let j of M.players)j.disableAI()}}();Object(S.a)("#game").addEventListener("submit",M=>{M.preventDefault();let j="death-match",t=document.getElementsByName("mode");for(let M=0,L=t.length;M{const t=j.player;if(!t)return;if(t.inGame())return;const L=new y.a(t.color);L.life=u.h,L.ammo=L.maxAmmo=t.maxAmmo,L.landed=!0,L.move(Object(A.u)(M.width*Math.random(),M.ground)),t.control(L),M.add(L)},2e3))},Object(g.b)(M),Object(g.a)(M);let j=new a.a(M.width/2+110,M.ground);M.add(j);const t=new y.a("#ff0015"),S=new n.a(Object(c.a)("nickname")||"YOU","#ff0015",t);S.isHuman=!0,S.control(t),M.players.push(S),S.maxAmmo=u.f,t.maxAmmo=u.f,t.ammo=u.f,t.landed=!0,t.move(Object(A.u)(M.width/2,M.ground)),M.add(t),Object(D.a)(M,S,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"});let z=Object(N.b)();for(let j=0;j{Object(e.a)(j,M,S,t)},j=>{Object(T.g)(j,M.players)}),Object(T.e)(M)}();break;case"teams":!function(){const M=new r.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-o.b.ground.height,M.players=[],Object(g.b)(M),Object(g.a)(M);const j=new n.b("#fd6a79");j.name="Red",j.startingPosition=12e3;const t=new n.b("#145ece");t.name="Blue",t.startingPosition=2e3;let N=location.search.match(/count=([0-9]+)vs([0-9]+)/);N&&(j.count=parseInt(N[1]),t.count=parseInt(N[2]));let S=new a.a(j.startingPosition,M.ground),z=new a.a(t.startingPosition,M.ground);M.add(S),M.add(z);let s=new y.a("#ff0015"),x=new n.a(Object(c.a)("nickname")||"YOU",s.color,s);x.isHuman=!0,x.join(j),s.player=x,M.players.push(x),x.maxAmmo=u.f,s.maxAmmo=u.f,s.ammo=u.f,s.landed=!0,s.move(Object(A.u)(j.startingPosition-130,M.ground)),M.add(s),Object(D.a)(M,x,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"});let l=!1;M.onCrash=function(j){j.player&&(j.player.detach(),setTimeout(()=>{const t=j.player;if(!t)return;if(t.inGame())return;let L=t.team;if(!L)return;L.points--,L.points<=0&&setTimeout(()=>{l||(l=!0,alert((null==L?void 0:L.name)+" team loses\n\n ¯\\_(ツ)_/¯"),location.href="?mode=teams")},2*u.n);const N=new y.a(t.color);N.life=u.h,N.ammo=N.maxAmmo=t.maxAmmo,N.landed=!0,N.move(Object(A.u)(L.startingPosition,M.ground)),t.control(N),M.add(N)},6e3))};for(let t=1;t{Object(e.a)(j,M,x,t)},M=>{Object(T.i)(M,j,t)}),Object(T.e)(M)}();break;case"duel":!function(){const M=new r.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-o.b.ground.height,M.players=[],M.onCrash=function(j){j.player&&(j.player.detach(),setTimeout(()=>{const t=j.player;if(!t)return;if(t.inGame())return;const L=new y.a(t.color);L.life=u.h,L.ammo=L.maxAmmo=t.maxAmmo,L.landed=!0,L.move(Object(A.u)(M.width*Math.random(),M.ground)),t.control(L),M.add(L)},2e3))},Object(g.b)(M),Object(g.a)(M);let j=new a.a(M.width/2+110,M.ground);M.add(j);const t=new y.a("#ff0015"),N=new n.a(Object(c.a)("nickname")||"YOU","#ff0015",t);N.isHuman=!0,N.control(t),M.players.push(N),N.maxAmmo=u.f,t.maxAmmo=u.f,t.ammo=u.f,t.landed=!0,t.move(Object(A.u)(M.width/2,M.ground)),M.add(t),Object(D.a)(M,N,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"});{const j=i.a.pop()||"no name",t="#145ece",N=new y.a(t),e=new n.a(j,t,N);N.player=e,M.players.push(e),e.maxAmmo=u.f,N.maxAmmo=u.f,N.ammo=u.f,N.landed=!0,N.move(Object(A.u)(M.width*Math.random(),M.ground)),M.add(N),e.disableAI=Object(L.a)(M,e,{missileChance:.3})}const S=document.querySelector("#canvas"),[z,s]=Object(e.b)(1.25,S);Object(I.a)(z,s,M,(j,t)=>{Object(e.a)(j,M,N,t)},j=>{Object(T.g)(j,M.players)}),Object(T.e)(M)}();break;case"survival":!function(){const M=new r.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-o.b.ground.height,M.players=[],Object(g.b)(M),Object(g.a)(M);let j=new a.a(M.width/2+110,M.ground);M.add(j);const t=new URLSearchParams(window.location.search);let S,z=parseInt(t.get("size")||"2"),s=Object(N.b)(),x=new n.b("#ff0015"),l=new y.a(x.color),w=new n.a(Object(c.a)("nickname")||"YOU",x.color,l);w.join(x),w.isHuman=!0,w.control(l),M.players.push(w),l.ammo=l.maxAmmo=w.maxAmmo=100,l.missiles=l.maxMissiles=w.maxMissiles=10,l.landed=!0,l.move(Object(A.u)(M.width/2-100,M.ground)),M.add(l),Object(D.a)(M,w,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"});let O=()=>{S=new n.b(s.pop()||"black");for(let j=0;j{alert(`Good run! But ${z} opponents turned out to be too much for you.\n\n (╯°□°)╯︵ ┻━┻`),location.href="?mode=survival"},3*u.n);else{let M=!0;for(let j of S.members)j.inGame()&&(M=!1);M&&(z++,setTimeout(O,3*u.n))}}},O();const C=document.querySelector("#canvas"),[E,d]=Object(e.b)(1.25,C);Object(I.a)(E,d,M,(j,t)=>{Object(e.a)(j,M,w,t)},M=>{Object(T.h)(M,x,S)}),Object(T.e)(M)}();break;case"swarm":!function(){const M=new r.a({width:15e3,height:4e3,ground:0,stratosphere:50});let j,t;M.ground=M.height-o.b.ground.height,M.players=[],Object(g.b)(M),Object(g.a)(M);const N=new URLSearchParams(window.location.search);j=t=parseInt(N.get("size")||"50");const a=new n.b("#ff0015"),S=new n.b("#145ece");let z=new y.a(a.color),s=new n.a(Object(c.a)("nickname")||"YOU",a.color,z);z.thrust=u.k,s.isHuman=!0,s.join(a),a.leader=s,z.player=s,M.players.push(s),s.maxAmmo=u.f,z.maxAmmo=u.f,z.ammo=u.f,z.move(Object(A.u)(3*M.width/4,M.height/2)),M.add(z);const x=Object(D.a)(M,s,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"}),l=[];let w;M.onCrash=function(M){if(M.player){let j=M.player;if(j.detach(),j.isHuman){let M;for(;M=l.shift();)if(M.hasPlane()){M.disableAI(),x(M),M.isHuman=!0,a.leader=M,s=M;break}}}clearTimeout(w),w=window.setTimeout(()=>{let M=a.members.filter(M=>M.hasPlane()).length,j=S.members.filter(M=>M.hasPlane()).length;0!=M&&0!=j||(0!=M&&0==j&&alert("You won! 🎉"),0==M&&0!=j&&alert("You lose."),0==M&&0==j&&alert("¯\\_(ツ)_/¯"),location.href="?mode=swarm")},5*u.n)};for(let t=1;t{Object(e.a)(j,M,s,t)},M=>{}),Object(T.e)(M)}();break;case"domination":!function(){const M=new r.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-o.b.ground.height,M.players=[],M.onCrash=function(j){j.player&&(j.player.detach(),setTimeout(()=>{const t=j.player;if(!t)return;if(t.inGame())return;const L=new y.a(t.color);L.life=u.h,L.ammo=L.maxAmmo=t.maxAmmo,L.landed=!0,L.move(Object(A.u)(M.width*Math.random(),M.ground)),t.control(L),M.add(L)},2e3))},Object(g.b)(M),Object(g.a)(M);let j=new a.a(M.width/2+110,M.ground);M.add(j);const t=new y.a("#ff0015"),S=new n.a(Object(c.a)("nickname")||"YOU","#ff0015",t);S.isHuman=!0,S.control(t),M.players.push(S),S.maxAmmo=u.f,t.maxAmmo=u.f,t.ammo=u.f,t.landed=!0,t.move(Object(A.u)(M.width/2,M.ground)),M.add(t),Object(D.a)(M,S,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"},{moreBullets:!0,explodingMissiles:!0});let z=Object(N.b)();for(let j=0;j<12;j++){const t=i.a.pop()||"no name",N=z.pop()||"black",e=new y.a(N),I=new n.a(t,N,e);e.player=I,M.players.push(I),I.maxAmmo=e.maxAmmo=e.ammo=j<=1?u.f:u.b,e.landed=!0,e.move(Object(A.u)(Math.random()*M.width,M.ground)),M.add(e),I.disableAI=Object(L.a)(M,I)}const s=document.querySelector("#canvas"),[x,l]=Object(e.b)(1.25,s);Object(I.a)(x,l,M,(j,t)=>{Object(e.a)(j,M,S,t)},j=>{Object(T.g)(j,M.players)}),Object(T.e)(M)}();break;case"revenge":!function(){const M=new r.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-o.b.ground.height,M.players=[],M.onCrash=function(){setTimeout(()=>{alert("Cows have taken their revenge!"),location.href="?mode=revenge"},3*u.n)},Object(g.b)(M);const j=new n.b("#0051ff");j.name="Cows";for(let t=u.g;t>=0;t--){let t=new z.a,L=new n.a("Cow",j.color,t);t.player=L,L.join(j),t.move(Object(A.u)(Math.random()*M.width,M.ground-t.sprite.height/2)),O(M,t),M.add(t)}M.onCowKill=j=>{if(j.dead)return;j.destroy(),j.dead=!0;let t=new s.d(o.b.cowDead);t.position=j.position,t.position.y=M.ground-t.sprite.height+2,M.groundObjects.add(t),setTimeout(()=>M.groundObjects.delete(t),30*u.n),Object(x.a)(M,j),N.kills++};const t=new n.b("#ff0015"),L=new y.a("#ff0015"),N=new n.a(Object(c.a)("nickname")||"YOU","#ff0015",L);N.join(t),N.isHuman=!0,N.control(L),M.players.push(N),N.maxAmmo=u.f,L.maxAmmo=u.f,L.ammo=u.f,L.move(Object(A.u)(M.width/2,-300)),M.add(L),Object(D.a)(M,N,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"});const i=document.querySelector("#canvas"),[a,S]=Object(e.b)(1.25,i);Object(I.a)(a,S,M,(j,t)=>{Object(e.a)(j,M,N,t)},M=>{Object(T.f)(M,N)}),Object(T.e)(M)}();break;case"playground":!function(){const M=new r.a({width:15e3,height:4e3,ground:0,stratosphere:50});M.ground=M.height-o.b.ground.height,M.players=[],Object(g.b)(M);const j=new y.a("#ff0015"),t=new n.a("YOU","#ff0015",j);M.players.push(t),t.control(j),j.move(Object(A.u)(M.width/2-200,500)),M.add(j),Object(D.a)(M,t,{thrustLevers:{up:["ArrowUp","KeyW"],down:["ArrowDown","KeyS"]},elevator:{up:["ArrowLeft","KeyA"],down:["ArrowRight","KeyD"]},fire:"Space",missile:"KeyX",catapult:"KeyC"}),j.thrust=u.k;{const j=i.a.pop()||"no name",t="#e2e2e2",N=new y.a(t),e=new n.a(j,t,N);M.players.push(e),e.control(N),N.move(Object(A.u)(M.width/2,500)),M.add(N),N.thrust=u.k,setInterval(()=>{N.pointTo=Object(L.b)(M,N,A.p)},100)}const N=document.querySelector("#canvas"),[a,c]=Object(e.b)(1.25,N);Object(I.a)(a,c,M,(j,L)=>{Object(e.a)(j,M,t,L)},M=>{})}()}}(j)})}))}]);