\n ").concat(a.name,"\n ").concat(a.help(Math.max(1,e.perks[a.id])),"\n
\n ").concat(n.reverse().join(""),"\n".concat(K("score_panel.upgrades_picked"),"
")+a.join("")}function ej(e,a){if(!e.perks.clairvoyant||e.creative)return"";for(var r="",n=0;n".concat(K("score_panel.upcoming_levels"),"
").concat(r,"
")}function eE(e){return e.level}function eA(e){return -1!==e.bricks.indexOf(e.ballsColor)}function eH(e){if(!e.perks.reach)return -1;for(var a=e.level.size,r=-1,n=-1,t=-1,s=0;s0&&Y(1-a.y/e.gameZoneHeight*1.1+.1,0,1)||0}function eI(e,a){return Math.pow(e.x-a.x,2)+Math.pow(e.y-a.y,2)}function eV(e,a){return Math.sqrt(eI(e,a))}function eZ(e){return!!(e.lastPuckMove&&e.perks.passive_income&&e.lastPuckMove>e.levelTime-250*e.perks.passive_income)}function eN(){try{return parseInt(localStorage.getItem("breakout-3-hs-short")||"0")}catch(e){}return 0}function eU(e){var a=[],r=[],n=Math.max(-1e3+100*e,0);if(e>20){var t=ea.slice(0,Math.floor(e/2)).map(function(e){return e}).filter(function(e){var a;return a=e.id,_||(_=new Set(["extra_levels","extra_life","one_more_choice","instant_upgrade","shunt","slow_down"]),ea.forEach(function(e){e.requires&&_.add(e.requires)})),!_.has(a)}).sort(function(a,r){return et(e+a.id)-et(e+r.id)}),s=Math.min(3,Math.ceil(e/30));a=t.slice(0,s),r=t.slice(s,s+s)}return{required:a,forbidden:r,minScore:n}}function eK(e,a,r){var n=eU(e),t=n.required,s=n.forbidden,i=n.minScore,_=function(e){var a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(a=Math).max.apply(a,[0].concat(x(e.filter(function(e){return!r.find(function(a){var r;return!(null==e?void 0:null===(r=e.perks)||void 0===r?void 0:r[a.id])})&&!n.find(function(a){var r;return null==e?void 0:null===(r=e.perks)||void 0===r?void 0:r[a.id]})}).map(function(e){return e.score}))))}(a,t,s),o=_&&r?K("unlocks.reached",{reached:_}):"";return _>=i?null:t.length||s.length?{reached:_,minScore:i,text:K("unlocks.minScoreWithPerks",{minScore:i,required:t.map(function(e){return e.name}).join(", "),forbidden:s.map(function(e){return e.name}).join(", ")})+o}:{reached:_,minScore:i,text:K("unlocks.minScore",{minScore:i})+o}}function eY(e,a){return a.perks.transparency?Y(a.perks.transparency*(1-e.y/a.gameZoneHeight*1.2),0,1):0}var eX={};if(eX=k("kqXj6").getBundleURL("lzUSl")+"sw-b71.1348ae79.js","serviceWorker"in navigator&&window.location.href.endsWith("/index.html?isPWA=true")){var eJ=new URL(eX);navigator.serviceWorker.register(eJ)}var f=k("5mG9B"),M=k("6QuVk"),e$=document.getElementById("game"),eQ=e$.getContext("2d",{alpha:!1}),e0=document.createElement("img");e0.src="data:image/svg+xml;base64,"+btoa(''),e0.onload=function(){return rS.needsRender=!0};var e1=document.createElement("img");e1.onload=function(){return rS.needsRender=!0};var e2=document.createElement("canvas"),e4=document.createElement("canvas"),e3=e4.getContext("2d",{alpha:!1});function e5(e,a,r,n,t,s,i){var _=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1;e.globalAlpha=_,r&&("#FF0000"==r?(e.strokeStyle="#FF0000",e.lineDashOffset=ao(a),e.lineWidth=2,e.setLineDash(a_)):(e.strokeStyle="#FFFFFF",e.lineWidth=1),e.beginPath(),e.moveTo(n,t),e.lineTo(s,i),e.stroke(),"#FF0000"==r&&(e.setLineDash(ai),e.lineWidth=1),e.globalAlpha=1)}var e6=document.createElement("canvas"),e7="",e8={};function e9(e,a,r,n,t){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",i="ball"+a+"_"+r+"_"+s,_=Math.round(r);if(!e8[i]){var o=document.createElement("canvas");o.width=_,o.height=_;var l=o.getContext("2d");l.beginPath(),l.arc(_/2,_/2,Math.round(_/2)-1,0,2*Math.PI),l.fillStyle=a,l.fill(),s&&(l.lineWidth=2,l.strokeStyle=s,l.stroke()),e8[i]=o}e.drawImage(e8[i],Math.round(n-_/2),Math.round(t-_/2))}function ae(e,a,r,n,t,s,i){var _=(Math.round(i/Math.PI*64)%32+32)%32,o="coin with halo_"+a+"_"+r+"_"+s+"_"+("#ffd300"===a?_:"whatever");if(!e8[o]){var l=document.createElement("canvas");l.width=r,l.height=r;var u=l.getContext("2d");u.beginPath(),u.arc(r/2,r/2,r/2,0,2*Math.PI),u.fillStyle=a,u.fill(),u.strokeStyle=s,"#FF0000"==s&&(u.lineWidth=2,u.setLineDash(a_)),"transparent"===a&&(u.lineWidth=2),u.stroke(),"#ffd300"===a&&(u.beginPath(),u.arc(r/2,r/2,r/2*.6,0,2*Math.PI),u.fillStyle="rgba(255,255,255,0.5)",u.fill(),u.translate(r/2,r/2),u.rotate(_/16),u.translate(-r/2,-r/2),u.globalCompositeOperation="multiply",an(u,"$",a,r-2,r/2,r/2+1),an(u,"$",a,r-2,r/2,r/2+1)),e8[o]=l}e.drawImage(e8[o],Math.round(n-r/2),Math.round(t-r/2))}function aa(e,a,r,n,t){var s="fuzzy-circle"+a+"_"+r;null==a||a.startsWith("#");var i=Math.round(3*r);if(!(!i||isNaN(i))){if(!e8[s]){var _=document.createElement("canvas");_.width=i,_.height=i;var o=_.getContext("2d"),l=o.createRadialGradient(i/2,i/2,0,i/2,i/2,i/2);l.addColorStop(0,a),l.addColorStop(.3,a+"88"),l.addColorStop(.6,a+"22"),l.addColorStop(1,"transparent"),o.fillStyle=l,o.fillRect(0,0,i,i),e8[s]=_}e.drawImage(e8[s],Math.round(n-i/2),Math.round(t-i/2))}}function ar(e,a,r,n,t){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,i=arguments.length>6?arguments[6]:void 0,_=Math.ceil(n-e.brickWidth/2),o=Math.ceil(t-e.brickWidth/2),l=Math.ceil(n+e.brickWidth/2)-1,u=Math.ceil(t+e.brickWidth/2)-1,c=l-_,d=u-o,p="brick"+r+"__"+c+"_"+d+"_"+s+"_"+i+"_";if(!e8[p]){var m,g,b,h,v,k,y=document.createElement("canvas");y.width=c,y.height=d;var f=y.getContext("2d");f.fillStyle=r,f.setLineDash(-1!==s?a_:ai),f.lineDashOffset=s,f.strokeStyle=-1!==s&&"#FF000033"||r,f.lineJoin="round",f.lineWidth=4,m=f,g=2,b=2,h=c-4,v=d-4,k=2,m.beginPath(),m.moveTo(4,2),m.lineTo(g+h-k,b),m.quadraticCurveTo(g+h,b,g+h,b+k),m.lineTo(g+h,b+v-k),m.quadraticCurveTo(g+h,b+v,g+h-k,b+v),m.lineTo(g+k,b+v),m.quadraticCurveTo(g,b+v,g,b+v-k),m.lineTo(g,b+k),m.quadraticCurveTo(g,b,g+k,b),m.closePath(),i||f.fill(),f.stroke(),e8[p]=y}a.drawImage(e8[p],_,o,c,d)}function an(e,a,r,n,t,s){var i=arguments.length>6&&void 0!==arguments[6]&&arguments[6],_="text"+a+"_"+r+"_"+n+"_"+i;if(!e8[_]){var o=document.createElement("canvas");o.width=n*a.length,o.height=n;var l=o.getContext("2d");l.fillStyle=r,l.textAlign=i?"left":"center",l.textBaseline="middle",l.font=n+"px monospace",l.fillText(a,i?0:o.width/2,o.height/2,o.width),e8[_]=o}e.drawImage(e8[_],i?t:Math.round(t-e8[_].width/2),Math.round(s-e8[_].height/2))}var at=document.getElementById("score"),as=document.getElementById("menuLabel"),ai=[],a_=[5,5];function ao(e){return eg("basic")?0:Math.floor(e.levelTime%500/500*10)%10}function al(e,a){return e.perks.metamorphosis||eg("colorful_coins")||e.perks.hypnosis||e.perks.rainbow?a.color:"#ffd300"}var f=k("5mG9B"),M=k("6QuVk");function au(){eg("record")&&(null==o?void 0:o.state)==="recording"&&(null==o||o.pause())}function ac(){eg("record")&&o&&(null==o||o.stop(),o=null)}var f=k("5mG9B"),M=k("6QuVk"),ad=0,ap=null,am=document.getElementById("popup"),ag=document.getElementById("close-modale");ag.addEventListener("click",function(e){e.preventDefault(),ap&&ap()}),ag.title=K("play.close_modale_window_tooltip");var ab=-1;function ah(e){return av.apply(this,arguments)}function av(){return(av=(0,f._)(function(e){var a,r,n,t,s,i,_;return(0,M.__generator)(this,function(o){return a=e.title,n=void 0===(r=e.content)?[]:r,s=void 0===(t=e.allowClose)||t,_=void 0===(i=e.className)?"":i,ak(1),[2,new Promise(function(e){var r,t=function(a){o||(o=!0,Array.prototype.forEach.call(i.querySelectorAll("button:not([disabled])"),function(e){return e.disabled=!0}),document.body.style.minHeight=document.body.scrollHeight+"px",setTimeout(function(){return document.body.style.minHeight=""},0),i.remove(),e(a))};am.className=_,ag.style.display=s?"":"none";var i=document.createElement("div"),o=!1;if(ap=s?function(){t(void 0)}:null,a){var l=document.createElement("h1");l.innerHTML=a,i.appendChild(l)}null==n||n.filter(function(e){return e}).forEach(function(e,a){if(e){if("string"==typeof e){var r,n,s=document.createElement("div");s.innerHTML=e,i.appendChild(s);return}(null===(r=i.lastChild)||void 0===r?void 0:r.nodeName)=="SECTION"?n=i.lastChild:((n=document.createElement("section")).className="actions",i.appendChild(n));var _=e.text,o=e.value,l=e.help,u=e.disabled,c=e.className,d=e.icon,p=e.tooltip,m=document.createElement("button");m.innerHTML="\n".concat(void 0===d?"":d,"\n\n ").concat(e.name,"\n ").concat(e.help(1),"\n
\n".concat(a,"
\n").concat(K("gameOver.cumulative_total",{startTs:n,endTs:r}),"
\n "),{icon:eu["icon:new_run"],value:null,text:K("confirmRestart.yes"),help:""},'',s,function(e){if(e.creative)return"";var a="",r="";try{var n=ed.map(function(e,a){var r;return{li:a,l:e,r:null===(r=eK(a,aW,!1))||void 0===r?void 0:r.text}}).filter(function(e){return e.r});e.runStatistics.runTime=Math.round(e.runStatistics.runTime);var t=w({},e.perks);for(var s in t)t[s]||delete t[s];aW.push(z(w({},e.runStatistics),{perks:t,appVersion:el}));var i=n.filter(function(e){var a=e.li;return!eK(a,aW,!0)});i.length&&(a="\n\n\n ").concat(a.name,"\n ").concat(ex(a),"\n
\n".concat(K("gameOver.stats_intro",{count:aW.length-1}),"
")+r)}catch(e){console.warn(e)}return a+r}(rS)]}).then(function(){return rx({levelToAvoid:eE(rS).name})})}}function af(e){return e.creative?""+K("gameOver.creative")+"
":""}var aW=[];try{aW=JSON.parse(localStorage.getItem("breakout_71_runs_history")||"[]").sort(function(e,a){return a.score-e.score}).slice(0,100)}catch(e){}var aw=0;function az(e){var a=document.createElement("div");a.classList="toast",a.innerHTML=e;var r=1500+200*aw;a.style.animationDuration=r+"ms",a.style.top=40+50*aw+"px",document.body.appendChild(a),aw++,setTimeout(function(){a.remove(),aw--},r)}function aS(e,a){e.computer_controlled||(e.puckPosition=a,e.needsRender=!0)}function ax(e){aM(e);var a,r=1+((null===(a=e.perks)||void 0===a?void 0:a.multiball)||0),n=e.puckWidth/(r+1);e.balls=[],e.ballsColor="#FFFFFF",(e.perks.picky_eater||e.perks.pierce_color)&&(e.ballsColor=function(e){var a,r={};e.forEach(function(e){return r[e]=(r[e]||0)+1});var n=(a=Math).max.apply(a,x(Object.keys(r).map(function(e){return r[e]})));return eM(Object.keys(r).filter(function(e){return r[e]==n}))}(e.bricks.filter(function(e){return e}))||"#FFFFFF");for(var t=0;t".concat(K("score_panel.close_to_unlock"),'
\n\n ").concat(i,"\n ").concat(null===(a=n.reason)||void 0===a?void 0:a.text,"\n
\n".concat(K("level_up.before_buttons",{score:e.score-e.levelStartScore,catchGain:t,levelSpawnedCoins:e.levelSpawnedCoins,time:Math.round(e.levelTime/1e3),timeGain:n,levelMisses:e.levelMisses,missesGain:i,levelWallBounces:e.levelWallBounces,wallHitsGain:s,compliment:o}),"\n
\n").concat(K("level_up.after_buttons",{level:e.currentLevel+1,max:eT(e)}),"
\n").concat(ej(e,e.currentLevel+1),"
\n")].concat(x(_),[eC(e),re(e),''])}),{allowClose:!1}))];case 2:return"reroll"===(l=u.sent())?(r++,e.rerolls--):(e.perks[l]++,"instant_upgrade"===l&&(r+=2),e.runStatistics.upgrades_picked++),[3,1];case 3:return[2]}})})).apply(this,arguments)}function r_(e,a){return eG(rS,Math.floor(a/rS.brickWidth),Math.floor((e-rS.offsetX)/rS.brickWidth))}function ro(e){if(rS.bricks[e])return e}function rl(e,a,r){var n,t,s;return null!==(s=null!==(t=null!==(n=ro(r_(e-r,a-r)))&&void 0!==n?n:ro(r_(e+r,a-r)))&&void 0!==t?t:ro(r_(e+r,a+r)))&&void 0!==s?s:ro(r_(e-r,a+r))}window.addEventListener("resize",function(){return rs(rS)}),window.addEventListener("fullscreenchange",function(){return rs(rS)}),setInterval(function(){var e=window.innerWidth,a=window.innerHeight;(e!==rS.canvasWidth||a!==rS.canvasHeight)&&rs(rS)},1e3),e$.addEventListener("mouseup",function(e){0===e.button&&(rS.running?rt(!0):(rr(),eg("pointerLock")&&e$.requestPointerLock&&e$.requestPointerLock().then()))}),e$.addEventListener("mousemove",function(e){document.pointerLockElement===e$?aS(rS,rS.puckPosition+e.movementX):aS(rS,e.x)}),e$.addEventListener("touchstart",function(e){var a;e.preventDefault(),(null===(a=e.touches)||void 0===a?void 0:a.length)&&(aS(rS,e.touches[0].pageX),aM(rS),rr())}),e$.addEventListener("touchend",function(e){e.preventDefault(),rt(!0)}),e$.addEventListener("touchcancel",function(e){e.preventDefault(),rt(!0)}),e$.addEventListener("touchmove",function(e){var a;(null===(a=e.touches)||void 0===a?void 0:a.length)&&aS(rS,e.touches[0].pageX)});var ru=0,rc=60;setInterval(function(){rc=ru,ru=0},1e3),setInterval(function(){rS.creative||(p||(p=ed.map(function(e,a){return w({name:e.name,li:a,l:e},eU(a))})),p.forEach(function(e){var a=e.name,r=e.minScore,n=e.forbidden,t=e.required;e.l,!(ra.has(a)||rS.score\n ").concat(e.name,"
\n ").concat(e.help(1),"\n
\n ").concat(e.name," \n
\n ").concat($(e.credit||""),"\n\n Made in France by Renan LE CARO. \n Donate\n Discord\n F-Droid\n Google Play\n itch.io \n Gitlab\n Web version\n HackerNews\n Privacy Policy\n Archives\n v.'.concat(el,"\n
")]),allowClose:!0})];case 1:return(a=r.sent())&&(a(),rS.needsRender=!0),[2]}})})).apply(this,arguments)}function rg(){return rb.apply(this,arguments)}function rb(){return(rb=(0,f._)(function(){var e,a,r,n,t,s,i,_,o;return(0,M.__generator)(this,function(l){switch(l.label){case 0:rt(!0),(a=[{disabled:eg("easy"),icon:eu["icon:starting_perks"],text:K("starting_perks.title"),help:K("starting_perks.help"),value:function(){return(0,f._)(function(){return(0,M.__generator)(this,function(e){switch(e.label){case 0:return[4,a0()];case 1:return e.sent(),[2]}})})()}}]).push({icon:eu[null===(e=V.find(function(e){return e.value===U()}))||void 0===e?void 0:e.levelName],text:K("settings.language"),help:K("settings.language_help"),value:function(){return(0,f._)(function(){var e,a;return(0,M.__generator)(this,function(r){switch(r.label){case 0:return[4,ah({title:K("settings.language"),content:[K("settings.language_help")].concat(x(V.map(function(e){return z(w({},e),{icon:eu[e.levelName]})}))),allowClose:!0})];case 1:if(!(a=(e=r.sent())&&e!==U()))return[3,3];return[4,ry(rS)];case 2:a=r.sent(),r.label=3;case 3:return a&&(H("lang",e),window.location.reload()),[2]}})})()}}),r=!0,n=!1,t=void 0;try{for(s=function(){var e=_.value;em[e]&&a.push({icon:eg(e)?eu["icon:checkmark_checked"]:eu["icon:checkmark_unchecked"],text:em[e].name,help:em[e].help,value:function(){eb(e),rs(rS),rh(),rg()}})},i=Object.keys(em)[Symbol.iterator]();!(r=(_=i.next()).done);r=!0)s()}catch(e){n=!0,t=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw t}}return a.push({icon:eu["icon:download"],text:K("settings.download_save_file"),help:K("settings.download_save_file_help"),value:function(){return(0,f._)(function(){var e,a;return(0,M.__generator)(this,function(r){return e=a3(),(a=document.createElement("a")).setAttribute("href","data:application/json;base64,"+btoa(JSON.stringify({fileType:"B71-save-file",appVersion:el,signedPayload:e,key:et("Security by obscurity, but really the game is oss so eh"+e)}))),a.setAttribute("download","b71-save-"+new Date().toISOString().slice(0,19).replace(/[^0-9]+/gi,"-")+".b71"),document.body.appendChild(a),a.click(),setTimeout(function(){return document.body.removeChild(a)},1e3),[2]})})()}}),a.push({icon:eu["icon:upload"],text:K("settings.load_save_file"),help:K("settings.load_save_file_help"),value:function(){return(0,f._)(function(){var e,a;return(0,M.__generator)(this,function(r){if(!document.getElementById("save_file_picker")){var n;(a=document.createElement("input")).setAttribute("type","file"),a.setAttribute("id","save_file_picker"),a.setAttribute("accept",".b71,.json"),a.style.position="absolute",a.style.left="-1000px",a.addEventListener("change",(n=(0,f._)(function(e){var r,n,t,s,i,_,o,l,u;return(0,M.__generator)(this,function(e){switch(e.label){case 0:if(e.trys.push([0,4,,6]),!(n=a&&(null===(r=a.files)||void 0===r?void 0:r.item(0))))return[3,3];return[4,new Promise(function(e,a){var r=new FileReader;r.onload=function(){var a;e((null===(a=r.result)||void 0===a?void 0:a.toString())||"")},r.onerror=function(){a(r.error)},r.readAsText(n)})];case 1:if(s=(t=JSON.parse(e.sent())).fileType,i=t.appVersion,_=t.signedPayload,o=t.key,"B71-save-file"!==s)throw Error("Not a B71 save file");if(i>el)throw Error("Please update your app first, this file is for version "+i+" or newer.");if(o!==et("Security by obscurity, but really the game is oss so eh"+_))throw Error("Key does not match content.");for(var c in l=JSON.parse(_),localStorage.clear(),l)localStorage.setItem(c,l[c]);return[4,ah({title:K("settings.save_file_loaded"),content:[K("settings.save_file_loaded_help"),{text:K("settings.save_file_loaded_ok")}]})];case 2:e.sent(),window.location.reload(),e.label=3;case 3:return[3,6];case 4:return u=e.sent(),[4,ah({title:K("settings.save_file_error"),content:[u.message,{text:K("settings.save_file_loaded_ok")}]})];case 5:return e.sent(),[3,6];case 6:return a.value="",[2]}})}),function(e){return n.apply(this,arguments)})),document.body.appendChild(a)}return null===(e=document.getElementById("save_file_picker"))||void 0===e||e.click(),[2]})})()}}),a.push({icon:eu["icon:coins"],text:K("settings.max_coins",{max:F()}),help:K("settings.max_coins_help"),value:function(){return(0,f._)(function(){return(0,M.__generator)(this,function(e){switch(e.label){case 0:return H("max_coins",(A("max_coins",1)+1)%6),[4,rg()];case 1:return e.sent(),[2]}})})()}}),a.push({icon:eu["icon:particles"],text:K("settings.max_particles",{max:I()}),help:K("settings.max_particles_help"),value:function(){return(0,f._)(function(){return(0,M.__generator)(this,function(e){switch(e.label){case 0:return H("max_particles",(A("max_particles",1)+1)%6),[4,rg()];case 1:return e.sent(),[2]}})})()}}),a.push({icon:eu["icon:reset"],text:K("settings.reset"),help:K("settings.reset_help"),value:function(){return(0,f._)(function(){return(0,M.__generator)(this,function(e){switch(e.label){case 0:return[4,ah({title:K("settings.reset"),content:[K("settings.reset_instruction"),{text:K("settings.reset_confirm"),value:!0},{text:K("settings.reset_cancel"),value:!1}],allowClose:!0})];case 1:return e.sent()&&(localStorage.clear(),window.location.reload()),[2]}})})()}}),[4,ah({title:K("main_menu.settings_title"),content:[K("main_menu.settings_help")].concat(x(a)),allowClose:!0,className:"settings"})];case 1:return(o=l.sent())&&(o(),rS.needsRender=!0),[2]}})})).apply(this,arguments)}function rh(){return rv.apply(this,arguments)}function rv(){return(rv=(0,f._)(function(){var e;return(0,M.__generator)(this,function(a){switch(a.label){case 0:if(a.trys.push([0,10,,11]),!(document.fullscreenEnabled||document.webkitFullscreenEnabled))return[2,!1];if(!(null!==document.fullscreenElement&&!eg("fullscreen")))return[3,5];if(!document.exitFullscreen)return[3,2];return[4,document.exitFullscreen()];case 1:case 3:case 6:case 8:return a.sent(),[2,!0];case 2:if(!document.webkitCancelFullScreen)return[3,4];return[4,document.webkitCancelFullScreen()];case 4:return[3,9];case 5:if(!(eg("fullscreen")&&!document.fullscreenElement))return[3,9];if(!(e=document.documentElement).requestFullscreen)return[3,7];return[4,e.requestFullscreen()];case 7:if(!e.webkitRequestFullscreen)return[3,9];return[4,e.webkitRequestFullscreen()];case 9:return[3,11];case 10:return console.warn(a.sent()),[3,11];case 11:return[2,!1]}})})).apply(this,arguments)}function rk(){return(rk=(0,f._)(function(){var e,a,r,n,t,s;return(0,M.__generator)(this,function(i){switch(i.label){case 0:return e=D(),a=eg("mobile-mode")?"help":"tooltip",r=ep.sort(function(e,a){return e.threshold-a.threshold}).map(function(r){var n=r.name,t=r.id,s=r.threshold,i=r.icon,_=r.help;return W({text:n,disabled:e".concat(K("unlocks.intro",{ts:e}),"\n ").concat(r.find(function(e){return e.disabled})?K("unlocks.greyed_out_help"):"","
")].concat(x(r),[K("unlocks.level",{unlocked:t.filter(function(e){return!e.disabled}).length,out_of:t.length})],x(t)),allowClose:!0,className:eg("mobile-mode")?"":"actionsAsGrid"})];case 1:if(!(s=i.sent()))return[3,3];return[4,ry(rS)];case 2:i.sent()&&rx(w({},s)),i.label=3;case 3:return[2]}})})).apply(this,arguments)}function ry(e){return rf.apply(this,arguments)}function rf(){return(rf=(0,f._)(function(e){return(0,M.__generator)(this,function(a){return!e.currentLevel||ad?[2,!0]:(rt(!0),[2,ah({title:K("confirmRestart.title"),content:[K("confirmRestart.text"),{value:!0,text:K("confirmRestart.yes")},{value:!1,text:K("confirmRestart.no")}]})])})})).apply(this,arguments)}var rW={ArrowLeft:0,ArrowRight:0,Shift:0};function rw(e,a){rW[e]=a,rS.keyboardPuckSpeed=(rW.ArrowRight-rW.ArrowLeft)*(1+2*rW.Shift)*rS.gameZoneWidth/50}document.addEventListener("keydown",(r=(0,f._)(function(e){return(0,M.__generator)(this,function(a){return"f"!==e.key.toLowerCase()||e.ctrlKey||e.metaKey?e.key in rW&&rw(e.key,1):(eb("fullscreen"),rh())," "!==e.key||ad||(rS.running?rt(!0):rr(),e.preventDefault()),[2]})}),function(e){return r.apply(this,arguments)}));var rz=new Date;document.addEventListener("keyup",(n=(0,f._)(function(e){var a,r,n,t,s;return(0,M.__generator)(this,function(i){switch(i.label){case 0:if(s=document.querySelector("button:focus"),!(e.key in rW))return[3,1];return rw(e.key,0),[3,10];case 1:if("ArrowDown"!==e.key||(null==s?void 0:null===(a=s.nextElementSibling)||void 0===a?void 0:a.tagName)!=="BUTTON")return[3,2];return null==s||null===(r=s.nextElementSibling)||void 0===r||r.focus(),[3,10];case 2:if("ArrowUp"!==e.key||(null==s?void 0:null===(n=s.previousElementSibling)||void 0===n?void 0:n.tagName)!=="BUTTON")return[3,3];return null==s||null===(t=s.previousElementSibling)||void 0===t||t.focus(),[3,10];case 3:if(!("Escape"===e.key&&ap))return[3,4];return ap(),[3,10];case 4:if(!("Escape"===e.key&&rS.running))return[3,5];return rt(!0),[3,10];case 5:if(!("m"===e.key.toLowerCase()&&!ad))return[3,6];return rp().then(),[3,10];case 6:if(!("s"===e.key.toLowerCase()&&!ad))return[3,7];return a8(rS).then(),[3,10];case 7:if(!("r"===e.key.toLowerCase()&&!ad&&rz