From b47585bc92aef017209134be00312818a28f92eb Mon Sep 17 00:00:00 2001 From: ducdat0507 <62660527+ducdat0507@users.noreply.github.com> Date: Tue, 13 Dec 2022 08:03:30 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20thepaper?= =?UTF-8?q?pilot/Advent-Incremental@2edc63888d4a19a2c9756b03fc4e42a0b0db51?= =?UTF-8?q?d4=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...eLoop.3a885249.js => gameLoop.4c2ba2f1.js} | 2 +- .../{index.9b588766.js => index.0516c815.js} | 22 +++++++++---------- index.html | 2 +- sw.js | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) rename assets/{gameLoop.3a885249.js => gameLoop.4c2ba2f1.js} (91%) rename assets/{index.9b588766.js => index.0516c815.js} (69%) diff --git a/assets/gameLoop.3a885249.js b/assets/gameLoop.4c2ba2f1.js similarity index 91% rename from assets/gameLoop.3a885249.js rename to assets/gameLoop.4c2ba2f1.js index 4e04bbb..c18d0df 100644 --- a/assets/gameLoop.3a885249.js +++ b/assets/gameLoop.4c2ba2f1.js @@ -1 +1 @@ -import{_ as T,s as d,p as e,a as l,l as c,D as m,b as s,g as u}from"./index.9b588766.js";import"./vue.92681fcb.js";import{b1 as v}from"./@vue.4ce677c2.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.731cedc5.js";import"./is-plain-object.906d88e8.js";import"./vue-next-select.a2bfab1d.js";import"./vue-toastification.6f567382.js";import"./vuedraggable.7949458c.js";import"./sortablejs.29100d8a.js";import"./vue-textarea-autosize.35804eaf.js";import"./workbox-window.8d14e8b7.js";let n=null,f=null;function r(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const o=i;if(l.lastTenTicks.push(o),l.lastTenTicks.length>10&&(l.lastTenTicks=l.lastTenTicks.slice(1)),(f==null?void 0:f.value)&&!e.keepGoing||l.hasNaN||(i=Math.max(i,0),e.devSpeed===0))return;if(c.value=!1,e.offlineTime!=null){if(m.gt(e.offlineTime,s.offlineLimit*3600)&&(e.offlineTime=s.offlineLimit*3600),m.gt(e.offlineTime,0)&&e.devSpeed!==0){const p=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-p,i+=p}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||m.lt(e.offlineTime,0))&&(e.offlineTime=null)}if(i=Math.min(i,s.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),m.eq(i,0))return;e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308);let a=o;for(;a>1;)u.emit("update",i/o,1),a--;u.emit("update",i*a/o,a),d.unthrottled?(requestAnimationFrame(r),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(r,50))}async function F(){f=(await T(()=>import("./index.9b588766.js").then(function(t){return t.c}),["assets/index.9b588766.js","assets/index.40999a53.css","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"])).hasWon,v(f,t=>{t&&u.emit("gameWon")}),d.unthrottled?requestAnimationFrame(r):n=setInterval(r,50)}export{F as startGameLoop}; +import{_ as T,s as d,p as e,a as l,l as c,D as m,b as s,g as u}from"./index.0516c815.js";import"./vue.92681fcb.js";import{b1 as v}from"./@vue.4ce677c2.js";/* empty css */import"./nanoevents.1080beb7.js";import"./lz-string.731cedc5.js";import"./is-plain-object.906d88e8.js";import"./vue-next-select.a2bfab1d.js";import"./vue-toastification.6f567382.js";import"./vuedraggable.7949458c.js";import"./sortablejs.29100d8a.js";import"./vue-textarea-autosize.35804eaf.js";import"./workbox-window.8d14e8b7.js";let n=null,f=null;function r(){const t=Date.now();let i=(t-e.time)/1e3;e.time=t;const o=i;if(l.lastTenTicks.push(o),l.lastTenTicks.length>10&&(l.lastTenTicks=l.lastTenTicks.slice(1)),(f==null?void 0:f.value)&&!e.keepGoing||l.hasNaN||(i=Math.max(i,0),e.devSpeed===0))return;if(c.value=!1,e.offlineTime!=null){if(m.gt(e.offlineTime,s.offlineLimit*3600)&&(e.offlineTime=s.offlineLimit*3600),m.gt(e.offlineTime,0)&&e.devSpeed!==0){const p=Math.max(e.offlineTime/10,i);e.offlineTime=e.offlineTime-p,i+=p}else e.devSpeed===0&&(e.offlineTime+=i);(!e.offlineProd||m.lt(e.offlineTime,0))&&(e.offlineTime=null)}if(i=Math.min(i,s.maxTickLength),e.devSpeed!=null&&(i*=e.devSpeed),Number.isFinite(i)||(i=1e308),m.eq(i,0))return;e.timePlayed+=i,Number.isFinite(e.timePlayed)||(e.timePlayed=1e308);let a=o;for(;a>1;)u.emit("update",i/o,1),a--;u.emit("update",i*a/o,a),d.unthrottled?(requestAnimationFrame(r),n!=null&&(clearInterval(n),n=null)):n==null&&(n=setInterval(r,50))}async function F(){f=(await T(()=>import("./index.0516c815.js").then(function(t){return t.c}),["assets/index.0516c815.js","assets/index.40999a53.css","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"])).hasWon,v(f,t=>{t&&u.emit("gameWon")}),d.unthrottled?requestAnimationFrame(r):n=setInterval(r,50)}export{F as startGameLoop}; diff --git a/assets/index.9b588766.js b/assets/index.0516c815.js similarity index 69% rename from assets/index.9b588766.js rename to assets/index.0516c815.js index d5978cd..cf942e2 100644 --- a/assets/index.9b588766.js +++ b/assets/index.0516c815.js @@ -1,19 +1,19 @@ -/* empty css */import"./vue.92681fcb.js";import{Z as f,l as wt,aa as _e,t as H,ay as ya,ar as Rl,aE as k,a0 as T,aK as Xt,a1 as h,O as x,aG as ra,A as Dt,_ as be,a8 as n,b6 as ge,b8 as ha,bs as ci,C as u,aq as Ol,bu as Yl,bb as ba,T as nn,a7 as s,u as wa,j as on,bv as Ia,q as aa,b1 as jt,G as bt,aC as pi,w as Yt,b2 as Vt,ao as sn,I as At,aN as rt,$ as G,J as Te,aH as yl,aF as hl,z as ol,al as ca,aL as xl,H as rn,aJ as mi,bn as un,br as dn,be as cn}from"./@vue.4ce677c2.js";import{c as vi}from"./nanoevents.1080beb7.js";import{L as El}from"./lz-string.731cedc5.js";import{i as pn}from"./is-plain-object.906d88e8.js";import{Y as mn}from"./vue-next-select.a2bfab1d.js";import{s as vn,u as fi}from"./vue-toastification.6f567382.js";import{D as fn}from"./vuedraggable.7949458c.js";import{p as gn}from"./vue-textarea-autosize.35804eaf.js";import{v as yn,n as hn}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const bn=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const d of r.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function l(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerpolicy&&(r.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?r.credentials="include":o.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=l(o);fetch(o.href,r)}};bn();const wn="modulepreload",Wa={},An="./",pa=function(t,l){return!l||l.length===0?t():Promise.all(l.map(i=>{if(i=`${An}${i}`,i in Wa)return;Wa[i]=!0;const o=i.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${r}`))return;const d=document.createElement("link");if(d.rel=o?"stylesheet":wn,o||(d.as="script",d.crossOrigin=""),d.href=i,document.head.appendChild(d),o)return new Promise((c,m)=>{d.addEventListener("load",c),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},kn="./projInfo-schema.json",Cn="Advent Incremental",En="An incremental game you play a day at a time, leading up to Christmas!",_n="advent-incremental",Sn="thepaperpilot and friends",Mn="",xn="",Bn="0.5",Nn="Initial Commit",Dn=!0,In=!1,Tn=2,Pn=!0,Fn=null,Un="",Rn=["main"],On=3600,qn=0,Ln=!0,Gn="base64";var je={$schema:kn,title:Cn,description:En,id:_n,author:Sn,discordName:Mn,discordLink:xn,versionNumber:Bn,versionTitle:Nn,allowGoBack:Dn,defaultShowSmall:In,defaultDecimalsShown:Tn,useHeader:Pn,banner:Fn,logo:Un,initialTabs:Rn,maxTickLength:On,offlineLimit:qn,enablePausing:Ln,exportEncoding:Gn};const Sa=17,Qn=9e15,$n=Math.log10(9e15),Hn=1/9e15,Vn=308,jn=-324,Ka=5,zn=function(){const e=[];for(let l=jn+1;l<=Vn;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),Pl=[2,Math.E,3,4,5,6,7,8,9,10],Jn=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.18422737399915,1.4066113788546144,1.680911177655277,2.027492094355525,2.4775152854601967,3.080455730250329,3.918234505962507,5.1332705696484595,6.9878696918072905,10]],Wn=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]],A=function(t){return a.fromValue_noAlloc(t)},ke=function(e,t,l){return a.fromComponents(e,t,l)},Pe=function(t,l,i){return a.fromComponents_noNormalize(t,l,i)},Cl=function(t,l){const i=l+1,o=Math.ceil(Math.log10(Math.abs(t))),r=Math.round(t*Math.pow(10,i-o))*Math.pow(10,o-i);return parseFloat(r.toFixed(Math.max(i-o,0)))},Ma=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},Kn=function(e){if(!isFinite(e))return e;if(e<-50)return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let t=1;for(;e<10;)t=t*e,++e;e-=1;let l=.9189385332046727;l=l+(e+.5)*Math.log(e),l=l-e;const i=e*e;let o=e;return l=l+1/(12*o),o=o*i,l=l+1/(360*o),o=o*i,l=l+1/(1260*o),o=o*i,l=l+1/(1680*o),o=o*i,l=l+1/(1188*o),o=o*i,l=l+691/(360360*o),o=o*i,l=l+7/(1092*o),o=o*i,l=l+3617/(122400*o),Math.exp(l)/t},gi=.5671432904097838,Xa=function(e,t=1e-10){let l,i;if(!Number.isFinite(e)||e===0)return e;if(e===1)return gi;e<10?l=0:l=Math.log(e)-Math.log(Math.log(e));for(let o=0;o<100;++o){if(i=(e*Math.exp(-l)+l*l)/(l+1),Math.abs(i-l).5?1:-1;if(Math.random()*20<1)return Pe(t,0,1);const l=Math.floor(Math.random()*(e+1));let i=l===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(i=Math.trunc(i));let o=Math.pow(10,i);return Math.random()>.9&&(o=Math.trunc(o)),ke(t,l,o)}static affordGeometricSeries_core(e,t,l,i){const o=t.mul(l.pow(i));return I.floor(e.div(o).mul(l.sub(1)).add(1).log10().div(l.log10()))}static sumGeometricSeries_core(e,t,l,i){return t.mul(l.pow(i)).mul(I.sub(1,l.pow(e))).div(I.sub(1,l))}static affordArithmeticSeries_core(e,t,l,i){const r=t.add(i.mul(l)).sub(l.div(2)),d=r.pow(2);return r.neg().add(d.add(l.mul(e).mul(2)).sqrt()).div(l).floor()}static sumArithmeticSeries_core(e,t,l,i){const o=t.add(i.mul(l));return e.div(2).mul(o.mul(2).plus(e.sub(1).mul(l)))}static efficiencyOfPurchase_core(e,t,l){return e.div(t).add(e.div(l))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag=Qn)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e<$n&&this.layer>0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=t*Math.pow(10,e),e=Math.abs(this.mag),t=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(e,t,l){return this.sign=e,this.layer=t,this.mag=l,this.normalize(),this}fromComponents_noNormalize(e,t,l){return this.sign=e,this.layer=t,this.mag=l,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){e=e.replace(",","");const t=e.split("^^^");if(t.length===2){const C=parseFloat(t[0]),v=parseFloat(t[1]),S=t[1].split(";");let N=1;if(S.length===2&&(N=parseFloat(S[1]),isFinite(N)||(N=1)),isFinite(C)&&isFinite(v)){const D=I.pentate(C,v,N);return this.sign=D.sign,this.layer=D.layer,this.mag=D.mag,this}}const l=e.split("^^");if(l.length===2){const C=parseFloat(l[0]),v=parseFloat(l[1]),S=l[1].split(";");let N=1;if(S.length===2&&(N=parseFloat(S[1]),isFinite(N)||(N=1)),isFinite(C)&&isFinite(v)){const D=I.tetrate(C,v,N);return this.sign=D.sign,this.layer=D.layer,this.mag=D.mag,this}}const i=e.split("^");if(i.length===2){const C=parseFloat(i[0]),v=parseFloat(i[1]);if(isFinite(C)&&isFinite(v)){const S=I.pow(C,v);return this.sign=S.sign,this.layer=S.layer,this.mag=S.mag,this}}e=e.trim().toLowerCase();let o,r,d=e.split("pt");if(d.length===2){o=10,r=parseFloat(d[0]),d[1]=d[1].replace("(",""),d[1]=d[1].replace(")","");let C=parseFloat(d[1]);if(isFinite(C)||(C=1),isFinite(o)&&isFinite(r)){const v=I.tetrate(o,r,C);return this.sign=v.sign,this.layer=v.layer,this.mag=v.mag,this}}if(d=e.split("p"),d.length===2){o=10,r=parseFloat(d[0]),d[1]=d[1].replace("(",""),d[1]=d[1].replace(")","");let C=parseFloat(d[1]);if(isFinite(C)||(C=1),isFinite(o)&&isFinite(r)){const v=I.tetrate(o,r,C);return this.sign=v.sign,this.layer=v.layer,this.mag=v.mag,this}}const c=e.split("e"),m=c.length-1;if(m===0){const C=parseFloat(e);if(isFinite(C))return this.fromNumber(C)}else if(m===1){const C=parseFloat(e);if(isFinite(C)&&C!==0)return this.fromNumber(C)}const p=e.split("e^");if(p.length===2){this.sign=1,p[0].charAt(0)=="-"&&(this.sign=-1);let C="";for(let v=0;v=43&&S<=57||S===101)C+=p[1].charAt(v);else return this.layer=parseFloat(C),this.mag=parseFloat(p[1].substr(v+1)),this.normalize(),this}}if(m<1)return this.sign=0,this.layer=0,this.mag=0,this;const w=parseFloat(c[0]);if(w===0)return this.sign=0,this.layer=0,this.mag=0,this;let b=parseFloat(c[c.length-1]);if(m>=2){const C=parseFloat(c[c.length-2]);isFinite(C)&&(b*=Math.sign(C),b+=Ma(C))}if(!isFinite(w))this.sign=c[0]==="-"?-1:1,this.layer=m,this.mag=b;else if(m===1)this.sign=Math.sign(w),this.layer=1,this.mag=b+Math.log10(Math.abs(w));else if(this.sign=Math.sign(w),this.layer=m,m===2){const C=I.mul(ke(1,2,b),A(w));return this.sign=C.sign,this.layer=C.layer,this.mag=C.mag,this}else this.mag=b;return this.normalize(),this}fromValue(e){return e instanceof I||e!=null&&typeof e=="object"&&"sign"in e&&"mag"in e&&"layer"in e?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:Cl(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:Cl(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=Ka?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(e){return this.layer===0?(this.sign*this.mag).toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return this.layer===0?(this.sign*this.mag).toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return this.e<=-7?this.toExponential(e-1):e>this.e?this.toFixed(e-this.exponent-1):this.toExponential(e-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(e):Cl(this.m,e)+"e"+Cl(this.e,e):this.layer===1?Cl(this.m,e)+"e"+Cl(this.e,e):this.layer<=Ka?(this.sign===-1?"-":"")+"e".repeat(this.layer)+Cl(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+Cl(this.mag,e)}abs(){return Pe(this.sign===0?0:1,this.layer,this.mag)}neg(){return Pe(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?I.dZero:this.layer===0?ke(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?I.dZero:this.layer===0?ke(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?I.dZero:this.layer===0?ke(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?I.dZero:this.layer===0?ke(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=A(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer)||this.sign===0)return t;if(t.sign===0)return this;if(this.sign===-t.sign&&this.layer===t.layer&&this.mag===t.mag)return Pe(0,0,0);let l,i;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(I.cmpabs(this,t)>0?(l=this,i=t):(l=t,i=this),l.layer===0&&i.layer===0)return A(l.sign*l.mag+i.sign*i.mag);const o=l.layer*Math.sign(l.mag),r=i.layer*Math.sign(i.mag);if(o-r>=2)return l;if(o===0&&r===-1){if(Math.abs(i.mag-Math.log10(l.mag))>Sa)return l;{const d=Math.pow(10,Math.log10(l.mag)-i.mag),c=i.sign+l.sign*d;return ke(Math.sign(c),1,i.mag+Math.log10(Math.abs(c)))}}if(o===1&&r===0){if(Math.abs(l.mag-Math.log10(i.mag))>Sa)return l;{const d=Math.pow(10,l.mag-Math.log10(i.mag)),c=i.sign+l.sign*d;return ke(Math.sign(c),1,Math.log10(i.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(l.mag-i.mag)>Sa)return l;{const d=Math.pow(10,l.mag-i.mag),c=i.sign+l.sign*d;return ke(Math.sign(c),1,i.mag+Math.log10(Math.abs(c)))}}plus(e){return this.add(e)}sub(e){return this.add(A(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=A(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return Pe(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return Pe(this.sign*t.sign,0,1);let l,i;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(l=this,i=t):(l=t,i=this),l.layer===0&&i.layer===0)return A(l.sign*i.sign*l.mag*i.mag);if(l.layer>=3||l.layer-i.layer>=2)return ke(l.sign*i.sign,l.layer,l.mag);if(l.layer===1&&i.layer===0)return ke(l.sign*i.sign,1,l.mag+Math.log10(i.mag));if(l.layer===1&&i.layer===1)return ke(l.sign*i.sign,1,l.mag+i.mag);if(l.layer===2&&i.layer===1){const o=ke(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ke(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)));return ke(l.sign*i.sign,o.layer+1,o.sign*o.mag)}if(l.layer===2&&i.layer===2){const o=ke(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ke(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)));return ke(l.sign*i.sign,o.layer+1,o.sign*o.mag)}throw Error("Bad arguments to mul: "+this+", "+e)}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const t=A(e);return this.mul(t.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return this.mag===0?I.dNaN:this.layer===0?ke(this.sign,0,1/this.mag):ke(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=A(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,i=t.mag>0?t.layer:-t.layer;return l>i?1:lt.mag?1:this.mag0?t:this}clamp(e,t){return this.max(e).min(t)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,t){const l=A(e);return this.eq_tolerance(l,t)?0:this.cmp(l)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const l=A(e);if(t==null&&(t=1e-7),this.sign!==l.sign||Math.abs(this.layer-l.layer)>1)return!1;let i=this.mag,o=l.mag;return this.layer>l.layer&&(o=Ma(o)),this.layer0?ke(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ke(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?I.dNaN:this.layer>0?ke(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ke(this.sign,0,Math.log10(this.mag))}log(e){return e=A(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?I.dNaN:this.layer===0&&e.layer===0?ke(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):I.div(this.log10(),e.log10())}log2(){return this.sign<=0?I.dNaN:this.layer===0?ke(this.sign,0,Math.log2(this.mag)):this.layer===1?ke(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?ke(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):ke(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?I.dNaN:this.layer===0?ke(this.sign,0,Math.log(this.mag)):this.layer===1?ke(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?ke(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):ke(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=A(e),l=this,i=t;if(l.sign===0)return i.eq(0)?Pe(1,0,1):l;if(l.sign===1&&l.layer===0&&l.mag===1)return l;if(i.sign===0)return Pe(1,0,1);if(i.sign===1&&i.layer===0&&i.mag===1)return l;const o=l.absLog10().mul(i).pow10();return this.sign===-1?Math.abs(i.toNumber()%2)%2===1?o.neg():Math.abs(i.toNumber()%2)%2===0?o:I.dNaN:o}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return I.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return ke(1,0,t);if(e.sign===0)return I.dOne;e=Pe(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?ke(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?ke(-e.sign,e.layer+1,-e.mag):I.dOne}pow_base(e){return A(e).pow(this)}root(e){const t=A(e);return this.pow(t.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?I.exp(I.mul(this,I.ln(this).sub(1))):I.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(Pe(1,0,24)))return A(Kn(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const l=e*e;let i=e,o=12*i,r=1/o,d=t+r;if(d===t||(t=d,i=i*l,o=360*i,r=1/o,d=t-r,d===t))return I.exp(t);t=d,i=i*l,o=1260*i;let c=1/o;return t=t+c,i=i*l,o=1680*i,c=1/o,t=t-c,I.exp(t)}else return this.layer===1?I.exp(I.mul(this,I.ln(this).sub(1))):I.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?I.dOne:this.layer===0&&this.mag<=709.7?A(Math.exp(this.sign*this.mag)):this.layer===0?ke(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?ke(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):ke(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return A(Math.sqrt(this.sign*this.mag));if(this.layer===1)return ke(1,2,Math.log10(this.mag)-.3010299956639812);{const e=I.div(Pe(this.sign,this.layer-1,this.mag),Pe(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=Pe(1,0,1)){if(e===1)return I.pow(this,t);if(e===0)return new I(t);if(this.eq(I.dOne))return I.dOne;if(this.eq(-1))return I.pow(this,t);if(e===Number.POSITIVE_INFINITY){const o=this.toNumber();if(o<=1.444667861009766&&o>=.06598803584531254){if(o>1.444667861009099)return new I(Math.E);const r=I.ln(this).neg();return r.lambertw().div(r)}else return o>1.444667861009766?new I(Number.POSITIVE_INFINITY):I.dNaN}if(this.eq(I.dZero)){let o=Math.abs((e+1)%2);return o>1&&(o=2-o),new I(o)}if(e<0)return I.iteratedlog(t,this,-e);t=A(t);const l=e;e=Math.trunc(e);const i=l-e;if(this.gt(I.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let o=0;o3)return Pe(t.sign,t.layer+(e-o-1),t.mag);if(o>1e4)return t}return t}iteratedexp(e=2,t=Pe(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return I.tetrate(e,-t,this);e=A(e);let l=A(this);const i=t;t=Math.trunc(t);const o=i-t;if(l.layer-e.layer>3){const r=Math.min(t,l.layer-e.layer-3);t-=r,l.layer-=r}for(let r=0;r1e4)return l}return o>0&&o<1&&(e.eq(10)?l=l.layeradd10(-o):l=l.layeradd(-o,e)),l}slog(e=10){if(e=A(e),e.lte(I.dZero)||e.eq(I.dOne))return I.dNaN;if(e.lt(I.dOne))return this.eq(I.dOne)?I.dZero:this.eq(I.dZero)?I.dNegOne:I.dNaN;if(this.mag<0||this.eq(I.dZero))return I.dNegOne;let t=0,l=A(this);if(l.layer-e.layer>3){const i=l.layer-e.layer-3;t+=i,l.layer-=i}for(let i=0;i<100;++i)if(l.lt(I.dZero))l=I.pow(e,l),t-=1;else{if(l.lte(I.dOne))return A(t+I.slog_critical(e.toNumber(),l.toNumber()));t+=1,l=I.log(l,e)}return A(t)}static slog_critical(e,t){return e>10?t-1:I.critical_section(e,t,Wn)}static tetrate_critical(e,t){return I.critical_section(e,t,Jn)}static critical_section(e,t,l){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let i=0,o=0;for(let c=0;ce){const m=(e-Pl[c])/(Pl[c+1]-Pl[c]);i=l[c][Math.floor(t)]*(1-m)+l[c+1][Math.floor(t)]*m,o=l[c][Math.ceil(t)]*(1-m)+l[c+1][Math.ceil(t)]*m;break}const r=t-Math.floor(t);return i*(1-r)+o*r}layeradd10(e){e=I.fromValue_noAlloc(e).toNumber();const t=A(this);if(e>=1){t.mag<0&&t.layer>0?(t.sign=0,t.mag=0,t.layer=0):t.sign===-1&&t.layer==0&&(t.sign=1,t.mag=-t.mag);const l=Math.trunc(e);e-=l,t.layer+=l}if(e<=-1){const l=Math.trunc(e);if(e-=l,t.layer+=l,t.layer<0)for(let i=0;i<100;++i){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const i=this.slog(t).toNumber()+e;return i>=0?I.tetrate(t,i):Number.isFinite(i)?i>=-1?I.log(I.tetrate(t,i+1),t):I.log(I.log(I.tetrate(t,i+2),t),t):I.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return A(Xa(this.toNumber()));if(this.layer===0)return A(Xa(this.sign*this.mag));if(this.layer===1)return Ya(this);if(this.layer===2)return Ya(this);if(this.layer>=3)return Pe(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return Pe(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=Pe(1,0,1)){t=A(t);const l=e;e=Math.trunc(e);const i=l-e;i!==0&&(t.eq(I.dOne)?(++e,t=new I(i)):this.eq(10)?t=t.layeradd10(i):t=t.layeradd(i,this));for(let o=0;o10)return t}return t}sin(){return this.mag<0?this:this.layer===0?A(Math.sin(this.sign*this.mag)):Pe(0,0,0)}cos(){return this.mag<0?I.dOne:this.layer===0?A(Math.cos(this.sign*this.mag)):Pe(0,0,0)}tan(){return this.mag<0?this:this.layer===0?A(Math.tan(this.sign*this.mag)):Pe(0,0,0)}asin(){return this.mag<0?this:this.layer===0?A(Math.asin(this.sign*this.mag)):Pe(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?A(Math.acos(this.toNumber())):this.layer===0?A(Math.acos(this.sign*this.mag)):Pe(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?A(Math.atan(this.sign*this.mag)):A(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return I.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return I.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?Pe(Number.NaN,Number.NaN,Number.NaN):I.ln(this.add(1).div(A(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(I.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};let a=I;a.dZero=Pe(0,0,0);a.dOne=Pe(1,0,1);a.dNegOne=Pe(-1,0,1);a.dTwo=Pe(1,0,2);a.dTen=Pe(1,0,10);a.dNaN=Pe(Number.NaN,Number.NaN,Number.NaN);a.dInf=Pe(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);a.dNegInf=Pe(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);a.dNumberMax=ke(1,0,Number.MAX_VALUE);a.dNumberMin=ke(1,0,Number.MIN_VALUE);const Xn=new a(1);function Kl(e,t,l=!0){let i=a.log10(e).floor(),o=a.div(e,a.pow(10,i));o.toStringWithDecimalPlaces(t)==="10"&&(o=Xn,i=i.add(1));const r=i.gte(1e9)?we(i,Math.max(Math.max(t,3),je.defaultDecimalsShown)):i.gte(1e4)?ma(i,0):i.toStringWithDecimalPlaces(0);return l?o.toStringWithDecimalPlaces(t)+"e"+r:"e"+r}function ma(e,t){if(e==null)return"NaN";if(e=new a(e),e.mag<.001)return 0 .toFixed(t);const i=e.toStringWithDecimalPlaces(t).split(".");return i[0]=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),i.length==1?i[0]:i[0]+"."+i[1]}function yi(e,t){return e==null?"NaN":(e=new a(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),je.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const Yn=new a("eeee1000"),Zn=new a("e100000"),Za=new a("e1000"),hi=new a(1e9),eo=new a(1e6),to=new a(1e3),lo=new a(.98),ao=new a(.001),bi=new a(0);function we(e,t,l){if(t==null&&(t=je.defaultDecimalsShown),l=l!=null?l:je.defaultShowSmall,e=new a(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+we(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(Yn)){const i=e.slog();return i.gte(eo)?"F"+we(i.floor()):a.pow(10,i.sub(i.floor())).toStringWithDecimalPlaces(3)+"F"+ma(i.floor(),0)}else{if(e.gte(Zn))return Kl(e,0,!1);if(e.gte(Za))return Kl(e,0);if(e.gte(hi))return Kl(e,t);if(e.gte(to))return ma(e,0);if(e.gte(ao)||!l)return yi(e,t);if(e.eq(bi))return 0 .toFixed(t)}return e=wi(e),e.lt(Za)?Kl(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):we(e,t)+"\u207B\xB9"}function Ce(e){return e=new a(e),e.sign<0?"-"+Ce(e.neg()):e.gte(hi)||e.lte(lo)&&!e.eq(bi)?we(e):we(e,0)}function Pa(e,t){return t==null&&(t=je.defaultDecimalsShown),a.lt(e,0)?"-"+Pa(a.neg(e),t):a.gt(e,2**51)?we(a.div(e,31536e3))+"y":(e=new a(e).toNumber(),e<60?we(e)+"s":e<3600?Ce(Math.floor(e/60))+"m "+we(e%60,t)+"s":e<86400?Ce(Math.floor(e/3600))+"h "+Ce(Math.floor(e/60)%60)+"m "+Ce(e%60)+"s":e<31536e3?Ce(Math.floor(e/84600)%365)+"d "+Ce(Math.floor(e/3600)%24)+"h "+Ce(Math.floor(e/60)%60)+"m":Ce(Math.floor(e/31536e3))+"y "+Ce(Math.floor(e/84600)%365)+"d "+Ce(Math.floor(e/3600)%24)+"h")}function io(e,t,l){e=new a(e);let i=e.toStringWithDecimalPlaces(t);return new a(i).gte(l)&&(i=a.sub(l,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),i}function no(e,t){return we(e,t,!0)}function wi(e){let t=a.log10(e).ceil();const l=a.div(e,a.pow(10,t));return t=t.neg(),e=new a(10).pow(t).times(l),e}function Ai(e,t,l=a.dOne){let i=e[0][0],o=e[0][1];for(let r=1;r(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(Fe||{});const Zl=Symbol("DoNotCache");function W(e,t){const l=e[t];Ta(l)&&l.length===0&&!l[Zl]?e[t]=f(l.bind(e)):Ta(l)&&(e[t]=l.bind(e),e[t][Zl]=!0)}function Ct(e){return Ta(e)&&!e[Zl]&&(e=f(e)),e}const Bl=Symbol("Component"),Nl=Symbol("GatherProps");let vo=0;function Vl(e="feature-"){return e+vo++}var kt=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(kt||{});function _(e){return e[Zl]=!0,e}function y(e,t=2){return e?0:t}function Nt(e,t,l){e[t]===void 0&&l!=null&&(e[t]=l)}function _i(e,...t){const l=[],i=o=>{Object.keys(o).forEach(r=>{const d=o[r];d&&typeof d=="object"&&(t.includes(d.type)?l.push(d):!(d instanceof a)&&!wt(d)&&i(d))})};return i(e),l}const Fl={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var Fa=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(Fa||{}),jl={classic:Fl,paper:{...Fl,variables:{...Fl.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...Fl,variables:{...Fl.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...Fl,variables:{...Fl.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const tt=vi();document.fonts.onloadingdone=()=>tt.emit("fontsLoaded");var fo=Object.freeze(Object.defineProperty({__proto__:null,globalBus:tt},Symbol.toStringTag,{value:"Module"}));var Ve=(e,t)=>{const l=e.__vccOpts||e;for(const[i,o]of t)l[i]=o;return l};const go=_e({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var w;const l=H({}),i=new ResizeObserver(c),o=H(null);ya(()=>{const b=o.value;b!=null&&i.observe(b)});let r=!0,d=H((w=o.value)==null?void 0:w.getBoundingClientRect());function c(){r&&(r=!1,Rl(()=>{var b;d.value=(b=o.value)==null?void 0:b.getBoundingClientRect(),Object.values(l.value).filter(C=>C).forEach(C=>C.rect=C.element.getBoundingClientRect()),t("updateNodes",l.value),r=!0}))}tt.on("fontsLoaded",c);const m={attributes:!1,childList:!0,subtree:!1};ra(Ua,(b,C)=>{const v=new MutationObserver(()=>p(b));v.observe(C,m),l.value[b]={element:C,observer:v,rect:C.getBoundingClientRect()},c()}),ra(Ra,b=>{var C;(C=l.value[b])==null||C.observer.disconnect(),l.value[b]=void 0,c()}),ra(Oa,l),ra(qa,d);function p(b){const C=l.value[b];C!=null&&(C.rect=C.element.getBoundingClientRect(),t("updateNodes",l.value))}return(b,C)=>(k(),T(x,null,[Xt(b.$slots,"default",{},void 0,!0),h("div",{ref_key:"resizeListener",ref:o,class:"resize-listener"},null,512)],64))}});var Si=Ve(go,[["__scopeId","data-v-2b1dc1bc"]]);const yo=["onPointerdown"],ho={class:"modal-wrapper"},bo={class:"modal-container"},wo={class:"modal-header"},Ao=s(" default header "),ko={class:"modal-body"},Co=s(" default body "),Eo={class:"modal-footer"},_o=h("div",{class:"modal-default-flex-grow"},null,-1),Et=_e({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:l}){const o=Dt(e),r=f(()=>o.modelValue||c.value);function d(){l("update:modelValue",!1)}const c=H(!1),m=H(null),p=f(()=>{var w,b;return(b=(w=m.value)==null?void 0:w.nodes)!=null?b:null});return t({isOpen:r,nodes:p}),(w,b)=>(k(),be(nn,{to:"#modal-root"},[n(ba,{name:"modal",onBeforeEnter:b[0]||(b[0]=C=>c.value=!0),onAfterLeave:b[1]||(b[1]=C=>c.value=!1)},{default:ge(()=>[ha(h("div",Ol({class:"modal-mask",onPointerdown:Yl(d,["self"])},w.$attrs),[h("div",ho,[h("div",bo,[h("div",wo,[Xt(w.$slots,"header",{shown:u(r)},()=>[Ao])]),h("div",ko,[n(Si,{ref_key:"contextRef",ref:m},{default:ge(()=>[Xt(w.$slots,"body",{shown:u(r)},()=>[Co])]),_:3},512)]),h("div",Eo,[Xt(w.$slots,"footer",{shown:u(r)},()=>[h("div",{class:"modal-default-footer"},[_o,h("button",{class:"button modal-default-button",onClick:d}," Close ")])])])])])],16,yo),[[ci,e.modelValue]])]),_:3})]))}}),Ua=Symbol("RegisterNode"),Ra=Symbol("UnregisterNode"),Oa=Symbol("Nodes"),qa=Symbol("Bounds"),Bt=wa({});window.layers=Bt;const Gl={},ll=[];function $t(e,t){return Ht(()=>{const l={},i=l.emitter=vi();if(l.on=i.on.bind(i),l.emit=i.emit.bind(i),l.nodes=H({}),l.id=e,ll.push(e),Gl[e]=new Set,l.minimized=Me(!1),Object.assign(l,t.call(l)),ll[ll.length-1]==null||ll[ll.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen +/* empty css */import"./vue.92681fcb.js";import{Z as f,l as wt,aa as _e,t as H,ay as ya,ar as Rl,aE as k,a0 as T,aK as Xt,a1 as h,O as M,aG as ra,A as Dt,_ as be,a8 as n,b6 as ge,b8 as ha,bs as ci,C as u,aq as Ol,bu as Zl,bb as ba,T as nn,a7 as s,u as wa,j as on,bv as Ia,q as ia,b1 as jt,G as bt,aC as pi,w as Yt,b2 as Vt,ao as sn,I as At,aN as ut,$ as G,J as Te,aH as yl,aF as hl,z as ol,al as ca,aL as xl,H as rn,aJ as mi,bn as un,br as dn,be as cn}from"./@vue.4ce677c2.js";import{c as vi}from"./nanoevents.1080beb7.js";import{L as El}from"./lz-string.731cedc5.js";import{i as pn}from"./is-plain-object.906d88e8.js";import{Y as mn}from"./vue-next-select.a2bfab1d.js";import{s as vn,u as fi}from"./vue-toastification.6f567382.js";import{D as fn}from"./vuedraggable.7949458c.js";import{p as gn}from"./vue-textarea-autosize.35804eaf.js";import{v as yn,n as hn}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const bn=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const d of r.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function l(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerpolicy&&(r.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?r.credentials="include":o.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=l(o);fetch(o.href,r)}};bn();const wn="modulepreload",Wa={},An="./",pa=function(t,l){return!l||l.length===0?t():Promise.all(l.map(i=>{if(i=`${An}${i}`,i in Wa)return;Wa[i]=!0;const o=i.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${r}`))return;const d=document.createElement("link");if(d.rel=o?"stylesheet":wn,o||(d.as="script",d.crossOrigin=""),d.href=i,document.head.appendChild(d),o)return new Promise((c,m)=>{d.addEventListener("load",c),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},kn="./projInfo-schema.json",Cn="Advent Incremental",En="An incremental game you play a day at a time, leading up to Christmas!",_n="advent-incremental",Sn="thepaperpilot and friends",Mn="",xn="",Bn="0.5",Nn="Initial Commit",Dn=!0,In=!1,Tn=2,Pn=!0,Fn=null,Un="",Rn=["main"],On=3600,qn=0,Ln=!0,Gn="base64";var je={$schema:kn,title:Cn,description:En,id:_n,author:Sn,discordName:Mn,discordLink:xn,versionNumber:Bn,versionTitle:Nn,allowGoBack:Dn,defaultShowSmall:In,defaultDecimalsShown:Tn,useHeader:Pn,banner:Fn,logo:Un,initialTabs:Rn,maxTickLength:On,offlineLimit:qn,enablePausing:Ln,exportEncoding:Gn};const Sa=17,Qn=9e15,$n=Math.log10(9e15),Hn=1/9e15,Vn=308,jn=-324,Ka=5,zn=function(){const e=[];for(let l=jn+1;l<=Vn;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),Pl=[2,Math.E,3,4,5,6,7,8,9,10],Jn=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.18422737399915,1.4066113788546144,1.680911177655277,2.027492094355525,2.4775152854601967,3.080455730250329,3.918234505962507,5.1332705696484595,6.9878696918072905,10]],Wn=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]],A=function(t){return a.fromValue_noAlloc(t)},ke=function(e,t,l){return a.fromComponents(e,t,l)},Pe=function(t,l,i){return a.fromComponents_noNormalize(t,l,i)},Cl=function(t,l){const i=l+1,o=Math.ceil(Math.log10(Math.abs(t))),r=Math.round(t*Math.pow(10,i-o))*Math.pow(10,o-i);return parseFloat(r.toFixed(Math.max(i-o,0)))},Ma=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},Kn=function(e){if(!isFinite(e))return e;if(e<-50)return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let t=1;for(;e<10;)t=t*e,++e;e-=1;let l=.9189385332046727;l=l+(e+.5)*Math.log(e),l=l-e;const i=e*e;let o=e;return l=l+1/(12*o),o=o*i,l=l+1/(360*o),o=o*i,l=l+1/(1260*o),o=o*i,l=l+1/(1680*o),o=o*i,l=l+1/(1188*o),o=o*i,l=l+691/(360360*o),o=o*i,l=l+7/(1092*o),o=o*i,l=l+3617/(122400*o),Math.exp(l)/t},gi=.5671432904097838,Xa=function(e,t=1e-10){let l,i;if(!Number.isFinite(e)||e===0)return e;if(e===1)return gi;e<10?l=0:l=Math.log(e)-Math.log(Math.log(e));for(let o=0;o<100;++o){if(i=(e*Math.exp(-l)+l*l)/(l+1),Math.abs(i-l).5?1:-1;if(Math.random()*20<1)return Pe(t,0,1);const l=Math.floor(Math.random()*(e+1));let i=l===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(i=Math.trunc(i));let o=Math.pow(10,i);return Math.random()>.9&&(o=Math.trunc(o)),ke(t,l,o)}static affordGeometricSeries_core(e,t,l,i){const o=t.mul(l.pow(i));return I.floor(e.div(o).mul(l.sub(1)).add(1).log10().div(l.log10()))}static sumGeometricSeries_core(e,t,l,i){return t.mul(l.pow(i)).mul(I.sub(1,l.pow(e))).div(I.sub(1,l))}static affordArithmeticSeries_core(e,t,l,i){const r=t.add(i.mul(l)).sub(l.div(2)),d=r.pow(2);return r.neg().add(d.add(l.mul(e).mul(2)).sqrt()).div(l).floor()}static sumArithmeticSeries_core(e,t,l,i){const o=t.add(i.mul(l));return e.div(2).mul(o.mul(2).plus(e.sub(1).mul(l)))}static efficiencyOfPurchase_core(e,t,l){return e.div(t).add(e.div(l))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag=Qn)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e<$n&&this.layer>0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=t*Math.pow(10,e),e=Math.abs(this.mag),t=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(e,t,l){return this.sign=e,this.layer=t,this.mag=l,this.normalize(),this}fromComponents_noNormalize(e,t,l){return this.sign=e,this.layer=t,this.mag=l,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){e=e.replace(",","");const t=e.split("^^^");if(t.length===2){const C=parseFloat(t[0]),v=parseFloat(t[1]),S=t[1].split(";");let N=1;if(S.length===2&&(N=parseFloat(S[1]),isFinite(N)||(N=1)),isFinite(C)&&isFinite(v)){const D=I.pentate(C,v,N);return this.sign=D.sign,this.layer=D.layer,this.mag=D.mag,this}}const l=e.split("^^");if(l.length===2){const C=parseFloat(l[0]),v=parseFloat(l[1]),S=l[1].split(";");let N=1;if(S.length===2&&(N=parseFloat(S[1]),isFinite(N)||(N=1)),isFinite(C)&&isFinite(v)){const D=I.tetrate(C,v,N);return this.sign=D.sign,this.layer=D.layer,this.mag=D.mag,this}}const i=e.split("^");if(i.length===2){const C=parseFloat(i[0]),v=parseFloat(i[1]);if(isFinite(C)&&isFinite(v)){const S=I.pow(C,v);return this.sign=S.sign,this.layer=S.layer,this.mag=S.mag,this}}e=e.trim().toLowerCase();let o,r,d=e.split("pt");if(d.length===2){o=10,r=parseFloat(d[0]),d[1]=d[1].replace("(",""),d[1]=d[1].replace(")","");let C=parseFloat(d[1]);if(isFinite(C)||(C=1),isFinite(o)&&isFinite(r)){const v=I.tetrate(o,r,C);return this.sign=v.sign,this.layer=v.layer,this.mag=v.mag,this}}if(d=e.split("p"),d.length===2){o=10,r=parseFloat(d[0]),d[1]=d[1].replace("(",""),d[1]=d[1].replace(")","");let C=parseFloat(d[1]);if(isFinite(C)||(C=1),isFinite(o)&&isFinite(r)){const v=I.tetrate(o,r,C);return this.sign=v.sign,this.layer=v.layer,this.mag=v.mag,this}}const c=e.split("e"),m=c.length-1;if(m===0){const C=parseFloat(e);if(isFinite(C))return this.fromNumber(C)}else if(m===1){const C=parseFloat(e);if(isFinite(C)&&C!==0)return this.fromNumber(C)}const p=e.split("e^");if(p.length===2){this.sign=1,p[0].charAt(0)=="-"&&(this.sign=-1);let C="";for(let v=0;v=43&&S<=57||S===101)C+=p[1].charAt(v);else return this.layer=parseFloat(C),this.mag=parseFloat(p[1].substr(v+1)),this.normalize(),this}}if(m<1)return this.sign=0,this.layer=0,this.mag=0,this;const w=parseFloat(c[0]);if(w===0)return this.sign=0,this.layer=0,this.mag=0,this;let b=parseFloat(c[c.length-1]);if(m>=2){const C=parseFloat(c[c.length-2]);isFinite(C)&&(b*=Math.sign(C),b+=Ma(C))}if(!isFinite(w))this.sign=c[0]==="-"?-1:1,this.layer=m,this.mag=b;else if(m===1)this.sign=Math.sign(w),this.layer=1,this.mag=b+Math.log10(Math.abs(w));else if(this.sign=Math.sign(w),this.layer=m,m===2){const C=I.mul(ke(1,2,b),A(w));return this.sign=C.sign,this.layer=C.layer,this.mag=C.mag,this}else this.mag=b;return this.normalize(),this}fromValue(e){return e instanceof I||e!=null&&typeof e=="object"&&"sign"in e&&"mag"in e&&"layer"in e?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:Cl(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:Cl(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=Ka?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(e){return this.layer===0?(this.sign*this.mag).toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return this.layer===0?(this.sign*this.mag).toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return this.e<=-7?this.toExponential(e-1):e>this.e?this.toFixed(e-this.exponent-1):this.toExponential(e-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(e):Cl(this.m,e)+"e"+Cl(this.e,e):this.layer===1?Cl(this.m,e)+"e"+Cl(this.e,e):this.layer<=Ka?(this.sign===-1?"-":"")+"e".repeat(this.layer)+Cl(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+Cl(this.mag,e)}abs(){return Pe(this.sign===0?0:1,this.layer,this.mag)}neg(){return Pe(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?I.dZero:this.layer===0?ke(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?I.dZero:this.layer===0?ke(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?I.dZero:this.layer===0?ke(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?I.dZero:this.layer===0?ke(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=A(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer)||this.sign===0)return t;if(t.sign===0)return this;if(this.sign===-t.sign&&this.layer===t.layer&&this.mag===t.mag)return Pe(0,0,0);let l,i;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(I.cmpabs(this,t)>0?(l=this,i=t):(l=t,i=this),l.layer===0&&i.layer===0)return A(l.sign*l.mag+i.sign*i.mag);const o=l.layer*Math.sign(l.mag),r=i.layer*Math.sign(i.mag);if(o-r>=2)return l;if(o===0&&r===-1){if(Math.abs(i.mag-Math.log10(l.mag))>Sa)return l;{const d=Math.pow(10,Math.log10(l.mag)-i.mag),c=i.sign+l.sign*d;return ke(Math.sign(c),1,i.mag+Math.log10(Math.abs(c)))}}if(o===1&&r===0){if(Math.abs(l.mag-Math.log10(i.mag))>Sa)return l;{const d=Math.pow(10,l.mag-Math.log10(i.mag)),c=i.sign+l.sign*d;return ke(Math.sign(c),1,Math.log10(i.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(l.mag-i.mag)>Sa)return l;{const d=Math.pow(10,l.mag-i.mag),c=i.sign+l.sign*d;return ke(Math.sign(c),1,i.mag+Math.log10(Math.abs(c)))}}plus(e){return this.add(e)}sub(e){return this.add(A(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=A(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return Pe(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return Pe(this.sign*t.sign,0,1);let l,i;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(l=this,i=t):(l=t,i=this),l.layer===0&&i.layer===0)return A(l.sign*i.sign*l.mag*i.mag);if(l.layer>=3||l.layer-i.layer>=2)return ke(l.sign*i.sign,l.layer,l.mag);if(l.layer===1&&i.layer===0)return ke(l.sign*i.sign,1,l.mag+Math.log10(i.mag));if(l.layer===1&&i.layer===1)return ke(l.sign*i.sign,1,l.mag+i.mag);if(l.layer===2&&i.layer===1){const o=ke(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ke(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)));return ke(l.sign*i.sign,o.layer+1,o.sign*o.mag)}if(l.layer===2&&i.layer===2){const o=ke(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ke(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)));return ke(l.sign*i.sign,o.layer+1,o.sign*o.mag)}throw Error("Bad arguments to mul: "+this+", "+e)}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const t=A(e);return this.mul(t.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return this.mag===0?I.dNaN:this.layer===0?ke(this.sign,0,1/this.mag):ke(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=A(e);return this.sign>t.sign?1:this.sign0?this.layer:-this.layer,i=t.mag>0?t.layer:-t.layer;return l>i?1:lt.mag?1:this.mag0?t:this}clamp(e,t){return this.max(e).min(t)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,t){const l=A(e);return this.eq_tolerance(l,t)?0:this.cmp(l)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const l=A(e);if(t==null&&(t=1e-7),this.sign!==l.sign||Math.abs(this.layer-l.layer)>1)return!1;let i=this.mag,o=l.mag;return this.layer>l.layer&&(o=Ma(o)),this.layer0?ke(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ke(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?I.dNaN:this.layer>0?ke(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ke(this.sign,0,Math.log10(this.mag))}log(e){return e=A(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?I.dNaN:this.layer===0&&e.layer===0?ke(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):I.div(this.log10(),e.log10())}log2(){return this.sign<=0?I.dNaN:this.layer===0?ke(this.sign,0,Math.log2(this.mag)):this.layer===1?ke(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?ke(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):ke(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?I.dNaN:this.layer===0?ke(this.sign,0,Math.log(this.mag)):this.layer===1?ke(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?ke(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):ke(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=A(e),l=this,i=t;if(l.sign===0)return i.eq(0)?Pe(1,0,1):l;if(l.sign===1&&l.layer===0&&l.mag===1)return l;if(i.sign===0)return Pe(1,0,1);if(i.sign===1&&i.layer===0&&i.mag===1)return l;const o=l.absLog10().mul(i).pow10();return this.sign===-1?Math.abs(i.toNumber()%2)%2===1?o.neg():Math.abs(i.toNumber()%2)%2===0?o:I.dNaN:o}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return I.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return ke(1,0,t);if(e.sign===0)return I.dOne;e=Pe(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?ke(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?ke(-e.sign,e.layer+1,-e.mag):I.dOne}pow_base(e){return A(e).pow(this)}root(e){const t=A(e);return this.pow(t.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?I.exp(I.mul(this,I.ln(this).sub(1))):I.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(Pe(1,0,24)))return A(Kn(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const l=e*e;let i=e,o=12*i,r=1/o,d=t+r;if(d===t||(t=d,i=i*l,o=360*i,r=1/o,d=t-r,d===t))return I.exp(t);t=d,i=i*l,o=1260*i;let c=1/o;return t=t+c,i=i*l,o=1680*i,c=1/o,t=t-c,I.exp(t)}else return this.layer===1?I.exp(I.mul(this,I.ln(this).sub(1))):I.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?I.dOne:this.layer===0&&this.mag<=709.7?A(Math.exp(this.sign*this.mag)):this.layer===0?ke(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?ke(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):ke(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return A(Math.sqrt(this.sign*this.mag));if(this.layer===1)return ke(1,2,Math.log10(this.mag)-.3010299956639812);{const e=I.div(Pe(this.sign,this.layer-1,this.mag),Pe(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=Pe(1,0,1)){if(e===1)return I.pow(this,t);if(e===0)return new I(t);if(this.eq(I.dOne))return I.dOne;if(this.eq(-1))return I.pow(this,t);if(e===Number.POSITIVE_INFINITY){const o=this.toNumber();if(o<=1.444667861009766&&o>=.06598803584531254){if(o>1.444667861009099)return new I(Math.E);const r=I.ln(this).neg();return r.lambertw().div(r)}else return o>1.444667861009766?new I(Number.POSITIVE_INFINITY):I.dNaN}if(this.eq(I.dZero)){let o=Math.abs((e+1)%2);return o>1&&(o=2-o),new I(o)}if(e<0)return I.iteratedlog(t,this,-e);t=A(t);const l=e;e=Math.trunc(e);const i=l-e;if(this.gt(I.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let o=0;o3)return Pe(t.sign,t.layer+(e-o-1),t.mag);if(o>1e4)return t}return t}iteratedexp(e=2,t=Pe(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return I.tetrate(e,-t,this);e=A(e);let l=A(this);const i=t;t=Math.trunc(t);const o=i-t;if(l.layer-e.layer>3){const r=Math.min(t,l.layer-e.layer-3);t-=r,l.layer-=r}for(let r=0;r1e4)return l}return o>0&&o<1&&(e.eq(10)?l=l.layeradd10(-o):l=l.layeradd(-o,e)),l}slog(e=10){if(e=A(e),e.lte(I.dZero)||e.eq(I.dOne))return I.dNaN;if(e.lt(I.dOne))return this.eq(I.dOne)?I.dZero:this.eq(I.dZero)?I.dNegOne:I.dNaN;if(this.mag<0||this.eq(I.dZero))return I.dNegOne;let t=0,l=A(this);if(l.layer-e.layer>3){const i=l.layer-e.layer-3;t+=i,l.layer-=i}for(let i=0;i<100;++i)if(l.lt(I.dZero))l=I.pow(e,l),t-=1;else{if(l.lte(I.dOne))return A(t+I.slog_critical(e.toNumber(),l.toNumber()));t+=1,l=I.log(l,e)}return A(t)}static slog_critical(e,t){return e>10?t-1:I.critical_section(e,t,Wn)}static tetrate_critical(e,t){return I.critical_section(e,t,Jn)}static critical_section(e,t,l){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let i=0,o=0;for(let c=0;ce){const m=(e-Pl[c])/(Pl[c+1]-Pl[c]);i=l[c][Math.floor(t)]*(1-m)+l[c+1][Math.floor(t)]*m,o=l[c][Math.ceil(t)]*(1-m)+l[c+1][Math.ceil(t)]*m;break}const r=t-Math.floor(t);return i*(1-r)+o*r}layeradd10(e){e=I.fromValue_noAlloc(e).toNumber();const t=A(this);if(e>=1){t.mag<0&&t.layer>0?(t.sign=0,t.mag=0,t.layer=0):t.sign===-1&&t.layer==0&&(t.sign=1,t.mag=-t.mag);const l=Math.trunc(e);e-=l,t.layer+=l}if(e<=-1){const l=Math.trunc(e);if(e-=l,t.layer+=l,t.layer<0)for(let i=0;i<100;++i){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const i=this.slog(t).toNumber()+e;return i>=0?I.tetrate(t,i):Number.isFinite(i)?i>=-1?I.log(I.tetrate(t,i+1),t):I.log(I.log(I.tetrate(t,i+2),t),t):I.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return A(Xa(this.toNumber()));if(this.layer===0)return A(Xa(this.sign*this.mag));if(this.layer===1)return Ya(this);if(this.layer===2)return Ya(this);if(this.layer>=3)return Pe(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return Pe(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=Pe(1,0,1)){t=A(t);const l=e;e=Math.trunc(e);const i=l-e;i!==0&&(t.eq(I.dOne)?(++e,t=new I(i)):this.eq(10)?t=t.layeradd10(i):t=t.layeradd(i,this));for(let o=0;o10)return t}return t}sin(){return this.mag<0?this:this.layer===0?A(Math.sin(this.sign*this.mag)):Pe(0,0,0)}cos(){return this.mag<0?I.dOne:this.layer===0?A(Math.cos(this.sign*this.mag)):Pe(0,0,0)}tan(){return this.mag<0?this:this.layer===0?A(Math.tan(this.sign*this.mag)):Pe(0,0,0)}asin(){return this.mag<0?this:this.layer===0?A(Math.asin(this.sign*this.mag)):Pe(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?A(Math.acos(this.toNumber())):this.layer===0?A(Math.acos(this.sign*this.mag)):Pe(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?A(Math.atan(this.sign*this.mag)):A(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return I.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return I.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?Pe(Number.NaN,Number.NaN,Number.NaN):I.ln(this.add(1).div(A(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(I.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};let a=I;a.dZero=Pe(0,0,0);a.dOne=Pe(1,0,1);a.dNegOne=Pe(-1,0,1);a.dTwo=Pe(1,0,2);a.dTen=Pe(1,0,10);a.dNaN=Pe(Number.NaN,Number.NaN,Number.NaN);a.dInf=Pe(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);a.dNegInf=Pe(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);a.dNumberMax=ke(1,0,Number.MAX_VALUE);a.dNumberMin=ke(1,0,Number.MIN_VALUE);const Xn=new a(1);function Xl(e,t,l=!0){let i=a.log10(e).floor(),o=a.div(e,a.pow(10,i));o.toStringWithDecimalPlaces(t)==="10"&&(o=Xn,i=i.add(1));const r=i.gte(1e9)?we(i,Math.max(Math.max(t,3),je.defaultDecimalsShown)):i.gte(1e4)?ma(i,0):i.toStringWithDecimalPlaces(0);return l?o.toStringWithDecimalPlaces(t)+"e"+r:"e"+r}function ma(e,t){if(e==null)return"NaN";if(e=new a(e),e.mag<.001)return 0 .toFixed(t);const i=e.toStringWithDecimalPlaces(t).split(".");return i[0]=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),i.length==1?i[0]:i[0]+"."+i[1]}function yi(e,t){return e==null?"NaN":(e=new a(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),je.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const Yn=new a("eeee1000"),Zn=new a("e100000"),Za=new a("e1000"),hi=new a(1e9),eo=new a(1e6),to=new a(1e3),lo=new a(.98),ao=new a(.001),bi=new a(0);function we(e,t,l){if(t==null&&(t=je.defaultDecimalsShown),l=l!=null?l:je.defaultShowSmall,e=new a(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+we(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(Yn)){const i=e.slog();return i.gte(eo)?"F"+we(i.floor()):a.pow(10,i.sub(i.floor())).toStringWithDecimalPlaces(3)+"F"+ma(i.floor(),0)}else{if(e.gte(Zn))return Xl(e,0,!1);if(e.gte(Za))return Xl(e,0);if(e.gte(hi))return Xl(e,t);if(e.gte(to))return ma(e,0);if(e.gte(ao)||!l)return yi(e,t);if(e.eq(bi))return 0 .toFixed(t)}return e=wi(e),e.lt(Za)?Xl(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):we(e,t)+"\u207B\xB9"}function Ce(e){return e=new a(e),e.sign<0?"-"+Ce(e.neg()):e.gte(hi)||e.lte(lo)&&!e.eq(bi)?we(e):we(e,0)}function Pa(e,t){return t==null&&(t=je.defaultDecimalsShown),a.lt(e,0)?"-"+Pa(a.neg(e),t):a.gt(e,2**51)?we(a.div(e,31536e3))+"y":(e=new a(e).toNumber(),e<60?we(e)+"s":e<3600?Ce(Math.floor(e/60))+"m "+we(e%60,t)+"s":e<86400?Ce(Math.floor(e/3600))+"h "+Ce(Math.floor(e/60)%60)+"m "+Ce(e%60)+"s":e<31536e3?Ce(Math.floor(e/84600)%365)+"d "+Ce(Math.floor(e/3600)%24)+"h "+Ce(Math.floor(e/60)%60)+"m":Ce(Math.floor(e/31536e3))+"y "+Ce(Math.floor(e/84600)%365)+"d "+Ce(Math.floor(e/3600)%24)+"h")}function io(e,t,l){e=new a(e);let i=e.toStringWithDecimalPlaces(t);return new a(i).gte(l)&&(i=a.sub(l,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),i}function no(e,t){return we(e,t,!0)}function wi(e){let t=a.log10(e).ceil();const l=a.div(e,a.pow(10,t));return t=t.neg(),e=new a(10).pow(t).times(l),e}function Ai(e,t,l=a.dOne){let i=e[0][0],o=e[0][1];for(let r=1;r(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(Fe||{});const ea=Symbol("DoNotCache");function W(e,t){const l=e[t];Ta(l)&&l.length===0&&!l[ea]?e[t]=f(l.bind(e)):Ta(l)&&(e[t]=l.bind(e),e[t][ea]=!0)}function Ct(e){return Ta(e)&&!e[ea]&&(e=f(e)),e}const Bl=Symbol("Component"),Nl=Symbol("GatherProps");let vo=0;function jl(e="feature-"){return e+vo++}var kt=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(kt||{});function _(e){return e[ea]=!0,e}function y(e,t=2){return e?0:t}function Nt(e,t,l){e[t]===void 0&&l!=null&&(e[t]=l)}function _i(e,...t){const l=[],i=o=>{Object.keys(o).forEach(r=>{const d=o[r];d&&typeof d=="object"&&(t.includes(d.type)?l.push(d):!(d instanceof a)&&!wt(d)&&i(d))})};return i(e),l}const Fl={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var Fa=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(Fa||{}),zl={classic:Fl,paper:{...Fl,variables:{...Fl.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...Fl,variables:{...Fl.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...Fl,variables:{...Fl.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const lt=vi();document.fonts.onloadingdone=()=>lt.emit("fontsLoaded");var fo=Object.freeze(Object.defineProperty({__proto__:null,globalBus:lt},Symbol.toStringTag,{value:"Module"}));var Ve=(e,t)=>{const l=e.__vccOpts||e;for(const[i,o]of t)l[i]=o;return l};const go=_e({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var w;const l=H({}),i=new ResizeObserver(c),o=H(null);ya(()=>{const b=o.value;b!=null&&i.observe(b)});let r=!0,d=H((w=o.value)==null?void 0:w.getBoundingClientRect());function c(){r&&(r=!1,Rl(()=>{var b;d.value=(b=o.value)==null?void 0:b.getBoundingClientRect(),Object.values(l.value).filter(C=>C).forEach(C=>C.rect=C.element.getBoundingClientRect()),t("updateNodes",l.value),r=!0}))}lt.on("fontsLoaded",c);const m={attributes:!1,childList:!0,subtree:!1};ra(Ua,(b,C)=>{const v=new MutationObserver(()=>p(b));v.observe(C,m),l.value[b]={element:C,observer:v,rect:C.getBoundingClientRect()},c()}),ra(Ra,b=>{var C;(C=l.value[b])==null||C.observer.disconnect(),l.value[b]=void 0,c()}),ra(Oa,l),ra(qa,d);function p(b){const C=l.value[b];C!=null&&(C.rect=C.element.getBoundingClientRect(),t("updateNodes",l.value))}return(b,C)=>(k(),T(M,null,[Xt(b.$slots,"default",{},void 0,!0),h("div",{ref_key:"resizeListener",ref:o,class:"resize-listener"},null,512)],64))}});var Si=Ve(go,[["__scopeId","data-v-2b1dc1bc"]]);const yo=["onPointerdown"],ho={class:"modal-wrapper"},bo={class:"modal-container"},wo={class:"modal-header"},Ao=s(" default header "),ko={class:"modal-body"},Co=s(" default body "),Eo={class:"modal-footer"},_o=h("div",{class:"modal-default-flex-grow"},null,-1),Et=_e({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:l}){const o=Dt(e),r=f(()=>o.modelValue||c.value);function d(){l("update:modelValue",!1)}const c=H(!1),m=H(null),p=f(()=>{var w,b;return(b=(w=m.value)==null?void 0:w.nodes)!=null?b:null});return t({isOpen:r,nodes:p}),(w,b)=>(k(),be(nn,{to:"#modal-root"},[n(ba,{name:"modal",onBeforeEnter:b[0]||(b[0]=C=>c.value=!0),onAfterLeave:b[1]||(b[1]=C=>c.value=!1)},{default:ge(()=>[ha(h("div",Ol({class:"modal-mask",onPointerdown:Zl(d,["self"])},w.$attrs),[h("div",ho,[h("div",bo,[h("div",wo,[Xt(w.$slots,"header",{shown:u(r)},()=>[Ao])]),h("div",ko,[n(Si,{ref_key:"contextRef",ref:m},{default:ge(()=>[Xt(w.$slots,"body",{shown:u(r)},()=>[Co])]),_:3},512)]),h("div",Eo,[Xt(w.$slots,"footer",{shown:u(r)},()=>[h("div",{class:"modal-default-footer"},[_o,h("button",{class:"button modal-default-button",onClick:d}," Close ")])])])])])],16,yo),[[ci,e.modelValue]])]),_:3})]))}}),Ua=Symbol("RegisterNode"),Ra=Symbol("UnregisterNode"),Oa=Symbol("Nodes"),qa=Symbol("Bounds"),Bt=wa({});window.layers=Bt;const Gl={},ll=[];function $t(e,t){return Ht(()=>{const l={},i=l.emitter=vi();if(l.on=i.on.bind(i),l.emit=i.emit.bind(i),l.nodes=H({}),l.id=e,ll.push(e),Gl[e]=new Set,l.minimized=Me(!1),Object.assign(l,t.call(l)),ll[ll.length-1]==null||ll[ll.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen Stack: ${ll} -Trying to pop ${l.id}`;return ll.pop(),W(l,"color"),W(l,"display"),W(l,"name"),Nt(l,"name",l.id),W(l,"minWidth"),Nt(l,"minWidth",600),W(l,"minimizable"),Nt(l,"minimizable",!0),W(l,"minimizedDisplay"),l})}function Mi(e,t){if(console.info("Adding layer",e.id),Bt[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Bt[e.id]);return}Nt(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Bt[e.id]=e,tt.emit("addLayer",e,t.layers[e.id])}function So(e){return Bt[e]}function xi(e){console.info("Removing layer",e.id),tt.emit("removeLayer",e),Bt[e.id]=void 0}function Mo(e){xi(e),Mi(e,me)}function xo(e){const t=H(!1);return{openModal:()=>t.value=!0,modal:_(()=>n(Et,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>n("h2",null,[u(e.name)]),body:u(e.display)}))}}tt.on("update",function(t){Object.values(Bt).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(Bt).forEach(l=>{l==null||l.emit("update",t)}),Object.values(Bt).forEach(l=>{l==null||l.emit("postUpdate",t)})});var Bo=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ua,UnregisterNodeInjectionKey:Ra,NodesInjectionKey:Oa,BoundsInjectionKey:qa,layers:Bt,persistentRefs:Gl,addingLayers:ll,createLayer:$t,addLayer:Mi,getLayer:So,removeLayer:xi,reloadLayer:Mo,setupLayerModal:xo},Symbol.toStringTag,{value:"Module"}));const La=Symbol("PersistentState"),Sl=Symbol("DefaultValue"),fa=Symbol("StackTrace"),Bi=Symbol("Deleted"),ea=Symbol("NonPersistent"),Xl=Symbol("SaveDataPath");function No(){var e;return((e=new Error().stack)==null?void 0:e.split(` +Trying to pop ${l.id}`;return ll.pop(),W(l,"color"),W(l,"display"),W(l,"name"),Nt(l,"name",l.id),W(l,"minWidth"),Nt(l,"minWidth",600),W(l,"minimizable"),Nt(l,"minimizable",!0),W(l,"minimizedDisplay"),l})}function Mi(e,t){if(console.info("Adding layer",e.id),Bt[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Bt[e.id]);return}Nt(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Bt[e.id]=e,lt.emit("addLayer",e,t.layers[e.id])}function So(e){return Bt[e]}function xi(e){console.info("Removing layer",e.id),lt.emit("removeLayer",e),Bt[e.id]=void 0}function Mo(e){xi(e),Mi(e,me)}function xo(e){const t=H(!1);return{openModal:()=>t.value=!0,modal:_(()=>n(Et,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>n("h2",null,[u(e.name)]),body:u(e.display)}))}}lt.on("update",function(t){Object.values(Bt).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(Bt).forEach(l=>{l==null||l.emit("update",t)}),Object.values(Bt).forEach(l=>{l==null||l.emit("postUpdate",t)})});var Bo=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ua,UnregisterNodeInjectionKey:Ra,NodesInjectionKey:Oa,BoundsInjectionKey:qa,layers:Bt,persistentRefs:Gl,addingLayers:ll,createLayer:$t,addLayer:Mi,getLayer:So,removeLayer:xi,reloadLayer:Mo,setupLayerModal:xo},Symbol.toStringTag,{value:"Module"}));const La=Symbol("PersistentState"),Sl=Symbol("DefaultValue"),fa=Symbol("StackTrace"),Bi=Symbol("Deleted"),ta=Symbol("NonPersistent"),Yl=Symbol("SaveDataPath");function No(){var e;return((e=new Error().stack)==null?void 0:e.split(` `).slice(3,5).map(t=>t.trim()).join(` -`))||""}function Me(e){const t=wt(e)?e:H(e);t[La]=t,t[Sl]=wt(e)?e.value:e,t[fa]=No(),t[Bi]=!1;const l=f({get(){return t.value},set(i){t.value=i}});return l[Sl]=t[Sl],t[ea]=l,t[Xl]=void 0,ll.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,` +`))||""}function Me(e){const t=wt(e)?e:H(e);t[La]=t,t[Sl]=wt(e)?e.value:e,t[fa]=No(),t[Bi]=!1;const l=f({get(){return t.value},set(i){t.value=i}});return l[Sl]=t[Sl],t[ta]=l,t[Yl]=void 0,ll.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,` Created at: -`+t[fa]):Gl[ll[ll.length-1]].add(t),t}function Do(e){return e&&typeof e=="object"&&La in e}function O(e){return e[ea]}tt.on("addLayer",(e,t)=>{const l=[],i=(o,r=[])=>{let d=!1;return Object.keys(o).forEach(c=>{let m=o[c];if(m&&typeof m=="object")if(vt in m&&(m=m[vt]),Do(m)){if(d=!0,m[Bi]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,` +`+t[fa]):Gl[ll[ll.length-1]].add(t),t}function Do(e){return e&&typeof e=="object"&&La in e}function O(e){return e[ta]}lt.on("addLayer",(e,t)=>{const l=[],i=(o,r=[])=>{let d=!1;return Object.keys(o).forEach(c=>{let m=o[c];if(m&&typeof m=="object")if(vt in m&&(m=m[vt]),Do(m)){if(d=!0,m[Bi]){console.warn("Deleted persistent ref present in returned object. Ignoring...",m,` Created at: -`+m[fa]);return}Gl[e.id].delete(m);const p=[e.id,...r,c];m[Xl]!=null&&JSON.stringify(p)!==JSON.stringify(m[Xl])&&console.error(`Persistent ref is being saved to \`${p.join(".")}\` when it's already present at \`${m[Xl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,m),m[Xl]=p;const w=r.reduce((C,v)=>(v in C||(C[v]={}),C[v]),t),b=w[c];w[c]=m[La],on(w)?b!=null?w[c]=b:w[c]=m[Sl]:b!=null?w[c].value=b:w[c].value=m[Sl]}else!(m instanceof a)&&!wt(m)&&!l.includes(m)&&(typeof m.type=="symbol"&&l.push(m),i(m,[...r,c])&&(Ia(m)&&!Ia(o)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",vt in o?o[vt]:o,c):d=!0))}),d};i(e[vt]),Gl[e.id].forEach(o=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,o,` +`+m[fa]);return}Gl[e.id].delete(m);const p=[e.id,...r,c];m[Yl]!=null&&JSON.stringify(p)!==JSON.stringify(m[Yl])&&console.error(`Persistent ref is being saved to \`${p.join(".")}\` when it's already present at \`${m[Yl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,m),m[Yl]=p;const w=r.reduce((C,v)=>(v in C||(C[v]={}),C[v]),t),b=w[c];w[c]=m[La],on(w)?b!=null?w[c]=b:w[c]=m[Sl]:b!=null?w[c].value=b:w[c].value=m[Sl]}else!(m instanceof a)&&!wt(m)&&!l.includes(m)&&(typeof m.type=="symbol"&&l.push(m),i(m,[...r,c])&&(Ia(m)&&!Ia(o)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",vt in o?o[vt]:o,c):d=!0))}),d};i(e[vt]),Gl[e.id].forEach(o=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,o,` Created at: -`+o[fa])}),Gl[e.id].clear()});const vt=Symbol("ProxyState"),Ll=Symbol("ProxyPath");function Ht(e,t={}){const l=t;let i=!1;function o(){return i||(Object.assign(l,e(l)),i=!0),l}return new Proxy(l,{get(r,d){if(d===vt)return o();const c=o()[d];return c&&typeof c=="object"&&ea in c?c[ea]:c},set(r,d,c){return o()[d]=c,!0},has(r,d){return d===vt?!0:Reflect.has(o(),d)},ownKeys(){return Reflect.ownKeys(o())},getOwnPropertyDescriptor(r,d){return i||(Object.assign(l,e(l)),i=!0),Object.getOwnPropertyDescriptor(r,d)}})}var gt=window.state=wa({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Ni=aa({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Di(e){return JSON.stringify(e,(t,l)=>u(l))}const Ii={get(e,t){var i;if(t===vt||t===Ll)return e[t];const l=e[vt][t];if(t!=="value"&&(pn(l)||Array.isArray(l))){if(l!==((i=e[t])==null?void 0:i[vt])){const o=[...e[Ll],t];e[t]=new Proxy({[vt]:l,[Ll]:o},Ii)}return e[t]}return l},set(e,t,l,i){if(!gt.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof a&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const o=e[vt][t];if(!(typeof o=="number"&&isNaN(o)||o instanceof a&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.mag))))throw Ni.autosave=!1,gt.hasNaN=!0,gt.NaNPath=[...e[Ll],t],gt.NaNReceiver=i,console.error("Attempted to set NaN value",[...e[Ll],t],e[vt]),"Attempted to set NaN value. See above for details"}return e[vt][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[vt])},has(e,t){return Reflect.has(e[vt],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[vt],t)}};var me=window.player=new Proxy({[vt]:Ni,[Ll]:["player"]},Ii);function Ti(e={}){return Object.assign({id:`${je.id}-0`,name:"Default Save",tabs:je.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:je.id,modVersion:je.versionNumber,layers:{}},e)}function al(e){const t=El.compressToUTF16(Di(e!=null?e:me[vt]));return localStorage.setItem((e!=null?e:me[vt]).id,t),t}async function Io(){Po();try{let e=localStorage.getItem(mt.active);if(e==null){await Ul(Ql());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=El.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==je.id){await Ul(Ql());return}t.id=mt.active,await Ul(t)}catch(e){console.error(`Failed to load save. Falling back to new save. -`,e),await Ul(Ql())}}function Ql(){const e=da(),t=Ti({id:e});return al(t),mt.saves.push(e),t}function da(){let e,t=0;do e=`${je.id}-${t++}`;while(localStorage.getItem(e));return e}const Ga=H(!1);async function Ul(e){console.info("Loading save",e),Ga.value=!0;const{layers:t,removeLayer:l,addLayer:i}=await pa(()=>Promise.resolve().then(function(){return Bo}),void 0),{fixOldSave:o,getInitialLayers:r}=await pa(()=>Promise.resolve().then(function(){return Ir}),void 0);for(const d in t){const c=t[d];c&&l(c)}r(e).forEach(d=>i(d,e)),e=Ti(e),e.offlineProd&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,je.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==je.versionNumber&&(o(e.modVersion,e),e.modVersion=je.versionNumber),Object.assign(me,e),mt.active=me.id,tt.emit("onLoad")}setInterval(()=>{me.autosave&&al()},1e3);window.onbeforeunload=()=>{me.autosave&&al()};window.save=al;const To=window.hardReset=async()=>{await Ul(Ql())},ta=aa({active:"",saves:[],showTPS:!0,theme:Fa.Nordic,unthrottled:!1});jt(ta,e=>{const t=El.compressToUTF16(JSON.stringify(e));localStorage.setItem(je.id,t)},{deep:!0});var mt=window.settings=ta;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Fa.Nordic};tt.emit("loadSettings",e),Object.assign(ta,e),To()};function Po(){try{let e=localStorage.getItem(je.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=El.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(ta,t)}tt.emit("loadSettings",ta)}catch{}}const Pi=aa([]);function Fo(e){Pi.push(e)}const Fi=aa([]);function Uo(e){Fi.push(e)}const Ro=aa([]),Oo={class:"table"},Qt=_e({__name:"Column",setup(e){const t=f(()=>jl[mt.theme].mergeAdjacent);return(l,i)=>(k(),T("div",Oo,[h("div",{class:bt(["col",{mergeAdjacent:u(t)}])},[Xt(l.$slots,"default")],2)]))}}),qo={class:"table"},Hl=_e({__name:"Row",setup(e){const t=f(()=>jl[mt.theme].mergeAdjacent);return(l,i)=>(k(),T("div",qo,[h("div",{class:bt(["row",{mergeAdjacent:u(t)}])},[Xt(l.$slots,"default")],2)]))}});function Qa(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!sn(e)}function He(e,t="span"){return typeof e=="function"?_e({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}`),_e({template:e})):_e({render:()=>({})}):e}function ce(e){if(fl(e))return typeof e=="function"?e():He(e);const t=e[Bl];return n(t,e[Nl](),null)}function it(...e){let t;return n(Hl,null,Qa(t=e.map(ce))?t:{default:()=>[t]})}function Zt(...e){let t;return n(Qt,null,Qa(t=e.map(ce))?t:{default:()=>[t]})}function Ml(...e){return n("div",{class:"table-grid"},[e.map(t=>n("div",{class:{["row-grid"]:!0,mergeAdjacent:jl[mt.theme].mergeAdjacent}},[t.map(ce)]))])}function nl(e){if(fl(e))return typeof e=="function"?e():typeof e=="string"?n(x,null,[e]):n(e,null,null);const t=e[Bl];return n(t,e[Nl](),null)}function Lo(...e){let t;return n(Qt,null,Qa(t=e.map(nl))?t:{default:()=>[t]})}function fl(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Zl]===!0}function Ui(e,t,l){const i=H(null),o=H(void 0);function r(m){i.value||(i.value=setInterval(c,250)),o.value=m,l&&(l.value=!0)}function d(){i.value&&(clearInterval(i.value),i.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(o.value)}return pi(d),{start:r,stop:d,handleHolding:c}}function Go(e,t){const l=f(()=>e.filter(i=>u(i.visibility)===kt.Visible&&t(i)));return{firstFeature:f(()=>l.value[0]),collapsedContent:_(()=>Zt(...l.value.slice(1))),hasCollapsedContent:f(()=>l.value.length>1)}}function ga(e,t="div"){const l=Yt();return Vt(()=>{l.value=He(St(e),t)}),l}function gl(e,t="div"){const l=Yt(null);return Vt(()=>{const i=St(e);l.value=i==null?null:He(i,t)}),l}function Qo(e){return f(()=>St(e))}function St(e){return u(u(e))}function K(...e){return e.includes(Object)||e.push(Object),e}const Ee=_e({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(k(),T("div",{style:At({width:e.width,height:e.height})},null,4))}});const $o={},Ho={class:"notif"};function Vo(e,t){return k(),T("div",Ho,"!")}var ei=Ve($o,[["render",Vo],["__scopeId","data-v-66323fd4"]]),jo=_e({props:{element:Object,display:{type:K(Object,String,Function),required:!0},style:K(Object,String,Array),classes:K(Object),direction:K(String),xoffset:K(String),yoffset:K(String),pinned:Object},setup(e){const{element:t,display:l,pinned:i}=Dt(e),o=H(!1),r=f(()=>(St(i)||o.value)&&d.value),d=gl(l),c=Yt(He(_(()=>{const w=St(t);return w==null?"":nl(w)})));function m(w){const b=i;w.shiftKey&&b&&(b.value=!b.value,w.stopPropagation(),w.preventDefault())}const p=f(()=>St(i)&&jl[mt.theme].showPin);return{Direction:Fe,isHovered:o,isShown:r,comp:d,elementComp:c,unref:u,togglePinned:m,showPin:p}}});const zo={key:0,class:"material-icons pinned"};function Jo(e,t,l,i,o,r){return k(),T("div",{class:bt(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=d=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=d=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...d)=>e.togglePinned&&e.togglePinned(...d))},[Xt(e.$slots,"default",{},void 0,!0),e.elementComp?(k(),be(rt(e.elementComp),{key:0})):G("",!0),n(ba,{name:"fade"},{default:ge(()=>{var d;return[e.isShown?(k(),T("div",{key:0,class:bt(["tooltip",{top:e.unref(e.direction)===e.Direction.Up,left:e.unref(e.direction)===e.Direction.Left,right:e.unref(e.direction)===e.Direction.Right,bottom:e.unref(e.direction)===e.Direction.Down,...e.unref(e.classes)}]),style:At([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(d=e.unref(e.style))!=null?d:{}])},[e.showPin?(k(),T("span",zo,"push_pin")):G("",!0),e.comp?(k(),be(rt(e.comp),{key:1})):G("",!0)],6)):G("",!0)]}),_:1})],34)}var yt=Ve(jo,[["render",Jo],["__scopeId","data-v-6102fa3a"]]);const Aa=e=>(yl("data-v-14ecc7bd"),e=e(),hl(),e),Wo={key:0,class:"day feature dontMerge opened"},Ko={class:"date"},Xo=s("Dec"),Yo=Aa(()=>h("br",null,null,-1)),Zo={class:"date"},es=s("Dec"),ts=Aa(()=>h("br",null,null,-1)),ls=Aa(()=>h("div",{class:"doors"},null,-1)),as={class:"date"},is=s("Dec"),ns=Aa(()=>h("br",null,null,-1)),os={key:0,class:"material-icons lock"},ss={key:1,class:"timer"},rs=_e({__name:"Day",props:{day:null,symbol:null,layer:null,opened:null,recentlyUpdated:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const l=e,i=f(()=>l.layer&&a.gte(U.day.value,l.day)&&new Date().getMonth()===11&&new Date().getDate()>=l.day);function o(){i.value&&t("unlockLayer")}return(r,d)=>{var c,m,p;return e.opened.value?(k(),T("div",Wo,[n(yt,{display:(p=(m=u(Bt)[(c=e.layer)!=null?c:""])==null?void 0:m.name)!=null?p:"",direction:u(Fe).Up,yoffset:"5px"},{default:ge(()=>[n(ba,{appear:"",name:"door"},{default:ge(()=>[h("div",{class:"doors",onClick:d[0]||(d[0]=w=>t("openLayer"))},[h("div",Ko,[Xo,Yo,s(Te(e.day),1)]),h("div",Zo,[es,ts,s(Te(e.day),1)])])]),_:1}),h("div",{class:"icon",onClick:d[1]||(d[1]=w=>t("openLayer")),style:At({backgroundImage:`url(${e.symbol})`})},null,4),h("div",{class:"lore",onClick:d[2]||(d[2]=w=>t("openLore"))},"?"),u(e.shouldNotify)?(k(),be(ei,{key:0})):G("",!0)]),_:1},8,["display","direction"])])):(k(),T("div",{key:1,class:bt(["day feature dontMerge",{can:u(i),locked:!u(i),canOpen:u(i)}]),onClick:o},[ls,h("div",as,[is,ns,s(Te(e.day),1)]),u(i)?G("",!0):(k(),T("div",os,"lock")),u(U).day.value===e.day&&!u(i)?(k(),T("div",ss,Te(u(U).timeUntilNewDay.value<0?"NYI, sorry":u(Pa)(u(U).timeUntilNewDay.value,0)),1)):G("",!0),u(i)?(k(),be(ei,{key:2})):G("",!0)],2))}}});var us=Ve(rs,[["__scopeId","data-v-14ecc7bd"]]);const ds=_e({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,l=ga(ol(t,"display")),i=ga(ol(t,"content"));return(o,r)=>(k(),be(Qt,{class:"collapsible-container"},{default:ge(()=>[h("button",{onClick:r[0]||(r[0]=d=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(k(),be(rt(u(l))))]),e.collapsed.value?G("",!0):(k(),be(rt(u(i)),{key:0}))]),_:1}))}});var cs=Ve(ds,[["__scopeId","data-v-a72c16aa"]]);const ps={key:0},ms={key:0,class:"mark star"},vs=["src"],fs=_e({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,l)=>e.mark?(k(),T("div",ps,[e.mark===!0?(k(),T("div",ms)):(k(),T("img",{key:1,class:"mark",src:e.mark},null,8,vs))])):G("",!0)}});var ka=Ve(fs,[["__scopeId","data-v-2207999f"]]);const gs=_e({__name:"Node",props:{id:null},setup(e){const l=Dt(e),i=ca(Ua,()=>{}),o=ca(Ra,()=>{}),r=Yt(null),d=f(()=>r.value&&r.value.parentElement);return jt([d,l.id],([c,m],[p,w])=>{p&&o(u(w)),c&&i(m,c)}),pi(()=>o(u(l.id))),(c,m)=>(k(),T("div",{class:"node",ref_key:"node",ref:r},null,512))}});var na=Ve(gs,[["__scopeId","data-v-a48cb382"]]);const ys=_e({props:{progress:{type:K(String,Object,Number),required:!0},width:{type:K(Number),required:!0},height:{type:K(Number),required:!0},direction:{type:K(String),required:!0},display:K(Object,String,Function),visibility:{type:K(Number),required:!0},style:K(Object,String,Array),classes:K(Object),borderStyle:K(Object,String,Array),textStyle:K(Object,String,Array),baseStyle:K(Object,String,Array),fillStyle:K(Object,String,Array),mark:K(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:ka,Node:na},setup(e){const{progress:t,width:l,height:i,direction:o,display:r}=Dt(e),d=f(()=>{let p=t.value instanceof a?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(p,0),1))*100}),c=f(()=>{const p={width:St(l)+.5+"px",height:St(i)+.5+"px"};switch(u(o)){case Fe.Up:p.clipPath=`inset(${d.value}% -2px -2px -2px)`,p.width=St(l)+2+"px";break;case Fe.Down:p.clipPath=`inset(-2px -2px ${d.value}% -2px)`,p.width=St(l)+2+"px";break;case Fe.Right:p.clipPath=`inset(-2px ${d.value}% -2px -2px)`;break;case Fe.Left:p.clipPath=`inset(-2px -2px -2px ${d.value} + '%)`;break;case Fe.Default:p.clipPath="inset(-2px 50% -2px -2px)";break}return p}),m=gl(r);return{normalizedProgress:d,barStyle:c,component:m,unref:u,Visibility:kt}}});function hs(e,t,l,i,o,r){var m,p,w,b,C,v,S;const d=xl("MarkNode"),c=xl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),T("div",{key:0,style:At([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(m=e.unref(e.style))!=null?m:{}]),class:bt({bar:!0,...e.unref(e.classes)})},[h("div",{class:"overlayTextContainer border",style:At([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(p=e.unref(e.borderStyle))!=null?p:{}])},[e.component?(k(),T("span",{key:0,class:"overlayText",style:At(e.unref(e.textStyle))},[(k(),be(rt(e.component)))],4)):G("",!0)],4),h("div",{class:"border",style:At([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(w=e.unref(e.style))!=null?w:{},(b=e.unref(e.baseStyle))!=null?b:{},(C=e.unref(e.borderStyle))!=null?C:{}])},[h("div",{class:"fill",style:At([e.barStyle,(v=e.unref(e.style))!=null?v:{},(S=e.unref(e.fillStyle))!=null?S:{}])},null,4)],4),n(d,{mark:e.unref(e.mark)},null,8,["mark"]),n(c,{id:e.id},null,8,["id"])],6)):G("",!0)}var bs=Ve(ys,[["render",hs],["__scopeId","data-v-730cc7a0"]]);const ws=Symbol("Bar");function el(e){return Ht(()=>{const t=e();return t.id=Vl("bar-"),t.type=ws,t[Bl]=bs,W(t,"visibility"),Nt(t,"visibility",kt.Visible),W(t,"width"),W(t,"height"),W(t,"direction"),W(t,"style"),W(t,"classes"),W(t,"borderStyle"),W(t,"baseStyle"),W(t,"textStyle"),W(t,"fillStyle"),W(t,"progress"),W(t,"display"),W(t,"mark"),t[Nl]=function(){const{progress:l,width:i,height:o,direction:r,display:d,visibility:c,style:m,classes:p,borderStyle:w,textStyle:b,baseStyle:C,fillStyle:v,mark:S,id:N}=this;return{progress:l,width:i,height:o,direction:r,display:d,visibility:c,style:u(m),classes:p,borderStyle:w,textStyle:b,baseStyle:C,fillStyle:v,mark:S,id:N}},t})}var As=_e({props:{display:{type:K(Object,String,Function),required:!0},visibility:{type:K(Number),required:!0},style:K(Object,String,Array),classes:K(Object),onClick:Function,onHold:Function,canClick:{type:K(Boolean),required:!0},small:Boolean,mark:K(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:na,MarkNode:ka},setup(e){const{display:t,onClick:l,onHold:i}=Dt(e),o=Yt("");Vt(()=>{const c=St(t);if(c==null){o.value="";return}if(fl(c)){o.value=He(c);return}const m=He(c.title||"","h3"),p=He(c.description,"div");o.value=He(_(()=>n("span",null,[c.title?n("div",null,[n(m,null,null)]):null,n(p,null,null)])))});const{start:r,stop:d}=Ui(l,i,e.isHolding);return{start:r,stop:d,comp:o,Visibility:kt,unref:u}}});function ks(e,t,l,i,o,r){var m;const d=xl("MarkNode"),c=xl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),T("button",{key:0,style:At([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(m=e.unref(e.style))!=null?m:[]]),onClick:t[0]||(t[0]=(...p)=>e.onClick&&e.onClick(...p)),onMousedown:t[1]||(t[1]=(...p)=>e.start&&e.start(...p)),onMouseleave:t[2]||(t[2]=(...p)=>e.stop&&e.stop(...p)),onMouseup:t[3]||(t[3]=(...p)=>e.stop&&e.stop(...p)),onTouchstartPassive:t[4]||(t[4]=(...p)=>e.start&&e.start(...p)),onTouchendPassive:t[5]||(t[5]=(...p)=>e.stop&&e.stop(...p)),onTouchcancelPassive:t[6]||(t[6]=(...p)=>e.stop&&e.stop(...p)),class:bt({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(k(),be(rt(e.unref(e.comp)),{key:0})):G("",!0),n(d,{mark:e.unref(e.mark)},null,8,["mark"]),n(c,{id:e.id},null,8,["id"])],38)):G("",!0)}var Ri=Ve(As,[["render",ks],["__scopeId","data-v-8cedd7da"]]);const Cs=Symbol("Clickable");function Lt(e){return Ht(()=>{var l;const t=(l=e==null?void 0:e())!=null?l:{};if(t.id=Vl("clickable-"),t.type=Cs,t[Bl]=Ri,t.isHolding=H(!1),W(t,"visibility"),Nt(t,"visibility",kt.Visible),W(t,"canClick"),Nt(t,"canClick",!0),W(t,"classes"),W(t,"style"),W(t,"mark"),W(t,"display"),t.onClick){const i=t.onClick.bind(t);t.onClick=function(o){u(t.canClick)&&i(o)}}if(t.onHold){const i=t.onHold.bind(t);t.onHold=function(){u(t.canClick)&&i()}}return t[Nl]=function(){const{display:i,visibility:o,style:r,classes:d,onClick:c,onHold:m,isHolding:p,canClick:w,small:b,mark:C,id:v}=this;return{display:i,visibility:o,style:u(r),classes:d,onClick:c,onHold:m,isHolding:p,canClick:w,small:b,mark:C,id:v}},t})}function ht(e,t="points",l=0,i=void 0){const o=wt(e)?e:Me(e);if(o.displayName=t,o.precision=l,o.small=i,!wt(e)){const r=o[ea];r.displayName=t,r.precision=l,r.small=i}return o}function ti(e){const t=Me(e.value);return jt(e,l=>{Ga.value||a.gt(l,t.value)&&(t.value=l)}),t}function Es(e){const t=Me(e.value);return jt(e,(l,i)=>{Ga.value||a.gt(l,i)&&(t.value=a.add(t.value,a.sub(l,i)))}),t}new a("10^^8");new a("1e100");function oa(e,t){const l=t!=null?t:e.value;return a.eq(e.precision,0)?Y(e.small?l:a.floor(l)):Q(l,e.precision,e.small)}const _s=["x1","y1","x2","y2"],Ss=_e({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const l=Dt(e),i=f(()=>{const r=l.startNode.value.rect,d=l.boundingRect.value,c=d?{x:r.x+r.width/2-d.x,y:r.y+r.height/2-d.y}:{x:0,y:0};return l.link.value.offsetStart&&(c.x+=l.link.value.offsetStart.x,c.y+=l.link.value.offsetStart.y),c}),o=f(()=>{const r=l.endNode.value.rect,d=l.boundingRect.value,c=d?{x:r.x+r.width/2-d.x,y:r.y+r.height/2-d.y}:{x:0,y:0};return l.link.value.offsetEnd&&(c.x+=l.link.value.offsetEnd.x,c.y+=l.link.value.offsetEnd.y),c});return(r,d)=>(k(),T("line",Ol({"stroke-width":"15px",stroke:"white"},e.link,{x1:u(i).x,y1:u(i).y,x2:u(o).x,y2:u(o).y}),null,16,_s))}});const Ms=_e({__name:"Links",props:{links:null},setup(e){var m;const l=ol(e,"links"),i=H(null),o=ca(Oa,H({})),r=ca(qa,H(void 0)),d=H((m=i.value)==null?void 0:m.getBoundingClientRect());jt(r,()=>{var p;return d.value=(p=i.value)==null?void 0:p.getBoundingClientRect()}),ya(()=>{var p;return d.value=(p=i.value)==null?void 0:p.getBoundingClientRect()});const c=f(()=>{var w,b;const p=o.value;return(b=(w=l.value)==null?void 0:w.filter(C=>{var v,S;return((v=p[C.startNode.id])==null?void 0:v.rect)&&((S=p[C.startNode.id])==null?void 0:S.rect)}))!=null?b:[]});return(p,w)=>(k(),T(x,null,[u(c)?(k(),T("svg",rn(Ol({key:0},p.$attrs)),[(k(!0),T(x,null,mi(u(c),(b,C)=>(k(),be(Ss,{key:C,link:b,boundingRect:d.value,startNode:u(o)[b.startNode.id],endNode:u(o)[b.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):G("",!0),h("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var xs=Ve(Ms,[["__scopeId","data-v-063f6d6b"]]);_e({props:{nodes:{type:K(Array),required:!0},leftSideNodes:K(Array),rightSideNodes:K(Array),branches:K(Array)},components:{Links:xs},setup(e){const{nodes:t,leftSideNodes:l,rightSideNodes:i}=Dt(e),o=Yt();Vt(()=>{const c=St(t);o.value=He(_(()=>n(x,null,[c.map(m=>n("span",{class:"row tree-row",style:"margin: 50px auto;"},[m.map(nl)]))])))});const r=Yt();Vt(()=>{const c=St(l);r.value=c?He(_(()=>n("span",{class:"left-side-nodes small"},[c.map(nl)]))):""});const d=Yt();return Vt(()=>{const c=St(i);d.value=c?He(_(()=>n("span",{class:"side-nodes small"},[c.map(nl)]))):""}),{unref:u,nodesComp:o,leftNodesComp:r,rightNodesComp:d}}});_e({props:{display:K(Object,String,Function),visibility:{type:K(Number),required:!0},style:K(String,Object,Array),classes:K(Object),onClick:Function,onHold:Function,color:K(String),glowColor:K(String),canClick:{type:K(Boolean),required:!0},mark:K(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:ka,Node:na},setup(e){const{onClick:t,onHold:l,display:i}=Dt(e),o=gl(i),{start:r,stop:d}=Ui(t,l);return{start:r,stop:d,comp:o,unref:u,Visibility:kt,isCoercableComponent:fl}}});function sl(e){const t=[],l={};let i=!1;function o(){return i||(t.push(...e()),l.base=t.map(c=>Ct(c.base)),l.baseText=t.map(c=>Ct(c.baseText)),l.visible=t.map(c=>Ct(c.visible)),i=!0),t}const r=Me({});return[_(()=>{const c=o();let m=!0;const p=c.map((w,b)=>{var N,D,z;if(u(l.visible[b])===!1)return null;const C=n("h3",{onClick:()=>r.value[b]=!r.value[b],style:"cursor: pointer"},[n("span",{class:"modifier-toggle"+(u(r.value[b])?" collapsed":"")},[s("\u25BC")]),w.title,w.subtitle?n("span",{class:"subtitle"},[s(" ("),w.subtitle,s(")")]):null]),v=u(r.value[b])?null:n(x,null,[n("div",{class:"modifier-container"},[n("span",{class:"modifier-description"},[nl((N=u(l.baseText[b]))!=null?N:"Base")]),n("span",{class:"modifier-amount"},[Q((D=u(l.base[b]))!=null?D:1),w.unit])]),nl(u(w.modifier.description))]),S=!m;return m=!1,n(x,null,[S?n("br",null,null):null,n("div",null,[C,n("br",null,null),v,n("hr",null,null),n("div",{class:"modifier-container"},[n("span",{class:"modifier-description"},[s("Total")]),n("span",{class:"modifier-amount"},[Q(w.modifier.apply((z=u(l.base[b]))!=null?z:1)),w.unit])])])])});return n(x,null,[p])}),r]}function la(e){const t=Object.values(e).reverse(),l=Me(!0),i=f(()=>t.filter(m=>m.earned.value===!1)),{firstFeature:o,collapsedContent:r,hasCollapsedContent:d}=Go(t,m=>m.earned.value),c=_(()=>{const m=[...i.value];return o.value&&m.push(o.value),Lo(...m,_(()=>ha(n(cs,{collapsed:l,content:r,display:l.value?"Show other completed milestones":"Hide other completed milestones"},null),[[ci,u(d)]])))});return{collapseMilestones:l,display:c}}function bl(e){const t=e.ignoreTotal?e.resource:Es(e.resource),l=()=>{var c,m;if(U.day.value!==e.day)return 1;let r=a.add(t.value,1),d=e.goal;return((m=(c=e.usingLog)==null?void 0:c.value)!=null?m:me.usingLog)&&(r=r.log10(),d=a.log10(d)),a.div(r,d)},i=el(()=>({direction:Fe.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:l,display:_(()=>U.day.value===e.day?n(x,null,[Ce(t.value),s("/"),Ce(e.goal)]):"")})),o=_(()=>n(x,null,[n("div",null,[U.day.value===e.day?n(x,null,[s("Reach "),Ce(e.goal),s(" "),e.ignoreTotal?"":"total ",e.resource.displayName,s(" to complete the day")]):n(x,null,[e.name,s(" Complete!")]),e.modal?n(x,null,[" ",s("-")," ",n("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[s("Check Modifiers")])]):void 0]),ce(i),e.modal?ce(e.modal.display):void 0]));return Vt(()=>{U.day.value===e.day&&a.gte(t.value,e.goal)&&U.completeDay()}),{total:t,trackerDisplay:o}}function il(e){var d;const t=(d=e.style)!=null?d:{minHeight:"20px",width:"40px",color:"var(--foreground)"},l=Lt(()=>({display:"0",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=0}})),i=Lt(()=>({display:"-",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=a.sub(e.active.value,1)}})),o=Lt(()=>({display:"+",style:t,canClick(){return a.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=a.add(e.active.value,1)}})),r=Lt(()=>({display:"Max",style:t,canClick(){return a.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=e.buyable.amount.value}}));return{min:l,remove:i,add:o,max:r}}const Bs=Symbol("Buyable");function Le(e){const t=Me(0);return Ht(()=>{var r,d,c;const l=e();if(l.canPurchase==null&&(l.resource==null||l.cost==null))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",l),"Cannot create buyable without a canPurchase property or a resource and cost property";l.id=Vl("buyable-"),l.type=Bs,l[Bl]=Ri,l.amount=t,l.amount[Sl]=(r=l.initialValue)!=null?r:0,l.canAfford=f(()=>{const m=l,p=u(m.cost);return m.resource!=null&&p!=null&&a.gte(m.resource.value,p)}),l.canPurchase==null&&(l.canPurchase=f(()=>u(l.visibility)===kt.Visible&&u(l.canAfford)&&a.lt(l.amount.value,u(l.purchaseLimit)))),l.maxed=f(()=>a.gte(l.amount.value,u(l.purchaseLimit))),W(l,"classes");const i=l.classes;l.classes=f(()=>{const m=u(i)||{};return l.maxed.value&&(m.bought=!0),m}),W(l,"canPurchase"),l.canClick=l.canPurchase,l.onClick=l.purchase=(c=(d=l.onClick)!=null?d:l.purchase)!=null?c:function(){var w;const m=l;if(!u(m.canPurchase))return;const p=u(m.cost);m.cost!=null&&m.resource!=null&&(m.resource.value=a.sub(m.resource.value,p),m.amount.value=a.add(m.amount.value,1)),(w=m.onPurchase)==null||w.call(m,p)},W(l,"display");const o=l.display;return l.display=_(()=>{const m=u(o);if(fl(m)){const p=He(m);return n(p,null,null)}if(m!=null&&l.cost!=null&&l.resource!=null){const p=l,w=He(m.title||"","h3"),b=He(m.description||""),C=He(m.effectDisplay||"");return n("span",null,[m.title?n("div",null,[n(w,null,null)]):null,m.description?n(b,null,null):null,m.showAmount===!1?null:n("div",null,[n("br",null,null),u(p.purchaseLimit)===a.dInf?n(x,null,[s("Amount: "),Y(p.amount.value)]):n(x,null,[s("Amount: "),Y(p.amount.value),s(" /")," ",Y(u(p.purchaseLimit))])]),m.effectDisplay?n("div",null,[n("br",null,null),s("Currently: "),n(C,null,null)]):null,p.cost&&!p.maxed.value?n("div",null,[s("Cost: "),Q(u(p.cost)||0)," ",l.resource.displayName]):null])}return""}),W(l,"visibility"),Nt(l,"visibility",kt.Visible),W(l,"cost"),W(l,"resource"),W(l,"purchaseLimit"),Nt(l,"purchaseLimit",a.dInf),W(l,"style"),W(l,"mark"),W(l,"small"),l[Nl]=function(){const{display:m,visibility:p,style:w,classes:b,onClick:C,canClick:v,small:S,mark:N,id:D}=this;return{display:m,visibility:p,style:u(w),classes:b,onClick:C,canClick:v,small:S,mark:N,id:D}},l})}const Ca=wa({}),$a=Symbol("Hotkey");function $l(e){return Ht(()=>{const t=e();return t.type=$a,W(t,"enabled"),Nt(t,"enabled",!0),W(t,"description"),t})}tt.on("addLayer",e=>{_i(e,$a).forEach(t=>{Ca[t.key]=t})});tt.on("removeLayer",e=>{_i(e,$a).forEach(t=>{Ca[t.key]=void 0})});document.onkeydown=function(e){var i;if(((i=e.target)==null?void 0:i.tagName)==="INPUT"||ja.value&&!me.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const l=Ca[t];l&&u(l.enabled)&&(e.preventDefault(),l.onPress())};Uo(_(()=>{const e=Object.values(Ca).filter(t=>u(t==null?void 0:t.enabled));return e.length===0?"":n("div",null,[n("br",null,null),n("h4",null,[s("Hotkeys")]),e.map(t=>n("div",null,[t==null?void 0:t.key,s(": "),t==null?void 0:t.description]))])}));const Ns=_e({__name:"Sticky",setup(e){const t=H("0"),l=new ResizeObserver(o),i=Yt(null);function o(){let r=i.value;if(r==null)return;let d=0;for(;r.previousSibling;){const c=r.previousSibling;c.dataset&&"vSticky"in c.dataset&&(d+=c.offsetHeight),r=c}t.value=d+"px"}return Rl(o),document.fonts.ready.then(o),ya(()=>{var d;const r=(d=i.value)==null?void 0:d.parentElement;r&&l.observe(r)}),(r,d)=>(k(),T("div",{class:"sticky",style:At({top:t.value}),ref_key:"element",ref:i,"data-v-sticky":""},[Xt(r.$slots,"default",{},void 0,!0)],4))}});var Ds=Ve(Ns,[["__scopeId","data-v-cccac690"]]);const li=_e({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,l=f(()=>oa(t.resource));return(i,o)=>(k(),T("h2",{style:At({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},Te(u(l)),5))}});const Is={class:"main-display"},Ts={key:0},Ps={key:1},Fs=s(", "),Us={key:2},Rs=h("br",null,null,-1),Os={class:"main-display"},qs={key:0},Ls={key:1},Gs=s(", "),Qs={key:2},$s=h("br",null,null,-1),Gt=_e({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null,sticky:{type:Boolean,default:!0}},setup(e){const l=Dt(e),i=H(null),o=gl(l.effectDisplay),r=H(null),d=gl(l.productionDisplay),c=f(()=>a.lt(l.resource.value,"1e1000"));return(m,p)=>{var w,b;return e.sticky?(k(),be(Ds,{key:0},{default:ge(()=>{var C,v,S,N;return[h("div",{class:bt(["main-display-container",(C=e.classes)!=null?C:{}]),style:At([{"min-height":`${((S=(v=i.value)==null?void 0:v.$el.clientHeight)!=null?S:0)+50}px`},(N=e.style)!=null?N:{}])},[h("div",Is,[u(c)?(k(),T("span",Ts,"You have ")):G("",!0),n(li,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),s(" "+Te(e.resource.displayName),1),u(o)?(k(),T("span",Ps,[Fs,(k(),be(rt(u(o)),{ref_key:"effectRef",ref:i},null,512))])):G("",!0),u(d)?(k(),T("span",Us,[Rs,(k(),be(rt(u(d)),{ref_key:"productionRef",ref:r},null,512))])):G("",!0)])],6)]}),_:1})):(k(),T("div",{key:1,class:bt(["main-display-container",(w=e.classes)!=null?w:{}]),style:At([{"min-height":"50px"},(b=e.style)!=null?b:{}])},[h("div",Os,[u(c)?(k(),T("span",qs,"You have ")):G("",!0),n(li,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),s(" "+Te(e.resource.displayName),1),u(o)?(k(),T("span",Ls,[Gs,(k(),be(rt(u(o)),{ref_key:"effectRef",ref:i},null,512))])):G("",!0),u(d)?(k(),T("span",Qs,[$s,(k(),be(rt(u(d)),{ref_key:"productionRef",ref:r},null,512))])):G("",!0)])],6))}}});var Hs=_e({props:{display:{type:K(String,Object,Function),required:!0},visibility:{type:K(Number),required:!0},style:K(String,Object,Array),classes:K(Object),resource:Object,cost:K(String,Object,Number),canPurchase:{type:K(Boolean),required:!0},bought:{type:K(Boolean),required:!0},mark:K(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:na,MarkNode:ka},setup(e){const{display:t,cost:l}=Dt(e),i=Yt("");return Vt(()=>{const o=St(t);if(o==null){i.value="";return}if(fl(o)){i.value=He(o);return}const r=St(l),d=He(o.title||"","h3"),c=He(o.description,"div"),m=He(o.effectDisplay||"");i.value=He(_(()=>{var p;return n("span",null,[o.title?n("div",null,[n(d,null,null)]):null,n(c,null,null),o.effectDisplay?n("div",null,[s("Currently: "),n(m,null,null)]):null,e.resource!=null&&o.showCost!==!1?n(x,null,[n("br",null,null),s("Cost: "),e.resource&&oa(e.resource,r)," ",(p=e.resource)==null?void 0:p.displayName]):null])}))}),{component:i,unref:u,Visibility:kt}}});const Vs=["disabled"];function js(e,t,l,i,o,r){var m;const d=xl("MarkNode"),c=xl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),T("button",{key:0,style:At([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(m=e.unref(e.style))!=null?m:{}]),onClick:t[0]||(t[0]=(...p)=>e.purchase&&e.purchase(...p)),class:bt({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(k(),be(rt(e.unref(e.component)),{key:0})):G("",!0),n(d,{mark:e.unref(e.mark)},null,8,["mark"]),n(c,{id:e.id},null,8,["id"])],14,Vs)):G("",!0)}var zs=Ve(Hs,[["render",js],["__scopeId","data-v-7f411ac8"]]);const Js=Symbol("Upgrade");function q(e){const t=Me(!1);return Ht(()=>{const l=e();return l.id=Vl("upgrade-"),l.type=Js,l[Bl]=zs,l.canAfford==null&&(l.resource==null||l.cost==null)&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",l),l.bought=t,l.canAfford==null?l.canAfford=f(()=>{const i=l;return i.resource!=null&&i.cost!=null&&a.gte(i.resource.value,u(i.cost))}):W(l,"canAfford"),l.canPurchase=f(()=>u(l.visibility)===kt.Visible&&u(l.canAfford)&&!u(l.bought)),l.purchase=function(){var o;const i=l;!u(i.canPurchase)||(i.resource!=null&&i.cost!=null&&(i.resource.value=a.sub(i.resource.value,u(i.cost))),t.value=!0,(o=i.onPurchase)==null||o.call(i))},W(l,"visibility"),Nt(l,"visibility",kt.Visible),W(l,"classes"),W(l,"style"),W(l,"display"),W(l,"mark"),W(l,"cost"),W(l,"resource"),l[Nl]=function(){const{display:i,visibility:o,style:r,classes:d,resource:c,cost:m,canPurchase:p,bought:w,mark:b,id:C,purchase:v}=this;return{display:i,visibility:o,style:u(r),classes:d,resource:c,cost:m,canPurchase:p,bought:w,mark:b,id:C,purchase:v}},l})}function le(e){return Ht(()=>{const{addend:t,description:l,enabled:i}=e(),o=Ct(t),r=Ct(l),d=i==null?void 0:Ct(i);return{apply:c=>a.add(c,u(o)),revert:c=>a.sub(c,u(o)),enabled:d,description:l==null?void 0:_(()=>n("div",{class:"modifier-container"},[u(r)?n("span",{class:"modifier-description"},[nl(u(r))]):null,n("span",{class:"modifier-amount"},[a.gte(u(o),0)?"+":"",Q(u(o))])]))}})}function g(e){return Ht(()=>{const{multiplier:t,description:l,enabled:i}=e(),o=Ct(t),r=Ct(l),d=i==null?void 0:Ct(i);return{apply:c=>a.times(c,u(o)),revert:c=>a.div(c,u(o)),enabled:d,description:l==null?void 0:_(()=>n("div",{class:"modifier-container"},[u(r)?n("span",{class:"modifier-description"},[nl(u(r))]):null,n("span",{class:"modifier-amount"},[s("\xD7"),Q(u(o))])]))}})}function ml(e){return Ht(()=>{const{exponent:t,description:l,enabled:i,supportLowNumbers:o}=e(),r=Ct(t),d=Ct(l),c=i==null?void 0:Ct(i);return{apply:m=>{let p=m;return o&&(p=a.add(p,1)),p=a.pow(p,u(r)),o&&(p=a.sub(p,1)),p},revert:m=>{let p=m;return o&&(p=a.add(p,1)),p=a.root(p,u(r)),o&&(p=a.sub(p,1)),p},enabled:c,description:l==null?void 0:_(()=>n("div",{class:"modifier-container"},[u(d)?n("span",{class:"modifier-description"},[nl(u(d)),o?" (+1 effective)":null]):null,n("span",{class:"modifier-amount"},[s("^"),Q(u(r))])]))}})}function J(e){return Ht(()=>{const t=e();return{apply:l=>t.filter(i=>u(i.enabled)!==!1).reduce((i,o)=>o.apply(i),l),revert:t.every(l=>l.revert!=null)?l=>t.filter(i=>u(i.enabled)!==!1).reduceRight((i,o)=>o.revert(i),l):void 0,enabled:f(()=>t.filter(l=>u(l.enabled)!==!1).length>0),description:_(()=>n(x,null,[t.filter(l=>u(l.enabled)!==!1).map(l=>u(l.description)).filter(l=>l).map(nl)]))}})}function Oi(e){return Ht(()=>{const t=e();return t.currentGain==null&&(t.currentGain=f(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=a.floor(l).max(0),u(t.buyMax)||(l=l.min(1)),l})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=f(()=>{let l=t.scaling.currentAt(t);return t.roundUpCost&&(l=a.ceil(l)),l})),t.nextAt==null&&(t.nextAt=f(()=>{let l=t.scaling.nextAt(t);return t.roundUpCost&&(l=a.ceil(l)),l})),t.convert==null&&(t.convert=function(){var o;const l=u(t.currentGain),i=u(t.currentAt);t.gainResource.value=a.add(t.gainResource.value,l),t.spend(l,i),(o=t.onConvert)==null||o.call(t,l)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),W(t,"currentGain"),W(t,"actualGain"),W(t,"currentAt"),W(t,"nextAt"),W(t,"buyMax"),Nt(t,"buyMax",!0),W(t,"roundUpCost"),Nt(t,"roundUpCost",!0),t})}function Ha(e,t){const l=Ct(e),i=Ct(t);return{currentGain(o){let r=u(o.baseResource.value);if(o.costModifier&&(r=o.costModifier.apply(r)),a.lt(r,u(l)))return 0;const d=a.div(r,u(l)).pow(u(i));return d.isNan()?new a(0):d},currentAt(o){let r=u(o.currentGain);return o.gainModifier&&(r=o.gainModifier.revert(r)),r=a.max(0,r).root(u(i)).times(u(l)),o.costModifier&&(r=o.costModifier.revert(r)),r},nextAt(o){let r=a.add(u(o.currentGain),1).floor();return o.gainModifier&&(r=o.gainModifier.revert(r)),r=a.max(0,r).root(u(i)).times(u(l)).max(u(l)),o.costModifier&&(r=o.costModifier.revert(r)),r}}}function qi(e){return Oi(e)}function Ws(e){return Oi(()=>{const t=e();return Nt(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=f(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=a.floor(l).max(t.gainResource.value),u(t.buyMax)||(l=l.min(a.add(t.gainResource.value,1))),l})),t.actualGain==null&&(t.actualGain=f(()=>{let l=a.sub(a.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return u(t.buyMax)||(l=l.min(1)),l})),Nt(t,"convert",function(){var o;const l=u(t.actualGain),i=u(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(u(t.currentGain)):u(t.currentGain),t.spend(l,i),(o=t.onConvert)==null||o.call(t,l)}),t})}function xa(e,t,l=.5){return a.lte(e,t)?e:a.pow(e,l).times(a.pow(t,a.sub(1,l)))}function ai(e,t,l=.5){return{...e,currentAt:i=>xa(e.currentAt(i),u(t),a.recip(u(l))),nextAt:i=>xa(e.nextAt(i),u(t),a.recip(u(l))),currentGain:i=>xa(e.currentGain(i),u(t),u(l))}}const Ks={},Xs={style:{"white-space":"nowrap"}},Ys=h("span",{style:{"font-size":"larger","font-family":"initial"}},"\u221A",-1),Zs={style:{display:"inline-block","border-top":"1px solid","padding-left":".2em"}};function er(e,t){return k(),T("span",Xs,[Ys,h("div",Zs,[Xt(e.$slots,"default")])])}var pl=Ve(Ks,[["render",er]]);const tr={},lr={class:"fraction"};function ar(e,t){return k(),T("div",lr,[Xt(e.$slots,"default")])}var ir=Ve(tr,[["render",ar]]);const nr={class:"field"},or={key:0,class:"field-title"},Va=_e({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var d;const l=e,i=gl(ol(l,"title"),"span"),o=H((d=l.options.find(c=>c.value===l.modelValue))!=null?d:null);jt(ol(l,"modelValue"),c=>{var m;St(o)!==c&&(o.value=(m=l.options.find(p=>p.value===c))!=null?m:null)});function r(c){t("update:modelValue",c.value)}return(c,m)=>(k(),T("div",nr,[u(i)?(k(),T("span",or,[(k(),be(rt(u(i))))])):G("",!0),n(u(mn),{options:e.options,modelValue:o.value,"onUpdate:modelValue":[m[0]||(m[0]=p=>o.value=p),r],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});var sr=_e({props:{visibility:{type:K(Number),required:!0},display:{type:K(String,Object,Function),required:!0},style:K(String,Object,Array),classes:K(Object),earned:{type:K(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:na},setup(e){const{display:t}=Dt(e),l=Yt("");return Vt(()=>{const i=St(t);if(i==null){l.value="";return}if(fl(i)){l.value=He(i);return}const o=He(i.requirement,"h3"),r=He(i.effectDisplay||"","b"),d=He(i.optionsDisplay||"","span");l.value=He(_(()=>n("span",null,[n(o,null,null),i.effectDisplay?n("div",null,[n(r,null,null)]):null,i.optionsDisplay?n("div",{class:"equal-spaced"},[n(d,null,null)]):null])))}),{comp:l,unref:u,Visibility:kt}}});function rr(e,t,l,i,o,r){var c;const d=xl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),T("div",{key:0,style:At([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:bt({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(k(),be(rt(e.unref(e.comp)))),n(d,{id:e.id},null,8,["id"])],6)):G("",!0)}var ur=Ve(sr,[["render",rr],["__scopeId","data-v-f4e8794e"]]);tt.on("setupVue",e=>e.use(vn));const ii=fi(),dr=Symbol("Milestone");let _l;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(_l||(_l={}));function P(e){const t=Me(!1);return Ht(()=>{var o;const l=(o=e==null?void 0:e())!=null?o:{};l.id=Vl("milestone-"),l.type=dr,l[Bl]=ur,l.earned=t,l.complete=function(){var d;const r=l;if(t.value=!0,(d=r.onComplete)==null||d.call(r),r.display&&u(r.showPopups)===!0){const c=u(r.display),m=He(fl(c)?c:c.requirement);ii(n(x,null,[n("h3",null,[s("Milestone earned!")]),n("div",null,[n(m,null,null)])]))}},W(l,"visibility"),Nt(l,"visibility",kt.Visible);const i=l.visibility;if(l.visibility=f(()=>{const r=u(l.display);switch(mt.msDisplay){default:case _l.All:return u(i);case _l.Configurable:return u(l.earned)&&!(r!=null&&typeof r=="object"&&"optionsDisplay"in r)?kt.None:u(i);case _l.Incomplete:return u(l.earned)?kt.None:u(i);case _l.None:return kt.None}}),W(l,"style"),W(l,"classes"),W(l,"display"),W(l,"showPopups"),l[Nl]=function(){const{visibility:r,display:d,style:c,classes:m,earned:p,id:w}=this;return{visibility:r,display:d,style:u(c),classes:m,earned:p,id:w}},l.shouldEarn){const r=l;Vt(()=>{var d,c;if(mt.active===me.id&&!r.earned.value&&u(r.visibility)===kt.Visible&&((d=r.shouldEarn)==null?void 0:d.call(r))&&(r.earned.value=!0,(c=r.onComplete)==null||c.call(r),r.display&&u(r.showPopups)===!0)){const m=u(r.display),p=He(fl(m)?m:m.requirement);ii(n(x,null,[n("h3",null,[s("Milestone earned!")]),n("div",null,[n(p,null,null)])]))}})}return l})}tt.on("loadSettings",e=>{Nt(e,"msDisplay",_l.All)});const cr=Object.values(_l).map(e=>({label:Ei(e),value:e}));Fo(_(()=>n(Va,{title:"Show Milestones",options:cr,"onUpdate:modelValue":e=>mt.msDisplay=e,modelValue:mt.msDisplay},null)));const pr={class:"field"},mr=_e({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,i=f(()=>He(u(l.title)||"","span")),o=f({get(){return!!l.modelValue},set(r){t("update:modelValue",r)}});return(r,d)=>(k(),T("label",pr,[ha(h("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":d[0]||(d[0]=c=>wt(o)?o.value=c:null)},null,512),[[un,u(o)]]),(k(),be(rt(u(i))))]))}});var vl=Ve(mr,[["__scopeId","data-v-33d57459"]]);const vr=Symbol("Reset");function fr(e){return Ht(()=>{const t=e();return t.id=Vl("reset-"),t.type=vr,t.reset=function(){var i;const l=o=>{if(o&&typeof o=="object")if(Sl in o){const r=o;r.value=r[Sl]}else!(o instanceof a)&&!wt(o)&&Object.values(o).forEach(r=>l(r))};u(t.thingsToReset).forEach(l),tt.emit("reset",t),(i=t.onReset)==null||i.call(t)},W(t,"thingsToReset"),t})}const ua={};tt.on("removeLayer",e=>{var t;(t=ua[e.id])==null||t.call(ua),ua[e.id]=void 0});const gr="workshop",zl=2,Ye=$t(gr,function(){const e="Workshop",t="#D66B02",l="#D66B02",i=ht(0,"foundation progress"),o=Ws(()=>({scaling:ai(ai(Ha(250,1.5),5387,1/1e10),1e20,3e8),baseResource:re.logs,gainResource:O(i),roundUpCost:!0,spend(ie,xe){re.logs.value=a.sub(re.logs.value,xe)},costModifier:J(()=>[ml(()=>({exponent:.95,description:"Holly Level 5",enabled:R.elfTraining.cutterElfTraining.milestones[4].earned}))])})),r=Lt(()=>({display:_(()=>n(x,null,[n("b",{style:"font-size: x-large"},[s("Build "),Y(o.actualGain.value),s("% of the foundation")]),n("br",null,null),n("br",null,null),n("span",{style:"font-size: large"},[s("Cost:")," ",oa(re.logs,a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value)," ",re.logs.displayName])])),visibility:()=>y(a.lt(i.value,100)||R.elfTraining.expandersElfTraining.milestones[2].earned.value),canClick:()=>a.gte(re.logs.value,o.currentAt.value)&&(a.lt(i.value,100)||R.elfTraining.expandersElfTraining.milestones[2].earned.value),onClick(){!u(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"})),d=$l(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{r.canClick.value&&r.onClick()}})),c=f(()=>!Re.milestones[6].earned.value),m=P(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>a.gte(i.value,1),showPopups:c})),p=P(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>a.gte(i.value,10),visibility:()=>y(m.earned.value),showPopups:c})),w=P(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>a.gte(i.value,20),visibility:()=>y(p.earned.value),showPopups:c})),b=P(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>a.gte(i.value,30),visibility:()=>y(w.earned.value),showPopups:c})),C=P(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>a.gte(i.value,40),visibility:()=>y(b.earned.value),showPopups:c})),v=P(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(i.value,50),visibility:()=>y(C.earned.value),showPopups:c})),S=P(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>a.gte(i.value,75),visibility:()=>y(v.earned.value),showPopups:c})),N=P(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>a.gte(i.value,100),visibility:()=>y(S.earned.value),showPopups:c})),D=P(()=>({display:{requirement:"200% Foundation Completed",effectDisplay:"The 1% milestone is now +2% and multiplicative"},shouldEarn:()=>a.gte(i.value,200),visibility:()=>y(N.earned.value&&R.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),z=P(()=>({display:{requirement:"400% Foundation Completed",effectDisplay:"Gain +10% metal for every 10% foundation completed"},shouldEarn:()=>a.gte(i.value,400),visibility:()=>y(D.earned.value&&R.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),B=P(()=>({display:{requirement:"600% Foundation Completed",effectDisplay:"Gain +10% oil for every 10% foundation completed"},shouldEarn:()=>a.gte(i.value,600),visibility:()=>y(z.earned.value&&R.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),E=P(()=>({display:{requirement:"800% Foundation Completed",effectDisplay:"Gain +10% plastic for every 10% foundation completed"},shouldEarn:()=>a.gte(i.value,800),visibility:()=>y(B.earned.value&&R.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),F=P(()=>({display:{requirement:"1000% Foundation Completed",effectDisplay:"Double paper, boxes, and all cloth actions"},shouldEarn:()=>a.gte(i.value,1e3),visibility:()=>y(E.earned.value&&R.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),Z={logGainMilestone1:m,autoCutMilestone1:p,autoPlantMilestone1:w,autoCutMilestone2:b,autoPlantMilestone2:C,logGainMilestone2:v,morePlantsMilestone1:S,logGainMilestone3:N,extraExpansionMilestone1:D,extraExpansionMilestone2:z,extraExpansionMilestone3:B,extraExpansionMilestone4:E,extraExpansionMilestone5:F},{collapseMilestones:ae,display:oe}=la(Z),ve=el(()=>({direction:Fe.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>U.day.value===zl?a.div(i.value,100):1,display:_(()=>U.day.value===zl?n(x,null,[Y(i.value),s("%")]):"")}));return Vt(()=>{U.day.value===zl&&a.gte(i.value,100)&&U.completeDay()}),{name:e,day:zl,color:t,foundationProgress:i,foundationConversion:o,milestones:Z,collapseMilestones:ae,minWidth:700,buildFoundationHK:d,display:_(()=>n(x,null,[n("div",null,[U.day.value===zl?"Complete the foundation to complete the day":`${e} Complete!`]),ce(ve),n(Ee,null,null),n("div",null,[n("span",null,[s("The foundation is ")]),n("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[Y(i.value)]),s("% completed")]),a.lt(i.value,100)||R.elfTraining.expandersElfTraining.milestones[2].earned.value?n(Ee,null,null):null,ce(r),n(Ee,null,null),oe()])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(i.value),s(" "),i.displayName]))}}),yr="plastic",ni=10,Ze=$t(yr,function(){const e="Plastic",t="#DCD9CD",l=ht(0,"plastic"),[i,o]=sl(()=>[{title:"Plastic Gain",modifier:ye,base:0}]),r=H(!1),d=_(()=>n(Et,{modelValue:r.value,"onUpdate:modelValue":Ie=>r.value=Ie},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:i})),c=Me(0),m=f(()=>a.times(c.value,100)),p=Le(()=>({resource:at.metal,cost(){const Ie=new a(this.amount.value);let Se=a.pow(1.2,Ie).times(1e7);return R.elfTraining.fertilizerElfTraining.milestones[3].earned.value&&(Se=a.sub(Se,a.pow(l.value,2)).max(0)),Se},display:_(()=>n(x,null,[n("h3",null,[s("Refinery")]),n("br",null,null),s("Refines oil into plastic pellets"),n("br",null,null),s("Consumes 100 oil/s to create 1 plastic/s"),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),Q(m.value),s(" oil/sec"),n("br",null,null),s("+"),Q(c.value),s(" plastic/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Y(u(p.cost))," ",p.resource.displayName])),onPurchase(){c.value=a.add(c.value,1)},style:{width:"300px"}})),{min:w,max:b,add:C,remove:v}=il({buyable:p,active:c,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),S=f(()=>a.pow(5,a.add([...Object.values(B),...Object.values(ae)].filter(Ie=>Ie.bought.value).length,2))),N=q(()=>({resource:O(l),cost:S,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!N.bought.value})})),D=q(()=>({resource:O(l),cost:S,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!D.bought.value})})),z=q(()=>({resource:O(l),cost:S,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!z.bought.value})})),B={paperTools:N,boxTools:D,clothTools:z},E=q(()=>({resource:O(l),cost:S,visibility:()=>y(N.bought.value),display:()=>({title:"Paper Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!E.bought.value})})),F=q(()=>({resource:O(l),cost:S,visibility:()=>y(D.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!F.bought.value})})),Z=q(()=>({resource:O(l),cost:S,visibility:()=>y(z.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!Z.bought.value})})),ae={paperElf:E,boxElf:F,clothElf:Z},oe=Le(()=>({resource:O(l),cost(){const Ie=this.amount.value;return a.pow(1.3,Ie).times(100)},visibility:()=>y(E.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:_(()=>n(x,null,[Y(oe.amount.value),s("%")])),showAmount:!1}})),ve=Le(()=>({resource:O(l),cost(){const Ie=this.amount.value;return a.pow(1.3,Ie).times(100)},visibility:()=>y(F.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:_(()=>n(x,null,[Y(ve.amount.value),s("%")])),showAmount:!1}})),ie=Le(()=>({resource:O(l),cost(){const Ie=this.amount.value;return a.pow(1.3,Ie).times(100)},visibility:()=>y(Z.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions are +10% more efficient",effectDisplay:_(()=>n(x,null,[Y(a.times(ie.amount.value,10)),s("%")])),showAmount:!1}})),xe={passivePaper:oe,passiveBoxes:ve,clothGains:ie},ye=J(()=>[le(()=>({addend:c,description:"Oil Refinery",enabled:()=>a.gt(c.value,0)})),g(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:E.bought})),g(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:F.bought})),g(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:Z.bought})),g(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:nt.row2Upgrades.plasticUpgrade.bought})),g(()=>({multiplier:()=>de.oilEffectiveness.value,description:"Effectiveness",enabled:()=>a.lt(de.oilEffectiveness.value,1)})),g(()=>({multiplier:Je.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Je.dyes.yellow.amount.value,1)})),g(()=>({multiplier:()=>a.div(Ye.foundationProgress.value,10).floor().div(10).add(1),description:"800% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone4.earned}))]),ee=f(()=>ye.apply(0));tt.on("update",Ie=>{a.lt(U.day.value,ni)||(l.value=a.times(Ie,ee.value).add(l.value))});const{total:ne,trackerDisplay:Be}=bl({resource:l,goal:25e4,name:e,day:ni,color:t,textColor:"var(--feature-foreground)",modal:{show:r,display:d}});return{name:e,color:t,plastic:l,totalPlastic:ne,buildRefinery:p,activeRefinery:c,oilCost:m,upgrades:B,elfUpgrades:ae,buyables:xe,generalTabCollapsed:o,minWidth:700,display:_(()=>n(x,null,[ce(Be),n(Ee,null,null),n(Gt,{resource:l,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(ee.value,0)?`+${Q(ee.value)}/s`:void 0},null),n(Ee,null,null),n(Qt,null,{default:()=>[ce(p),n("div",null,[Y(a.floor(c.value)),s("/"),Y(a.floor(p.amount.value))]),it(w,v,C,b)]}),n(Hl,null,{default:()=>[Zt(N,E,oe),Zt(D,F,ve),Zt(z,Z,ie)]})])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(l.value),s(" "),l.displayName]))}}),hr="paper",Ba=5,j=$t(hr,function(){const e="Paper",t="#E8DCB8",l=ht(0,"paper"),i=ht(f(()=>a.min(a.div(re.logs.value,1e9),a.div(L.ash.value,Ie.value))),"pulp"),o=qi(()=>({scaling:Ha(1,1.2),baseResource:i,gainResource:O(l),roundUpCost:!0,spend(pe,et){re.logs.value=a.sub(re.logs.value,a.times(et,1e9)),L.ash.value=a.sub(L.ash.value,a.times(et,Ie.value))},gainModifier:ne})),r=Lt(()=>({display:_(()=>{const pe=a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value;return n(x,null,[n("span",{style:"font-size: large"},[s("Create "),Y(o.currentGain.value),s(" "),l.displayName]),n("br",null,null),n("span",{style:"font-size: large"},[s("Cost: "),oa(re.logs,pe),s(" "),i.displayName,s(" ("),Y(a.times(pe,1e9)),s(" "),re.logs.displayName,s(";")," ",Y(a.times(pe,Ie.value))," ",L.ash.displayName,s(")")])])}),canClick:()=>a.gte(o.actualGain.value,1),onClick(){!u(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"}));function d(pe){const et=Le(()=>({...pe,display:{title:pe.name,description:`Print a copy of "${pe.name}", which ${pe.elfName} will use to improve their skills! Each copy printed will reduce the "${pe.buyableName}" price scaling by 0.95x and make ${pe.elfName} purchase +10% faster!`,effectDisplay:_(()=>n(x,null,[Q(a.pow(.95,et.amount.value)),s("x price scaling,")," ",Q(a.div(et.amount.value,10).add(1)),s("x auto-purchase speed")])),showAmount:!1},resource:O(l),cost(){let X=this.amount.value;(pe.elfName==="Star"||pe.elfName==="Bell")&&(X=a.pow(X,2)),a.gte(X,100)&&(X=a.pow(X,2).div(100)),a.gte(X,1e4)&&(X=a.pow(X,2).div(1e4)),X=a.pow(.95,D.amount.value).times(X);let ut=5;R.elfTraining.paperElfTraining.milestones[0].earned.value&&ut--;let We=a.pow(ut,X).times(10);return R.elfTraining.paperElfTraining.milestones[0].earned.value&&(We=a.div(We,ve.value.max(1))),We},style:"width: 600px"}));return et}const c=d({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),m=d({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),p=d({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),w=d({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),b=d({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),C=d({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),v=d({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>y(Re.elves.smallFireElf.bought.value)}),S=d({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>y(Re.elves.bonfireElf.bought.value)}),N=d({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>y(Re.elves.kilnElf.bought.value)}),D=d({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>y(Re.elves.paperElf.bought.value)}),z=d({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>y(Re.elves.boxElf.bought.value)}),B=d({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>y(Re.elves.clothElf.bought.value)}),E=d({name:"Drills and Mills",elfName:"Peppermint",buyableName:"Mining Drill",visibility:()=>y(R.elfTraining.expandersElfTraining.milestones[3].earned.value)}),F=d({name:"Deep in the Earth",elfName:"Frosty",buyableName:"Oil Drills",visibility:()=>y(R.elfTraining.fertilizerElfTraining.milestones[4].earned.value)}),Z=d({name:"Burning the Midnight Oil",elfName:"Cocoa",buyableName:"Oil-Consuming Machines",visibility:()=>y(R.elfTraining.heatedCutterElfTraining.milestones[4].earned.value)}),ae=d({name:"Physical Metallurgy",elfName:"Twinkle",buyableName:"Metal Buyables",visibility:()=>y(R.elfTraining.expandersElfTraining.milestones[4].earned.value)}),oe={cuttersBook:c,plantersBook:m,expandersBook:p,heatedCuttersBook:w,heatedPlantersBook:b,fertilizerBook:C,smallFireBook:v,bonfireBook:S,kilnBook:N,paperBook:D,boxBook:z,clothBook:B,miningDrillBook:E,heavyDrillBook:F,oilBook:Z,metalBook:ae},ve=f(()=>Object.values(oe).reduce((pe,et)=>pe.add(et.amount.value),new a(0))),ie=q(()=>({resource:O(l),cost:1e8,visibility:()=>y(Ze.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),xe=q(()=>({resource:O(l),cost:1e9,visibility:()=>y(Ze.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),ye=q(()=>({resource:O(l),cost:1e10,visibility:()=>y(Ze.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),ee={clothUpgrade:ie,drillingUpgrade:xe,oilUpgrade:ye},ne=J(()=>[g(()=>({multiplier:2,description:"Scholar's shoes",enabled:ft.paperUpgrades.paperUpgrade1.bought})),g(()=>({multiplier:2,description:"Scholar's slacks",enabled:ft.paperUpgrades.paperUpgrade2.bought})),g(()=>({multiplier:2,description:"Scholar's jacket",enabled:ft.paperUpgrades.paperUpgrade3.bought})),g(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:ft.paperUpgrades.paperUpgrade4.bought})),g(()=>({multiplier:Je.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Je.dyes.yellow.amount.value,1)})),g(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone5.earned}))]),Be=J(()=>[g(()=>({multiplier:.1,description:"Star Level 2",enabled:R.elfTraining.paperElfTraining.milestones[1].earned}))]),Ie=f(()=>Be.apply(1e6)),[Se,Ue]=sl(()=>[{title:"Paper Gain",modifier:ne,base:1},{title:"Ash Cost",modifier:Be,base:1e6,unit:" ash/pulp"}]),fe=H(!1),Oe=_(()=>n(Et,{modelValue:fe.value,"onUpdate:modelValue":pe=>fe.value=pe},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:Se}));tt.on("update",pe=>{a.lt(U.day.value,Ba)||(l.value=a.times(pe,Ze.buyables.passivePaper.amount.value).times(o.currentGain.value).div(100).add(l.value))});const{total:De,trackerDisplay:qe}=bl({resource:l,goal:5e3,name:e,day:Ba,color:t,textColor:"var(--feature-foreground)",modal:{show:fe,display:Oe}});return{name:e,day:Ba,color:t,paper:l,totalPaper:De,paperConversion:o,books:oe,upgrades:ee,generalTabCollapsed:Ue,minWidth:700,display:_(()=>n(x,null,[ce(qe),n(Ee,null,null),n(Gt,{resource:l,color:t,style:"margin-bottom: 0"},null),n(Ee,null,null),ce(r),n(Ee,null,null),it(...Object.values(ee)),n(Ee,null,null),Zt(...Object.values(oe))])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(l.value),s(" "),l.displayName]))}}),br="oil",Na=9,de=$t(br,function(){const e="Oil",t="#000000",l="var(--foreground)",i=ht(0,"oil"),o=ht(0,"depth"),r=Me(0),d=f(()=>a.lt(o.value,990)?a.add(10,o.value):a.pow(1.001,a.sub(o.value,990)).mul(1e3));function c(){if(a.lt(o.value,990)){const Xe=a.min(a.affordArithmeticSeries(r.value,10,1,o.value),a.sub(990,o.value)),qt=a.sumArithmeticSeries(Xe,10,1,o.value);r.value=a.sub(r.value,qt),o.value=a.add(o.value,Xe)}if(a.gte(o.value,990)){const Xe=a.affordGeometricSeries(r.value,1e3,1.001,a.sub(o.value,990)),qt=a.sumGeometricSeries(Xe,1e3,1.001,a.sub(o.value,990));r.value=a.sub(r.value,qt),o.value=a.add(o.value,Xe)}}const m=Me(0),p=f(()=>a.times(a.pow(m.value,z.value).pow(2),1e14)),w=f(()=>a.times(a.pow(m.value,z.value),1)),b=Le(()=>({resource:at.metal,cost(){const Xe=new a(this.amount.value);return a.pow(1.3,Xe).times(25e3)},display:_(()=>n(x,null,[n("h3",null,[s("Heavy Drill")]),n("br",null,null),s("A large drill specialized at deep mining."),n("br",null,null),s("Consumes 1e14*(Heavy Drills amount)"),n("sup",null,[s("2")]),s(" coal/sec for (Heavy Drills amount) drill power."),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),we(p.value),s(" coal/sec"),n("br",null,null),s("+"),we(w.value),s(" drill power"),n("br",null,null),n("br",null,null),s("Cost: "),Ce(u(b.cost)),s(" "),b.resource.displayName])),onPurchase(){m.value=a.add(m.value,1)},style:{color:l,width:"160px"}})),{min:C,max:v,add:S,remove:N}=il({buyable:b,active:m}),D=Me(0),z=f(()=>a.add(D.value,Math.E).ln()),B=Le(()=>({resource:at.metal,cost(){const Xe=new a(this.amount.value);return a.pow(2,Xe).times(1e5)},display:_(()=>n(x,null,[n("h3",null,[s("Heavy Drill Drill")]),n("br",null,null),s("Attach extra drills to Heavy Drills to make them faster"),n("br",null,null),s("Raise amount of effective Heavy Drills by ^ln(Heavy Drill Drill amount + e)."),n("br",null,null),s("(also affects coal consumption)."),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("^"),we(z.value),s(" Heavy Drill amount"),n("br",null,null),n("br",null,null),s("Cost: "),Ce(u(B.cost)),s(" "),B.resource.displayName])),onPurchase(){D.value=a.add(D.value,1)},style:{color:l,width:"160px"}})),{min:E,max:F,add:Z,remove:ae}=il({buyable:B,active:D}),oe=Me(0),ve=f(()=>a.pow(1/3,oe.value)),ie=f(()=>a.pow(2,oe.value)),xe=f(()=>a.pow(1.2,oe.value)),ye=Le(()=>({resource:at.metal,cost(){const Xe=new a(this.amount.value);return a.pow(8,Xe).times(2e5)},display:_(()=>n(x,null,[n("h3",null,[s("Heavy Extractor")]),n("br",null,null),s("Attach extractors to the drill to mine coal and ore, but with a price."),n("br",null,null),s("Divides drill power by 3 to multiply coal gain by 2 and ore gain by 1.2."),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("\xD7"),we(ve.value),s(" drill power"),n("br",null,null),s("\xD7"),we(ie.value),s(" coal/sec"),n("br",null,null),s("\xD7"),we(xe.value),s(" ore/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Ce(u(ye.cost))," ",ye.resource.displayName])),onPurchase(){oe.value=a.add(oe.value,1)},style:{color:l,width:"160px"}})),{min:ee,max:ne,add:Be,remove:Ie}=il({buyable:ye,active:oe}),Se=Me(0),Ue=f(()=>a.pow(Rt[3].bought.value?4:5,Se.value)),fe=f(()=>a.add(Se.value,Kt.value).pow(2).mul(m.value).mul(a.add(D.value,1)).mul(oe.value).mul(o.value).div(1e5)),Oe=Le(()=>({resource:at.metal,cost(){const Xe=new a(this.amount.value);let qt=a.pow(16,Xe).times(2e6);return Rt[4].bought.value&&(qt=qt.div(a.add(Tl.value,1).root(6))),qt},display:_(()=>n(x,null,[n("h3",null,[s("Oil Pump")]),n("br",null,null),s("Pump that oil from the ground."),n("br",null,null),s("Gain oil based on the number of Heavy buildings active and well depth, but coal usage is multiplied by "),Rt[3].bought.value?4:5,s("\xD7."),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("\xD7"),we(Ue.value),s(" coal usage"),n("br",null,null),s("+"),we(fe.value),s(" oil/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Ce(u(Oe.cost)),s(" "),Oe.resource.displayName])),onPurchase(){Se.value=a.add(Se.value,1)},style:{color:l,width:"160px"}})),{max:De,min:qe,add:pe,remove:et}=il({buyable:Oe,active:Se}),X=Me(0),ut=f(()=>a.pow(X.value,2)),We=f(()=>a.pow(X.value,3).mul(1e19)),ze=f(()=>a.add(X.value,1)),se=Le(()=>({resource:O(i),cost(){const Xe=new a(this.amount.value);return a.pow(2,Xe).times(50)},display:_(()=>n(x,null,[n("h3",null,[s("Oil Burner")]),n("br",null,null),s("Burn oil as fuel."),n("br",null,null),s("(Oil Burner Amount)"),n("sup",null,[s("2")]),s(" unit of oil can give 1e19*(Oil Burner Amount)"),n("sup",null,[s("3")]),s(" units of coal."),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),we(ut.value),s(" oil/sec"),n("br",null,null),s("-"),we(We.value),s(" coal consumption"),Rt[2].bought.value?n(x,null,[n("br",null,null),s("\xD7"),we(ze.value),s(" to auto smelting multi")]):"",n("br",null,null),n("br",null,null),s("Cost: "),Ce(u(se.cost)),s(" "),se.resource.displayName])),onPurchase(){X.value=a.add(X.value,1)},style:{color:l,width:"160px"}})),{max:$e,min:dt,add:Mt,remove:ot}=il({buyable:se,active:X}),ct=Me(0),Ke=f(()=>a.pow(ct.value,2).mul(100)),Ge=f(()=>a.add(ct.value,1)),_t=Le(()=>({resource:at.metal,cost(){const Xe=new a(this.amount.value);let qt=a.pow(10,Xe).times(1e7);return Rt[4].bought.value&&(qt=qt.div(a.add(Tl.value,1).root(6))),qt},display:_(()=>n(x,null,[n("h3",null,[s("Oil Smelter")]),n("br",null,null),s("Use oil as a crucible fuel."),n("br",null,null),s("Burn 100*(Oil Smelter amount)"),n("sup",null,[s("2")]),s(" oil to smelt +100% faster."),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),we(Ke.value),s(" oil/sec"),n("br",null,null),s("\xD7"),we(Ge.value),s(" smelting speed"),n("br",null,null),n("br",null,null),s("Cost: "),Ce(u(_t.cost)),s(" "),_t.resource.displayName])),onPurchase(){ct.value=a.add(ct.value,1)},style:{color:l,width:"160px"}})),{max:xt,min:It,add:ue,remove:$}=il({buyable:_t,active:ct}),he=[P(()=>({display:{requirement:"5m Well Depth",effectDisplay:"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)."},shouldEarn:()=>a.gte(o.value,5)})),P(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>a.gte(o.value,10),visibility:()=>y(he[0].earned.value)})),P(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>a.gte(o.value,25),visibility:()=>y(he[1].earned.value)})),P(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>a.gte(o.value,60),visibility:()=>y(he[2].earned.value)})),P(()=>({display:{requirement:"150m Well Depth",effectDisplay:"It appears that coal and metal appear a lot more when you go this deep! Unlock an upgrade apiece for coal and metal!"},shouldEarn:()=>a.gte(o.value,150),visibility:()=>y(he[3].earned.value)})),P(()=>({display:{requirement:"350m Well Depth",effectDisplay:"There is even more coal and metal than you thought. Why don't you utilize your heavy drill to mine them? Unlock a new drill upgrade!"},shouldEarn:()=>a.gte(o.value,350),visibility:()=>y(he[4].earned.value)})),P(()=>({display:{requirement:"1,000m Well Depth",effectDisplay:"You've finally found oil! Maybe it's time to make those oil useful! Unfortunately extracting them would use more coal, and also it's becoming much harder to mine deeper due to the thermal heat and pressure."},shouldEarn:()=>a.gte(o.value,1e3),visibility:()=>y(a.gte(o.value,1e3))})),P(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>a.gte(o.value,3e3),visibility:()=>y(a.gte(o.value,2e3))}))],{collapseMilestones:Ut,display:Jt}=la(he),Ae=[P(()=>({display:{requirement:"100 total oil",effectDisplay:"Hmm, these oil pumps are really expensive. Maybe you should find a way to solve this problem... maybe you can use oil as fuel instead of coal?"},shouldEarn:()=>a.gte(Tl.value,100)})),P(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>a.gte(Tl.value,500),visibility:()=>y(Ae[0].earned.value)})),P(()=>({display:{requirement:"10,000 total oil",effectDisplay:"Wow, this is really bright when you burn it. Maybe it can be helpful to use them to smelt metal?"},shouldEarn:()=>a.gte(Tl.value,1e4),visibility:()=>y(Ae[1].earned.value)}))],{collapseMilestones:Ne,display:pt}=la(Ae),Tt=[q(()=>({resource:L.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per coal Mining Drill owned.",effectDisplay:_(()=>n(x,null,[s("x"),we(st[0].value)]))},style:{color:l}})),q(()=>({resource:at.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per ore Mining Drill owned.",effectDisplay:_(()=>n(x,null,[s("x"),we(st[1].value)]))},style:{color:l}})),q(()=>({resource:L.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:_(()=>n(x,null,[s("x"),we(st[2].value)]))},style:{color:l}})),q(()=>({resource:at.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:_(()=>n(x,null,[s("x"),we(st[3].value)]))},style:{color:l}})),q(()=>({resource:O(i),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:_(()=>n(x,null,[s("+"),we(a.mul(st[4].value,100)),s("%")]))},style:{color:l}}))],st=[f(()=>a.mul(L.buildDrill.amount.value,a.add(.04,lt.value)).add(1)),f(()=>a.mul(at.oreDrill.amount.value,a.add(.04,lt.value)).add(1)),f(()=>a.mul(a.max(L.coal.value,1).log10().floor(),a.add(.06,lt.value)).add(1)),f(()=>a.mul(a.max(at.metal.value,1).log10().floor(),a.add(.1,lt.value)).add(1)),f(()=>a.mul(b.amount.value,.001))],Rt=[q(()=>({resource:O(i),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:l}})),q(()=>({resource:O(i),cost:500,display:{title:"Oil the Mining Drills",description:"Double ore mining speed and square the coal drill amount in its effect."},style:{color:l}})),q(()=>({resource:O(i),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your metal gain."},style:{color:l}})),q(()=>({resource:O(i),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:l}})),q(()=>({resource:O(i),cost:5e4,display:{title:"Be One with the Oil",description:_(()=>n(x,null,[s("Divide metal ingot prices of oil buildings by "),n("sup",null,[s("6")]),n(pl,null,{default:()=>[s("total oil + 1")]})]))},style:{color:l}}))],rl=J(()=>[le(()=>({addend:()=>a.negate(p.value),description:"Heavy Drill",enabled:()=>a.gt(m.value,0)})),g(()=>({multiplier:Ue,description:"Oil Pump",enabled:()=>a.gt(Se.value,0)})),le(()=>({addend:Al,description:"Oil to Coal Substitution",enabled:()=>a.gt(Al.value,0)}))]),ul=f(()=>rl.apply(0)),te=J(()=>[le(()=>({addend:w,description:"Heavy Drill",enabled:()=>a.gt(m.value,0)})),g(()=>({multiplier:ve,description:"Heavy Extractor",enabled:()=>a.gt(oe.value,0)})),g(()=>({multiplier:st[0],description:"Coal Drill Synergy",enabled:Tt[0].bought})),g(()=>({multiplier:st[1],description:"Metal Drill Synergy",enabled:Tt[1].bought})),g(()=>({multiplier:st[2],description:"Coal Drill Upgrade",enabled:Tt[2].bought})),g(()=>({multiplier:st[3],description:"Metal Drill Upgrade",enabled:Tt[3].bought})),g(()=>({multiplier:2,description:"Guide to drilling",enabled:j.upgrades.drillingUpgrade.bought})),g(()=>({multiplier:()=>dl.value,description:"Effectiveness",enabled:()=>a.lt(dl.value,1)}))]),V=f(()=>te.apply(0)),Qe=J(()=>[le(()=>({addend:st[4],description:"Drill Oil",enabled:Tt[4].bought}))]),lt=f(()=>Qe.apply(0)),Pt=J(()=>[le(()=>({addend:fe,description:"Oil Pump",enabled:()=>a.gt(Se.value,0)})),g(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:Rt[0].bought})),g(()=>({multiplier:2,description:"3000m Well Depth",enabled:he[7].earned})),g(()=>({multiplier:2,description:"Oil and where to find it",enabled:j.upgrades.oilUpgrade.bought})),g(()=>({multiplier:()=>dl.value,description:"Effectiveness",enabled:()=>a.lt(dl.value,1)})),g(()=>({multiplier:()=>a.div(Ye.foundationProgress.value,10).floor().div(10).add(1),description:"600% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone3.earned})),g(()=>({multiplier:()=>a.sqrt(R.totalElfLevels.value),description:"Jack Level 4",enabled:R.elfTraining.heatedCutterElfTraining.milestones[3].earned}))]),Ft=f(()=>Pt.apply(0)),Wt=J(()=>[le(()=>({addend:()=>a.negate(ut.value),description:"Oil Burner",enabled:()=>a.gt(X.value,0)})),le(()=>({addend:()=>a.negate(Ke.value),description:"Oil Smelter",enabled:()=>a.gt(ct.value,0)})),le(()=>({addend:()=>a.negate(Ze.oilCost.value),description:"Oil Refinery",enabled:()=>a.gt(Ze.activeRefinery.value,0)}))]),M=f(()=>Wt.apply(0)),Ot=J(()=>[le(()=>({addend:We,description:"Oil Burner",enabled:()=>a.gt(X.value,0)})),g(()=>({multiplier:()=>kl.value,description:"Effectiveness",enabled:()=>a.lt(kl.value,1)}))]),Al=f(()=>Ot.apply(0)),Dl=J(()=>[le(()=>({addend:Je.boosts.red1,description:"Red Dye Boost 1",enabled:()=>a.gte(Je.dyes.red.amount.value,1)}))]),Kt=f(()=>Dl.apply(0)),[cl,tl]=sl(()=>[{title:"Coal Consumption",modifier:rl,unit:"/s",base:0},{title:"Drill Power",modifier:te,base:0},{title:"Upgrade Bonus",modifier:Qe,base:0,visible(){return a.gt(lt.value,0)}},{title:"Oil Speed",modifier:Pt,unit:"/s",base:0,visible(){return a.gt(Ft.value,0)}},{title:"Oil Consumption",modifier:Wt,unit:"/s",base:0,visible(){return a.lt(M.value,0)}},{title:"Oil to Coal Substitution",modifier:Ot,unit:"/s",base:0,visible(){return a.gt(Al.value,0)}},{title:"Extra Oil Pumps",modifier:Dl,base:0,visible(){return a.gt(Kt.value,0)}}]),Il=H(!1),ln=_(()=>n(Et,{modelValue:Il.value,"onUpdate:modelValue":Xe=>Il.value=Xe},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:cl})),dl=H(a.dOne),kl=H(a.dOne);tt.on("update",Xe=>{if(a.lt(U.day.value,Na))return;const qt=a.negate(ul.value);a.gt(qt,0)?(dl.value=a.min(a.div(L.coal.value,qt),1),L.coal.value=a.sub(L.coal.value,a.mul(qt,dl.value).mul(Xe))):dl.value=a.dOne,r.value=a.add(r.value,a.mul(V.value,Xe)),i.value=a.add(i.value,a.mul(Ft.value,Xe)),c();const _a=a.negate(M.value);a.gt(_a,0)?(kl.value=a.min(a.div(i.value,_a),1),i.value=a.sub(i.value,a.mul(_a,kl.value).mul(Xe)).max(0)):kl.value=a.dOne});const{total:Tl,trackerDisplay:an}=bl({resource:i,goal:25e4,name:e,day:Na,color:t,modal:{show:Il,display:ln}});return{name:e,day:Na,color:t,oil:i,totalOil:Tl,depth:o,drillProgress:r,activeHeavy:m,buildHeavy:b,activeHeavy2:D,buildHeavy2:B,activeExtractor:oe,buildExtractor:ye,activePump:Se,buildPump:Oe,activeBurner:X,buildBurner:se,activeSmelter:ct,buildSmelter:_t,extractorCoal:ie,extractorOre:xe,coalEffectiveness:dl,oilEffectiveness:kl,depthMilestones:he,collapsedDepthMilestones:Ut,row1Upgrades:Tt,row2Upgrades:Rt,minWidth:700,oilMilestones:Ae,collapsedOilMilestones:Ne,generalTabCollapsed:tl,display:_(()=>{const Xe=[];return he[1].earned.value&&Xe.push(Tt),Ae[1].earned.value&&Xe.push(Rt),n(x,null,[ce(an),n(Ee,null,null),a.lt(dl.value,1)?n("div",null,[s("Coal efficiency: "),we(a.mul(dl.value,100)),s("%")]):null,a.lt(kl.value,1)?n("div",null,[s("Oil efficiency: "),we(a.mul(kl.value,100)),s("%")]):null,n(Gt,{resource:i,color:t,sticky:!0,productionDisplay:_(()=>n(x,null,[a.lt(o.value,1e3)?"Reach 1000m to start gaining oil":n(x,null,[va(a.add(Ft.value,M.value))])]))},null),a.eq(Ft.value,0)?n(x,null,[s("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),n("br",null,null)]):"",n(Hl,null,{default:()=>[he[6].earned.value?n(Qt,null,{default:()=>[ce(Oe),n("div",null,[Ce(a.floor(Se.value)),s("/"),Ce(a.floor(Oe.amount.value))]),it(qe,et,pe,De)]}):null,Ae[0].earned.value?n(Qt,null,{default:()=>[ce(se),n("div",null,[Ce(a.floor(X.value)),s("/"),Ce(a.floor(se.amount.value))]),it(dt,ot,Mt,$e)]}):null,Ae[2].earned.value?n(Qt,null,{default:()=>[ce(_t),n("div",null,[Ce(a.floor(ct.value)),s("/"),Ce(a.floor(_t.amount.value))]),it(It,$,ue,xt)]}):null]}),n("br",null,null),n("div",null,[n("span",null,[s("The well is ")]),n("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[Ce(o.value)]),s("m deep"),n("br",null,null),s("Next at "),we(a.sub(d.value,r.value))," ",s("drill power seconds")]),n("div",null,[n("span",null,[s("Your drill power is ")]),n("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[we(V.value)])]),n(Ee,null,null),n(Hl,null,{default:()=>[n(Qt,null,{default:()=>[ce(b),n("div",null,[Ce(a.floor(m.value)),s("/"),Ce(a.floor(b.amount.value))]),it(C,N,S,v)]}),he[3].earned.value?n(Qt,null,{default:()=>[ce(B),n("div",null,[Ce(a.floor(D.value)),s("/"),Ce(a.floor(B.amount.value))]),it(E,ae,Z,F)]}):null,he[5].earned.value?n(Qt,null,{default:()=>[ce(ye),n("div",null,[Ce(a.floor(oe.value)),s("/"),Ce(a.floor(ye.amount.value))]),it(ee,Ie,Be,ne)]}):null]}),n(Ee,null,null),Ml(...Xe),n(Ee,null,null),Jt(),a.gte(Tl.value,50)?pt():""])}),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),we(i.value),s(" "),i.displayName]))}}),wr="metal",oi=7,at=$t(wr,function(){const e="Metal",t="#888B8D",l=ht(0,"metal ingots",void 0,!0),i=ti(l),o=ht(0,"ore"),r=ti(o),d=J(()=>[g(()=>({multiplier:5,description:"Crucible",enabled:ne.bought})),g(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>a.gte(fe.amount.value,1)})),g(()=>({multiplier:2,description:"Industrial Furnace",enabled:Ie.bought})),g(()=>({multiplier:()=>a.add(qe.value,1),description:"Hotter Forges",enabled:()=>a.gte(De.amount.value,1)})),g(()=>({multiplier:2,description:"Carry metal in boxes",enabled:nt.row2Upgrades.metalUpgrade.bought})),g(()=>({multiplier:Je.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Je.dyes.purple.amount.value,1)})),g(()=>({multiplier:()=>a.add(ft.cloth.value,1).log10().plus(1),description:"Glistening Paint",enabled:Je.upgrades.redDyeUpg.bought})),g(()=>({multiplier:()=>a.div(Ye.foundationProgress.value,10).floor().div(10).add(1),description:"400% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone2.earned})),ml(()=>({exponent:1.1,description:"Mary Level 2",enabled:R.elfTraining.heatedPlanterElfTraining.milestones[1].earned}))]),c=f(()=>d.apply(.1)),m=J(()=>[le(()=>({addend:()=>a.times(fe.amount.value,10),description:"Industrial Crucibles",enabled:()=>a.gte(fe.amount.value,1)})),g(()=>({multiplier:2,description:"Efficient Crucibles",enabled:L.efficientSmelther.bought})),g(()=>({multiplier:()=>a.mul(de.activeSmelter.value,de.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>a.gt(de.activeSmelter.value,0)})),g(()=>({multiplier:Je.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Je.dyes.purple.amount.value,1)})),g(()=>({multiplier:()=>a.add(Ze.activeRefinery.value,1).sqrt(),description:"De Louvre",enabled:Je.upgrades.redDyeUpg2.bought})),g(()=>({multiplier:()=>a.div(R.totalElfExp.value,1e3).add(1).sqrt(),description:"Mary Level 5",enabled:R.elfTraining.heatedPlanterElfTraining.milestones[4].earned}))]),p=f(()=>m.apply(0)),w=J(()=>[g(()=>({multiplier:3,description:"Efficient Crucibles",enabled:L.efficientSmelther.bought})),g(()=>({multiplier:()=>a.add(de.activeBurner.value,1).mul(de.oilEffectiveness.value),description:"Blaster Burner",enabled:de.row2Upgrades[2].bought}))]),b=f(()=>w.apply(1)),C=1e10,v=f(()=>a.min(o.value,a.div(L.coal.value,C)).floor().max(0)),S=Lt(()=>({display:_(()=>{const se=a.gte(v.value,1)?v.value:a.add(v.value,1);return n(x,null,[n("span",{style:"font-size: large"},[s("Smelt "),we(a.times(v.value,c.value))," ",l.displayName]),n("br",null,null),n("span",{style:"font-size: large"},[s("Cost: "),Ce(se),s(" "),o.displayName,s(";")," ",Ce(a.times(se,C)),s(" "),L.coal.displayName])])}),canClick:()=>a.gte(v.value,1),onClick(){!u(this.canClick)||N(v.value)},style:{width:"600px",minHeight:"unset"}}));function N(se,$e=1){const[dt,Mt,ot]=[a.times(se,c.value).times($e),se,a.times(se,C)];l.value=a.add(l.value,dt),o.value=a.sub(o.value,Mt),L.coal.value=a.sub(L.coal.value,ot)}const D=J(()=>[le(()=>({addend:()=>Ue.amount.value,description:"Mining Drills",enabled:()=>a.gte(Ue.amount.value,1)})),g(()=>({multiplier:()=>a.mul(de.depth.value,.05).add(1),description:"25m Well Depth",enabled:de.depthMilestones[2].earned})),g(()=>({multiplier:de.extractorOre,description:"Heavy Extractor",enabled:()=>a.gt(de.activeExtractor.value,0)})),g(()=>({multiplier:2,description:"Carry ore in boxes",enabled:nt.row2Upgrades.oreUpgrade.bought}))]),z=f(()=>D.apply(1)),B=J(()=>[g(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:ye.bought})),g(()=>({multiplier:2,description:"Double Pickaxe",enabled:ee.bought})),g(()=>({multiplier:2.5,description:"Mining Drills",enabled:()=>a.gte(Ue.amount.value,1)})),g(()=>({multiplier:2,description:"Efficient Drills",enabled:Se.bought})),g(()=>({multiplier:2,description:"Oil the Mining Drills",enabled:de.row2Upgrades[1].bought}))]),E=f(()=>B.apply(a.recip(Z))),F=Me(0),Z=10,ae=el(()=>({width:400,height:25,direction:Fe.Right,fillStyle:{backgroundColor:t},progress:()=>F.value})),oe=J(()=>[le(()=>({addend:z})),g(()=>({multiplier:E}))]),ve=f(()=>oe.apply(0)),ie=J(()=>[le(()=>({addend:ve})),le(()=>({addend:()=>a.negate(p.value),enabled:Oe}))]),xe=f(()=>ie.apply(0)),ye=q(()=>({resource:O(l),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.

Halve the time to mine more ore"}})),ee=q(()=>({resource:O(l),cost:.1,display:{title:"Double Pickaxe",description:"This is too slow. What if you swung two pickaxes at once?

Halve the time to mine ore, again"},visibility:()=>y(ee.bought.value)})),ne=q(()=>({resource:O(l),cost:1,display:{title:"Crucible",description:"Smelting this all by hand is rather painful, and a lot of the metal is left in the slag. A small crucible should help a lot!

Increase the metal extracted per ore by 5x"},visibility:()=>y(ne.bought.value||a.div(r.value,c.value).plus(i.value).gte(1))})),Be=q(()=>({resource:O(l),cost:0,display:{title:"Coal Drilling",description:"These mining drills are pretty powerful, mining more ore than you can actually smelt. Could be worth making some to mine coal instead"},visibility:()=>y(a.gte(Ue.amount.value,1)&&(Be.bought.value||U.days[7].opened.value||a.lt(L.computedCoalGain.value,a.times(z.value,E.value).times(C)))),onPurchase(){U.days[2].recentlyUpdated.value=!0}})),Ie=q(()=>({canAfford(){return a.gte(l.value,50)&&a.gte(L.coal.value,1e11)},onPurchase(){l.value=a.sub(l.value,50),L.coal.value=a.sub(L.coal.value,1e11)},display:{title:"Industrial Furnace",description:`Moving smelting out of the open air and into a dedicated furnace should make efficiency even better. Double metal gained per ore +`+o[fa])}),Gl[e.id].clear()});const vt=Symbol("ProxyState"),Ll=Symbol("ProxyPath");function Ht(e,t={}){const l=t;let i=!1;function o(){return i||(Object.assign(l,e(l)),i=!0),l}return new Proxy(l,{get(r,d){if(d===vt)return o();const c=o()[d];return c&&typeof c=="object"&&ta in c?c[ta]:c},set(r,d,c){return o()[d]=c,!0},has(r,d){return d===vt?!0:Reflect.has(o(),d)},ownKeys(){return Reflect.ownKeys(o())},getOwnPropertyDescriptor(r,d){return i||(Object.assign(l,e(l)),i=!0),Object.getOwnPropertyDescriptor(r,d)}})}var gt=window.state=wa({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Ni=ia({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Di(e){return JSON.stringify(e,(t,l)=>u(l))}const Ii={get(e,t){var i;if(t===vt||t===Ll)return e[t];const l=e[vt][t];if(t!=="value"&&(pn(l)||Array.isArray(l))){if(l!==((i=e[t])==null?void 0:i[vt])){const o=[...e[Ll],t];e[t]=new Proxy({[vt]:l,[Ll]:o},Ii)}return e[t]}return l},set(e,t,l,i){if(!gt.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof a&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const o=e[vt][t];if(!(typeof o=="number"&&isNaN(o)||o instanceof a&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.mag))))throw Ni.autosave=!1,gt.hasNaN=!0,gt.NaNPath=[...e[Ll],t],gt.NaNReceiver=i,console.error("Attempted to set NaN value",[...e[Ll],t],e[vt]),"Attempted to set NaN value. See above for details"}return e[vt][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[vt])},has(e,t){return Reflect.has(e[vt],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[vt],t)}};var me=window.player=new Proxy({[vt]:Ni,[Ll]:["player"]},Ii);function Ti(e={}){return Object.assign({id:`${je.id}-0`,name:"Default Save",tabs:je.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:je.id,modVersion:je.versionNumber,layers:{}},e)}function al(e){const t=El.compressToUTF16(Di(e!=null?e:me[vt]));return localStorage.setItem((e!=null?e:me[vt]).id,t),t}async function Io(){Po();try{let e=localStorage.getItem(mt.active);if(e==null){await Ul(Ql());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=El.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==je.id){await Ul(Ql());return}t.id=mt.active,await Ul(t)}catch(e){console.error(`Failed to load save. Falling back to new save. +`,e),await Ul(Ql())}}function Ql(){const e=da(),t=Ti({id:e});return al(t),mt.saves.push(e),t}function da(){let e,t=0;do e=`${je.id}-${t++}`;while(localStorage.getItem(e));return e}const Ga=H(!1);async function Ul(e){console.info("Loading save",e),Ga.value=!0;const{layers:t,removeLayer:l,addLayer:i}=await pa(()=>Promise.resolve().then(function(){return Bo}),void 0),{fixOldSave:o,getInitialLayers:r}=await pa(()=>Promise.resolve().then(function(){return Ir}),void 0);for(const d in t){const c=t[d];c&&l(c)}r(e).forEach(d=>i(d,e)),e=Ti(e),e.offlineProd&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,je.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==je.versionNumber&&(o(e.modVersion,e),e.modVersion=je.versionNumber),Object.assign(me,e),mt.active=me.id,lt.emit("onLoad")}setInterval(()=>{me.autosave&&al()},1e3);window.onbeforeunload=()=>{me.autosave&&al()};window.save=al;const To=window.hardReset=async()=>{await Ul(Ql())},la=ia({active:"",saves:[],showTPS:!0,theme:Fa.Nordic,unthrottled:!1});jt(la,e=>{const t=El.compressToUTF16(JSON.stringify(e));localStorage.setItem(je.id,t)},{deep:!0});var mt=window.settings=la;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Fa.Nordic};lt.emit("loadSettings",e),Object.assign(la,e),To()};function Po(){try{let e=localStorage.getItem(je.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=El.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(la,t)}lt.emit("loadSettings",la)}catch{}}const Pi=ia([]);function Fo(e){Pi.push(e)}const Fi=ia([]);function Uo(e){Fi.push(e)}const Ro=ia([]),Oo={class:"table"},Qt=_e({__name:"Column",setup(e){const t=f(()=>zl[mt.theme].mergeAdjacent);return(l,i)=>(k(),T("div",Oo,[h("div",{class:bt(["col",{mergeAdjacent:u(t)}])},[Xt(l.$slots,"default")],2)]))}}),qo={class:"table"},Vl=_e({__name:"Row",setup(e){const t=f(()=>zl[mt.theme].mergeAdjacent);return(l,i)=>(k(),T("div",qo,[h("div",{class:bt(["row",{mergeAdjacent:u(t)}])},[Xt(l.$slots,"default")],2)]))}});function Qa(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!sn(e)}function He(e,t="span"){return typeof e=="function"?_e({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}`),_e({template:e})):_e({render:()=>({})}):e}function ce(e){if(fl(e))return typeof e=="function"?e():He(e);const t=e[Bl];return n(t,e[Nl](),null)}function nt(...e){let t;return n(Vl,null,Qa(t=e.map(ce))?t:{default:()=>[t]})}function Zt(...e){let t;return n(Qt,null,Qa(t=e.map(ce))?t:{default:()=>[t]})}function Ml(...e){return n("div",{class:"table-grid"},[e.map(t=>n("div",{class:{["row-grid"]:!0,mergeAdjacent:zl[mt.theme].mergeAdjacent}},[t.map(ce)]))])}function nl(e){if(fl(e))return typeof e=="function"?e():typeof e=="string"?n(M,null,[e]):n(e,null,null);const t=e[Bl];return n(t,e[Nl](),null)}function Lo(...e){let t;return n(Qt,null,Qa(t=e.map(nl))?t:{default:()=>[t]})}function fl(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[ea]===!0}function Ui(e,t,l){const i=H(null),o=H(void 0);function r(m){i.value||(i.value=setInterval(c,250)),o.value=m,l&&(l.value=!0)}function d(){i.value&&(clearInterval(i.value),i.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(o.value)}return pi(d),{start:r,stop:d,handleHolding:c}}function Go(e,t){const l=f(()=>e.filter(i=>u(i.visibility)===kt.Visible&&t(i)));return{firstFeature:f(()=>l.value[0]),collapsedContent:_(()=>Zt(...l.value.slice(1))),hasCollapsedContent:f(()=>l.value.length>1)}}function ga(e,t="div"){const l=Yt();return Vt(()=>{l.value=He(St(e),t)}),l}function gl(e,t="div"){const l=Yt(null);return Vt(()=>{const i=St(e);l.value=i==null?null:He(i,t)}),l}function Qo(e){return f(()=>St(e))}function St(e){return u(u(e))}function K(...e){return e.includes(Object)||e.push(Object),e}const Ee=_e({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(k(),T("div",{style:At({width:e.width,height:e.height})},null,4))}});const $o={},Ho={class:"notif"};function Vo(e,t){return k(),T("div",Ho,"!")}var ei=Ve($o,[["render",Vo],["__scopeId","data-v-66323fd4"]]),jo=_e({props:{element:Object,display:{type:K(Object,String,Function),required:!0},style:K(Object,String,Array),classes:K(Object),direction:K(String),xoffset:K(String),yoffset:K(String),pinned:Object},setup(e){const{element:t,display:l,pinned:i}=Dt(e),o=H(!1),r=f(()=>(St(i)||o.value)&&d.value),d=gl(l),c=Yt(He(_(()=>{const w=St(t);return w==null?"":nl(w)})));function m(w){const b=i;w.shiftKey&&b&&(b.value=!b.value,w.stopPropagation(),w.preventDefault())}const p=f(()=>St(i)&&zl[mt.theme].showPin);return{Direction:Fe,isHovered:o,isShown:r,comp:d,elementComp:c,unref:u,togglePinned:m,showPin:p}}});const zo={key:0,class:"material-icons pinned"};function Jo(e,t,l,i,o,r){return k(),T("div",{class:bt(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=d=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=d=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...d)=>e.togglePinned&&e.togglePinned(...d))},[Xt(e.$slots,"default",{},void 0,!0),e.elementComp?(k(),be(ut(e.elementComp),{key:0})):G("",!0),n(ba,{name:"fade"},{default:ge(()=>{var d;return[e.isShown?(k(),T("div",{key:0,class:bt(["tooltip",{top:e.unref(e.direction)===e.Direction.Up,left:e.unref(e.direction)===e.Direction.Left,right:e.unref(e.direction)===e.Direction.Right,bottom:e.unref(e.direction)===e.Direction.Down,...e.unref(e.classes)}]),style:At([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(d=e.unref(e.style))!=null?d:{}])},[e.showPin?(k(),T("span",zo,"push_pin")):G("",!0),e.comp?(k(),be(ut(e.comp),{key:1})):G("",!0)],6)):G("",!0)]}),_:1})],34)}var yt=Ve(jo,[["render",Jo],["__scopeId","data-v-6102fa3a"]]);const Aa=e=>(yl("data-v-14ecc7bd"),e=e(),hl(),e),Wo={key:0,class:"day feature dontMerge opened"},Ko={class:"date"},Xo=s("Dec"),Yo=Aa(()=>h("br",null,null,-1)),Zo={class:"date"},es=s("Dec"),ts=Aa(()=>h("br",null,null,-1)),ls=Aa(()=>h("div",{class:"doors"},null,-1)),as={class:"date"},is=s("Dec"),ns=Aa(()=>h("br",null,null,-1)),os={key:0,class:"material-icons lock"},ss={key:1,class:"timer"},rs=_e({__name:"Day",props:{day:null,symbol:null,layer:null,opened:null,recentlyUpdated:null,shouldNotify:null},emits:["openLore","openLayer","unlockLayer"],setup(e,{emit:t}){const l=e,i=f(()=>l.layer&&a.gte(U.day.value,l.day)&&new Date().getMonth()===11&&new Date().getDate()>=l.day);function o(){i.value&&t("unlockLayer")}return(r,d)=>{var c,m,p;return e.opened.value?(k(),T("div",Wo,[n(yt,{display:(p=(m=u(Bt)[(c=e.layer)!=null?c:""])==null?void 0:m.name)!=null?p:"",direction:u(Fe).Up,yoffset:"5px"},{default:ge(()=>[n(ba,{appear:"",name:"door"},{default:ge(()=>[h("div",{class:"doors",onClick:d[0]||(d[0]=w=>t("openLayer"))},[h("div",Ko,[Xo,Yo,s(Te(e.day),1)]),h("div",Zo,[es,ts,s(Te(e.day),1)])])]),_:1}),h("div",{class:"icon",onClick:d[1]||(d[1]=w=>t("openLayer")),style:At({backgroundImage:`url(${e.symbol})`})},null,4),h("div",{class:"lore",onClick:d[2]||(d[2]=w=>t("openLore"))},"?"),u(e.shouldNotify)?(k(),be(ei,{key:0})):G("",!0)]),_:1},8,["display","direction"])])):(k(),T("div",{key:1,class:bt(["day feature dontMerge",{can:u(i),locked:!u(i),canOpen:u(i)}]),onClick:o},[ls,h("div",as,[is,ns,s(Te(e.day),1)]),u(i)?G("",!0):(k(),T("div",os,"lock")),u(U).day.value===e.day&&!u(i)?(k(),T("div",ss,Te(u(U).timeUntilNewDay.value<0?"NYI, sorry":u(Pa)(u(U).timeUntilNewDay.value,0)),1)):G("",!0),u(i)?(k(),be(ei,{key:2})):G("",!0)],2))}}});var us=Ve(rs,[["__scopeId","data-v-14ecc7bd"]]);const ds=_e({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,l=ga(ol(t,"display")),i=ga(ol(t,"content"));return(o,r)=>(k(),be(Qt,{class:"collapsible-container"},{default:ge(()=>[h("button",{onClick:r[0]||(r[0]=d=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(k(),be(ut(u(l))))]),e.collapsed.value?G("",!0):(k(),be(ut(u(i)),{key:0}))]),_:1}))}});var cs=Ve(ds,[["__scopeId","data-v-a72c16aa"]]);const ps={key:0},ms={key:0,class:"mark star"},vs=["src"],fs=_e({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,l)=>e.mark?(k(),T("div",ps,[e.mark===!0?(k(),T("div",ms)):(k(),T("img",{key:1,class:"mark",src:e.mark},null,8,vs))])):G("",!0)}});var ka=Ve(fs,[["__scopeId","data-v-2207999f"]]);const gs=_e({__name:"Node",props:{id:null},setup(e){const l=Dt(e),i=ca(Ua,()=>{}),o=ca(Ra,()=>{}),r=Yt(null),d=f(()=>r.value&&r.value.parentElement);return jt([d,l.id],([c,m],[p,w])=>{p&&o(u(w)),c&&i(m,c)}),pi(()=>o(u(l.id))),(c,m)=>(k(),T("div",{class:"node",ref_key:"node",ref:r},null,512))}});var na=Ve(gs,[["__scopeId","data-v-a48cb382"]]);const ys=_e({props:{progress:{type:K(String,Object,Number),required:!0},width:{type:K(Number),required:!0},height:{type:K(Number),required:!0},direction:{type:K(String),required:!0},display:K(Object,String,Function),visibility:{type:K(Number),required:!0},style:K(Object,String,Array),classes:K(Object),borderStyle:K(Object,String,Array),textStyle:K(Object,String,Array),baseStyle:K(Object,String,Array),fillStyle:K(Object,String,Array),mark:K(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:ka,Node:na},setup(e){const{progress:t,width:l,height:i,direction:o,display:r}=Dt(e),d=f(()=>{let p=t.value instanceof a?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(p,0),1))*100}),c=f(()=>{const p={width:St(l)+.5+"px",height:St(i)+.5+"px"};switch(u(o)){case Fe.Up:p.clipPath=`inset(${d.value}% -2px -2px -2px)`,p.width=St(l)+2+"px";break;case Fe.Down:p.clipPath=`inset(-2px -2px ${d.value}% -2px)`,p.width=St(l)+2+"px";break;case Fe.Right:p.clipPath=`inset(-2px ${d.value}% -2px -2px)`;break;case Fe.Left:p.clipPath=`inset(-2px -2px -2px ${d.value} + '%)`;break;case Fe.Default:p.clipPath="inset(-2px 50% -2px -2px)";break}return p}),m=gl(r);return{normalizedProgress:d,barStyle:c,component:m,unref:u,Visibility:kt}}});function hs(e,t,l,i,o,r){var m,p,w,b,C,v,S;const d=xl("MarkNode"),c=xl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),T("div",{key:0,style:At([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(m=e.unref(e.style))!=null?m:{}]),class:bt({bar:!0,...e.unref(e.classes)})},[h("div",{class:"overlayTextContainer border",style:At([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(p=e.unref(e.borderStyle))!=null?p:{}])},[e.component?(k(),T("span",{key:0,class:"overlayText",style:At(e.unref(e.textStyle))},[(k(),be(ut(e.component)))],4)):G("",!0)],4),h("div",{class:"border",style:At([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(w=e.unref(e.style))!=null?w:{},(b=e.unref(e.baseStyle))!=null?b:{},(C=e.unref(e.borderStyle))!=null?C:{}])},[h("div",{class:"fill",style:At([e.barStyle,(v=e.unref(e.style))!=null?v:{},(S=e.unref(e.fillStyle))!=null?S:{}])},null,4)],4),n(d,{mark:e.unref(e.mark)},null,8,["mark"]),n(c,{id:e.id},null,8,["id"])],6)):G("",!0)}var bs=Ve(ys,[["render",hs],["__scopeId","data-v-730cc7a0"]]);const ws=Symbol("Bar");function el(e){return Ht(()=>{const t=e();return t.id=jl("bar-"),t.type=ws,t[Bl]=bs,W(t,"visibility"),Nt(t,"visibility",kt.Visible),W(t,"width"),W(t,"height"),W(t,"direction"),W(t,"style"),W(t,"classes"),W(t,"borderStyle"),W(t,"baseStyle"),W(t,"textStyle"),W(t,"fillStyle"),W(t,"progress"),W(t,"display"),W(t,"mark"),t[Nl]=function(){const{progress:l,width:i,height:o,direction:r,display:d,visibility:c,style:m,classes:p,borderStyle:w,textStyle:b,baseStyle:C,fillStyle:v,mark:S,id:N}=this;return{progress:l,width:i,height:o,direction:r,display:d,visibility:c,style:u(m),classes:p,borderStyle:w,textStyle:b,baseStyle:C,fillStyle:v,mark:S,id:N}},t})}var As=_e({props:{display:{type:K(Object,String,Function),required:!0},visibility:{type:K(Number),required:!0},style:K(Object,String,Array),classes:K(Object),onClick:Function,onHold:Function,canClick:{type:K(Boolean),required:!0},small:Boolean,mark:K(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:na,MarkNode:ka},setup(e){const{display:t,onClick:l,onHold:i}=Dt(e),o=Yt("");Vt(()=>{const c=St(t);if(c==null){o.value="";return}if(fl(c)){o.value=He(c);return}const m=He(c.title||"","h3"),p=He(c.description,"div");o.value=He(_(()=>n("span",null,[c.title?n("div",null,[n(m,null,null)]):null,n(p,null,null)])))});const{start:r,stop:d}=Ui(l,i,e.isHolding);return{start:r,stop:d,comp:o,Visibility:kt,unref:u}}});function ks(e,t,l,i,o,r){var m;const d=xl("MarkNode"),c=xl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),T("button",{key:0,style:At([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(m=e.unref(e.style))!=null?m:[]]),onClick:t[0]||(t[0]=(...p)=>e.onClick&&e.onClick(...p)),onMousedown:t[1]||(t[1]=(...p)=>e.start&&e.start(...p)),onMouseleave:t[2]||(t[2]=(...p)=>e.stop&&e.stop(...p)),onMouseup:t[3]||(t[3]=(...p)=>e.stop&&e.stop(...p)),onTouchstartPassive:t[4]||(t[4]=(...p)=>e.start&&e.start(...p)),onTouchendPassive:t[5]||(t[5]=(...p)=>e.stop&&e.stop(...p)),onTouchcancelPassive:t[6]||(t[6]=(...p)=>e.stop&&e.stop(...p)),class:bt({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(k(),be(ut(e.unref(e.comp)),{key:0})):G("",!0),n(d,{mark:e.unref(e.mark)},null,8,["mark"]),n(c,{id:e.id},null,8,["id"])],38)):G("",!0)}var Ri=Ve(As,[["render",ks],["__scopeId","data-v-8cedd7da"]]);const Cs=Symbol("Clickable");function Lt(e){return Ht(()=>{var l;const t=(l=e==null?void 0:e())!=null?l:{};if(t.id=jl("clickable-"),t.type=Cs,t[Bl]=Ri,t.isHolding=H(!1),W(t,"visibility"),Nt(t,"visibility",kt.Visible),W(t,"canClick"),Nt(t,"canClick",!0),W(t,"classes"),W(t,"style"),W(t,"mark"),W(t,"display"),t.onClick){const i=t.onClick.bind(t);t.onClick=function(o){u(t.canClick)&&i(o)}}if(t.onHold){const i=t.onHold.bind(t);t.onHold=function(){u(t.canClick)&&i()}}return t[Nl]=function(){const{display:i,visibility:o,style:r,classes:d,onClick:c,onHold:m,isHolding:p,canClick:w,small:b,mark:C,id:v}=this;return{display:i,visibility:o,style:u(r),classes:d,onClick:c,onHold:m,isHolding:p,canClick:w,small:b,mark:C,id:v}},t})}function ht(e,t="points",l=0,i=void 0){const o=wt(e)?e:Me(e);if(o.displayName=t,o.precision=l,o.small=i,!wt(e)){const r=o[ta];r.displayName=t,r.precision=l,r.small=i}return o}function ti(e){const t=Me(e.value);return jt(e,l=>{Ga.value||a.gt(l,t.value)&&(t.value=l)}),t}function Es(e){const t=Me(e.value);return jt(e,(l,i)=>{Ga.value||a.gt(l,i)&&(t.value=a.add(t.value,a.sub(l,i)))}),t}new a("10^^8");new a("1e100");function oa(e,t){const l=t!=null?t:e.value;return a.eq(e.precision,0)?Y(e.small?l:a.floor(l)):Q(l,e.precision,e.small)}const _s=["x1","y1","x2","y2"],Ss=_e({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const l=Dt(e),i=f(()=>{const r=l.startNode.value.rect,d=l.boundingRect.value,c=d?{x:r.x+r.width/2-d.x,y:r.y+r.height/2-d.y}:{x:0,y:0};return l.link.value.offsetStart&&(c.x+=l.link.value.offsetStart.x,c.y+=l.link.value.offsetStart.y),c}),o=f(()=>{const r=l.endNode.value.rect,d=l.boundingRect.value,c=d?{x:r.x+r.width/2-d.x,y:r.y+r.height/2-d.y}:{x:0,y:0};return l.link.value.offsetEnd&&(c.x+=l.link.value.offsetEnd.x,c.y+=l.link.value.offsetEnd.y),c});return(r,d)=>(k(),T("line",Ol({"stroke-width":"15px",stroke:"white"},e.link,{x1:u(i).x,y1:u(i).y,x2:u(o).x,y2:u(o).y}),null,16,_s))}});const Ms=_e({__name:"Links",props:{links:null},setup(e){var m;const l=ol(e,"links"),i=H(null),o=ca(Oa,H({})),r=ca(qa,H(void 0)),d=H((m=i.value)==null?void 0:m.getBoundingClientRect());jt(r,()=>{var p;return d.value=(p=i.value)==null?void 0:p.getBoundingClientRect()}),ya(()=>{var p;return d.value=(p=i.value)==null?void 0:p.getBoundingClientRect()});const c=f(()=>{var w,b;const p=o.value;return(b=(w=l.value)==null?void 0:w.filter(C=>{var v,S;return((v=p[C.startNode.id])==null?void 0:v.rect)&&((S=p[C.startNode.id])==null?void 0:S.rect)}))!=null?b:[]});return(p,w)=>(k(),T(M,null,[u(c)?(k(),T("svg",rn(Ol({key:0},p.$attrs)),[(k(!0),T(M,null,mi(u(c),(b,C)=>(k(),be(Ss,{key:C,link:b,boundingRect:d.value,startNode:u(o)[b.startNode.id],endNode:u(o)[b.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):G("",!0),h("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var xs=Ve(Ms,[["__scopeId","data-v-063f6d6b"]]);_e({props:{nodes:{type:K(Array),required:!0},leftSideNodes:K(Array),rightSideNodes:K(Array),branches:K(Array)},components:{Links:xs},setup(e){const{nodes:t,leftSideNodes:l,rightSideNodes:i}=Dt(e),o=Yt();Vt(()=>{const c=St(t);o.value=He(_(()=>n(M,null,[c.map(m=>n("span",{class:"row tree-row",style:"margin: 50px auto;"},[m.map(nl)]))])))});const r=Yt();Vt(()=>{const c=St(l);r.value=c?He(_(()=>n("span",{class:"left-side-nodes small"},[c.map(nl)]))):""});const d=Yt();return Vt(()=>{const c=St(i);d.value=c?He(_(()=>n("span",{class:"side-nodes small"},[c.map(nl)]))):""}),{unref:u,nodesComp:o,leftNodesComp:r,rightNodesComp:d}}});_e({props:{display:K(Object,String,Function),visibility:{type:K(Number),required:!0},style:K(String,Object,Array),classes:K(Object),onClick:Function,onHold:Function,color:K(String),glowColor:K(String),canClick:{type:K(Boolean),required:!0},mark:K(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:ka,Node:na},setup(e){const{onClick:t,onHold:l,display:i}=Dt(e),o=gl(i),{start:r,stop:d}=Ui(t,l);return{start:r,stop:d,comp:o,unref:u,Visibility:kt,isCoercableComponent:fl}}});function sl(e){const t=[],l={};let i=!1;function o(){return i||(t.push(...e()),l.base=t.map(c=>Ct(c.base)),l.baseText=t.map(c=>Ct(c.baseText)),l.visible=t.map(c=>Ct(c.visible)),i=!0),t}const r=Me({});return[_(()=>{const c=o();let m=!0;const p=c.map((w,b)=>{var N,D,z;if(u(l.visible[b])===!1)return null;const C=n("h3",{onClick:()=>r.value[b]=!r.value[b],style:"cursor: pointer"},[n("span",{class:"modifier-toggle"+(u(r.value[b])?" collapsed":"")},[s("\u25BC")]),w.title,w.subtitle?n("span",{class:"subtitle"},[s(" ("),w.subtitle,s(")")]):null]),v=u(r.value[b])?null:n(M,null,[n("div",{class:"modifier-container"},[n("span",{class:"modifier-description"},[nl((N=u(l.baseText[b]))!=null?N:"Base")]),n("span",{class:"modifier-amount"},[Q((D=u(l.base[b]))!=null?D:1),w.unit])]),nl(u(w.modifier.description))]),S=!m;return m=!1,n(M,null,[S?n("br",null,null):null,n("div",null,[C,n("br",null,null),v,n("hr",null,null),n("div",{class:"modifier-container"},[n("span",{class:"modifier-description"},[s("Total")]),n("span",{class:"modifier-amount"},[Q(w.modifier.apply((z=u(l.base[b]))!=null?z:1)),w.unit])])])])});return n(M,null,[p])}),r]}function aa(e){const t=Object.values(e).reverse(),l=Me(!0),i=f(()=>t.filter(m=>m.earned.value===!1)),{firstFeature:o,collapsedContent:r,hasCollapsedContent:d}=Go(t,m=>m.earned.value),c=_(()=>{const m=[...i.value];return o.value&&m.push(o.value),Lo(...m,_(()=>ha(n(cs,{collapsed:l,content:r,display:l.value?"Show other completed milestones":"Hide other completed milestones"},null),[[ci,u(d)]])))});return{collapseMilestones:l,display:c}}function bl(e){const t=e.ignoreTotal?e.resource:Es(e.resource),l=()=>{var c,m;if(U.day.value!==e.day)return 1;let r=a.add(t.value,1),d=e.goal;return((m=(c=e.usingLog)==null?void 0:c.value)!=null?m:me.usingLog)&&(r=r.log10(),d=a.log10(d)),a.div(r,d)},i=el(()=>({direction:Fe.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:l,display:_(()=>U.day.value===e.day?n(M,null,[Ce(t.value),s("/"),Ce(e.goal)]):"")})),o=_(()=>n(M,null,[n("div",null,[U.day.value===e.day?n(M,null,[s("Reach "),Ce(e.goal),s(" "),e.ignoreTotal?"":"total ",e.resource.displayName,s(" to complete the day")]):n(M,null,[e.name,s(" Complete!")]),e.modal?n(M,null,[" ",s("-")," ",n("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[s("Check Modifiers")])]):void 0]),ce(i),e.modal?ce(e.modal.display):void 0]));return Vt(()=>{U.day.value===e.day&&a.gte(t.value,e.goal)&&U.completeDay()}),{total:t,trackerDisplay:o}}function il(e){var d;const t=(d=e.style)!=null?d:{minHeight:"20px",width:"40px",color:"var(--foreground)"},l=Lt(()=>({display:"0",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=0}})),i=Lt(()=>({display:"-",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=a.sub(e.active.value,1)}})),o=Lt(()=>({display:"+",style:t,canClick(){return a.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=a.add(e.active.value,1)}})),r=Lt(()=>({display:"Max",style:t,canClick(){return a.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=e.buyable.amount.value}}));return{min:l,remove:i,add:o,max:r}}const Bs=Symbol("Buyable");function Le(e){const t=Me(0);return Ht(()=>{var r,d,c;const l=e();if(l.canPurchase==null&&(l.resource==null||l.cost==null))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",l),"Cannot create buyable without a canPurchase property or a resource and cost property";l.id=jl("buyable-"),l.type=Bs,l[Bl]=Ri,l.amount=t,l.amount[Sl]=(r=l.initialValue)!=null?r:0,l.canAfford=f(()=>{const m=l,p=u(m.cost);return m.resource!=null&&p!=null&&a.gte(m.resource.value,p)}),l.canPurchase==null&&(l.canPurchase=f(()=>u(l.visibility)===kt.Visible&&u(l.canAfford)&&a.lt(l.amount.value,u(l.purchaseLimit)))),l.maxed=f(()=>a.gte(l.amount.value,u(l.purchaseLimit))),W(l,"classes");const i=l.classes;l.classes=f(()=>{const m=u(i)||{};return l.maxed.value&&(m.bought=!0),m}),W(l,"canPurchase"),l.canClick=l.canPurchase,l.onClick=l.purchase=(c=(d=l.onClick)!=null?d:l.purchase)!=null?c:function(){var w;const m=l;if(!u(m.canPurchase))return;const p=u(m.cost);m.cost!=null&&m.resource!=null&&(m.resource.value=a.sub(m.resource.value,p),m.amount.value=a.add(m.amount.value,1)),(w=m.onPurchase)==null||w.call(m,p)},W(l,"display");const o=l.display;return l.display=_(()=>{const m=u(o);if(fl(m)){const p=He(m);return n(p,null,null)}if(m!=null&&l.cost!=null&&l.resource!=null){const p=l,w=He(m.title||"","h3"),b=He(m.description||""),C=He(m.effectDisplay||"");return n("span",null,[m.title?n("div",null,[n(w,null,null)]):null,m.description?n(b,null,null):null,m.showAmount===!1?null:n("div",null,[n("br",null,null),u(p.purchaseLimit)===a.dInf?n(M,null,[s("Amount: "),Y(p.amount.value)]):n(M,null,[s("Amount: "),Y(p.amount.value),s(" /")," ",Y(u(p.purchaseLimit))])]),m.effectDisplay?n("div",null,[n("br",null,null),s("Currently: "),n(C,null,null)]):null,p.cost&&!p.maxed.value?n("div",null,[s("Cost: "),Q(u(p.cost)||0)," ",l.resource.displayName]):null])}return""}),W(l,"visibility"),Nt(l,"visibility",kt.Visible),W(l,"cost"),W(l,"resource"),W(l,"purchaseLimit"),Nt(l,"purchaseLimit",a.dInf),W(l,"style"),W(l,"mark"),W(l,"small"),l[Nl]=function(){const{display:m,visibility:p,style:w,classes:b,onClick:C,canClick:v,small:S,mark:N,id:D}=this;return{display:m,visibility:p,style:u(w),classes:b,onClick:C,canClick:v,small:S,mark:N,id:D}},l})}const Ca=wa({}),$a=Symbol("Hotkey");function $l(e){return Ht(()=>{const t=e();return t.type=$a,W(t,"enabled"),Nt(t,"enabled",!0),W(t,"description"),t})}lt.on("addLayer",e=>{_i(e,$a).forEach(t=>{Ca[t.key]=t})});lt.on("removeLayer",e=>{_i(e,$a).forEach(t=>{Ca[t.key]=void 0})});document.onkeydown=function(e){var i;if(((i=e.target)==null?void 0:i.tagName)==="INPUT"||ja.value&&!me.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const l=Ca[t];l&&u(l.enabled)&&(e.preventDefault(),l.onPress())};Uo(_(()=>{const e=Object.values(Ca).filter(t=>u(t==null?void 0:t.enabled));return e.length===0?"":n("div",null,[n("br",null,null),n("h4",null,[s("Hotkeys")]),e.map(t=>n("div",null,[t==null?void 0:t.key,s(": "),t==null?void 0:t.description]))])}));const Ns=_e({__name:"Sticky",setup(e){const t=H("0"),l=new ResizeObserver(o),i=Yt(null);function o(){let r=i.value;if(r==null)return;let d=0;for(;r.previousSibling;){const c=r.previousSibling;c.dataset&&"vSticky"in c.dataset&&(d+=c.offsetHeight),r=c}t.value=d+"px"}return Rl(o),document.fonts.ready.then(o),ya(()=>{var d;const r=(d=i.value)==null?void 0:d.parentElement;r&&l.observe(r)}),(r,d)=>(k(),T("div",{class:"sticky",style:At({top:t.value}),ref_key:"element",ref:i,"data-v-sticky":""},[Xt(r.$slots,"default",{},void 0,!0)],4))}});var Ds=Ve(Ns,[["__scopeId","data-v-cccac690"]]);const li=_e({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,l=f(()=>oa(t.resource));return(i,o)=>(k(),T("h2",{style:At({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},Te(u(l)),5))}});const Is={class:"main-display"},Ts={key:0},Ps={key:1},Fs=s(", "),Us={key:2},Rs=h("br",null,null,-1),Os={class:"main-display"},qs={key:0},Ls={key:1},Gs=s(", "),Qs={key:2},$s=h("br",null,null,-1),Gt=_e({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null,sticky:{type:Boolean,default:!0}},setup(e){const l=Dt(e),i=H(null),o=gl(l.effectDisplay),r=H(null),d=gl(l.productionDisplay),c=f(()=>a.lt(l.resource.value,"1e1000"));return(m,p)=>{var w,b;return e.sticky?(k(),be(Ds,{key:0},{default:ge(()=>{var C,v,S,N;return[h("div",{class:bt(["main-display-container",(C=e.classes)!=null?C:{}]),style:At([{"min-height":`${((S=(v=i.value)==null?void 0:v.$el.clientHeight)!=null?S:0)+50}px`},(N=e.style)!=null?N:{}])},[h("div",Is,[u(c)?(k(),T("span",Ts,"You have ")):G("",!0),n(li,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),s(" "+Te(e.resource.displayName),1),u(o)?(k(),T("span",Ps,[Fs,(k(),be(ut(u(o)),{ref_key:"effectRef",ref:i},null,512))])):G("",!0),u(d)?(k(),T("span",Us,[Rs,(k(),be(ut(u(d)),{ref_key:"productionRef",ref:r},null,512))])):G("",!0)])],6)]}),_:1})):(k(),T("div",{key:1,class:bt(["main-display-container",(w=e.classes)!=null?w:{}]),style:At([{"min-height":"50px"},(b=e.style)!=null?b:{}])},[h("div",Os,[u(c)?(k(),T("span",qs,"You have ")):G("",!0),n(li,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),s(" "+Te(e.resource.displayName),1),u(o)?(k(),T("span",Ls,[Gs,(k(),be(ut(u(o)),{ref_key:"effectRef",ref:i},null,512))])):G("",!0),u(d)?(k(),T("span",Qs,[$s,(k(),be(ut(u(d)),{ref_key:"productionRef",ref:r},null,512))])):G("",!0)])],6))}}});var Hs=_e({props:{display:{type:K(String,Object,Function),required:!0},visibility:{type:K(Number),required:!0},style:K(String,Object,Array),classes:K(Object),resource:Object,cost:K(String,Object,Number),canPurchase:{type:K(Boolean),required:!0},bought:{type:K(Boolean),required:!0},mark:K(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:na,MarkNode:ka},setup(e){const{display:t,cost:l}=Dt(e),i=Yt("");return Vt(()=>{const o=St(t);if(o==null){i.value="";return}if(fl(o)){i.value=He(o);return}const r=St(l),d=He(o.title||"","h3"),c=He(o.description,"div"),m=He(o.effectDisplay||"");i.value=He(_(()=>{var p;return n("span",null,[o.title?n("div",null,[n(d,null,null)]):null,n(c,null,null),o.effectDisplay?n("div",null,[s("Currently: "),n(m,null,null)]):null,e.resource!=null&&o.showCost!==!1?n(M,null,[n("br",null,null),s("Cost: "),e.resource&&oa(e.resource,r)," ",(p=e.resource)==null?void 0:p.displayName]):null])}))}),{component:i,unref:u,Visibility:kt}}});const Vs=["disabled"];function js(e,t,l,i,o,r){var m;const d=xl("MarkNode"),c=xl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),T("button",{key:0,style:At([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(m=e.unref(e.style))!=null?m:{}]),onClick:t[0]||(t[0]=(...p)=>e.purchase&&e.purchase(...p)),class:bt({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(k(),be(ut(e.unref(e.component)),{key:0})):G("",!0),n(d,{mark:e.unref(e.mark)},null,8,["mark"]),n(c,{id:e.id},null,8,["id"])],14,Vs)):G("",!0)}var zs=Ve(Hs,[["render",js],["__scopeId","data-v-7f411ac8"]]);const Js=Symbol("Upgrade");function q(e){const t=Me(!1);return Ht(()=>{const l=e();return l.id=jl("upgrade-"),l.type=Js,l[Bl]=zs,l.canAfford==null&&(l.resource==null||l.cost==null)&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",l),l.bought=t,l.canAfford==null?l.canAfford=f(()=>{const i=l;return i.resource!=null&&i.cost!=null&&a.gte(i.resource.value,u(i.cost))}):W(l,"canAfford"),l.canPurchase=f(()=>u(l.visibility)===kt.Visible&&u(l.canAfford)&&!u(l.bought)),l.purchase=function(){var o;const i=l;!u(i.canPurchase)||(i.resource!=null&&i.cost!=null&&(i.resource.value=a.sub(i.resource.value,u(i.cost))),t.value=!0,(o=i.onPurchase)==null||o.call(i))},W(l,"visibility"),Nt(l,"visibility",kt.Visible),W(l,"classes"),W(l,"style"),W(l,"display"),W(l,"mark"),W(l,"cost"),W(l,"resource"),l[Nl]=function(){const{display:i,visibility:o,style:r,classes:d,resource:c,cost:m,canPurchase:p,bought:w,mark:b,id:C,purchase:v}=this;return{display:i,visibility:o,style:u(r),classes:d,resource:c,cost:m,canPurchase:p,bought:w,mark:b,id:C,purchase:v}},l})}function le(e){return Ht(()=>{const{addend:t,description:l,enabled:i}=e(),o=Ct(t),r=Ct(l),d=i==null?void 0:Ct(i);return{apply:c=>a.add(c,u(o)),revert:c=>a.sub(c,u(o)),enabled:d,description:l==null?void 0:_(()=>n("div",{class:"modifier-container"},[u(r)?n("span",{class:"modifier-description"},[nl(u(r))]):null,n("span",{class:"modifier-amount"},[a.gte(u(o),0)?"+":"",Q(u(o))])]))}})}function g(e){return Ht(()=>{const{multiplier:t,description:l,enabled:i}=e(),o=Ct(t),r=Ct(l),d=i==null?void 0:Ct(i);return{apply:c=>a.times(c,u(o)),revert:c=>a.div(c,u(o)),enabled:d,description:l==null?void 0:_(()=>n("div",{class:"modifier-container"},[u(r)?n("span",{class:"modifier-description"},[nl(u(r))]):null,n("span",{class:"modifier-amount"},[s("\xD7"),Q(u(o))])]))}})}function ml(e){return Ht(()=>{const{exponent:t,description:l,enabled:i,supportLowNumbers:o}=e(),r=Ct(t),d=Ct(l),c=i==null?void 0:Ct(i);return{apply:m=>{let p=m;return o&&(p=a.add(p,1)),p=a.pow(p,u(r)),o&&(p=a.sub(p,1)),p},revert:m=>{let p=m;return o&&(p=a.add(p,1)),p=a.root(p,u(r)),o&&(p=a.sub(p,1)),p},enabled:c,description:l==null?void 0:_(()=>n("div",{class:"modifier-container"},[u(d)?n("span",{class:"modifier-description"},[nl(u(d)),o?" (+1 effective)":null]):null,n("span",{class:"modifier-amount"},[s("^"),Q(u(r))])]))}})}function J(e){return Ht(()=>{const t=e();return{apply:l=>t.filter(i=>u(i.enabled)!==!1).reduce((i,o)=>o.apply(i),l),revert:t.every(l=>l.revert!=null)?l=>t.filter(i=>u(i.enabled)!==!1).reduceRight((i,o)=>o.revert(i),l):void 0,enabled:f(()=>t.filter(l=>u(l.enabled)!==!1).length>0),description:_(()=>n(M,null,[t.filter(l=>u(l.enabled)!==!1).map(l=>u(l.description)).filter(l=>l).map(nl)]))}})}function Oi(e){return Ht(()=>{const t=e();return t.currentGain==null&&(t.currentGain=f(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=a.floor(l).max(0),u(t.buyMax)||(l=l.min(1)),l})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=f(()=>{let l=t.scaling.currentAt(t);return t.roundUpCost&&(l=a.ceil(l)),l})),t.nextAt==null&&(t.nextAt=f(()=>{let l=t.scaling.nextAt(t);return t.roundUpCost&&(l=a.ceil(l)),l})),t.convert==null&&(t.convert=function(){var o;const l=u(t.currentGain),i=u(t.currentAt);t.gainResource.value=a.add(t.gainResource.value,l),t.spend(l,i),(o=t.onConvert)==null||o.call(t,l)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),W(t,"currentGain"),W(t,"actualGain"),W(t,"currentAt"),W(t,"nextAt"),W(t,"buyMax"),Nt(t,"buyMax",!0),W(t,"roundUpCost"),Nt(t,"roundUpCost",!0),t})}function Ha(e,t){const l=Ct(e),i=Ct(t);return{currentGain(o){let r=u(o.baseResource.value);if(o.costModifier&&(r=o.costModifier.apply(r)),a.lt(r,u(l)))return 0;const d=a.div(r,u(l)).pow(u(i));return d.isNan()?new a(0):d},currentAt(o){let r=u(o.currentGain);return o.gainModifier&&(r=o.gainModifier.revert(r)),r=a.max(0,r).root(u(i)).times(u(l)),o.costModifier&&(r=o.costModifier.revert(r)),r},nextAt(o){let r=a.add(u(o.currentGain),1).floor();return o.gainModifier&&(r=o.gainModifier.revert(r)),r=a.max(0,r).root(u(i)).times(u(l)).max(u(l)),o.costModifier&&(r=o.costModifier.revert(r)),r}}}function qi(e){return Oi(e)}function Ws(e){return Oi(()=>{const t=e();return Nt(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=f(()=>{let l=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return l=a.floor(l).max(t.gainResource.value),u(t.buyMax)||(l=l.min(a.add(t.gainResource.value,1))),l})),t.actualGain==null&&(t.actualGain=f(()=>{let l=a.sub(a.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return u(t.buyMax)||(l=l.min(1)),l})),Nt(t,"convert",function(){var o;const l=u(t.actualGain),i=u(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(u(t.currentGain)):u(t.currentGain),t.spend(l,i),(o=t.onConvert)==null||o.call(t,l)}),t})}function xa(e,t,l=.5){return a.lte(e,t)?e:a.pow(e,l).times(a.pow(t,a.sub(1,l)))}function ai(e,t,l=.5){return{...e,currentAt:i=>xa(e.currentAt(i),u(t),a.recip(u(l))),nextAt:i=>xa(e.nextAt(i),u(t),a.recip(u(l))),currentGain:i=>xa(e.currentGain(i),u(t),u(l))}}const Ks={},Xs={style:{"white-space":"nowrap"}},Ys=h("span",{style:{"font-size":"larger","font-family":"initial"}},"\u221A",-1),Zs={style:{display:"inline-block","border-top":"1px solid","padding-left":".2em"}};function er(e,t){return k(),T("span",Xs,[Ys,h("div",Zs,[Xt(e.$slots,"default")])])}var pl=Ve(Ks,[["render",er]]);const tr={},lr={class:"fraction"};function ar(e,t){return k(),T("div",lr,[Xt(e.$slots,"default")])}var ir=Ve(tr,[["render",ar]]);const nr={class:"field"},or={key:0,class:"field-title"},Va=_e({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var d;const l=e,i=gl(ol(l,"title"),"span"),o=H((d=l.options.find(c=>c.value===l.modelValue))!=null?d:null);jt(ol(l,"modelValue"),c=>{var m;St(o)!==c&&(o.value=(m=l.options.find(p=>p.value===c))!=null?m:null)});function r(c){t("update:modelValue",c.value)}return(c,m)=>(k(),T("div",nr,[u(i)?(k(),T("span",or,[(k(),be(ut(u(i))))])):G("",!0),n(u(mn),{options:e.options,modelValue:o.value,"onUpdate:modelValue":[m[0]||(m[0]=p=>o.value=p),r],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});var sr=_e({props:{visibility:{type:K(Number),required:!0},display:{type:K(String,Object,Function),required:!0},style:K(String,Object,Array),classes:K(Object),earned:{type:K(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:na},setup(e){const{display:t}=Dt(e),l=Yt("");return Vt(()=>{const i=St(t);if(i==null){l.value="";return}if(fl(i)){l.value=He(i);return}const o=He(i.requirement,"h3"),r=He(i.effectDisplay||"","b"),d=He(i.optionsDisplay||"","span");l.value=He(_(()=>n("span",null,[n(o,null,null),i.effectDisplay?n("div",null,[n(r,null,null)]):null,i.optionsDisplay?n("div",{class:"equal-spaced"},[n(d,null,null)]):null])))}),{comp:l,unref:u,Visibility:kt}}});function rr(e,t,l,i,o,r){var c;const d=xl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),T("div",{key:0,style:At([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:bt({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(k(),be(ut(e.unref(e.comp)))),n(d,{id:e.id},null,8,["id"])],6)):G("",!0)}var ur=Ve(sr,[["render",rr],["__scopeId","data-v-f4e8794e"]]);lt.on("setupVue",e=>e.use(vn));const ii=fi(),dr=Symbol("Milestone");let _l;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(_l||(_l={}));function P(e){const t=Me(!1);return Ht(()=>{var o;const l=(o=e==null?void 0:e())!=null?o:{};l.id=jl("milestone-"),l.type=dr,l[Bl]=ur,l.earned=t,l.complete=function(){var d;const r=l;if(t.value=!0,(d=r.onComplete)==null||d.call(r),r.display&&u(r.showPopups)===!0){const c=u(r.display),m=He(fl(c)?c:c.requirement);ii(n(M,null,[n("h3",null,[s("Milestone earned!")]),n("div",null,[n(m,null,null)])]))}},W(l,"visibility"),Nt(l,"visibility",kt.Visible);const i=l.visibility;if(l.visibility=f(()=>{const r=u(l.display);switch(mt.msDisplay){default:case _l.All:return u(i);case _l.Configurable:return u(l.earned)&&!(r!=null&&typeof r=="object"&&"optionsDisplay"in r)?kt.None:u(i);case _l.Incomplete:return u(l.earned)?kt.None:u(i);case _l.None:return kt.None}}),W(l,"style"),W(l,"classes"),W(l,"display"),W(l,"showPopups"),l[Nl]=function(){const{visibility:r,display:d,style:c,classes:m,earned:p,id:w}=this;return{visibility:r,display:d,style:u(c),classes:m,earned:p,id:w}},l.shouldEarn){const r=l;Vt(()=>{var d,c;if(mt.active===me.id&&!r.earned.value&&u(r.visibility)===kt.Visible&&((d=r.shouldEarn)==null?void 0:d.call(r))&&(r.earned.value=!0,(c=r.onComplete)==null||c.call(r),r.display&&u(r.showPopups)===!0)){const m=u(r.display),p=He(fl(m)?m:m.requirement);ii(n(M,null,[n("h3",null,[s("Milestone earned!")]),n("div",null,[n(p,null,null)])]))}})}return l})}lt.on("loadSettings",e=>{Nt(e,"msDisplay",_l.All)});const cr=Object.values(_l).map(e=>({label:Ei(e),value:e}));Fo(_(()=>n(Va,{title:"Show Milestones",options:cr,"onUpdate:modelValue":e=>mt.msDisplay=e,modelValue:mt.msDisplay},null)));const pr={class:"field"},mr=_e({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,i=f(()=>He(u(l.title)||"","span")),o=f({get(){return!!l.modelValue},set(r){t("update:modelValue",r)}});return(r,d)=>(k(),T("label",pr,[ha(h("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":d[0]||(d[0]=c=>wt(o)?o.value=c:null)},null,512),[[un,u(o)]]),(k(),be(ut(u(i))))]))}});var vl=Ve(mr,[["__scopeId","data-v-33d57459"]]);const vr=Symbol("Reset");function fr(e){return Ht(()=>{const t=e();return t.id=jl("reset-"),t.type=vr,t.reset=function(){var i;const l=o=>{if(o&&typeof o=="object")if(Sl in o){const r=o;r.value=r[Sl]}else!(o instanceof a)&&!wt(o)&&Object.values(o).forEach(r=>l(r))};u(t.thingsToReset).forEach(l),lt.emit("reset",t),(i=t.onReset)==null||i.call(t)},W(t,"thingsToReset"),t})}const ua={};lt.on("removeLayer",e=>{var t;(t=ua[e.id])==null||t.call(ua),ua[e.id]=void 0});const gr="workshop",Jl=2,Ye=$t(gr,function(){const e="Workshop",t="#D66B02",l="#D66B02",i=ht(0,"foundation progress"),o=Ws(()=>({scaling:ai(ai(Ha(250,1.5),5387,1/1e10),1e20,3e8),baseResource:re.logs,gainResource:O(i),roundUpCost:!0,spend(ie,xe){re.logs.value=a.sub(re.logs.value,xe)},costModifier:J(()=>[ml(()=>({exponent:.95,description:"Holly Level 5",enabled:R.elfTraining.cutterElfTraining.milestones[4].earned}))])})),r=Lt(()=>({display:_(()=>n(M,null,[n("b",{style:"font-size: x-large"},[s("Build "),Y(o.actualGain.value),s("% of the foundation")]),n("br",null,null),n("br",null,null),n("span",{style:"font-size: large"},[s("Cost:")," ",oa(re.logs,a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value)," ",re.logs.displayName])])),visibility:()=>y(a.lt(i.value,100)||R.elfTraining.expandersElfTraining.milestones[2].earned.value),canClick:()=>a.gte(re.logs.value,o.currentAt.value)&&(a.lt(i.value,100)||R.elfTraining.expandersElfTraining.milestones[2].earned.value),onClick(){!u(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"})),d=$l(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{r.canClick.value&&r.onClick()}})),c=f(()=>!Re.milestones[6].earned.value),m=P(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>a.gte(i.value,1),showPopups:c})),p=P(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>a.gte(i.value,10),visibility:()=>y(m.earned.value),showPopups:c})),w=P(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>a.gte(i.value,20),visibility:()=>y(p.earned.value),showPopups:c})),b=P(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>a.gte(i.value,30),visibility:()=>y(w.earned.value),showPopups:c})),C=P(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>a.gte(i.value,40),visibility:()=>y(b.earned.value),showPopups:c})),v=P(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(i.value,50),visibility:()=>y(C.earned.value),showPopups:c})),S=P(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>a.gte(i.value,75),visibility:()=>y(v.earned.value),showPopups:c})),N=P(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>a.gte(i.value,100),visibility:()=>y(S.earned.value),showPopups:c})),D=P(()=>({display:{requirement:"200% Foundation Completed",effectDisplay:"The 1% milestone is now +2% and multiplicative"},shouldEarn:()=>a.gte(i.value,200),visibility:()=>y(N.earned.value&&R.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),z=P(()=>({display:{requirement:"400% Foundation Completed",effectDisplay:"Gain +10% metal for every 10% foundation completed"},shouldEarn:()=>a.gte(i.value,400),visibility:()=>y(D.earned.value&&R.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),B=P(()=>({display:{requirement:"600% Foundation Completed",effectDisplay:"Gain +10% oil for every 10% foundation completed"},shouldEarn:()=>a.gte(i.value,600),visibility:()=>y(z.earned.value&&R.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),E=P(()=>({display:{requirement:"800% Foundation Completed",effectDisplay:"Gain +10% plastic for every 10% foundation completed"},shouldEarn:()=>a.gte(i.value,800),visibility:()=>y(B.earned.value&&R.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),F=P(()=>({display:{requirement:"1000% Foundation Completed",effectDisplay:"Double paper, boxes, and all cloth actions"},shouldEarn:()=>a.gte(i.value,1e3),visibility:()=>y(E.earned.value&&R.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),Z={logGainMilestone1:m,autoCutMilestone1:p,autoPlantMilestone1:w,autoCutMilestone2:b,autoPlantMilestone2:C,logGainMilestone2:v,morePlantsMilestone1:S,logGainMilestone3:N,extraExpansionMilestone1:D,extraExpansionMilestone2:z,extraExpansionMilestone3:B,extraExpansionMilestone4:E,extraExpansionMilestone5:F},{collapseMilestones:ae,display:se}=aa(Z),ve=el(()=>({direction:Fe.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>U.day.value===Jl?a.div(i.value,100):1,display:_(()=>U.day.value===Jl?n(M,null,[Y(i.value),s("%")]):"")}));return Vt(()=>{U.day.value===Jl&&a.gte(i.value,100)&&U.completeDay()}),{name:e,day:Jl,color:t,foundationProgress:i,foundationConversion:o,milestones:Z,collapseMilestones:ae,minWidth:700,buildFoundationHK:d,display:_(()=>n(M,null,[n("div",null,[U.day.value===Jl?"Complete the foundation to complete the day":`${e} Complete!`]),ce(ve),n(Ee,null,null),n("div",null,[n("span",null,[s("The foundation is ")]),n("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[Y(i.value)]),s("% completed")]),a.lt(i.value,100)||R.elfTraining.expandersElfTraining.milestones[2].earned.value?n(Ee,null,null):null,ce(r),n(Ee,null,null),se()])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(i.value),s(" "),i.displayName]))}}),yr="plastic",ni=10,et=$t(yr,function(){const e="Plastic",t="#DCD9CD",l=ht(0,"plastic"),[i,o]=sl(()=>[{title:"Plastic Gain",modifier:ye,base:0}]),r=H(!1),d=_(()=>n(Et,{modelValue:r.value,"onUpdate:modelValue":Ie=>r.value=Ie},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:i})),c=Me(0),m=f(()=>a.times(c.value,100)),p=Le(()=>({resource:it.metal,cost(){const Ie=new a(this.amount.value);let Se=a.pow(1.2,Ie).times(1e7);return R.elfTraining.fertilizerElfTraining.milestones[3].earned.value&&(Se=a.sub(Se,a.pow(l.value,2)).max(0)),Se},display:_(()=>n(M,null,[n("h3",null,[s("Refinery")]),n("br",null,null),s("Refines oil into plastic pellets"),n("br",null,null),s("Consumes 100 oil/s to create 1 plastic/s"),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),Q(m.value),s(" oil/sec"),n("br",null,null),s("+"),Q(c.value),s(" plastic/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Y(u(p.cost))," ",p.resource.displayName])),onPurchase(){c.value=a.add(c.value,1)},style:{width:"300px"}})),{min:w,max:b,add:C,remove:v}=il({buyable:p,active:c,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),S=f(()=>a.pow(5,a.add([...Object.values(B),...Object.values(ae)].filter(Ie=>Ie.bought.value).length,2))),N=q(()=>({resource:O(l),cost:S,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!N.bought.value})})),D=q(()=>({resource:O(l),cost:S,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!D.bought.value})})),z=q(()=>({resource:O(l),cost:S,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!z.bought.value})})),B={paperTools:N,boxTools:D,clothTools:z},E=q(()=>({resource:O(l),cost:S,visibility:()=>y(N.bought.value),display:()=>({title:"Paper Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!E.bought.value})})),F=q(()=>({resource:O(l),cost:S,visibility:()=>y(D.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!F.bought.value})})),Z=q(()=>({resource:O(l),cost:S,visibility:()=>y(z.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!Z.bought.value})})),ae={paperElf:E,boxElf:F,clothElf:Z},se=Le(()=>({resource:O(l),cost(){const Ie=this.amount.value;return a.pow(1.3,Ie).times(100)},visibility:()=>y(E.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:_(()=>n(M,null,[Y(se.amount.value),s("%")])),showAmount:!1}})),ve=Le(()=>({resource:O(l),cost(){const Ie=this.amount.value;return a.pow(1.3,Ie).times(100)},visibility:()=>y(F.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:_(()=>n(M,null,[Y(ve.amount.value),s("%")])),showAmount:!1}})),ie=Le(()=>({resource:O(l),cost(){const Ie=this.amount.value;return a.pow(1.3,Ie).times(100)},visibility:()=>y(Z.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions are +10% more efficient",effectDisplay:_(()=>n(M,null,[Y(a.times(ie.amount.value,10)),s("%")])),showAmount:!1}})),xe={passivePaper:se,passiveBoxes:ve,clothGains:ie},ye=J(()=>[le(()=>({addend:c,description:"Oil Refinery",enabled:()=>a.gt(c.value,0)})),g(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:E.bought})),g(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:F.bought})),g(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:Z.bought})),g(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:ot.row2Upgrades.plasticUpgrade.bought})),g(()=>({multiplier:()=>de.oilEffectiveness.value,description:"Effectiveness",enabled:()=>a.lt(de.oilEffectiveness.value,1)})),g(()=>({multiplier:Je.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Je.dyes.yellow.amount.value,1)})),g(()=>({multiplier:()=>a.div(Ye.foundationProgress.value,10).floor().div(10).add(1),description:"800% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone4.earned}))]),ee=f(()=>ye.apply(0));lt.on("update",Ie=>{a.lt(U.day.value,ni)||(l.value=a.times(Ie,ee.value).add(l.value))});const{total:ne,trackerDisplay:Be}=bl({resource:l,goal:25e4,name:e,day:ni,color:t,textColor:"var(--feature-foreground)",modal:{show:r,display:d}});return{name:e,color:t,plastic:l,totalPlastic:ne,buildRefinery:p,activeRefinery:c,oilCost:m,upgrades:B,elfUpgrades:ae,buyables:xe,generalTabCollapsed:o,minWidth:700,display:_(()=>n(M,null,[ce(Be),n(Ee,null,null),n(Gt,{resource:l,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(ee.value,0)?`+${Q(ee.value)}/s`:void 0},null),n(Ee,null,null),n(Qt,null,{default:()=>[ce(p),n("div",null,[Y(a.floor(c.value)),s("/"),Y(a.floor(p.amount.value))]),nt(w,v,C,b)]}),n(Vl,null,{default:()=>[Zt(N,E,se),Zt(D,F,ve),Zt(z,Z,ie)]})])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(l.value),s(" "),l.displayName]))}}),hr="paper",Ba=5,j=$t(hr,function(){const e="Paper",t="#E8DCB8",l=ht(0,"paper"),i=ht(f(()=>a.min(a.div(re.logs.value,1e9),a.div(L.ash.value,Ie.value))),"pulp"),o=qi(()=>({scaling:Ha(1,1.2),baseResource:i,gainResource:O(l),roundUpCost:!0,spend(pe,tt){re.logs.value=a.sub(re.logs.value,a.times(tt,1e9)),L.ash.value=a.sub(L.ash.value,a.times(tt,Ie.value))},gainModifier:ne})),r=Lt(()=>({display:_(()=>{const pe=a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value;return n(M,null,[n("span",{style:"font-size: large"},[s("Create "),Y(o.currentGain.value),s(" "),l.displayName]),n("br",null,null),n("span",{style:"font-size: large"},[s("Cost: "),oa(re.logs,pe),s(" "),i.displayName,s(" ("),Y(a.times(pe,1e9)),s(" "),re.logs.displayName,s(";")," ",Y(a.times(pe,Ie.value))," ",L.ash.displayName,s(")")])])}),canClick:()=>a.gte(o.actualGain.value,1),onClick(){!u(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"}));function d(pe){const tt=Le(()=>({...pe,display:{title:pe.name,description:`Print a copy of "${pe.name}", which ${pe.elfName} will use to improve their skills! Each copy printed will reduce the "${pe.buyableName}" price scaling by 0.95x and make ${pe.elfName} purchase +10% faster!`,effectDisplay:_(()=>n(M,null,[Q(a.pow(.95,tt.amount.value)),s("x price scaling,")," ",Q(a.div(tt.amount.value,10).add(1)),s("x auto-purchase speed")])),showAmount:!1},resource:O(l),cost(){let X=this.amount.value;(pe.elfName==="Star"||pe.elfName==="Bell")&&(X=a.pow(X,2)),a.gte(X,100)&&(X=a.pow(X,2).div(100)),a.gte(X,1e4)&&(X=a.pow(X,2).div(1e4)),X=a.pow(.95,D.amount.value).times(X);let dt=5;R.elfTraining.paperElfTraining.milestones[0].earned.value&&dt--;let We=a.pow(dt,X).times(10);return R.elfTraining.paperElfTraining.milestones[0].earned.value&&(We=a.div(We,ve.value.max(1))),We},style:"width: 600px"}));return tt}const c=d({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),m=d({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),p=d({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),w=d({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),b=d({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),C=d({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),v=d({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>y(Re.elves.smallFireElf.bought.value)}),S=d({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>y(Re.elves.bonfireElf.bought.value)}),N=d({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>y(Re.elves.kilnElf.bought.value)}),D=d({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>y(Re.elves.paperElf.bought.value)}),z=d({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>y(Re.elves.boxElf.bought.value)}),B=d({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>y(Re.elves.clothElf.bought.value)}),E=d({name:"Drills and Mills",elfName:"Peppermint",buyableName:"Mining Drill",visibility:()=>y(R.elfTraining.expandersElfTraining.milestones[3].earned.value)}),F=d({name:"Deep in the Earth",elfName:"Frosty",buyableName:"Oil Drills",visibility:()=>y(R.elfTraining.fertilizerElfTraining.milestones[4].earned.value)}),Z=d({name:"Burning the Midnight Oil",elfName:"Cocoa",buyableName:"Oil-Consuming Machines",visibility:()=>y(R.elfTraining.heatedCutterElfTraining.milestones[4].earned.value)}),ae=d({name:"Physical Metallurgy",elfName:"Twinkle",buyableName:"Metal Buyables",visibility:()=>y(R.elfTraining.expandersElfTraining.milestones[4].earned.value)}),se={cuttersBook:c,plantersBook:m,expandersBook:p,heatedCuttersBook:w,heatedPlantersBook:b,fertilizerBook:C,smallFireBook:v,bonfireBook:S,kilnBook:N,paperBook:D,boxBook:z,clothBook:B,miningDrillBook:E,heavyDrillBook:F,oilBook:Z,metalBook:ae},ve=f(()=>Object.values(se).reduce((pe,tt)=>pe.add(tt.amount.value),new a(0))),ie=q(()=>({resource:O(l),cost:1e8,visibility:()=>y(et.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),xe=q(()=>({resource:O(l),cost:1e9,visibility:()=>y(et.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),ye=q(()=>({resource:O(l),cost:1e10,visibility:()=>y(et.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),ee={clothUpgrade:ie,drillingUpgrade:xe,oilUpgrade:ye},ne=J(()=>[g(()=>({multiplier:2,description:"Scholar's shoes",enabled:ft.paperUpgrades.paperUpgrade1.bought})),g(()=>({multiplier:2,description:"Scholar's slacks",enabled:ft.paperUpgrades.paperUpgrade2.bought})),g(()=>({multiplier:2,description:"Scholar's jacket",enabled:ft.paperUpgrades.paperUpgrade3.bought})),g(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:ft.paperUpgrades.paperUpgrade4.bought})),g(()=>({multiplier:Je.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Je.dyes.yellow.amount.value,1)})),g(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone5.earned}))]),Be=J(()=>[g(()=>({multiplier:.1,description:"Star Level 2",enabled:R.elfTraining.paperElfTraining.milestones[1].earned}))]),Ie=f(()=>Be.apply(1e6)),[Se,Ue]=sl(()=>[{title:"Paper Gain",modifier:ne,base:1},{title:"Ash Cost",modifier:Be,base:1e6,unit:" ash/pulp"}]),fe=H(!1),Oe=_(()=>n(Et,{modelValue:fe.value,"onUpdate:modelValue":pe=>fe.value=pe},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:Se}));lt.on("update",pe=>{a.lt(U.day.value,Ba)||(l.value=a.times(pe,et.buyables.passivePaper.amount.value).times(o.currentGain.value).div(100).add(l.value))});const{total:De,trackerDisplay:qe}=bl({resource:l,goal:5e3,name:e,day:Ba,color:t,textColor:"var(--feature-foreground)",modal:{show:fe,display:Oe}});return{name:e,day:Ba,color:t,paper:l,totalPaper:De,paperConversion:o,books:se,upgrades:ee,generalTabCollapsed:Ue,minWidth:700,display:_(()=>n(M,null,[ce(qe),n(Ee,null,null),n(Gt,{resource:l,color:t,style:"margin-bottom: 0"},null),n(Ee,null,null),ce(r),n(Ee,null,null),nt(...Object.values(ee)),n(Ee,null,null),Zt(...Object.values(se))])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(l.value),s(" "),l.displayName]))}}),br="oil",Na=9,de=$t(br,function(){const e="Oil",t="#000000",l="var(--foreground)",i=ht(0,"oil"),o=ht(0,"depth"),r=Me(0),d=f(()=>a.lt(o.value,990)?a.add(10,o.value):a.pow(1.001,a.sub(o.value,990)).mul(1e3));function c(){if(a.lt(o.value,990)){const Xe=a.min(a.affordArithmeticSeries(r.value,10,1,o.value),a.sub(990,o.value)),qt=a.sumArithmeticSeries(Xe,10,1,o.value);r.value=a.sub(r.value,qt),o.value=a.add(o.value,Xe)}if(a.gte(o.value,990)){const Xe=a.affordGeometricSeries(r.value,1e3,1.001,a.sub(o.value,990)),qt=a.sumGeometricSeries(Xe,1e3,1.001,a.sub(o.value,990));r.value=a.sub(r.value,qt),o.value=a.add(o.value,Xe)}}const m=Me(0),p=f(()=>a.times(a.pow(m.value,z.value).pow(2),1e14)),w=f(()=>a.times(a.pow(m.value,z.value),1)),b=Le(()=>({resource:it.metal,cost(){const Xe=new a(this.amount.value);return a.pow(1.3,Xe).times(25e3)},display:_(()=>n(M,null,[n("h3",null,[s("Heavy Drill")]),n("br",null,null),s("A large drill specialized at deep mining."),n("br",null,null),s("Consumes 1e14*(Heavy Drills amount)"),n("sup",null,[s("2")]),s(" coal/sec for (Heavy Drills amount) drill power."),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),we(p.value),s(" coal/sec"),n("br",null,null),s("+"),we(w.value),s(" drill power"),n("br",null,null),n("br",null,null),s("Cost: "),Ce(u(b.cost)),s(" "),b.resource.displayName])),onPurchase(){m.value=a.add(m.value,1)},style:{color:l,width:"160px"}})),{min:C,max:v,add:S,remove:N}=il({buyable:b,active:m}),D=Me(0),z=f(()=>a.add(D.value,Math.E).ln()),B=Le(()=>({resource:it.metal,cost(){const Xe=new a(this.amount.value);return a.pow(2,Xe).times(1e5)},display:_(()=>n(M,null,[n("h3",null,[s("Heavy Drill Drill")]),n("br",null,null),s("Attach extra drills to Heavy Drills to make them faster"),n("br",null,null),s("Raise amount of effective Heavy Drills by ^ln(Heavy Drill Drill amount + e)."),n("br",null,null),s("(also affects coal consumption)."),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("^"),we(z.value),s(" Heavy Drill amount"),n("br",null,null),n("br",null,null),s("Cost: "),Ce(u(B.cost)),s(" "),B.resource.displayName])),onPurchase(){D.value=a.add(D.value,1)},style:{color:l,width:"160px"}})),{min:E,max:F,add:Z,remove:ae}=il({buyable:B,active:D}),se=Me(0),ve=f(()=>a.pow(1/3,se.value)),ie=f(()=>a.pow(2,se.value)),xe=f(()=>a.pow(1.2,se.value)),ye=Le(()=>({resource:it.metal,cost(){const Xe=new a(this.amount.value);return a.pow(8,Xe).times(2e5)},display:_(()=>n(M,null,[n("h3",null,[s("Heavy Extractor")]),n("br",null,null),s("Attach extractors to the drill to mine coal and ore, but with a price."),n("br",null,null),s("Divides drill power by 3 to multiply coal gain by 2 and ore gain by 1.2."),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("\xD7"),we(ve.value),s(" drill power"),n("br",null,null),s("\xD7"),we(ie.value),s(" coal/sec"),n("br",null,null),s("\xD7"),we(xe.value),s(" ore/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Ce(u(ye.cost))," ",ye.resource.displayName])),onPurchase(){se.value=a.add(se.value,1)},style:{color:l,width:"160px"}})),{min:ee,max:ne,add:Be,remove:Ie}=il({buyable:ye,active:se}),Se=Me(0),Ue=f(()=>a.pow(Rt[3].bought.value?4:5,Se.value)),fe=f(()=>a.add(Se.value,Kt.value).pow(2).mul(m.value).mul(a.add(D.value,1)).mul(se.value).mul(o.value).div(1e5)),Oe=Le(()=>({resource:it.metal,cost(){const Xe=new a(this.amount.value);let qt=a.pow(16,Xe).times(2e6);return Rt[4].bought.value&&(qt=qt.div(a.add(Tl.value,1).root(6))),qt},display:_(()=>n(M,null,[n("h3",null,[s("Oil Pump")]),n("br",null,null),s("Pump that oil from the ground."),n("br",null,null),s("Gain oil based on the number of Heavy buildings active and well depth, but coal usage is multiplied by "),Rt[3].bought.value?4:5,s("\xD7."),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("\xD7"),we(Ue.value),s(" coal usage"),n("br",null,null),s("+"),we(fe.value),s(" oil/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Ce(u(Oe.cost)),s(" "),Oe.resource.displayName])),onPurchase(){Se.value=a.add(Se.value,1)},style:{color:l,width:"160px"}})),{max:De,min:qe,add:pe,remove:tt}=il({buyable:Oe,active:Se}),X=Me(0),dt=f(()=>a.pow(X.value,2)),We=f(()=>a.pow(X.value,3).mul(1e19)),ze=f(()=>a.add(X.value,1)),oe=Le(()=>({resource:O(i),cost(){const Xe=new a(this.amount.value);return a.pow(2,Xe).times(50)},display:_(()=>n(M,null,[n("h3",null,[s("Oil Burner")]),n("br",null,null),s("Burn oil as fuel."),n("br",null,null),s("(Oil Burner Amount)"),n("sup",null,[s("2")]),s(" unit of oil can give 1e19*(Oil Burner Amount)"),n("sup",null,[s("3")]),s(" units of coal."),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),we(dt.value),s(" oil/sec"),n("br",null,null),s("-"),we(We.value),s(" coal consumption"),Rt[2].bought.value?n(M,null,[n("br",null,null),s("\xD7"),we(ze.value),s(" to auto smelting multi")]):"",n("br",null,null),n("br",null,null),s("Cost: "),Ce(u(oe.cost)),s(" "),oe.resource.displayName])),onPurchase(){X.value=a.add(X.value,1)},style:{color:l,width:"160px"}})),{max:$e,min:Ze,add:Mt,remove:st}=il({buyable:oe,active:X}),ct=Me(0),Ke=f(()=>a.pow(ct.value,2).mul(100)),Ge=f(()=>a.add(ct.value,1)),_t=Le(()=>({resource:it.metal,cost(){const Xe=new a(this.amount.value);let qt=a.pow(10,Xe).times(1e7);return Rt[4].bought.value&&(qt=qt.div(a.add(Tl.value,1).root(6))),qt},display:_(()=>n(M,null,[n("h3",null,[s("Oil Smelter")]),n("br",null,null),s("Use oil as a crucible fuel."),n("br",null,null),s("Burn 100*(Oil Smelter amount)"),n("sup",null,[s("2")]),s(" oil to smelt +100% faster."),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),we(Ke.value),s(" oil/sec"),n("br",null,null),s("\xD7"),we(Ge.value),s(" smelting speed"),n("br",null,null),n("br",null,null),s("Cost: "),Ce(u(_t.cost)),s(" "),_t.resource.displayName])),onPurchase(){ct.value=a.add(ct.value,1)},style:{color:l,width:"160px"}})),{max:xt,min:It,add:ue,remove:$}=il({buyable:_t,active:ct}),he=[P(()=>({display:{requirement:"5m Well Depth",effectDisplay:"Gain 25% more coal for each metre of well depth (after the 3 elf milestone)."},shouldEarn:()=>a.gte(o.value,5)})),P(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>a.gte(o.value,10),visibility:()=>y(he[0].earned.value)})),P(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>a.gte(o.value,25),visibility:()=>y(he[1].earned.value)})),P(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>a.gte(o.value,60),visibility:()=>y(he[2].earned.value)})),P(()=>({display:{requirement:"150m Well Depth",effectDisplay:"It appears that coal and metal appear a lot more when you go this deep! Unlock an upgrade apiece for coal and metal!"},shouldEarn:()=>a.gte(o.value,150),visibility:()=>y(he[3].earned.value)})),P(()=>({display:{requirement:"350m Well Depth",effectDisplay:"There is even more coal and metal than you thought. Why don't you utilize your heavy drill to mine them? Unlock a new drill upgrade!"},shouldEarn:()=>a.gte(o.value,350),visibility:()=>y(he[4].earned.value)})),P(()=>({display:{requirement:"1,000m Well Depth",effectDisplay:"You've finally found oil! Maybe it's time to make those oil useful! Unfortunately extracting them would use more coal, and also it's becoming much harder to mine deeper due to the thermal heat and pressure."},shouldEarn:()=>a.gte(o.value,1e3),visibility:()=>y(a.gte(o.value,1e3))})),P(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>a.gte(o.value,3e3),visibility:()=>y(a.gte(o.value,2e3))}))],{collapseMilestones:Ut,display:Jt}=aa(he),Ae=[P(()=>({display:{requirement:"100 total oil",effectDisplay:"Hmm, these oil pumps are really expensive. Maybe you should find a way to solve this problem... maybe you can use oil as fuel instead of coal?"},shouldEarn:()=>a.gte(Tl.value,100)})),P(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>a.gte(Tl.value,500),visibility:()=>y(Ae[0].earned.value)})),P(()=>({display:{requirement:"10,000 total oil",effectDisplay:"Wow, this is really bright when you burn it. Maybe it can be helpful to use them to smelt metal?"},shouldEarn:()=>a.gte(Tl.value,1e4),visibility:()=>y(Ae[1].earned.value)}))],{collapseMilestones:Ne,display:pt}=aa(Ae),Tt=[q(()=>({resource:L.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per coal Mining Drill owned.",effectDisplay:_(()=>n(M,null,[s("x"),we(rt[0].value)]))},style:{color:l}})),q(()=>({resource:it.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per ore Mining Drill owned.",effectDisplay:_(()=>n(M,null,[s("x"),we(rt[1].value)]))},style:{color:l}})),q(()=>({resource:L.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:_(()=>n(M,null,[s("x"),we(rt[2].value)]))},style:{color:l}})),q(()=>({resource:it.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:_(()=>n(M,null,[s("x"),we(rt[3].value)]))},style:{color:l}})),q(()=>({resource:O(i),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:_(()=>n(M,null,[s("+"),we(a.mul(rt[4].value,100)),s("%")]))},style:{color:l}}))],rt=[f(()=>a.mul(L.buildDrill.amount.value,a.add(.04,at.value)).add(1)),f(()=>a.mul(it.oreDrill.amount.value,a.add(.04,at.value)).add(1)),f(()=>a.mul(a.max(L.coal.value,1).log10().floor(),a.add(.06,at.value)).add(1)),f(()=>a.mul(a.max(it.metal.value,1).log10().floor(),a.add(.1,at.value)).add(1)),f(()=>a.mul(b.amount.value,.001))],Rt=[q(()=>({resource:O(i),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:l}})),q(()=>({resource:O(i),cost:500,display:{title:"Oil the Mining Drills",description:"Double ore mining speed and square the coal drill amount in its effect."},style:{color:l}})),q(()=>({resource:O(i),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your metal gain."},style:{color:l}})),q(()=>({resource:O(i),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:l}})),q(()=>({resource:O(i),cost:5e4,display:{title:"Be One with the Oil",description:_(()=>n(M,null,[s("Divide metal ingot prices of oil buildings by "),n("sup",null,[s("6")]),n(pl,null,{default:()=>[s("total oil + 1")]})]))},style:{color:l}}))],rl=J(()=>[le(()=>({addend:()=>a.negate(p.value),description:"Heavy Drill",enabled:()=>a.gt(m.value,0)})),g(()=>({multiplier:Ue,description:"Oil Pump",enabled:()=>a.gt(Se.value,0)})),le(()=>({addend:Al,description:"Oil to Coal Substitution",enabled:()=>a.gt(Al.value,0)}))]),ul=f(()=>rl.apply(0)),te=J(()=>[le(()=>({addend:w,description:"Heavy Drill",enabled:()=>a.gt(m.value,0)})),g(()=>({multiplier:ve,description:"Heavy Extractor",enabled:()=>a.gt(se.value,0)})),g(()=>({multiplier:rt[0],description:"Coal Drill Synergy",enabled:Tt[0].bought})),g(()=>({multiplier:rt[1],description:"Metal Drill Synergy",enabled:Tt[1].bought})),g(()=>({multiplier:rt[2],description:"Coal Drill Upgrade",enabled:Tt[2].bought})),g(()=>({multiplier:rt[3],description:"Metal Drill Upgrade",enabled:Tt[3].bought})),g(()=>({multiplier:2,description:"Guide to drilling",enabled:j.upgrades.drillingUpgrade.bought})),g(()=>({multiplier:()=>dl.value,description:"Effectiveness",enabled:()=>a.lt(dl.value,1)}))]),V=f(()=>te.apply(0)),Qe=J(()=>[le(()=>({addend:rt[4],description:"Drill Oil",enabled:Tt[4].bought}))]),at=f(()=>Qe.apply(0)),Pt=J(()=>[le(()=>({addend:fe,description:"Oil Pump",enabled:()=>a.gt(Se.value,0)})),g(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:Rt[0].bought})),g(()=>({multiplier:2,description:"3000m Well Depth",enabled:he[7].earned})),g(()=>({multiplier:2,description:"Oil and where to find it",enabled:j.upgrades.oilUpgrade.bought})),g(()=>({multiplier:()=>dl.value,description:"Effectiveness",enabled:()=>a.lt(dl.value,1)})),g(()=>({multiplier:()=>a.div(Ye.foundationProgress.value,10).floor().div(10).add(1),description:"600% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone3.earned})),g(()=>({multiplier:()=>a.sqrt(R.totalElfLevels.value),description:"Jack Level 4",enabled:R.elfTraining.heatedCutterElfTraining.milestones[3].earned}))]),Ft=f(()=>Pt.apply(0)),Wt=J(()=>[le(()=>({addend:()=>a.negate(dt.value),description:"Oil Burner",enabled:()=>a.gt(X.value,0)})),le(()=>({addend:()=>a.negate(Ke.value),description:"Oil Smelter",enabled:()=>a.gt(ct.value,0)})),le(()=>({addend:()=>a.negate(et.oilCost.value),description:"Oil Refinery",enabled:()=>a.gt(et.activeRefinery.value,0)}))]),x=f(()=>Wt.apply(0)),Ot=J(()=>[le(()=>({addend:We,description:"Oil Burner",enabled:()=>a.gt(X.value,0)})),g(()=>({multiplier:()=>kl.value,description:"Effectiveness",enabled:()=>a.lt(kl.value,1)}))]),Al=f(()=>Ot.apply(0)),Dl=J(()=>[le(()=>({addend:Je.boosts.red1,description:"Red Dye Boost 1",enabled:()=>a.gte(Je.dyes.red.amount.value,1)}))]),Kt=f(()=>Dl.apply(0)),[cl,tl]=sl(()=>[{title:"Coal Consumption",modifier:rl,unit:"/s",base:0},{title:"Drill Power",modifier:te,base:0},{title:"Upgrade Bonus",modifier:Qe,base:0,visible(){return a.gt(at.value,0)}},{title:"Oil Speed",modifier:Pt,unit:"/s",base:0,visible(){return a.gt(Ft.value,0)}},{title:"Oil Consumption",modifier:Wt,unit:"/s",base:0,visible(){return a.lt(x.value,0)}},{title:"Oil to Coal Substitution",modifier:Ot,unit:"/s",base:0,visible(){return a.gt(Al.value,0)}},{title:"Extra Oil Pumps",modifier:Dl,base:0,visible(){return a.gt(Kt.value,0)}}]),Il=H(!1),ln=_(()=>n(Et,{modelValue:Il.value,"onUpdate:modelValue":Xe=>Il.value=Xe},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:cl})),dl=H(a.dOne),kl=H(a.dOne);lt.on("update",Xe=>{if(a.lt(U.day.value,Na))return;const qt=a.negate(ul.value);a.gt(qt,0)?(dl.value=a.min(a.div(L.coal.value,qt),1),L.coal.value=a.sub(L.coal.value,a.mul(qt,dl.value).mul(Xe))):dl.value=a.dOne,r.value=a.add(r.value,a.mul(V.value,Xe)),i.value=a.add(i.value,a.mul(Ft.value,Xe)),c();const _a=a.negate(x.value);a.gt(_a,0)?(kl.value=a.min(a.div(i.value,_a),1),i.value=a.sub(i.value,a.mul(_a,kl.value).mul(Xe)).max(0)):kl.value=a.dOne});const{total:Tl,trackerDisplay:an}=bl({resource:i,goal:25e4,name:e,day:Na,color:t,modal:{show:Il,display:ln}});return{name:e,day:Na,color:t,oil:i,totalOil:Tl,depth:o,drillProgress:r,activeHeavy:m,buildHeavy:b,activeHeavy2:D,buildHeavy2:B,activeExtractor:se,buildExtractor:ye,activePump:Se,buildPump:Oe,activeBurner:X,buildBurner:oe,activeSmelter:ct,buildSmelter:_t,extractorCoal:ie,extractorOre:xe,coalEffectiveness:dl,oilEffectiveness:kl,depthMilestones:he,collapsedDepthMilestones:Ut,row1Upgrades:Tt,row2Upgrades:Rt,minWidth:700,oilMilestones:Ae,collapsedOilMilestones:Ne,generalTabCollapsed:tl,display:_(()=>{const Xe=[];return he[1].earned.value&&Xe.push(Tt),Ae[1].earned.value&&Xe.push(Rt),n(M,null,[ce(an),n(Ee,null,null),a.lt(dl.value,1)?n("div",null,[s("Coal efficiency: "),we(a.mul(dl.value,100)),s("%")]):null,a.lt(kl.value,1)?n("div",null,[s("Oil efficiency: "),we(a.mul(kl.value,100)),s("%")]):null,n(Gt,{resource:i,color:t,sticky:!0,productionDisplay:_(()=>n(M,null,[a.lt(o.value,1e3)?"Reach 1000m to start gaining oil":n(M,null,[va(a.add(Ft.value,x.value))])]))},null),a.eq(Ft.value,0)?n(M,null,[s("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),n("br",null,null)]):"",n(Vl,null,{default:()=>[he[6].earned.value?n(Qt,null,{default:()=>[ce(Oe),n("div",null,[Ce(a.floor(Se.value)),s("/"),Ce(a.floor(Oe.amount.value))]),nt(qe,tt,pe,De)]}):null,Ae[0].earned.value?n(Qt,null,{default:()=>[ce(oe),n("div",null,[Ce(a.floor(X.value)),s("/"),Ce(a.floor(oe.amount.value))]),nt(Ze,st,Mt,$e)]}):null,Ae[2].earned.value?n(Qt,null,{default:()=>[ce(_t),n("div",null,[Ce(a.floor(ct.value)),s("/"),Ce(a.floor(_t.amount.value))]),nt(It,$,ue,xt)]}):null]}),n("br",null,null),n("div",null,[n("span",null,[s("The well is ")]),n("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[Ce(o.value)]),s("m deep"),n("br",null,null),s("Next at "),we(a.sub(d.value,r.value))," ",s("drill power seconds")]),n("div",null,[n("span",null,[s("Your drill power is ")]),n("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[we(V.value)])]),n(Ee,null,null),n(Vl,null,{default:()=>[n(Qt,null,{default:()=>[ce(b),n("div",null,[Ce(a.floor(m.value)),s("/"),Ce(a.floor(b.amount.value))]),nt(C,N,S,v)]}),he[3].earned.value?n(Qt,null,{default:()=>[ce(B),n("div",null,[Ce(a.floor(D.value)),s("/"),Ce(a.floor(B.amount.value))]),nt(E,ae,Z,F)]}):null,he[5].earned.value?n(Qt,null,{default:()=>[ce(ye),n("div",null,[Ce(a.floor(se.value)),s("/"),Ce(a.floor(ye.amount.value))]),nt(ee,Ie,Be,ne)]}):null]}),n(Ee,null,null),Ml(...Xe),n(Ee,null,null),Jt(),a.gte(Tl.value,50)?pt():""])}),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),we(i.value),s(" "),i.displayName]))}}),wr="metal",oi=7,it=$t(wr,function(){const e="Metal",t="#888B8D",l=ht(0,"metal ingots",void 0,!0),i=ti(l),o=ht(0,"ore"),r=ti(o),d=J(()=>[g(()=>({multiplier:5,description:"Crucible",enabled:ne.bought})),g(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>a.gte(fe.amount.value,1)})),g(()=>({multiplier:2,description:"Industrial Furnace",enabled:Ie.bought})),g(()=>({multiplier:()=>a.add(qe.value,1),description:"Hotter Forges",enabled:()=>a.gte(De.amount.value,1)})),g(()=>({multiplier:2,description:"Carry metal in boxes",enabled:ot.row2Upgrades.metalUpgrade.bought})),g(()=>({multiplier:Je.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Je.dyes.purple.amount.value,1)})),g(()=>({multiplier:()=>a.add(ft.cloth.value,1).log10().plus(1),description:"Glistening Paint",enabled:Je.upgrades.redDyeUpg.bought})),g(()=>({multiplier:()=>a.div(Ye.foundationProgress.value,10).floor().div(10).add(1),description:"400% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone2.earned})),ml(()=>({exponent:1.1,description:"Mary Level 2",enabled:R.elfTraining.heatedPlanterElfTraining.milestones[1].earned}))]),c=f(()=>d.apply(.1)),m=J(()=>[le(()=>({addend:()=>a.times(fe.amount.value,10),description:"Industrial Crucibles",enabled:()=>a.gte(fe.amount.value,1)})),g(()=>({multiplier:2,description:"Efficient Crucibles",enabled:L.efficientSmelther.bought})),g(()=>({multiplier:()=>a.mul(de.activeSmelter.value,de.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>a.gt(de.activeSmelter.value,0)})),g(()=>({multiplier:Je.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Je.dyes.purple.amount.value,1)})),g(()=>({multiplier:()=>a.add(et.activeRefinery.value,1).sqrt(),description:"De Louvre",enabled:Je.upgrades.redDyeUpg2.bought})),g(()=>({multiplier:()=>a.div(R.totalElfExp.value,1e3).add(1).sqrt(),description:"Mary Level 5",enabled:R.elfTraining.heatedPlanterElfTraining.milestones[4].earned}))]),p=f(()=>m.apply(0)),w=J(()=>[g(()=>({multiplier:3,description:"Efficient Crucibles",enabled:L.efficientSmelther.bought})),g(()=>({multiplier:()=>a.add(de.activeBurner.value,1).mul(de.oilEffectiveness.value),description:"Blaster Burner",enabled:de.row2Upgrades[2].bought}))]),b=f(()=>w.apply(1)),C=1e10,v=f(()=>a.min(o.value,a.div(L.coal.value,C)).floor().max(0)),S=Lt(()=>({display:_(()=>{const oe=a.gte(v.value,1)?v.value:a.add(v.value,1);return n(M,null,[n("span",{style:"font-size: large"},[s("Smelt "),we(a.times(v.value,c.value))," ",l.displayName]),n("br",null,null),n("span",{style:"font-size: large"},[s("Cost: "),Ce(oe),s(" "),o.displayName,s(";")," ",Ce(a.times(oe,C)),s(" "),L.coal.displayName])])}),canClick:()=>a.gte(v.value,1),onClick(){!u(this.canClick)||N(v.value)},style:{width:"600px",minHeight:"unset"}}));function N(oe,$e=1){const[Ze,Mt,st]=[a.times(oe,c.value).times($e),oe,a.times(oe,C)];l.value=a.add(l.value,Ze),o.value=a.sub(o.value,Mt),L.coal.value=a.sub(L.coal.value,st)}const D=J(()=>[le(()=>({addend:()=>Ue.amount.value,description:"Mining Drills",enabled:()=>a.gte(Ue.amount.value,1)})),g(()=>({multiplier:()=>a.mul(de.depth.value,.05).add(1),description:"25m Well Depth",enabled:de.depthMilestones[2].earned})),g(()=>({multiplier:de.extractorOre,description:"Heavy Extractor",enabled:()=>a.gt(de.activeExtractor.value,0)})),g(()=>({multiplier:2,description:"Carry ore in boxes",enabled:ot.row2Upgrades.oreUpgrade.bought}))]),z=f(()=>D.apply(1)),B=J(()=>[g(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:ye.bought})),g(()=>({multiplier:2,description:"Double Pickaxe",enabled:ee.bought})),g(()=>({multiplier:2.5,description:"Mining Drills",enabled:()=>a.gte(Ue.amount.value,1)})),g(()=>({multiplier:2,description:"Efficient Drills",enabled:Se.bought})),g(()=>({multiplier:2,description:"Oil the Mining Drills",enabled:de.row2Upgrades[1].bought}))]),E=f(()=>B.apply(a.recip(Z))),F=Me(0),Z=10,ae=el(()=>({width:400,height:25,direction:Fe.Right,fillStyle:{backgroundColor:t},progress:()=>F.value})),se=J(()=>[le(()=>({addend:z})),g(()=>({multiplier:E}))]),ve=f(()=>se.apply(0)),ie=J(()=>[le(()=>({addend:ve})),le(()=>({addend:()=>a.negate(p.value),enabled:Oe}))]),xe=f(()=>ie.apply(0)),ye=q(()=>({resource:O(l),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.

Halve the time to mine more ore"}})),ee=q(()=>({resource:O(l),cost:.1,display:{title:"Double Pickaxe",description:"This is too slow. What if you swung two pickaxes at once?

Halve the time to mine ore, again"},visibility:()=>y(ee.bought.value)})),ne=q(()=>({resource:O(l),cost:1,display:{title:"Crucible",description:"Smelting this all by hand is rather painful, and a lot of the metal is left in the slag. A small crucible should help a lot!

Increase the metal extracted per ore by 5x"},visibility:()=>y(ne.bought.value||a.div(r.value,c.value).plus(i.value).gte(1))})),Be=q(()=>({resource:O(l),cost:0,display:{title:"Coal Drilling",description:"These mining drills are pretty powerful, mining more ore than you can actually smelt. Could be worth making some to mine coal instead"},visibility:()=>y(a.gte(Ue.amount.value,1)&&(Be.bought.value||U.days[7].opened.value||a.lt(L.computedCoalGain.value,a.times(z.value,E.value).times(C)))),onPurchase(){U.days[2].recentlyUpdated.value=!0}})),Ie=q(()=>({canAfford(){return a.gte(l.value,50)&&a.gte(L.coal.value,1e11)},onPurchase(){l.value=a.sub(l.value,50),L.coal.value=a.sub(L.coal.value,1e11)},display:{title:"Industrial Furnace",description:`Moving smelting out of the open air and into a dedicated furnace should make efficiency even better. Double metal gained per ore

- Cost: 50 ${l.displayName}
${we(1e11)} ${L.coal.displayName}`}})),Se=q(()=>({resource:O(l),cost:1e5,display:{title:"Efficient Drills",description:"Use metal and a bunch of R&D to make drilling stuff faster. Double coal and ore mining speed."},visibility:()=>y(de.depthMilestones[4].earned.value)})),Ue=Le(()=>({resource:O(l),cost(){return a.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:_(()=>n(x,null,[s("Mine 2.5x faster. Increase ore mining amount by")," ",Ce(Ue.amount.value),s(" ore per operation")]))},visibility:()=>y(a.gte(Ue.amount.value,1)||a.div(r.value,c.value).plus(i.value).gte(10)),style:{width:"200px"}})),fe=Le(()=>({resource:O(l),cost(){return a.pow(1.15,a.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:_(()=>n(x,null,[s("Automatically smelts")," ",Ce(a.times(fe.amount.value,10)),s(" ore per second")]))},visibility:()=>y(a.gte(fe.amount.value,1)||a.gte(Ue.amount.value,4)||a.gte(r.value,50)),style:{width:"200px"}})),Oe=Me(!0),De=Le(()=>({resource:L.coal,cost(){return a.pow(10,this.amount.value).times(1e12)},display:{title:"Hotter Forges",description:"More coal makes the fires burn hotter, getting just a little more metal out of each bit of ore",effectDisplay:_(()=>n(x,null,[s("Gain "),Ce(a.times(qe.value,100)),s("% more metal per ore")]))},visibility:()=>y(a.gte(De.amount.value,1)||Ie.bought.value),style:{width:"200px"}})),qe=f(()=>a.times(De.amount.value,.25));tt.on("update",se=>{F.value=a.times(se,E.value).plus(F.value);const $e=F.value.trunc();F.value=F.value.minus($e),o.value=a.add(o.value,a.times($e,z.value)),Oe.value&&N(a.min(v.value,a.times(p.value,se)),b.value)});const[pe,et]=sl(()=>[{title:"Auto Smelt Speed",modifier:m,base:0,unit:"/s",visible(){return a.gt(fe.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:w,base:1,visible(){return a.gt(b.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:D,base:1},{title:"Mining Speed",modifier:B,base:.1,unit:"/s"}]),X=H(!1),ut=_(()=>n(Et,{modelValue:X.value,"onUpdate:modelValue":se=>X.value=se},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:pe})),{total:We,trackerDisplay:ze}=bl({resource:l,goal:25e3,name:e,day:oi,color:t,modal:{show:X,display:ut}});return{name:e,day:oi,color:t,ore:o,bestOre:r,oreProgress:F,metal:l,bestMetal:i,totalMetal:We,simplePickaxe:ye,doublePickaxe:ee,crucible:ne,coalDrill:Be,industrialFurnace:Ie,efficientDrill:Se,oreDrill:Ue,industrialCrucible:fe,autoSmeltEnabled:Oe,hotterForge:De,generalTabCollapsed:et,minWidth:700,display:_(()=>n(x,null,[ce(ze),n(Ee,null,null),n(Gt,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:_(()=>n(x,null,[Oe.value&&a.gte(fe.amount.value,1)?`+${Ai([[p.value,"smelting speed"],[ve.value,"ore gain"],[a.div(L.computedCoalGain.value,C),"coal gain"]],"/s",a.mul(c.value,b.value))}`:void 0]))},null),n(Ee,null,null),ce(S),a.gte(fe.amount.value,1)?n("div",{style:{width:"150px"}},[n(vl,{title:"Auto Smelt",modelValue:Oe.value,"onUpdate:modelValue":se=>Oe.value=se},null)]):void 0,n(Ee,null,null),n(Gt,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:_(()=>n(x,null,[ki(xe.value)]))},null),n(Ee,null,null),n("div",null,[s("Currently mining "),we(z.value),s(" ore every")," ",we(a.recip(E.value)),s(" seconds")]),ce(ae),n(Ee,null,null),it(ye,ee,ne,Be,Ie,Se),it(Ue,fe,De)])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),we(l.value),s(" "),l.displayName]))}}),Ar="coal",si=3,L=$t(Ar,function(){const e="Coal",t="#151716",l="#B2BeB5",i="var(--foreground)",o=ht(0,"coal"),r=ht(0,"ash"),d=Me(0),c=f(()=>a.times(d.value,1e3)),m=f(()=>a.times(d.value,.1)),p=f(()=>{let M=a.times(d.value,50);return R.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(M=M.times(5)),M}),w=Le(()=>({resource:re.logs,cost(){let M=a.times(F.amount.value,u(F.cost)).plus(this.amount.value);return a.gte(M,100)&&(M=a.pow(M,2).div(100)),a.gte(M,1e4)&&(M=a.pow(M,2).div(1e4)),M=a.pow(.95,j.books.smallFireBook.amount.value).times(M),M.pow(1.5).times(1e4)},display:_(()=>n(x,null,[n("h3",null,[s("Small Fire")]),n("br",null,null),s("Burn 1000 logs for 0.1 coal and 50 ash"),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),Q(c.value),s(" logs/sec"),n("br",null,null),s("+"),Q(m.value),s(" coal/sec"),n("br",null,null),s("+"),Q(p.value),s(" ash/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Y(u(w.cost)),s(" "),w.resource.displayName])),onPurchase(){d.value=a.add(d.value,1)},style:{color:i,width:"160px"}})),{min:b,max:C,add:v,remove:S}=il({active:d,buyable:w}),N=ht(w.amount,"small fires"),D=Me(0),z=f(()=>a.times(D.value,1e4)),B=f(()=>{let M=a.times(D.value,10);return R.elfTraining.bonfireElfTraining.milestones[0].earned.value&&(M=M.times(5)),M}),E=f(()=>{let M=a.times(D.value,1e3);return R.elfTraining.bonfireElfTraining.milestones[0].earned.value&&(M=M.times(5)),M}),F=Le(()=>({resource:N,cost(){return a.pow(.95,j.books.bonfireBook.amount.value).times(10)},display:_(()=>n(x,null,[n("h3",null,[s("Bonfire")]),n("br",null,null),s("Burn 10,000 logs for 10 coal and 1000 ash"),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),Q(z.value),s(" logs/sec"),n("br",null,null),s("+"),Q(B.value),s(" coal/sec"),n("br",null,null),s("+"),Q(E.value),s(" ash/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Y(u(F.cost)),s(" "),F.resource.displayName])),onPurchase(M){d.value=a.sub(d.value,M).max(0),D.value=a.add(D.value,1)},style:{color:i,width:"160px"},visibility:()=>y(se.bought.value)})),{min:Z,max:ae,add:oe,remove:ve}=il({buyable:F,active:D}),ie=Me(0),xe=f(()=>a.times(ie.value,1e6)),ye=f(()=>{let M=a.times(ie.value,1e4);return R.elfTraining.kilnElfTraining.milestones[0].earned.value&&(M=M.times(5)),M}),ee=f(()=>{let M=a.times(ie.value,1e4);return R.elfTraining.kilnElfTraining.milestones[0].earned.value&&(M=M.times(5)),M}),ne=Le(()=>({resource:re.logs,cost(){let M=this.amount.value;return a.gte(M,100)&&(M=a.pow(M,2).div(100)),a.gte(M,1e4)&&(M=a.pow(M,2).div(1e4)),M=a.pow(.95,j.books.kilnBook.amount.value).times(M),a.pow(1.1,M).times(1e7)},display:_(()=>n(x,null,[n("h3",null,[s("Charcoal Kiln")]),n("br",null,null),s("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),Q(xe.value),s(" logs/sec"),n("br",null,null),s("+"),Q(ye.value),s(" coal/sec"),n("br",null,null),s("+"),Q(ee.value),s(" ash/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Y(u(ne.cost)),s(" "),ne.resource.displayName])),onPurchase(){ie.value=a.add(ie.value,1)},style:{color:i,width:"160px"},visibility:()=>y(ct.bought.value)})),{min:Be,max:Ie,add:Se,remove:Ue}=il({buyable:ne,active:ie}),fe=Me(0),Oe=f(()=>a.times(a.pow(fe.value,de.row2Upgrades[1].bought.value?2:1),5e7).times(at.efficientDrill.bought.value?2:1).times(R.elfTraining.smallfireElfTraining.milestones[2].earned.value?2:1).times(R.elfTraining.bonfireElfTraining.milestones[2].earned.value?2:1).times(R.elfTraining.kilnElfTraining.milestones[2].earned.value?2:1)),De=Le(()=>({resource:at.metal,cost(){let M=this.amount.value;a.gte(M,100)&&(M=a.pow(M,2).div(100)),a.gte(M,1e4)&&(M=a.pow(M,2).div(1e4));let Ot=a.pow(1.15,M).times(10);return R.elfTraining.fertilizerElfTraining.milestones[2].earned.value&&(Ot=Ot.div(a.add(re.totalLogs.value,Math.E).ln())),Ot},display:_(()=>n(x,null,[n("h3",null,[s("Mining Drill")]),n("br",null,null),s("Dig through the ground to find 50,000,000 coal"),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("+"),Q(Oe.value),s(" coal/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Y(u(De.cost)),s(" "),De.resource.displayName])),onPurchase(){fe.value=a.add(fe.value,1)},style:{color:i,width:"160px"},visibility:()=>y(at.coalDrill.bought.value)})),{max:qe,min:pe,add:et,remove:X}=il({buyable:De,active:fe}),ut=q(()=>({resource:O(o),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:i}})),We=q(()=>({resource:O(o),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:i}})),ze=q(()=>({resource:O(r),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:i}})),se=q(()=>({resource:N,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){N.value=a.add(N.value,this.cost)},style:{color:i}})),$e=[ut,We,ze,se],dt=q(()=>({resource:O(o),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:i},visibility:()=>y(se.bought.value)})),Mt=q(()=>({resource:O(o),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:i},visibility:()=>y(se.bought.value)})),ot=q(()=>({canAfford(){return a.gte(re.logs.value,1e5)&&a.gte(r.value,1e5)},onPurchase(){re.logs.value=a.sub(re.logs.value,1e5),r.value=a.sub(r.value,1e5)},display:_(()=>n(x,null,[n("h3",null,[s("Mulched Soil")]),n("br",null,null),s("Double the bonus from Fertilized Soil"),n("br",null,null),n("br",null,null),s("Cost: "),Y(1e5),s(" "),re.logs.displayName,n("br",null,null),Y(1e5),s(" "),r.displayName])),style:{color:i},visibility:()=>y(se.bought.value)})),ct=q(()=>({resource:re.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:i},visibility:()=>y(se.bought.value)})),Ke=[dt,Mt,ot,ct],Ge=q(()=>({resource:O(o),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:i},visibility:()=>y(de.depthMilestones[4].earned.value)})),_t=[Ge],xt=Le(()=>({resource:O(o),cost(){let M=this.amount.value;return a.gte(M,50)&&(M=a.pow(M,2).div(50)),a.gte(M,200)&&(M=a.pow(M,2).div(200)),a.gte(M,2e6)&&(M=a.pow(M,2).div(2e6)),M=a.pow(.95,j.books.heatedCuttersBook.amount.value).times(M),R.elfTraining.heatedCutterElfTraining.milestones[0].earned.value&&(M=a.pow(.95,j.books.heatedCuttersBook.amount.value).times(M)),a.add(M,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:_(()=>n(x,null,[s("Cutters cut down trees "),Q(Ut.value),s("x faster")]))},style:{color:i},visibility:()=>y(ut.bought.value)})),It=Le(()=>({resource:O(o),cost(){let M=this.amount.value;return a.gte(M,50)&&(M=a.pow(M,2).div(50)),a.gte(M,200)&&(M=a.pow(M,2).div(200)),a.gte(M,2e6)&&(M=a.pow(M,2).div(2e6)),M=a.pow(.95,j.books.heatedPlantersBook.amount.value).times(M),R.elfTraining.heatedPlanterElfTraining.milestones[0].earned.value&&(M=a.pow(.95,j.books.heatedPlantersBook.amount.value).times(M)),a.add(M,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:_(()=>n(x,null,[s("Planters plant trees "),Q(Ae.value),s("x faster")]))},style:{color:i},visibility:()=>y(We.bought.value)})),ue=Le(()=>({resource:O(r),cost(){let M=this.amount.value;return a.gte(M,50)&&(M=a.pow(M,2).div(50)),a.gte(M,200)&&(M=a.pow(M,2).div(200)),a.gte(M,2e6)&&(M=a.pow(M,2).div(2e6)),M=a.pow(.95,j.books.fertilizerBook.amount.value).times(M),R.elfTraining.fertilizerElfTraining.milestones[1].earned.value&&(M=a.pow(.95,j.books.fertilizerBook.amount.value).times(M)),a.add(M,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:_(()=>n(x,null,[s("Trees give "),Q(pt.value),s("x more logs")]))},style:{color:i},visibility:()=>y(ze.bought.value)})),$=[xt,It,ue],he=J(()=>[le(()=>({addend(){return a.times(xt.amount.value,.25)},description:"Heated Cutters",enabled(){return a.gt(xt.amount.value,0)}})),g(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:dt.bought}))]),Ut=f(()=>he.apply(1)),Jt=J(()=>[le(()=>({addend(){return a.times(It.amount.value,.25)},description:"Heated Planters",enabled(){return a.gt(It.amount.value,0)}})),g(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:Mt.bought}))]),Ae=f(()=>Jt.apply(1)),Ne=J(()=>[le(()=>({addend(){return a.times(ue.amount.value,.25)},description:"Fertilized Soil",enabled(){return a.gt(ue.amount.value,0)}})),g(()=>({multiplier:2,description:"Mulched Soil",enabled:ot.bought}))]),pt=f(()=>Ne.apply(1)),Tt=J(()=>[le(()=>({addend(){return m.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),le(()=>({addend(){return B.value},description:"Bonfires",enabled(){return a.gt(D.value,0)}})),le(()=>({addend(){return ye.value},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}})),le(()=>({addend(){return Oe.value},description:"Mining Drills",enabled(){return a.gt(fe.value,0)}})),g(()=>({multiplier:2,description:"Carry coal in boxes",enabled:nt.upgrades.coalUpgrade.bought})),g(()=>({multiplier:()=>a.div(nt.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:nt.upgrades.coalUpgrade.bought})),g(()=>({multiplier:()=>{let M=w.amount.value;return R.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(M=a.div(F.amount.value,10).add(M)),a.div(M,1e4).add(1)},description:"Small Fires Synergy",enabled:Re.elves.smallFireElf.bought})),g(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Re.elves.bonfireElf.bought})),g(()=>({multiplier:()=>a.div(ne.amount.value,100).times(Je.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Re.elves.kilnElf.bought})),g(()=>({multiplier:2,description:"Mining overalls",enabled:ft.metalUpgrades.metalUpgrade2.bought})),g(()=>({multiplier:3,description:"Mining helmet",enabled:ft.metalUpgrades.metalUpgrade3.bought})),g(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:ft.metalUpgrades.metalUpgrade4.bought})),g(()=>({multiplier:2,description:"12 Elves Trained",enabled:Re.milestones[11].earned})),ml(()=>({exponent:1.25,description:"3 Elves Trained",enabled:Re.milestones[2].earned,supportLowNumbers:!0})),g(()=>({multiplier:()=>a.mul(de.depth.value,.25).add(1),description:"5m Well Depth",enabled:de.depthMilestones[0].earned})),g(()=>({multiplier:de.extractorCoal,description:"Heavy Extractor",enabled:()=>a.gt(de.activeExtractor.value,0)})),ml(()=>({exponent:1.05,description:"Jack Level 2",enabled:R.elfTraining.heatedCutterElfTraining.milestones[1].earned}))]),st=f(()=>Tt.apply(0)),Rt=J(()=>[le(()=>({addend(){return p.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),le(()=>({addend(){return E.value},description:"Bonfires",enabled(){return a.gt(D.value,0)}})),le(()=>({addend(){return ee.value},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}})),g(()=>({multiplier:2,description:"Carry ash in boxes",enabled:nt.upgrades.ashUpgrade.bought})),g(()=>({multiplier:()=>a.div(nt.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:nt.upgrades.ashUpgrade.bought})),g(()=>({multiplier:()=>{let M=w.amount.value;return R.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(M=a.div(F.amount.value,100).add(M)),a.div(M,1e3).add(1)},description:"Small Fires Synergy",enabled:Re.elves.smallFireElf.bought})),g(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Re.elves.bonfireElf.bought})),g(()=>({multiplier:()=>a.div(ne.amount.value,100).times(Je.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Re.elves.kilnElf.bought})),g(()=>({multiplier:4,description:"Mining boots",enabled:ft.metalUpgrades.metalUpgrade1.bought})),ml(()=>({exponent:1.1,description:"Joy Level 2",enabled:R.elfTraining.smallfireElfTraining.milestones[1].earned})),ml(()=>({exponent:1.1,description:"Faith Level 2",enabled:R.elfTraining.bonfireElfTraining.milestones[1].earned})),ml(()=>({exponent:1.1,description:"Snowball Level 2",enabled:R.elfTraining.kilnElfTraining.milestones[1].earned}))]),rl=f(()=>Rt.apply(0)),ul=J(()=>[le(()=>({addend(){return a.negate(c.value)},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),le(()=>({addend(){return a.negate(z.value)},description:"Bonfires",enabled(){return a.gt(D.value,0)}})),le(()=>({addend(){return a.negate(xe.value)},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}}))]),te=f(()=>ul.apply(0)),[V,Qe]=sl(()=>[{title:"Log Consumption",modifier:ul,base:0,visible(){return a.gt(d.value,0)||a.gt(D.value,0)||a.gt(ie.value,0)}},{title:"Coal Gain",modifier:Tt,base:0,visible(){return a.gt(d.value,0)||a.gt(D.value,0)||a.gt(ie.value,0)}},{title:"Ash Gain",modifier:Rt,base:0,visible(){return a.gt(d.value,0)||a.gt(D.value,0)||a.gt(ie.value,0)}}]),lt=H(!1),Pt=_(()=>n(Et,{modelValue:lt.value,"onUpdate:modelValue":M=>lt.value=M},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:V}));tt.on("update",M=>{a.lt(U.day.value,si)||a.times(M,te.value).negate().gt(re.logs.value)||(re.logs.value=a.times(M,te.value).plus(re.logs.value),o.value=a.times(M,st.value).plus(o.value),r.value=a.times(M,rl.value).plus(r.value),d.value=a.max(d.value,0))});const{total:Ft,trackerDisplay:Wt}=bl({resource:o,goal:1e7,name:e,day:si,color:t,modal:{show:lt,display:Pt}});return{name:e,color:t,coal:o,totalCoal:Ft,computedCoalGain:st,ash:r,activeFires:d,buildFire:w,activeBonfires:D,buildBonfire:F,activeKilns:ie,buildKiln:ne,activeDrills:fe,buildDrill:De,warmerCutters:ut,warmerPlanters:We,basicFertilizer:ze,unlockBonfire:se,dedicatedCutters:dt,dedicatedPlanters:Mt,betterFertilizer:ot,unlockKiln:ct,efficientSmelther:Ge,heatedCutters:xt,heatedPlanters:It,moreFertilizer:ue,computedHeatedCutterEffect:Ut,computedHeatedPlanterEffect:Ae,computedFertilizerEffect:pt,generalTabCollapsed:Qe,minWidth:700,display:_(()=>n(x,null,[ce(Wt),n(Ee,null,null),n(Gt,{resource:o,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(st.value,0)?`+${Q(st.value)}/s`:void 0},null),n(Ee,null,null),n(Gt,{resource:r,color:l,style:"margin-bottom: 0",effectDisplay:a.gt(rl.value,0)?`+${Q(rl.value)}/s`:void 0},null),n(Ee,null,null),n(Hl,null,{default:()=>[n(Qt,null,{default:()=>[ce(w),n("div",null,[Y(a.floor(d.value)),s("/"),Y(a.floor(w.amount.value))]),it(b,S,v,C)]}),se.bought.value?n(x,null,[n(Ee,null,null),n(Qt,null,{default:()=>[ce(F),n("div",null,[Y(D.value),s("/"),Y(F.amount.value)]),it(Z,ve,oe,ae)]})]):void 0,ct.bought.value?n(x,null,[n(Ee,null,null),n(Qt,null,{default:()=>[ce(ne),n("div",null,[Y(ie.value),s("/"),Y(ne.amount.value)]),it(Be,Ue,Se,Ie)]})]):void 0,at.coalDrill.bought.value?n(x,null,[n(Ee,null,null),n(Qt,null,{default:()=>[ce(De),n("div",null,[Y(fe.value),s("/"),Y(De.amount.value)]),it(pe,X,et,qe)]})]):void 0]}),n(Ee,null,null),Ml($e,Ke,_t),it(...$)])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(o.value),s(" "),o.displayName]))}}),kr="elves",Jl=4,Re=$t(kr,function(){const e="Elves",t="red",l="#911D21",o=el(()=>({direction:Fe.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>U.day.value===Jl?a.div(Ge.value,6).times(.8333333333333334).add(a.div(a.add(L.coal.value,1).log10(),a.log10(1e9)).clamp(0,1).div(6)):1,display:_(()=>U.day.value===Jl?a.lt(Ge.value,6)?n(x,null,[Y(Ge.value),s("/6 elves")]):n(x,null,[Y(L.coal.value),s("/"),Y(1e9),s(" coal")]):"")})),r=fr(()=>({thingsToReset:[re,Ye,L],onReset(){setTimeout(()=>{Ae.earned.value?(re.row1Upgrades.forEach(te=>te.bought.value=!0),re.row2Upgrades.forEach(te=>te.bought.value=!0)):xt.earned.value&&(re.row1Upgrades[4].bought.value=!0,re.row2Upgrades[4].bought.value=!0),Ut.earned.value&&(Ye.foundationProgress.value=100),pt.earned.value&&(L.warmerCutters.bought.value=!0,L.warmerPlanters.bought.value=!0,L.basicFertilizer.bought.value=!0,L.unlockBonfire.bought.value=!0,L.dedicatedCutters.bought.value=!0,L.dedicatedPlanters.bought.value=!0,L.betterFertilizer.bought.value=!0,L.unlockKiln.bought.value=!0,L.efficientSmelther.bought.value=!0)})}})),d=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>a.gt(j.books.cuttersBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),c=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>a.gt(j.books.plantersBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),m=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>a.gt(j.books.expandersBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),p=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>a.gt(j.books.heatedCuttersBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),w=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>a.gt(j.books.heatedPlantersBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),b=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>a.gt(j.books.fertilizerBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),C=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>a.gt(j.books.smallFireBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),v=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>a.gt(j.books.bonfireBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),S=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>a.gt(j.books.kilnBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),N=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.paperBook.amount.value,.1).add(1),description:"The Book Thief",enabled:()=>a.gt(j.books.paperBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),D=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.boxBook.amount.value,.1).add(1),description:"Not a box",enabled:()=>a.gt(j.books.boxBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),z=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.clothBook.amount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>a.gt(j.books.clothBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),B=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.miningDrillBook.amount.value,.1).add(1),description:"Drills and Mills",enabled:()=>a.gt(j.books.miningDrillBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),E=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.heavyDrillBook.amount.value,.1).add(1),description:"Deep in the Earth",enabled:()=>a.gt(j.books.heavyDrillBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),F=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.oilBook.amount.value,.1).add(1),description:"Burning the Midnight Oil",enabled:()=>a.gt(j.books.oilBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),Z=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.metalBook.amount.value,.1).add(1),description:"Physical Metallurgy",enabled:()=>a.gt(j.books.metalBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),[ae,oe]=sl(()=>[{title:"Holly Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:Ke.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:Ke.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:Ke.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:p,base:10,unit:"/s",visible:Ke.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:w,base:10,unit:"/s",visible:Ke.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:b,base:10,unit:"/s",visible:Ke.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:C,base:10,unit:"/s",visible:Ke.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:v,base:10,unit:"/s",visible:Ke.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:S,base:10,unit:"/s",visible:Ke.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:N,base:10,unit:"/s",visible:Ke.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:D,base:10,unit:"/s",visible:Ke.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:z,base:10,unit:"/s",visible:Ke.clothElf.bought},{title:"Peppermint Auto-Buy Frequency",modifier:B,base:10,unit:"/s",visible:R.elfTraining.expandersElfTraining.milestones[3].earned},{title:"Frosty Auto-Buy Frequency",modifier:E,base:10,unit:"/s",visible:R.elfTraining.fertilizerElfTraining.milestones[4].earned.value},{title:"Cocoa Auto-Buy Frequency",modifier:F,base:10,unit:"/s",visible:R.elfTraining.heatedCutterElfTraining.milestones[4].earned.value},{title:"Twinkle Auto-Buy Frequency",modifier:Z,base:10,unit:"/s",visible:R.elfTraining.expandersElfTraining.milestones[4].earned}]),ve=H(!1),ie=_(()=>n(Et,{modelValue:ve.value,"onUpdate:modelValue":te=>ve.value=te},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:ae})),xe=f(()=>{let te=a.pow(4,Ge.value).times(1e6);return a.gte(Ge.value,9)&&(te=a.times(te,1e15)),te});function ye(te){var Al,Dl;const V=Me(0),Qe=Me(0),lt=te.hasToggle?Me(!1):H(!0),Pt=f(()=>te.cooldownModifier.apply(10)),Ft=Ct((Al=te.canBuy)!=null?Al:!0),Wt=Ct((Dl=te.buyMax)!=null?Dl:!1);function M(Kt){if(Ot.bought.value&&u(Ft)){V.value=a.add(V.value,Kt);const cl=a.recip(Pt.value);Qe.value+=Kt/cl.toNumber(),(Ia(te.buyable)?te.buyable:[te.buyable]).forEach(tl=>{var Il;for(;Wt||a.gte(V.value,cl);)if(te.customCost==null?u(tl.canPurchase):a.gte(tl.resource.value,te.customCost(tl.amount.value)))tl.amount.value=a.add(tl.amount.value,1),V.value=a.sub(V.value,cl),(Il=te.onAutoPurchase)==null||Il.call(te,tl);else{V.value=cl;break}})}}const Ot=q(()=>({...te,buyable:void 0,toggle:lt,buyProgress:V,update:M,resource:L.coal,cost:xe,computedAutoBuyCooldown:Pt,amountOfTimesDone:Qe,name:te.name,display:()=>({title:te.name,description:_(()=>n(x,null,[te.description,Ot.bought.value?null:n(x,null,[" ",s("Training this elf will require resetting all your progress from days 1-3.")]),Ot.bought.value&&te.hasToggle===!0?n(x,null,[n(vl,{title:te.toggleDesc,"onUpdate:modelValue":Kt=>lt.value=Kt,modelValue:lt.value},null)]):null])),showCost:!Ot.bought.value}),style:"width: 190px",onPurchase(){var Kt;(Kt=te.onPurchase)==null||Kt.call(te),r.reset()}}));return Ot}const ee=ye({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:re.row1Buyables[0],cooldownModifier:d,buyMax:()=>R.elfTraining.cutterElfTraining.milestones[1].earned.value}),ne=ye({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:re.row1Buyables[1],cooldownModifier:c,buyMax:()=>R.elfTraining.planterElfTraining.milestones[1].earned.value}),Be=ye({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:re.row1Buyables[2],cooldownModifier:m,buyMax:()=>R.elfTraining.expandersElfTraining.milestones[1].earned.value}),Ie=[ee,ne,Be],Se=ye({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:L.heatedCutters,cooldownModifier:p,buyMax:()=>R.elfTraining.heatedCutterElfTraining.milestones[2].earned.value}),Ue=ye({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:L.heatedPlanters,cooldownModifier:w,buyMax:()=>R.elfTraining.heatedPlanterElfTraining.milestones[2].earned.value}),fe=ye({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:L.moreFertilizer,cooldownModifier:b}),Oe=[Se,Ue,fe],De=ye({name:"Joy",description:"Joy will automatically purchase small fires you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased small fires automatically. Small fires will start giving a boost to ash and coal gain.",buyable:L.buildFire,cooldownModifier:C,visibility:()=>y(nt.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){De.toggle.value&&(L.activeFires.value=a.add(L.activeFires.value,1))},onPurchase(){U.days[4].recentlyUpdated.value=!0}}),qe=ye({name:"Faith",description:"Faith will automatically purchase bonfires you can afford. You can toggle whether or not to enable the purchased bonfires automatically. Bonfires will start giving a boost to ash and coal gain.",buyable:L.buildBonfire,cooldownModifier:v,visibility:()=>y(nt.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const te=u(this.buyable.cost);L.activeFires.value=a.sub(L.activeFires.value,te).max(0),L.buildFire.amount.value=a.sub(L.buildFire.amount.value,te).max(0),qe.toggle.value&&(L.activeBonfires.value=a.add(L.activeBonfires.value,1))},onPurchase(){U.days[4].recentlyUpdated.value=!0},canBuy:L.unlockBonfire.bought}),pe=ye({name:"Snowball",description:"Snowball will automatically purchase kilns you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased kilns automatically. Kilns will start giving a boost to ash and coal gain.",buyable:L.buildKiln,cooldownModifier:S,visibility:()=>y(nt.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){pe.toggle.value&&(L.activeKilns.value=a.add(L.activeKilns.value,1))},onPurchase(){U.days[4].recentlyUpdated.value=!0},canBuy:L.unlockKiln.bought}),et=[De,qe,pe],X=ye({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(j.books),cooldownModifier:N,visibility:()=>y(Ze.elfUpgrades.paperElf.bought.value)}),ut=ye({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:Object.values(nt.buyables),cooldownModifier:D,visibility:()=>y(Ze.elfUpgrades.boxElf.bought.value)}),We=ye({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[ft.buildPens,ft.betterShears,ft.fasterSpinning],cooldownModifier:z,visibility:()=>y(Ze.elfUpgrades.clothElf.bought.value)}),ze=[X,ut,We],se=ye({name:"Peppermint",description:"Peppermint will automatically purchase all mining drills you can afford, without actually spending any resources.",buyable:L.buildDrill,cooldownModifier:B,visibility:()=>y(R.elfTraining.expandersElfTraining.milestones[3].earned.value),hasToggle:!0,toggleDesc:"Activate auto-purchased mining drills",onAutoPurchase(){se.toggle.value&&(L.activeDrills.value=a.add(L.activeDrills.value,1))}}),$e=ye({name:"Frosty",description:"Frosty will automatically purchase all drill types in the oil section, without actually spending any resources.",buyable:[de.buildHeavy,de.buildHeavy2,de.buildExtractor],cooldownModifier:E,visibility:()=>y(R.elfTraining.fertilizerElfTraining.milestones[4].earned.value),hasToggle:!0,toggleDesc:"Activate auto-purchased oil drills",onAutoPurchase(te){$e.toggle.value&&(te===de.buildHeavy||te===de.buildHeavy||te===de.buildHeavy)&&(de.activeHeavy.value=a.add(de.activeHeavy.value,1))}}),dt=ye({name:"Cocoa",description:"Cocoa will automatically purchase all oil-using machines you can afford, without actually spending any resources.",buyable:[de.buildPump,de.buildBurner,de.buildSmelter],cooldownModifier:F,visibility:()=>y(R.elfTraining.heatedCutterElfTraining.milestones[4].earned.value),hasToggle:!0,toggleDesc:"Activate auto-purchased oil-using machines",onAutoPurchase(te){$e.toggle.value&&(te===de.buildPump?de.activePump.value=a.add(de.activePump.value,1):te===de.buildBurner?de.activeBurner.value=a.add(de.activeBurner.value,1):te===de.buildSmelter&&(de.activeSmelter.value=a.add(de.activeSmelter.value,1)))}}),Mt=[se,$e,dt],ot=ye({name:"Twinkle",description:"Twinkle will automatically purchase all metal buyables you can afford, without actually spending any resources.",buyable:[at.oreDrill,at.industrialCrucible,at.hotterForge],cooldownModifier:Z,visibility:()=>y(R.elfTraining.expandersElfTraining.milestones[4].earned.value)}),ct=[ot],Ke={cuttersElf:ee,plantersElf:ne,expandersElf:Be,heatedCuttersElf:Se,heatedPlantersElf:Ue,fertilizerElf:fe,smallFireElf:De,bonfireElf:qe,kilnElf:pe,paperElf:X,boxElf:ut,clothElf:We,miningDrillElf:se,heavyDrillElf:$e,oilElf:dt,metalElf:ot},Ge=f(()=>Object.values(Ke).filter(te=>te.bought.value).length),_t=P(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>a.gte(Ge.value,1)})),xt=P(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>a.gte(Ge.value,2),visibility:()=>y(_t.earned.value)})),It=P(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>a.gte(Ge.value,3),visibility:()=>y(xt.earned.value)})),ue=P(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(Ge.value,4),visibility:()=>y(It.earned.value)})),$=P(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>a.gte(Ge.value,5),visibility:()=>y(ue.earned.value)})),he=P(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>a.gte(Ge.value,6),visibility:()=>y($.earned.value)})),Ut=P(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>a.gte(Ge.value,7),visibility:()=>y(he.earned.value&&U.day.value>5)})),Jt=P(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>a.gte(Ge.value,8),visibility:()=>y(Ut.earned.value)})),Ae=P(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>a.gte(Ge.value,9),visibility:()=>y(Jt.earned.value)})),Ne=P(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>a.gte(Ge.value,10),visibility:()=>y(U.day.value>=10)})),pt=P(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>a.gte(Ge.value,11),visibility:()=>y(Ne.earned.value)})),Tt=P(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>a.gte(Ge.value,12),visibility:()=>y(pt.earned.value)})),st=[_t,xt,It,ue,$,he,Ut,Jt,Ae,Ne,pt,Tt],Rt={manualMilestone:_t,researchMilestone:xt,coalGainMilestone:It,logGainMilestone:ue,forestMilestone:$,elvesMilestone:he,foundationMilestone:Ut,forestMilestone2:Jt,treeUpgradesMilestone:Ae,elvesMilestone2:Ne,coalUpgradesMilestone:pt,coalGainMilestone2:Tt},{collapseMilestones:rl,display:ul}=la(Rt);return tt.on("update",te=>{a.lt(U.day.value,Jl)||Object.values(Ke).forEach(V=>V.update(te))}),Vt(()=>{U.day.value===Jl&&a.gte(Ge.value,6)&&a.gte(L.coal.value,1e9)&&U.completeDay()}),{name:e,color:t,elves:Ke,totalElves:Ge,milestones:st,collapseMilestones:rl,generalTabCollapsed:oe,minWidth:700,display:_(()=>n(x,null,[n("div",null,[U.day.value===Jl?`Reach ${Y(6)} trained elves and ${Y(1e9)} ${L.coal.displayName} to complete the day`:`${e} Complete!`," ",s("-")," ",n("button",{class:"button",style:"display: inline-block;",onClick:()=>ve.value=!0},[s("Check Modifiers")])]),ce(o),ce(ie),n(Ee,null,null),n("div",{style:"width: 600px"},[Ml(Ie,Oe,et,ze,Mt,ct)]),ul()]))}}),Cr="management",Wl=12,ql=13,R=$t(Cr,()=>{const e="Management",t="green",l=el(()=>({direction:Fe.Right,width:600,height:25,fillStyle:`backgroundColor: ${t}`,progress:()=>U.day.value===Wl?ut.reduce((V,Qe)=>V+Math.min(1,Qe.level.value/3),0)/ut.length:U.day.value===ql?We.reduce((V,Qe)=>V+Math.min(1,Qe.level.value/5),0)/We.length:1,display:_(()=>U.day.value===Wl||U.day.value===ql?n(x,null,[Y(a.times(u(l.progress),U.day.value===ql?80:36)),s("/"),U.day.value===ql?80:36,s(" elf levels")]):"")})),i=f(()=>{let V=0;for(const Qe of Object.values(X))V+=Qe.level.value;return V}),o=f(()=>Object.values(X).reduce((V,Qe)=>V.add(Qe.exp.value),new a(0))),r=q(()=>({display:{title:"Teach the Elves",description:"The Elves probably need to be taught if they're to do better. Maybe you'll build a school so you can teach them?"},resource:re.logs,cost:1e21})),d=q(()=>({display:{title:"Add a Classroom?",description:"Yay, you have a school. Too bad it has pretty much nothing in it. Maybe you could add some classrooms to make it less boring and more enticing to the Elves?"},visibility:()=>y(r.bought.value),resource:nt.boxes,style:"width: 150px",cost:1e13})),c=J(()=>[g(()=>({multiplier:Tt,description:"Classroom Effect",enabled:d.bought}))]),m=f(()=>c.apply(1));function p(V,Qe,...lt){const Pt=Me(0);let Ft=["Holly","Ivy","Hope","Jack","Mary","Noel","Joy","Faith","Snowball","Star","Bell","Gingersnap"].indexOf(V.name)+1;(V.name=="Star"||V.name=="Bell")&&(Ft/=3);const Wt=f(()=>a.pow(5,M.value).mul(4e3).mul(Ft)),M=f(()=>a.min(a.affordGeometricSeries(Pt.value,a.mul(4e3,Ft),5,0),Ne.amount.value).toNumber()),Ot=f(()=>a.sub(Pt.value,a.sumGeometricSeries(M.value,a.mul(4e3,Ft),5,0))),Al=el(()=>({direction:Fe.Right,width:160,height:12,style:()=>({"margin-top":"8px","box-shadow":se.value[V.name]?"0 0 12px "+(ae.value==V.name?"black":"white"):""}),baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",borderStyle:()=>a.gte(M.value,Ne.amount.value)?"border-color: red":"",progress:()=>a.div(Ot.value,Wt.value),display:_(()=>a.gte(M.value,Ne.amount.value)?n(x,null,[s("Limit reached")]):n(x,null,[Q(Ot.value),s("/"),Q(Wt.value),s(" XP")]))})),{collapseMilestones:Dl,display:Kt}=la(Qe),cl=J(()=>[g(()=>({multiplier:m,description:"Global XP Multiplier"})),g(()=>({multiplier:ze,description:"Focus Multiplier",enabled:()=>a.gt(dt.value,0)&&se.value[V.name]==!0})),...lt]),tl=f(()=>cl.apply(.1));return Lt(()=>({display:{title:_(()=>n(x,null,[V.name,s(" - LV "),Y(M.value)])),description:_(()=>n(x,null,[V.name,s(" can buy buyables "),Y(V.computedAutoBuyCooldown.value)," ",s("times per second, gaining")," ",a.gte(M.value,Ne.amount.value)?0:Q(a.mul(tl.value,V.computedAutoBuyCooldown.value))," ",s("XP/sec."),ce(Al)]))},style:()=>({width:"190px",background:ae.value==V.name?"var(--foreground)":""}),onClick(){ae.value=V.name},canClick(){return ae.value!==V.name},name:V.name,state:Dl,displayMilestone:Kt,level:M,exp:Pt,milestones:Qe,timeForExp:V.computedAutoBuyCooldown,amountOfTimesDone:V.amountOfTimesDone,elfXPGainComputed:tl,elfXPGain:cl}))}const w=[P(()=>({display:{requirement:"Holly Level 1",effectDisplay:_(()=>n(x,null,[s("Multiply log gain by "),n("sup",null,[s("9")]),n(pl,null,{default:()=>[s("Cutter amount")]}),s(".")]))},shouldEarn:()=>ve.level.value>=1})),P(()=>({display:{requirement:"Holly Level 2",effectDisplay:"Holly now buys max."},visibility:()=>y(w[0].earned.value),shouldEarn:()=>ve.level.value>=2})),P(()=>({display:{requirement:"Holly Level 3",effectDisplay:_(()=>n(x,null,[s("Multiply all cloth actions' effectiveness by log"),n("sub",null,[s("10")]),s("Cutter amount.")]))},visibility:()=>y(w[1].earned.value),shouldEarn:()=>ve.level.value>=3})),P(()=>({display:{requirement:"Holly Level 4",effectDisplay:"Multiply auto cutting amount by 1.1 per day completed"},visibility:()=>y(w[2].earned.value&&U.day.value>=13),shouldEarn:()=>ve.level.value>=4})),P(()=>({display:{requirement:"Holly Level 5",effectDisplay:"Raise workshop expansion cost by 0.95"},visibility:()=>y(w[3].earned.value&&U.day.value>=13),shouldEarn:()=>ve.level.value>=5}))],b=[P(()=>({display:{requirement:"Ivy Level 1",effectDisplay:"Planters are now twice as efficent."},shouldEarn:()=>ie.level.value>=1})),P(()=>({display:{requirement:"Ivy Level 2",effectDisplay:"Ivy now buys max."},visibility:()=>y(b[0].earned.value),shouldEarn:()=>ie.level.value>=2})),P(()=>({display:{requirement:"Ivy Level 3",effectDisplay:_(()=>n(x,null,[s("Auto planting speed is multiplied by 2"),n("sup",null,[s("(log"),n("sub",null,[s("10")]),s("(logs)"),n("sup",null,[s("0.2")]),s(")")])]))},visibility:()=>y(b[1].earned.value),shouldEarn:()=>ie.level.value>=3})),P(()=>({display:{requirement:"Ivy Level 4",effectDisplay:"Divide planter cost by 10"},visibility:()=>y(b[2].earned.value&&U.day.value>=13),shouldEarn:()=>ie.level.value>=4})),P(()=>({display:{requirement:"Ivy Level 5",effectDisplay:"The lesser of auto planting and cutting amounts is increased to match the greater"},visibility:()=>y(b[3].earned.value&&U.day.value>=13),shouldEarn:()=>ie.level.value>=5}))],C=[P(()=>({display:{requirement:"Hope Level 1",effectDisplay:"Forest size grows by trees planted per second raised to ^0.99"},shouldEarn:()=>xe.level.value>=1})),P(()=>({display:{requirement:"Hope Level 2",effectDisplay:"Hope now buys max."},visibility:()=>y(C[0].earned.value),shouldEarn:()=>xe.level.value>=2})),P(()=>({display:{requirement:"Hope Level 3",effectDisplay:"The workshop can be expanded past 100%, but costs scale faster. It also buys max now."},visibility:()=>y(C[1].earned.value),shouldEarn:()=>xe.level.value>=3})),P(()=>({display:{requirement:"Hope Level 4",effectDisplay:"Unlock an elf that autobuys mining drills."},visibility:()=>y(C[2].earned.value&&U.day.value>=13),shouldEarn:()=>xe.level.value>=4})),P(()=>({display:{requirement:"Hope Level 5",effectDisplay:"Unlock an elf that autobuys metal buyables."},visibility:()=>y(C[3].earned.value&&U.day.value>=13),shouldEarn:()=>xe.level.value>=5}))],v=[P(()=>({display:{requirement:"Jack Level 1",effectDisplay:'"Fahrenheit 451" affects "Heated Cutters" twice.'},shouldEarn:()=>ee.level.value>=1})),P(()=>({display:{requirement:"Jack Level 2",effectDisplay:"Coal gain is raised to the ^1.05"},visibility:()=>y(v[0].earned.value),shouldEarn:()=>ee.level.value>=2})),P(()=>({display:{requirement:"Jack Level 3",effectDisplay:"Jack now buys max."},visibility:()=>y(v[1].earned.value),shouldEarn:()=>ee.level.value>=3})),P(()=>({display:{requirement:"Jack Level 4",effectDisplay:_(()=>n(x,null,[s("Oil gain is multiplied by "),n(pl,null,{default:()=>[s("total elf levels")]}),s(".")]))},visibility:()=>y(v[2].earned.value&&U.day.value>=13),shouldEarn:()=>ee.level.value>=4})),P(()=>({display:{requirement:"Jack Level 5",effectDisplay:"Unlock an elf that autobuys oil-using machines."},visibility:()=>y(v[3].earned.value&&U.day.value>=13),shouldEarn:()=>ee.level.value>=5}))],S=[P(()=>({display:{requirement:"Mary Level 1",effectDisplay:'"Tillamook Burn Country" affects "Heated Planters" twice.'},shouldEarn:()=>ne.level.value>=1})),P(()=>({display:{requirement:"Mary Level 2",effectDisplay:"Metal gain is raised to the 1.1."},visibility:()=>y(S[0].earned.value),shouldEarn:()=>ne.level.value>=2})),P(()=>({display:{requirement:"Mary Level 3",effectDisplay:"Mary now buys max."},visibility:()=>y(S[1].earned.value),shouldEarn:()=>ne.level.value>=3})),P(()=>({display:{requirement:"Mary Level 4",effectDisplay:"Double automatic tree planting speed"},visibility:()=>y(S[2].earned.value&&U.day.value>=13),shouldEarn:()=>ne.level.value>=4})),P(()=>({display:{requirement:"Mary Level 5",effectDisplay:_(()=>n(x,null,[s("Auto smelting speed is multiplied by "),n(pl,null,{default:()=>[s("total XP/1000")]}),s(".")]))},visibility:()=>y(S[3].earned.value&&U.day.value>=13),shouldEarn:()=>ne.level.value>=5}))],N=[P(()=>({display:{requirement:"Noel Level 1",effectDisplay:_(()=>n(x,null,[s("Log gain is multiplied by "),n(pl,null,{default:()=>[s("total elf levels")]}),s(".")]))},shouldEarn:()=>Be.level.value>=1})),P(()=>({display:{requirement:"Noel Level 2",effectDisplay:`"The Garden Tree's Handbook" affects "Fertilized Soil" twice`},visibility:()=>y(N[0].earned.value),shouldEarn:()=>Be.level.value>=2})),P(()=>({display:{requirement:"Noel Level 3",effectDisplay:"Divide the mining drill cost by ln(Total logs + e)"},visibility:()=>y(N[1].earned.value),shouldEarn:()=>Be.level.value>=3})),P(()=>({display:{requirement:"Noel Level 4",effectDisplay:_(()=>n(x,null,[s("Reduce oil refinery cost by (Plastic amount)"),n("sup",null,[s("2")])]))},visibility:()=>y(N[2].earned.value&&U.day.value>=13),shouldEarn:()=>Be.level.value>=4})),P(()=>({display:{requirement:"Noel Level 5",effectDisplay:"Unlock an elf that autobuys drills and extractors"},visibility:()=>y(N[3].earned.value&&U.day.value>=13),shouldEarn:()=>ne.level.value>=5}))],D=[P(()=>({display:{requirement:"Joy Level 1",effectDisplay:"Small Fire synergy counts bonfires at reduced rate."},shouldEarn:()=>Se.level.value>=1})),P(()=>({display:{requirement:"Joy Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>y(D[0].earned.value),shouldEarn:()=>Se.level.value>=2})),P(()=>({display:{requirement:"Joy Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>y(D[1].earned.value),shouldEarn:()=>Se.level.value>=3})),P(()=>({display:{requirement:"Joy Level 4",effectDisplay:"Metal gain is boosted by heavy drills"},visibility:()=>y(D[2].earned.value&&U.day.value>=13),shouldEarn:()=>Se.level.value>=4})),P(()=>({display:{requirement:"Joy Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>y(D[3].earned.value&&U.day.value>=13),shouldEarn:()=>Se.level.value>=5}))],z=[P(()=>({display:{requirement:"Faith Level 1",effectDisplay:"Multiply bonfire efficiency by 5."},shouldEarn:()=>Ue.level.value>=1})),P(()=>({display:{requirement:"Faith Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>y(z[0].earned.value),shouldEarn:()=>Ue.level.value>=2})),P(()=>({display:{requirement:"Faith Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>y(z[1].earned.value),shouldEarn:()=>Ue.level.value>=3})),P(()=>({display:{requirement:"Faith Level 4",effectDisplay:"Oil gain is boosted by heavy drill drills"},visibility:()=>y(z[2].earned.value&&U.day.value>=13),shouldEarn:()=>Ue.level.value>=4})),P(()=>({display:{requirement:"Faith Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>y(z[3].earned.value&&U.day.value>=13),shouldEarn:()=>Ue.level.value>=5}))],B=[P(()=>({display:{requirement:"Snowball Level 1",effectDisplay:"Multiply kiln efficiency by 5."},shouldEarn:()=>fe.level.value>=1})),P(()=>({display:{requirement:"Snowball Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>y(B[0].earned.value),shouldEarn:()=>fe.level.value>=2})),P(()=>({display:{requirement:"Snowball Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>y(B[1].earned.value),shouldEarn:()=>fe.level.value>=3})),P(()=>({display:{requirement:"Snowball Level 4",effectDisplay:"Plastic gain is boosted by heavy extractors"},visibility:()=>y(B[2].earned.value&&U.day.value>=13),shouldEarn:()=>fe.level.value>=4})),P(()=>({display:{requirement:"Snowball Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>y(B[3].earned.value&&U.day.value>=13),shouldEarn:()=>fe.level.value>=5}))],E=[P(()=>({display:{requirement:"Star Level 1",effectDisplay:"Book cost is divided by total books bought."},shouldEarn:()=>De.level.value>=1})),P(()=>({display:{requirement:"Star Level 2",effectDisplay:"Pulp requires 10x less ash"},visibility:()=>y(E[0].earned.value),shouldEarn:()=>De.level.value>=2})),P(()=>({display:{requirement:"Star Level 3",effectDisplay:"Book cost scaling 5x -> 4x"},visibility:()=>y(E[1].earned.value),shouldEarn:()=>De.level.value>=3})),P(()=>({display:{requirement:"Star Level 4",effectDisplay:_(()=>n(x,null,[s("Multiply XP requirements by 0.95"),n("sup",null,[s("(total books)")])]))},visibility:()=>y(E[2].earned.value&&U.day.value>=13),shouldEarn:()=>De.level.value>=4})),P(()=>({display:{requirement:"Star Level 5",effectDisplay:"Gain 5 free books for all elves that are at level 5 or above."},visibility:()=>y(E[3].earned.value&&U.day.value>=13),shouldEarn:()=>De.level.value>=5}))],F=[P(()=>({display:{requirement:"Bell Level 1",effectDisplay:_(()=>n(x,null,[s("Every box buyable adds "),n(pl,null,{default:()=>[s("level")]}),s(" levels to same-row box buyables.")]))},shouldEarn:()=>qe.level.value>=1})),P(()=>({display:{requirement:"Bell Level 2",effectDisplay:"Box gain ^1.1"},visibility:()=>y(F[0].earned.value),shouldEarn:()=>qe.level.value>=2})),P(()=>({display:{requirement:"Bell Level 3",effectDisplay:"All box buyables scaling bases -1"},visibility:()=>y(F[1].earned.value),shouldEarn:()=>qe.level.value>=3})),P(()=>({display:{requirement:"Bell Level 4",effectDisplay:"Unlock a second row of box buyables"},visibility:()=>y(F[2].earned.value&&U.day.value>=13),shouldEarn:()=>qe.level.value>=4})),P(()=>({display:{requirement:"Bell Level 5",effectDisplay:"Unlock another row of box upgrades"},visibility:()=>y(F[3].earned.value&&U.day.value>=13),shouldEarn:()=>qe.level.value>=5}))],Z=[P(()=>({display:{requirement:"Gingersnap Level 1",effectDisplay:"Multiply all primary dye colors by ln(cloth + e)."},shouldEarn:()=>pe.level.value>=1})),P(()=>({display:{requirement:"Gingersnap Level 2",effectDisplay:_(()=>n(x,null,[s("Multiply all cloth actions' effectiveness by log"),n("sub",null,[s("10")]),s("(dye sum + 10)")]))},visibility:()=>y(Z[0].earned.value),shouldEarn:()=>pe.level.value>=2})),P(()=>({display:{requirement:"Gingersnap Level 3",effectDisplay:"Double all dye colors and cloth actions, but reset all dyes."},visibility:()=>y(Z[1].earned.value),shouldEarn:()=>pe.level.value>=3,onComplete(){["red","yellow","blue","orange","green","purple"].forEach(V=>{Je.dyes[V].amount.value=0,Je.dyes[V].buyable.amount.value=0})}})),P(()=>({display:{requirement:"Gingersnap Level 4",effectDisplay:_(()=>n(x,null,[s("Multiply ALL dye gain by")," ",n(ir,null,{default:()=>[n("div",null,[n(pl,null,{default:()=>[s("classrooms")]})]),n("div",null,[s("2")])]}),s("+1, but reset all dyes.")]))},visibility:()=>y(Z[2].earned.value&&U.day.value>=13),shouldEarn:()=>pe.level.value>=4,onComplete(){["red","yellow","blue","orange","green","purple"].forEach(V=>{Je.dyes[V].amount.value=0,Je.dyes[V].buyable.amount.value=0})}})),P(()=>({display:{requirement:"Gingersnap Level 5",effectDisplay:"Well depth divides metal machine costs"},visibility:()=>y(Z[3].earned.value&&U.day.value>=13),shouldEarn:()=>pe.level.value>=5}))],ae=Me("Holly"),oe=_(()=>{const V=Object.values(X).find(Qe=>Qe.name===ae.value);return V==null?(console.warn("This should not happen.",ae.value),""):n(x,null,[ae.value,s("'s milestones: "),V.displayMilestone()])}),ve=p(Re.elves.cuttersElf,w),ie=p(Re.elves.plantersElf,b),xe=p(Re.elves.expandersElf,C),ye=[ve,ie,xe],ee=p(Re.elves.heatedCuttersElf,v),ne=p(Re.elves.heatedPlantersElf,S),Be=p(Re.elves.fertilizerElf,N),Ie=[ee,ne,Be],Se=p(Re.elves.smallFireElf,D),Ue=p(Re.elves.bonfireElf,z),fe=p(Re.elves.kilnElf,B),Oe=[Se,Ue,fe],De=p(Re.elves.paperElf,E),qe=p(Re.elves.boxElf,F),pe=p(Re.elves.clothElf,Z),et=[De,qe,pe],X={cutterElfTraining:ve,planterElfTraining:ie,expandersElfTraining:xe,heatedCutterElfTraining:ee,heatedPlanterElfTraining:ne,fertilizerElfTraining:Be,smallfireElfTraining:Se,bonfireElfTraining:Ue,kilnElfTraining:fe,paperElfTraining:De,boxElfTraining:qe,clothElfTraining:pe},ut=[ve,ie,xe,ee,ne,Be,Se,Ue,fe,De,qe,pe],We=[ve,ie,xe,ee,ne,Be,Se,Ue,fe,De,qe,pe];tt.on("update",V=>{if(!(U.day.value=1&&(Qe.amountOfTimesDone.value-=lt,a.lt(Qe.level.value,Ne.amount.value)&&(Qe.exp.value=a.mul(Qe.elfXPGainComputed.value,lt).add(Qe.exp.value)))}dt.value=a.sub(dt.value,V).max(0),$e.value=a.sub($e.value,V).max(0),a.eq(dt.value,0)&&(se.value={},ze.value=a.pow(Ke.value,1-Math.abs(Math.sin(Date.now()/1e3*2))))}});const ze=Me(1),se=Me({}),$e=Me(0),dt=Me(0),Mt=J(()=>[g(()=>({multiplier:2,description:"Focus Upgrade 1",enabled:$.bought}))]),ot=J(()=>[le(()=>({addend:1,description:"Focus Upgrade 2",enabled:he.bought}))]),ct=J(()=>[le(()=>({addend:-5,description:"Focus Upgrade 3",enabled:Ut.bought}))]),Ke=f(()=>Mt.apply(10)),Ge=f(()=>ot.apply(3)),_t=f(()=>Number(ct.apply(15))),xt=el(()=>({direction:Fe.Right,width:566,height:25,style:"border-radius: 4px 4px 0 0",borderStyle:"border-radius: 4px 4px 0 0",fillStyle:`background: ${t}; transition: none`,progress:()=>a.sub(ze.value,1).div(a.sub(Ke.value,1)).toNumber(),display:_(()=>n(x,null,[Q(ze.value),s("x")]))})),It=Lt(()=>({display:{title:"Focus",description:_(()=>n(x,null,[s("Motivate elves to focus, multiplying 3 random elves' XP gain by up to")," ",Q(Ke.value),s("x, equal to the focus bars' effect."),a.gte($e.value,0)?n(x,null,[n("br",null,null),s("Reroll cooldown: "),ia($e.value)]):""]))},style:{width:"300px"},canClick:()=>a.eq($e.value,0),onClick(){$e.value=_t.value,dt.value=10,ue(12,Ge.value)}}));function ue(V,Qe){var Ft,Wt;let lt=0;se.value={};const Pt=a.min(Qe,V);for(;Pt.gt(lt);){const M=(Wt=(Ft=Object.values(X)[Math.floor(Math.random()*V)])==null?void 0:Ft.name)!=null?Wt:"";se.value[M]||(se.value[M]=!0,lt++)}}const $=q(()=>({display:{title:"Focus Booster",description:"Multiplies the maximum experience multiplier from focus by 2"},resource:re.logs,cost:1e25})),he=q(()=>({display:{title:"Focus Buffer",description:"Increase elves affected by focus by 1"},resource:re.logs,cost:1e30})),Ut=q(()=>({display:{title:"Focus Upgrader",description:"Focus can now be rerolled every 10 seconds"},resource:re.logs,cost:1e35})),Jt=[$,he,Ut],Ae=f(()=>{const V=a.pow(10,Ne.amount.value),Qe=a.pow(5,Ne.amount.value),lt=a.pow(1e4,Ne.amount.value),Pt=a.pow(2e3,Ne.amount.value);return{wood:lt.mul(1e21),coal:Pt.mul(1e32),paper:Pt.mul(1e18),boxes:lt.mul(1e13),metalIngots:Qe.mul(1e12),cloth:V.mul(1e4),plastic:Qe.mul(1e6),dye:a.add(Ne.amount.value,1).mul(1e4)}}),Ne=Le(()=>({display:_(()=>n(x,null,[n("h3",null,[s("Build a School")]),n("div",null,[s("You gotta start somewhere, right? Each school increases the maximum level for elves by 1, up to 5.")]),n("div",null,[s("You have "),Y(Ne.amount.value),s(" schools, which are currently letting elves learn up to level "),Y(Ne.amount.value),s(".")]),n("div",null,[s("Costs "),Q(Ae.value.wood),s(" logs, "),Q(Ae.value.coal)," ",s("coal, "),Q(Ae.value.paper),s(" paper, "),Q(Ae.value.boxes)," ",s("boxes, "),Q(Ae.value.metalIngots),s(" metal ingots,")," ",Q(Ae.value.cloth),s(" cloth, "),Q(Ae.value.plastic)," ",s("plastic, and requires "),Q(Ae.value.dye),s(" of red, yellow, and blue dye")])])),canPurchase(){return Ae.value.wood.lte(re.logs.value)&&Ae.value.coal.lte(L.coal.value)&&Ae.value.paper.lte(j.paper.value)&&Ae.value.boxes.lte(nt.boxes.value)&&Ae.value.metalIngots.lte(at.metal.value)&&Ae.value.cloth.lte(ft.cloth.value)&&Ae.value.plastic.lte(Ze.plastic.value)&&Ae.value.dye.lte(Je.dyes.blue.amount.value)&&Ae.value.dye.lte(Je.dyes.red.amount.value)&&Ae.value.dye.lte(Je.dyes.yellow.amount.value)},onPurchase(){re.logs.value=a.sub(re.logs.value,Ae.value.wood),L.coal.value=a.sub(L.coal.value,Ae.value.coal),j.paper.value=a.sub(j.paper.value,Ae.value.paper),nt.boxes.value=a.sub(nt.boxes.value,Ae.value.boxes),at.metal.value=a.sub(at.metal.value,Ae.value.metalIngots),ft.cloth.value=a.sub(ft.cloth.value,Ae.value.cloth),Ze.plastic.value=a.sub(Ze.plastic.value,Ae.value.plastic),this.amount.value=a.add(this.amount.value,1)},purchaseLimit:5,visibility:f(()=>y(r.bought.value)),style:"width: 600px"})),pt=f(()=>{const V=a.add(st.amount.value,1).pow(1.5);return{wood:V.mul(1e21),paper:V.mul(1e18),boxes:V.mul(1e13),metalIngots:V.mul(1e12)}}),Tt=f(()=>a.add(st.amount.value,1).pow(.9)),st=Le(()=>({display:_(()=>n(x,null,[n("h3",null,[s("Build a Classroom")]),n("div",null,[s("Hopefully it makes the school a bit less boring. Multiplies elves' XP gain by")," ",n(pl,null,{default:()=>[s("Classrooms + 1")]}),s(".")]),n("div",null,[s("You have "),Y(st.amount.value),s(" classrooms, which are currently multiplying elves' XP gain by "),Q(Tt.value)]),n("div",null,[s("Costs "),Q(pt.value.wood),s(" logs,"),Q(pt.value.paper),s(" paper, "),Q(pt.value.boxes)," ",s("boxes, "),Q(pt.value.metalIngots),s(" metal ingots")])])),canPurchase(){return pt.value.wood.lte(re.logs.value)&&pt.value.paper.lte(j.paper.value)&&pt.value.boxes.lte(nt.boxes.value)&&pt.value.metalIngots.lte(at.metal.value)},onPurchase(){re.logs.value=a.sub(re.logs.value,pt.value.wood),j.paper.value=a.sub(j.paper.value,pt.value.paper),nt.boxes.value=a.sub(nt.boxes.value,pt.value.boxes),at.metal.value=a.sub(at.metal.value,pt.value.metalIngots),this.amount.value=a.add(this.amount.value,1)},visibility:f(()=>y(d.bought.value)),style:"width: 600px"})),[Rt,rl]=sl(()=>[{title:"Elves affected by Focus",modifier:ot,base:3},{title:"Maximum Focus Effect",modifier:Mt,base:10},{title:"Focus Cooldown",modifier:ct,unit:" secs",base:15},{title:"Global XP Gain",modifier:c,unit:" XP"},{title:"Holly XP Gain per Action",modifier:ve.elfXPGain,base:.1,unit:" XP"},{title:"Ivy XP Gain per Action",modifier:ie.elfXPGain,base:.1,unit:" XP"},{title:"Hope XP Gain per Action",modifier:xe.elfXPGain,base:.1,unit:" XP"},{title:"Jack XP Gain per Action",modifier:ee.elfXPGain,base:.1,unit:" XP"},{title:"Mary XP Gain per Action",modifier:ne.elfXPGain,base:.1,unit:" XP"},{title:"Noel XP Gain per Action",modifier:Be.elfXPGain,base:.1,unit:" XP"},{title:"Joy XP Gain per Action",modifier:Se.elfXPGain,base:.1,unit:" XP"},{title:"Faith XP Gain per Action",modifier:Ue.elfXPGain,base:.1,unit:" XP"},{title:"Snowball XP Gain per Action",modifier:fe.elfXPGain,base:.1,unit:" XP"},{title:"Star XP Gain per Action",modifier:De.elfXPGain,base:.1,unit:" XP"},{title:"Bell XP Gain per Action",modifier:qe.elfXPGain,base:.1,unit:" XP"},{title:"Gingersnap XP Gain per Action",modifier:pe.elfXPGain,base:.1,unit:" XP"}]),ul=H(!1),te=_(()=>n(Et,{modelValue:ul.value,"onUpdate:modelValue":V=>ul.value=V},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:Rt}));return{name:e,day:Wl,color:t,minWidth:700,elfTraining:X,totalElfLevels:i,totalElfExp:o,currentShown:ae,generalTabCollapsed:rl,teaching:r,schools:Ne,classrooms:st,classroomUpgrade:d,focusMultiplier:ze,upgrades:Jt,focusTargets:se,focusCooldown:$e,focusTime:dt,display:_(()=>n(x,null,[U.day.value===Wl?"Get all elves to level 3.":U.day.value===ql&&U.days[ql-1].opened.value?"Get all elves to level 5.":`${e} Complete!`," ",s("-"),n("button",{class:"button",style:"display: inline-block;",onClick:()=>ul.value=!0},[s("Check Modifiers")]),ce(te),ce(l),n("br",null,null),Zt(Ne,st),Ml([r,d]),n(Ee,null,null),Ml(Jt),a.gt(Ne.amount.value,0)?n(x,null,[n("br",null,null),s("Click on an elf to see their milestones."),n("br",null,null),n("br",null,null),ce(It),n("br",null,null),Ml([xt],ye,Ie,Oe,et),n(Ee,null,null),oe()]):""]))}}),Er="cloth",ri=8,ft=$t(Er,function(){const e="Cloth",t="white",l=ht(0,"cloth"),i=ht(0,"wool"),o=ht(10,"sheep"),r=Me(0),d=el(()=>({direction:Fe.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>a.div(r.value,X.value)})),c=Lt(()=>({display:{title:"Breed sheep",description:_(()=>n(x,null,[s("Breed "),Ce(a.floor(pe.value)),s(" sheep"),n("br",null,null),ce(d)]))},style:{minHeight:"80px"},canClick:()=>a.gte(r.value,X.value),onClick(){if(a.lt(r.value,X.value))return;const ue=a.floor(pe.value);o.value=a.add(o.value,ue),r.value=0}})),m=Me(0),p=el(()=>({direction:Fe.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>a.div(m.value,se.value)})),w=Lt(()=>({display:{title:"Shear sheep",description:_(()=>n(x,null,[s("Shear up to "),Ce(a.floor(We.value)),s(" sheep"),n("br",null,null),ce(p)]))},style:{minHeight:"80px"},canClick:()=>a.gte(m.value,se.value),onClick(){if(a.lt(m.value,se.value))return;const ue=a.min(o.value,We.value).floor();i.value=a.add(i.value,ue),m.value=0}})),b=Me(0),C=el(()=>({direction:Fe.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>a.div(b.value,ot.value)})),v=Lt(()=>({display:{title:"Spinning wool",description:_(()=>n(x,null,[s("Spin "),Ce(a.floor(dt.value)),s(" wool"),n("br",null,null),ce(C)]))},style:{minHeight:"80px"},canClick:()=>a.gte(b.value,ot.value),onClick(){if(a.lt(b.value,ot.value))return;const ue=a.min(i.value,dt.value).floor();l.value=a.add(l.value,ue),i.value=a.sub(i.value,ue),b.value=0}})),S=$l(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{c.canClick.value&&c.onClick()}})),N=$l(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{w.canClick.value&&w.onClick()}})),D=$l(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{v.canClick.value&&v.onClick()}})),z=Le(()=>({resource:re.logs,cost(){let ue=this.amount.value;return a.gte(ue,100)&&(ue=a.pow(ue,2).div(100)),ue=a.pow(.95,j.books.clothBook.amount.value).times(ue),a.pow(1.5,ue).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),B=Le(()=>({resource:at.metal,cost(){let ue=this.amount.value;return a.gte(ue,100)&&(ue=a.pow(ue,2).div(100)),ue=a.pow(.95,j.books.clothBook.amount.value).times(ue),a.pow(1.4,ue).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),E=Le(()=>({resource:j.paper,cost(){let ue=this.amount.value;return a.gte(ue,100)&&(ue=a.pow(ue,2).div(100)),ue=a.pow(.95,j.books.clothBook.amount.value).times(ue),a.pow(1.3,ue).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),F=q(()=>({resource:O(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),Z=q(()=>({resource:O(i),cost:150,visibility:()=>y(F.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),ae=q(()=>({resource:O(o),cost:200,visibility:()=>y(Z.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),ve={treesUpgrade4:q(()=>({resource:O(l),cost:1e3,visibility:()=>y(Ze.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x log gain"}})),treesUpgrade3:ae,treesUpgrade2:Z,treesUpgrade1:F},ie=q(()=>({resource:O(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),xe=q(()=>({resource:O(i),cost:225,visibility:()=>y(ie.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),ye=q(()=>({resource:O(o),cost:300,visibility:()=>y(xe.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),ne={metalUpgrade4:q(()=>({resource:O(l),cost:2e3,visibility:()=>y(Ze.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:ye,metalUpgrade2:xe,metalUpgrade1:ie},Be=q(()=>({resource:O(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),Ie=q(()=>({resource:O(i),cost:200,visibility:()=>y(Be.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),Se=q(()=>({resource:O(o),cost:400,visibility:()=>y(Ie.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),fe={paperUpgrade4:q(()=>({resource:O(l),cost:4e3,visibility:()=>y(Ze.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:Se,paperUpgrade2:Ie,paperUpgrade1:Be},Oe=f(()=>a.add(re.computedAutoCuttingAmount.value,1).root(9)),De=f(()=>a.add(Je.dyeSum.value,10).log10()),qe=J(()=>[le(()=>({addend:z.amount,description:"Build more pens"})),g(()=>({multiplier:()=>a.div(Ze.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ze.buyables.clothGains.amount.value,1)})),g(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:j.upgrades.clothUpgrade.bought})),g(()=>({multiplier:De,description:"Gingersnap Level 2",enabled:R.elfTraining.clothElfTraining.milestones[1].earned})),g(()=>({multiplier:Oe,description:"Holly Level 3",enabled:R.elfTraining.cutterElfTraining.milestones[2].earned})),g(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone5.earned}))]),pe=f(()=>qe.apply(1)),et=J(()=>[]),X=f(()=>et.apply(1)),ut=J(()=>[le(()=>({addend:B.amount,description:"Make stronger shears"})),g(()=>({multiplier:()=>a.div(Ze.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ze.buyables.clothGains.amount.value,1)})),g(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:j.upgrades.clothUpgrade.bought})),g(()=>({multiplier:De,description:"Gingersnap Level 2",enabled:R.elfTraining.clothElfTraining.milestones[1].earned})),g(()=>({multiplier:Oe,description:"Holly Level 3",enabled:R.elfTraining.cutterElfTraining.milestones[2].earned})),g(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone5.earned}))]),We=f(()=>ut.apply(1)),ze=J(()=>[]),se=f(()=>ze.apply(1)),$e=J(()=>[le(()=>({addend:E.amount,description:"Learn how to spin"})),g(()=>({multiplier:()=>a.div(Ze.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Ze.buyables.clothGains.amount.value,1)})),g(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:j.upgrades.clothUpgrade.bought})),g(()=>({multiplier:De,description:"Gingersnap Level 2",enabled:R.elfTraining.clothElfTraining.milestones[1].earned})),g(()=>({multiplier:Oe,description:"Holly Level 3",enabled:R.elfTraining.cutterElfTraining.milestones[2].earned})),g(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone5.earned}))]),dt=f(()=>$e.apply(1)),Mt=J(()=>[]),ot=f(()=>Mt.apply(1)),[ct,Ke]=sl(()=>[{title:"Sheep Gain",modifier:qe,base:1},{title:"Sheep Breeding Cooldown",modifier:et,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:ut,base:1},{title:"Shearing Cooldown",modifier:ze,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:$e,base:1},{title:"Spinning Cooldown",modifier:Mt,base:1,visible:!1,unit:"s"}]),Ge=H(!1),_t=_(()=>n(Et,{modelValue:Ge.value,"onUpdate:modelValue":ue=>Ge.value=ue},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:ct}));tt.on("update",ue=>{a.lt(U.day.value,ri)||(a.gte(r.value,X.value)?r.value=X.value:(r.value=a.add(r.value,ue),c.isHolding.value&&c.onClick()),a.gte(m.value,se.value)?m.value=se.value:(m.value=a.add(m.value,ue),w.isHolding.value&&w.onClick()),a.gte(b.value,ot.value)?b.value=ot.value:(b.value=a.add(b.value,ue),v.isHolding.value&&v.onClick()))});const{total:xt,trackerDisplay:It}=bl({resource:l,goal:1e3,name:e,day:ri,color:t,textColor:"var(--feature-foreground)",modal:{show:Ge,display:_t}});return{name:e,color:t,cloth:l,totalCloth:xt,wool:i,sheep:o,buildPens:z,betterShears:B,fasterSpinning:E,treesUpgrades:ve,metalUpgrades:ne,paperUpgrades:fe,generalTabCollapsed:Ke,breedingProgress:r,shearingProgress:m,spinningProgress:b,breedSheepHK:S,shearSheepHK:N,spinWoolHK:D,minWidth:700,display:_(()=>n(x,null,[ce(It),n(Ee,null,null),n(Gt,{resource:l,style:"margin-bottom: 0"},null),n(Gt,{resource:i,style:"margin-bottom: 0"},null),n(Gt,{resource:o,style:"margin-bottom: 0"},null),it(c,w,v),it(z,B,E),n(Ee,null,null),n(Hl,null,{default:()=>[Zt(...Object.values(ve)),Zt(...Object.values(ne)),Zt(...Object.values(fe))]})])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(l.value),s(" "),l.displayName]))}}),_r="dyes",Sr=11,Je=$t(_r,function(){const e="Dyes",t="#D4D4F4";function l(v){const S=ht(0,v.name),N=J(()=>{const B=[le(()=>({addend:()=>a.add(z.amount.value,1),description:`${v.name} Chambers`}))];return(v.color==="red"||v.color==="yellow")&&B.push(g(()=>({multiplier:o.orange1,description:"Orange Dye Boost 1"}))),(v.color=="yellow"||v.color=="blue")&&B.push(g(()=>({multiplier:o.green1,description:"Green Dye Boost 1"}))),(v.color=="red"||v.color=="blue")&&B.push(g(()=>({multiplier:o.purple1,description:"Purple Dye Boost 1"}))),(v.color=="red"||v.color=="yellow"||v.color=="blue")&&(B.push(g(()=>({multiplier:2,description:"Wetter Dyes",enabled:c.yellowDyeUpg.bought}))),B.push(g(()=>({multiplier:()=>a.add(ft.cloth.value,Math.E).ln(),description:"Gingersnap Level 1",enabled:R.elfTraining.clothElfTraining.milestones[0].earned})))),B.push(g(()=>({multiplier:2,description:"Gingersnap Level 3",enabled:R.elfTraining.clothElfTraining.milestones[2].earned}))),B}),D=f(()=>N.apply(0)),z=Le(()=>{const B=Ct(v.costs);return{...v,style:()=>({backgroundColor:u(z.canPurchase)?t:"#545454",minWidth:"200px"}),display:_(()=>n("span",null,[n("h3",null,[v.name,s(" Chambers")]),n("br",null,null),s("Create "),Q(D.value),s(" "),v.name,v.dyesToReset.length>0?", but reset "+v.dyesToReset.map(E=>E.name).join(", "):"",s("."),n("br",null,null),n("br",null,null),n("span",{class:"white-space: pre-wrap"},[s("Currently:")," ",v.listedBoosts.filter(E=>u(E.visible)).map(E=>ce(_(()=>n("div",null,[u(E.desc)]))))]),n("br",null,null),n("div",null,[s("Cost:")," ",u(B).map(E=>ce(_(()=>{var F,Z;return n("div",null,[Q(u(a.pow((F=u(z.cost))!=null?F:a.dInf,u((Z=E.root)!=null?Z:1)).times(u(E.base))))," ",E.res.displayName,n("br",null,null)])})))])])),cost(){let E=z.amount.value;return a.gte(E,25)&&(E=a.pow(E,2).div(20)),a.gte(E,10)&&(E=a.pow(E,2).div(5)),a.div(E,10).plus(1)},canPurchase:f(E=>{var Z;if(u(z.visibility)!=kt.Visible)return!1;const F=(Z=E!=null?E:u(z.cost))!=null?Z:a.dInf;return u(B).every(ae=>{var oe;return a.div(ae.res.value,u(ae.base)).root(u((oe=ae.root)!=null?oe:1)).gte(F)})}),onPurchase(E){var Z;const F=(Z=E!=null?E:u(z.cost))!=null?Z:a.dInf;u(B).forEach(ae=>{var oe;ae.res.value=a.sub(ae.res.value,a.pow(F,u((oe=ae.root)!=null?oe:1)).times(u(ae.base)))}),S.value=a.add(S.value,D.value),z.amount.value=a.add(z.amount.value,1),v.dyesToReset.forEach(ae=>ae.reset())}}});return{name:v.name,amount:S,buyable:z,toGenerate:N,computedToGenerate:D,display:_(()=>n(Gt,{resource:S,color:v.color,style:"margin: 0; width: 200px; width: 180px; padding: 10px;",sticky:!1},null))}}const i={red:l({name:"Red Dye",color:"red",costs:()=>[{base:"2e18",root:5,res:re.logs},{base:f(()=>c.yellowDyeUpg2.bought.value?"2.5e5":"5e5"),root:2,res:de.oil}],listedBoosts:[{visible:!0,desc:f(()=>`+${Q(o.red1.value)} effective Oil Pumps (does not impact coal consumption)`)}],dyesToReset:[]}),yellow:l({name:"Yellow Dye",color:"yellow",costs:()=>[{base:"1e18",root:5,res:re.logs},{base:f(()=>c.yellowDyeUpg2.bought.value?"5e5":"1e6"),root:2,res:de.oil}],listedBoosts:[{visible:!0,desc:f(()=>`x${Q(o.yellow1.value)} Paper & Plastic gain`)}],dyesToReset:[]}),blue:l({name:"Blue Dye",color:"blue",costs:()=>[{base:"5e17",root:5,res:re.logs},{base:f(()=>c.yellowDyeUpg2.bought.value?"1e6":"2e6"),root:2,res:de.oil}],listedBoosts:[{visible:!0,desc:f(()=>`+${Y(o.blue1.value)} forest size (after all other modifiers).`)}],dyesToReset:[]}),orange:l({name:"Orange Dye",color:"orange",costs:()=>[{base:15,root:2,res:i.red.amount},{base:10,root:2,res:i.yellow.amount}],listedBoosts:[{visible:!0,desc:f(()=>`x${Q(o.orange1.value)} Red and Yellow Dye gain`)},{visible:!0,desc:f(()=>`/${Q(o.orange2.value)} Box buyable costs.`)}],dyesToReset:[{name:"Red Dye",reset(){i.red.amount.value=0,i.red.buyable.amount.value=0}},{name:"Yellow Dye",reset(){i.yellow.amount.value=0,i.yellow.buyable.amount.value=0}}]}),green:l({name:"Green Dye",color:"green",costs:()=>[{base:15,root:2,res:i.yellow.amount},{base:10,root:2,res:i.blue.amount}],listedBoosts:[{visible:!0,desc:f(()=>`x${Q(o.green1.value)} Yellow and Blue Dye gain`)},{visible:!0,desc:f(()=>`+${Y(a.sub(o.green2.value,1).times(100))}% Kiln synergy effect.`)}],dyesToReset:[{name:"Yellow Dye",reset(){i.yellow.amount.value=0,i.yellow.buyable.amount.value=0}},{name:"Blue Dye",reset(){i.blue.amount.value=0,i.blue.buyable.amount.value=0}}]}),purple:l({name:"Purple Dye",color:"purple",costs:()=>[{base:15,root:2,res:i.blue.amount},{base:10,root:2,res:i.red.amount}],listedBoosts:[{visible:!0,desc:f(()=>`x${Q(o.purple1.value)} Red and Blue Dye gain`)},{visible:!0,desc:f(()=>`x${Q(o.purple2.value)} Smelting Speed and Ore Purity`)}],dyesToReset:[{name:"Blue Dye",reset(){i.blue.amount.value=0,i.blue.buyable.amount.value=0}},{name:"Red Dye",reset(){i.red.amount.value=0,i.red.buyable.amount.value=0}}]})},o={red1:f(()=>a.pow(a.add(i.red.amount.value,1).log2().plus(1).log2().div(2),c.blueDyeUpg2.bought.value?1.5:1)),yellow1:f(()=>a.add(i.yellow.amount.value,1).log2().plus(1)),blue1:f(()=>a.add(i.blue.amount.value,1).log2().sqrt().times(5e6)),orange1:f(()=>a.pow(2,a.add(i.orange.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),orange2:f(()=>a.add(i.orange.amount.value,1).log2().plus(1)),green1:f(()=>a.pow(2,a.add(i.green.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),green2:f(()=>a.add(i.green.amount.value,1).log2().plus(1).pow(c.coalUpg.bought.value?2:1)),purple1:f(()=>a.pow(2,a.add(i.purple.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),purple2:f(()=>a.add(i.purple.amount.value,1).log2().plus(1))},[r,d]=sl(()=>[{title:"Red Dye Creation",modifier:i.red.toGenerate,base:0},{title:"Yellow Dye Creation",modifier:i.yellow.toGenerate,base:0},{title:"Blue Dye Creation",modifier:i.blue.toGenerate,base:0},{title:"Orange Dye Creation",modifier:i.orange.toGenerate,base:0},{title:"Green Dye Creation",modifier:i.green.toGenerate,base:0},{title:"Purple Dye Creation",modifier:i.purple.toGenerate,base:0}]),c={blueDyeUpg:q(()=>({visibility:()=>y(a.add(i.orange.amount.value,i.green.amount.value).add(i.purple.amount.value).gte(1)||c.blueDyeUpg.bought.value),display:{title:"Is Blue Dye just Water?",description:_(()=>n(x,null,[s("Multiply Log gain by log"),n("sub",null,[s("10")]),s("(Auto Cutting Amount)+1.")]))},cost:1e3,resource:O(i.blue.amount),onPurchase(){i.blue.amount.value=0,i.blue.buyable.amount.value=0}})),redDyeUpg:q(()=>({visibility:()=>y(a.add(i.orange.amount.value,i.green.amount.value).add(i.purple.amount.value).gte(10)||c.redDyeUpg.bought.value),display:{title:"Glistening Paint",description:_(()=>n(x,null,[s("Multiply Ore Purity by log"),n("sub",null,[s("10")]),s("(Cloth)+1.")]))},cost:1500,resource:O(i.red.amount),onPurchase(){i.red.amount.value=0,i.red.buyable.amount.value=0}})),yellowDyeUpg:q(()=>({visibility:()=>y(a.add(i.orange.amount.value,i.green.amount.value).add(i.purple.amount.value).gte(100)||c.yellowDyeUpg.bought.value),display:{title:"Wetter Dyes",description:"Double Red, Yellow, and Blue Dye gain, but reset their amounts."},cost:2e3,resource:O(i.yellow.amount),onPurchase(){i.red.amount.value=0,i.red.buyable.amount.value=0,i.yellow.amount.value=0,i.yellow.buyable.amount.value=0,i.blue.amount.value=0,i.blue.buyable.amount.value=0}})),yellowDyeUpg2:q(()=>({visibility:()=>y(c.yellowDyeUpg.bought.value),display:{title:"Golden Wash",description:"Halve the Oil cost of Red, Yellow, and Blue Dyes."},cost:5e3,resource:O(i.yellow.amount),onPurchase(){i.yellow.amount.value=0,i.yellow.buyable.amount.value=0}})),redDyeUpg2:q(()=>({visibility:()=>y(c.redDyeUpg.bought.value),display:{title:"De Louvre",description:_(()=>n(x,null,[s("Multiply Smelting Speed by "),n(pl,null,{default:()=>[s("Refineries+1")]}),s(".")]))},cost:6e3,resource:O(i.red.amount),onPurchase(){i.red.amount.value=0,i.red.buyable.amount.value=0}})),blueDyeUpg2:q(()=>({visibility:()=>y(c.blueDyeUpg.bought.value),display:{title:"Hydrophobia",description:"Raise Red Dye's effect ^1.5."},cost:7500,resource:O(i.blue.amount),onPurchase(){i.blue.amount.value=0,i.blue.buyable.amount.value=0}})),coalUpg:q(()=>({visibility:()=>y(c.blueDyeUpg2.bought.value&&c.redDyeUpg2.bought.value&&c.yellowDyeUpg2.bought.value),display:{title:"Denser Spectrum",description:"Orange, Green, and Purple Dyes' first effect is raised ^1.2, and Green Dye's second effect is squared. Buying this resets Red, Yellow, and Blue Dyes."},cost:"5e30",resource:L.coal,onPurchase(){i.red.amount.value=0,i.red.buyable.amount.value=0,i.yellow.amount.value=0,i.yellow.buyable.amount.value=0,i.blue.amount.value=0,i.blue.buyable.amount.value=0}}))},m=H(!1),p=_(()=>n(Et,{modelValue:m.value,"onUpdate:modelValue":v=>m.value=v},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:r})),w=ht(f(()=>Object.values(i).reduce((v,S)=>a.add(v,S.amount.value),0)),"Sum of Dyes"),{total:b,trackerDisplay:C}=bl({resource:w,goal:6e4,name:e,day:Sr,color:t,textColor:"var(--feature-foreground)",modal:{show:m,display:p},ignoreTotal:!0});return{name:e,color:t,dyes:i,dyeSum:w,boosts:o,totalDyeSum:b,minWidth:700,generalTabCollapsed:d,upgrades:c,display:_(()=>n(x,null,[ce(C),n(Ee,null,null),n("div",{style:"width: 620px"},[it(i.red.display,i.yellow.display,i.blue.display),it(i.red.buyable,i.yellow.buyable,i.blue.buyable),n(Ee,null,null),it(i.orange.display,i.green.display,i.purple.display),it(i.orange.buyable,i.green.buyable,i.purple.buyable)]),n(Ee,null,null),n("div",{class:"row",style:"vertical-align: top"},[Zt(c.redDyeUpg,c.redDyeUpg2),Zt(c.yellowDyeUpg,c.yellowDyeUpg2),Zt(c.blueDyeUpg,c.blueDyeUpg2)]),ce(c.coalUpg)]))}}),Mr="boxes",Da=6,nt=$t(Mr,function(){const e="Boxes",t="#964B00",l=ht(0,"boxes"),i=J(()=>[g(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone5.earned})),ml(()=>({exponent:1.1,description:"Bell Level 2",enabled:R.elfTraining.boxElfTraining.milestones[1].earned}))]),o=qi(()=>({scaling:Ha(1e10,1),baseResource:re.logs,gainResource:O(l),roundUpCost:!0,gainModifier:i})),r=Lt(()=>({display:_(()=>n(x,null,[n("span",{style:"font-size: large"},[s("Create "),Y(o.currentGain.value),s(" "),l.displayName]),n("br",null,null),n("span",{style:"font-size: large"},[s("Cost:")," ",oa(re.logs,a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value)," ",re.logs.displayName])])),canClick:()=>a.gte(o.actualGain.value,1),onClick(){!u(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"})),d=q(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){U.days[3].recentlyUpdated.value=!0},resource:O(l),cost:100})),c=q(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){U.days[3].recentlyUpdated.value=!0},resource:O(l),cost:1e3})),m=q(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){U.days[3].recentlyUpdated.value=!0},resource:O(l),cost:4e3})),p={logsUpgrade:d,ashUpgrade:c,coalUpgrade:m},w=q(()=>({resource:O(l),cost:1e8,visibility:()=>y(Ze.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),b=q(()=>({resource:O(l),cost:1e9,visibility:()=>y(Ze.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),C=q(()=>({resource:O(l),cost:1e10,visibility:()=>y(Ze.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),v={oreUpgrade:w,metalUpgrade:b,plasticUpgrade:C},S=q(()=>({resource:O(l),cost:1e16,visibility:()=>y(R.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry cloth in boxes",description:"Double all cloth actions"}})),N=q(()=>({resource:O(l),cost:1e17,visibility:()=>y(R.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry dye in boxes",description:"Double all dye gain"}})),D=q(()=>({resource:O(l),cost:1e18,visibility:()=>y(R.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry experience in boxes???",description:"Double xp gain"}})),z={clothUpgrade:S,dyeUpgrade:N,xpUpgrade:D},B=Le(()=>({display:{title:"Carry more logs",description:_(()=>n(x,null,[s("Use boxes to carry even more logs, boosting their gain"),n("br",null,null),n("br",null,null),n("div",null,[s("Amount: "),Y(B.amount.value),a.gt(B.freeLevels.value,0)?n(x,null,[s(" (+"),Y(B.freeLevels.value),s(")")]):null])])),effectDisplay:_(()=>n(x,null,[Q(a.div(B.totalAmount.value,2).add(1)),s("x")])),showAmount:!1},resource:O(l),cost(){let ee=this.amount.value;ee=a.pow(.95,j.books.boxBook.amount.value).times(ee);let ne=3;return R.elfTraining.boxElfTraining.milestones[2].earned.value&&ne--,a.pow(ne,ee).times(100).div(Je.boosts.orange2.value)},visibility:()=>y(d.bought.value),freeLevels:f(()=>R.elfTraining.boxElfTraining.milestones[0].earned.value?a.max(E.amount.value,1).sqrt().floor().add(a.max(F.amount.value,1).sqrt().floor()):0),totalAmount:f(()=>a.add(B.amount.value,B.freeLevels.value))})),E=Le(()=>({display:{title:"Carry more ash",description:_(()=>n(x,null,[s("Use boxes to carry even more ash, boosting its gain"),n("br",null,null),n("br",null,null),n("div",null,[s("Amount: "),Y(E.amount.value),a.gt(E.freeLevels.value,0)?n(x,null,[s(" (+"),Y(E.freeLevels.value),s(")")]):null])])),effectDisplay:_(()=>n(x,null,[Q(a.div(E.totalAmount.value,2).add(1)),s("x")])),showAmount:!1},resource:O(l),cost(){let ee=this.amount.value;ee=a.pow(.95,j.books.boxBook.amount.value).times(ee);let ne=5;return R.elfTraining.boxElfTraining.milestones[2].earned.value&&ne--,a.pow(ne,ee).times(1e3).div(Je.boosts.orange2.value)},visibility:()=>y(c.bought.value),freeLevels:f(()=>R.elfTraining.boxElfTraining.milestones[0].earned.value?a.max(B.amount.value,1).sqrt().floor().add(a.max(F.amount.value,1).sqrt().floor()):0),totalAmount:f(()=>a.add(E.amount.value,E.freeLevels.value))})),F=Le(()=>({display:{title:"Carry more coal",description:_(()=>n(x,null,[s("Use boxes to carry even more coal, boosting its gain"),n("br",null,null),n("br",null,null),n("div",null,[s("Amount: "),Y(F.amount.value),a.gt(F.freeLevels.value,0)?n(x,null,[s(" (+"),Y(F.freeLevels.value),s(")")]):null])])),effectDisplay:_(()=>n(x,null,[Q(a.div(F.totalAmount.value,2).add(1)),s("x")])),showAmount:!1},resource:O(l),cost(){let ee=this.amount.value;ee=a.pow(.95,j.books.boxBook.amount.value).times(ee);let ne=7;return R.elfTraining.boxElfTraining.milestones[2].earned.value&&ne--,a.pow(ne,ee).times(1e3).div(Je.boosts.orange2.value)},visibility:()=>y(m.bought.value),freeLevels:f(()=>R.elfTraining.boxElfTraining.milestones[0].earned.value?a.max(B.amount.value,1).sqrt().floor().add(a.max(E.amount.value,1).sqrt().floor()):0),totalAmount:f(()=>a.add(F.amount.value,F.freeLevels.value))})),Z={logBoxesBuyable:B,ashBoxesBuyable:E,coalBoxesBuyable:F};tt.on("update",ee=>{a.lt(U.day.value,Da)||(l.value=a.times(ee,Ze.buyables.passiveBoxes.amount.value).times(o.currentGain.value).div(100).add(l.value))});const[ae,oe]=sl(()=>[{title:"Boxes Gain",modifier:i,base:1}]),ve=H(!1),ie=_(()=>n(Et,{modelValue:ve.value,"onUpdate:modelValue":ee=>ve.value=ee},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:ae})),{total:xe,trackerDisplay:ye}=bl({resource:l,goal:5e4,name:e,day:Da,color:t,modal:{display:ie,show:ve}});return{name:e,day:Da,color:t,boxes:l,totalBoxes:xe,boxesConversion:o,upgrades:p,row2Upgrades:v,row3Upgrades:z,buyables:Z,minWidth:700,generalTabCollapsed:oe,display:_(()=>n(x,null,[ce(ye),n(Ee,null,null),n(Gt,{resource:l,color:t,style:"margin-bottom: 0"},null),n(Ee,null,null),ce(r),n(Ee,null,null),Ml(Object.values(p),Object.values(v),Object.values(z)),n(Ee,null,null),it(...Object.values(Z))])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(l.value),s(" "),l.displayName]))}}),xr="trees",ui=1,di=.1,re=$t(xr,function(){const e="Trees",t="#4BDC13",l="green",i=ht(0,"logs"),o=ht(0,"saplings"),r=H(0),d=J(()=>[le(()=>({addend:()=>a.times(oe.amount.value,10),description:"Expand Forest",enabled:E.bought})),le(()=>({addend:()=>a.div(Ye.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Ye.milestones.morePlantsMilestone1.earned})),g(()=>({multiplier:2,description:"5 Elves Trained",enabled:Re.milestones[4].earned})),g(()=>({multiplier:2,description:"8 Elves Trained",enabled:Re.milestones[7].earned})),g(()=>({multiplier:4,description:"Lumberjack Boots",enabled:ft.treesUpgrades.treesUpgrade1.bought})),le(()=>({addend:Je.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>a.gte(Je.dyes.blue.amount.value,1)})),le(()=>({addend:()=>a.pow(xe.value,.99),description:"Hope Level 1",enabled:R.elfTraining.expandersElfTraining.milestones[0].earned}))]),c=ht(f(()=>a.sub(d.apply(10),o.value)),"trees"),m=f(()=>d.apply(10)),p=q(()=>({resource:O(i),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),w=q(()=>({resource:O(i),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),b=q(()=>({resource:O(i),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),C=q(()=>({resource:O(i),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),v=q(()=>({resource:O(i),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),S=[p,w,b,C,v],N=q(()=>({resource:O(i),cost:50,visibility:()=>y(v.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),D=q(()=>({resource:O(i),cost:50,visibility:()=>y(v.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),z=q(()=>({resource:O(i),cost:150,visibility:()=>y(v.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),B=q(()=>({resource:O(i),cost:150,visibility:()=>y(v.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),E=q(()=>({resource:O(i),cost:300,visibility:()=>y(v.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),F=[N,D,z,B,E],Z=Le(()=>({resource:O(i),cost(){let $=this.amount.value;return a.gte($,50)&&($=a.pow($,2).div(50)),a.gte($,200)&&($=a.pow($,2).div(200)),a.gte($,2e6)&&($=a.pow($,2).div(2e6)),$=a.pow(.95,j.books.cuttersBook.amount.value).times($),a.times(100,$).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>y(E.bought.value)})),ae=Le(()=>({resource:O(i),cost(){let $=this.amount.value;a.gte($,50)&&($=a.pow($,2).div(50)),a.gte($,200)&&($=a.pow($,2).div(200)),a.gte($,2e6)&&($=a.pow($,2).div(2e6)),$=a.pow(.95,j.books.plantersBook.amount.value).times($);let he=a.times(100,$).add(200);return R.elfTraining.planterElfTraining.milestones[3].earned.value&&(he=a.div(he,10)),he},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>y(E.bought.value)})),oe=Le(()=>({resource:O(i),cost(){let $=this.amount.value;return a.gte($,100)&&($=a.pow($,2).div(100)),a.gte($,1e5)&&($=a.pow($,2).div(1e5)),a.gte($,1e15)&&($=a.pow($,10).div(1e135)),$=a.pow(.95,j.books.expandersBook.amount.value).times($),a.pow(a.add($,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>y(E.bought.value)})),ve=[Z,ae,oe],ie=J(()=>[le(()=>({addend:1,description:"Wooden Fingers",enabled:p.bought})),le(()=>({addend:Be,description:"Smart Knives",enabled:z.bought}))]),xe=f(()=>ie.apply(1)),ye=J(()=>[g(()=>({multiplier:.5,description:"Sharper Fingers",enabled:N.bought})),g(()=>({multiplier:()=>a.pow(.5,Re.totalElves.value),description:"1 Elf Trained",enabled:Re.milestones[0].earned}))]),ee=f(()=>ye.apply(1)),ne=J(()=>[le(()=>({addend:1,description:"Automated Knives",enabled:b.bought})),le(()=>({addend:Z.amount,description:"Generic Cutters",enabled:E.bought})),le(()=>({addend:()=>Ye.milestones.extraExpansionMilestone1.earned?a.pow(1.02,Ye.foundationProgress.value):a.div(Ye.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Ye.milestones.autoCutMilestone1.earned})),g(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Ye.milestones.autoCutMilestone2.earned})),g(()=>({multiplier:2,description:"Warmer Cutters",enabled:L.warmerCutters.bought})),g(()=>({multiplier:L.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>a.gt(L.heatedCutters.amount.value,0)})),g(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:ft.treesUpgrades.treesUpgrade2.bought})),g(()=>({multiplier:()=>a.pow(1.1,U.day.value),description:"Holly Level 4",enabled:R.elfTraining.cutterElfTraining.milestones[3].earned})),le(()=>({addend:()=>a.sub(Ie.value,pe.value).max(0),description:"Ivy Level 5",enabled:R.elfTraining.planterElfTraining.milestones[4].earned}))]),Be=f(()=>ne.apply(0)),Ie=H(0);setInterval(()=>jt(Be,$=>{Ie.value=$}),0);const Se=J(()=>[le(()=>({addend:1,description:"Leafy Fingers",enabled:w.bought})),le(()=>({addend:qe,description:"Smart Spades",enabled:B.bought}))]),Ue=f(()=>Se.apply(1)),fe=J(()=>[g(()=>({multiplier:.5,description:"Greener Fingers",enabled:D.bought})),g(()=>({multiplier:()=>a.pow(.5,Re.totalElves.value),description:"1 Elf Trained",enabled:Re.milestones[0].earned}))]),Oe=f(()=>fe.apply(1)),De=J(()=>[le(()=>({addend:1,description:"Automated Spade",enabled:C.bought})),le(()=>({addend:()=>a.div(ae.amount.value,2),description:"Generic Planters",enabled:E.bought})),le(()=>({addend:()=>a.div(Ye.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Ye.milestones.autoPlantMilestone1.earned})),g(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Ye.milestones.autoPlantMilestone2.earned})),g(()=>({multiplier:2,description:"Warmer Planters",enabled:L.warmerPlanters.bought})),g(()=>({multiplier:L.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>a.gt(L.heatedPlanters.amount.value,0)})),g(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:ft.treesUpgrades.treesUpgrade3.bought})),g(()=>({multiplier:2,description:"Ivy Level 1",enabled:R.elfTraining.planterElfTraining.milestones[0].earned})),g(()=>({multiplier:()=>a.pow(c.value,.2).log10().pow_base(2),description:"Ivy Level 3",enabled:R.elfTraining.planterElfTraining.milestones[2].earned})),g(()=>({multiplier:2,description:"Mary Level 4",enabled:R.elfTraining.heatedPlanterElfTraining.milestones[3].earned})),le(()=>({addend:()=>a.sub(pe.value,Ie.value).max(0),description:"Ivy Level 5",enabled:R.elfTraining.planterElfTraining.milestones[4].earned}))]),qe=f(()=>De.apply(0)),pe=H(0);setInterval(()=>jt(qe,$=>{pe.value=$}),0);const et=J(()=>[g(()=>({multiplier:1.25,description:"Research I",enabled:v.bought})),g(()=>({multiplier:1.25,description:"Research II",enabled:E.bought})),g(()=>({multiplier:()=>a.div(Ye.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Ye.milestones.logGainMilestone1.earned})),g(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Ye.milestones.logGainMilestone2.earned})),g(()=>({multiplier:1.25,description:"Ashy Soil",enabled:L.basicFertilizer.bought})),g(()=>({multiplier:L.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>a.gt(L.moreFertilizer.amount.value,0)})),g(()=>({multiplier:2,description:"4 Elves Trained",enabled:Re.milestones[3].earned})),g(()=>({multiplier:2,description:"Carry logs in boxes",enabled:nt.upgrades.logsUpgrade.bought})),g(()=>({multiplier:()=>a.div(nt.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:nt.upgrades.logsUpgrade.bought})),g(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:ft.treesUpgrades.treesUpgrade4.bought})),g(()=>({multiplier:f(()=>a.add(Be.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:Je.upgrades.blueDyeUpg.bought})),g(()=>({multiplier:f(()=>a.add(Be.value,1).root(9)),description:"Holly Level 1",enabled:R.elfTraining.cutterElfTraining.milestones[0].earned})),g(()=>({multiplier:()=>a.sqrt(R.totalElfLevels.value),description:"Noel Level 1",enabled:R.elfTraining.fertilizerElfTraining.milestones[0].earned})),ml(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Ye.milestones.logGainMilestone3.earned}))]),X=Me(0),ut=el(()=>({direction:Fe.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(X.value,ee.value)})),We=Lt(()=>({display:{title:"Cut trees",description:_(()=>n(x,null,[s("Cut down up to "),Y(a.floor(xe.value))," ",s("tree"),a.eq(xe.value,1)?"":"s",s(" at once!"),n("br",null,null),ce(ut)]))},style:{minHeight:"80px"},canClick:()=>a.gte(c.value,1)&&a.gte(X.value,ee.value),onClick(){if(a.lt(X.value,ee.value))return;const $=a.floor(a.min(c.value,a.times(xe.value,a.div(X.value,ee.value).floor())));i.value=a.add(i.value,a.times(et.apply(1),$)),o.value=a.add(o.value,$),X.value=0}})),ze=Me(0),se=el(()=>({direction:Fe.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(ze.value,Oe.value)})),$e=Lt(()=>({display:{title:"Plant trees",description:_(()=>n(x,null,[s("Plant up to "),Y(a.floor(Ue.value))," ",s("tree"),a.eq(Ue.value,1)?"":"s",s(" at once!"),n("br",null,null),ce(se)]))},style:{minHeight:"80px"},canClick:()=>a.gte(o.value,1)&&a.gte(ze.value,Oe.value),onClick(){if(a.lt(ze.value,Oe.value))return;const $=a.floor(a.min(o.value,a.times(Ue.value,a.div(ze.value,Oe.value).floor())));o.value=a.sub(o.value,$),ze.value=0}})),[dt,Mt]=sl(()=>[{title:"Logs per Tree",modifier:et,base:1,visible:v.bought},{title:"Manual Cutting Amount",modifier:ie,base:1,visible:p.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:ye,base:1,visible:p.bought,unit:"s"},{title:"Manual Planting Amount",modifier:Se,base:1,visible:w.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:fe,base:1,visible:w.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:ne,base:0,visible:b.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:De,base:0,visible:C.bought,unit:"/s"},{title:"Forest Size",modifier:d,base:10,visible:E.bought}]),ot=H(!1),ct=_(()=>n(Et,{modelValue:ot.value,"onUpdate:modelValue":$=>ot.value=$},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:dt}));tt.on("update",$=>{if(a.lt(U.day.value,ui))return;a.gte(X.value,ee.value)?X.value=ee.value:(X.value=a.add(X.value,$),We.isHolding.value&&We.onClick()),a.gte(ze.value,Oe.value)?ze.value=Oe.value:(ze.value=a.add(ze.value,$),$e.isHolding.value&&$e.onClick());const he=a.min(c.value,a.times(Be.value,$)),Ut=a.mul(et.apply(1),he),Jt=a.div(Ut,$);r.value=a.mul(Jt,di).add(a.mul(r.value,a.dOne.sub(di))),i.value=a.add(i.value,Ut),o.value=a.add(o.value,he);const Ae=a.min(o.value,a.times(qe.value,$));o.value=a.sub(o.value,Ae)});const Ke=f(()=>a.sub(Be.value,qe.value)),Ge=f(()=>a.sub(qe.value,Be.value)),_t=$l(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{We.canClick.value&&We.onClick()}})),xt=$l(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{$e.canClick.value&&$e.onClick()}})),{total:It,trackerDisplay:ue}=bl({resource:i,goal:1e4,name:e,day:ui,color:l,modal:{show:ot,display:ct}});return{name:e,color:t,logs:i,totalLogs:It,trees:c,saplings:o,cutTree:We,plantTree:$e,cutTreeHK:_t,plantTreeHK:xt,row1Upgrades:S,row2Upgrades:F,row1Buyables:ve,manualCutProgress:X,manualPlantProgress:ze,generalTabCollapsed:Mt,computedAutoCuttingAmount:Be,minWidth:700,display:_(()=>n(x,null,[ce(ue),n(Ee,null,null),n(Gt,{resource:i,color:t,style:"margin-bottom: 0",productionDisplay:a.gt(Be.value,0)?`+${Q(r.value)}/s average
equilibrium: +${Ci([[Be.value,"cutting speed"],[qe.value,"planting speed"],[a.mul(m.value,20),"forest cap"]],"/s",et.apply(1))}`:void 0},null),n(Gt,{resource:o,color:l,style:"margin-bottom: 0",productionDisplay:va(Ke.value)},null),n(Gt,{resource:c,color:l,style:"margin-bottom: 0",productionDisplay:va(Ge.value)},null),n(Ee,null,null),it(We,$e),n("div",null,[s("Tip: You can hold down on actions to perform them automatically")]),n(Ee,null,null),Ml(S,F),n(Ee,null,null),it(...ve)])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(i.value),s(" "),i.displayName]))}});var Li="./assets/tree.35808197.png",Gi="./assets/sws.714ad454.png",Qi="data:image/png;base64,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",$i="./assets/elf.9fbfa563.png",Hi="./assets/paperStacks.4c96ec8c.png",Vi="data:image/png;base64,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",ji="./assets/metal.7407f5d1.png",zi="./assets/cloth.7bcd7f37.png",Ji="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAE/ElEQVR42u3dW3baMBRAURhzO4x2zO5P25WPPAhIuq99JhAsayNwbHG/rusm6f3ugEiASIBIgEiASIBIgEiASIBIgNQ+mPv9/8Fc13V3ejUeyFsUnwWMRgF5FAYoGgXkWRiQqD2QFThAUUsgq3FAIkAgESCQCJDtQCARIJAIEEAECCQCJArISSQfHRekgIxG4h4yQCBZdAyQADLi+0jlGyw/e+2dAY+7mzdqgr76ek9OQjeENgBSDUl2IO51awjkJJRXTnTWd2T/WxoCJDOSla9r1UQ7faGjMpKWmzZk+riQCUgEjOpIWu9qsmNCfOckZ3nAKxpGZSRjtv2JeCePXj0ywQBkEJZHTnLk6pERBiDDsHx1oqOAZMZREYmdFZ+YYBlXkAowABmAJuqd/LO/WwkHIDqGoxoM30F0DEhFHIBoO5CqMADRFiBwAALIA5MKDkCWTbTIk7Hj41V1HIAknmCnT06HyQxHUiDVd0+EoxeOVEA6PKMASC8caYBkmFjVn7WAoymQrBPr7ZfjTvdBwVEISPVbJcDojQMQwQGI4ABEcAAiMAARMIAAAgwggKg8FEAECSACBBBB0gsIJIAAAogAgUS+gwAiQCARHAmBQAIIIJCoGKCU+2JBAgwgkKgAFiuIQPElXZAUBgKGsiJxq4kgyQgEDFVAEgIEDlVBchwIHAIEDDVBcgQIHAIEDgEChwABRJDsBgKHAIFDgAAiQOAQIIAIEEAECCASIBIgUk4cgAgQQAQHIAKkBhBI1AXHNiCgqAOO7UAgUWUcR4DAooowQoAAo0o4woFAoqwwrCACAxCBURQIHMoMIxQIHLKCAKIGWGxeLVCyAIFD1ZAAIlAyAInG8dXgwgvJWCDfHVRYIDkKJGLCrRhEUABpB2T14EEyG0mr50F2DRokgJQHsn13C0hGImnxyO2RgSoI5N+4dMUNSLblNvlEm3a1rjSQbjiyT6iJV+0ASQYk8yRaOQ5VoACSEMjfY/t1u91+JJknv6/r+ukNoRCQDpd2AckNBRBAUgHJhgWQpDgSvpseBxI9FuVvNekOJNEqEooj4ryXv5u3+8crQOLmQYvnQSasHoCcnxdtth4FpAaQj85T0EWPK9O5BaTPl/WngDzyujPvVQVIkZMXDGT56gELIIC88NonQgFkKBBImgLJdoICkSy5gvXs658Cpdw/CgFZC+TVY+gOpRSQlJsbNwACCSDdgGz5ByEkh4DsmDhZT0AnIJAcBLJyAmUf+AAkKYF0RAIIIJBEApmwbAPSF0nqnz+oMsiAAHJ08CsO7uG7e0ts1NABSaqfga48oAeBbH8GZOWKWB1JKJBOdQEy5fI8IH2/h5RaQcp/MgAEkN3HAYhOfsyyggACSCcglZEAAggggAACCCCAAAIIIDV3cwdEp5AAAgggnYC4zKt2QFYiAUQtgaxA4l4stQbyChK3u2sEkGeRAKIxQL4DxTPpikSS5kdz3sNiVxMB8g4UG8cJkInnEhBABAggAgQQAQIIIIAAAgggkAACCCCAACJAABEggAgQAQKIAAFEgAAiQACBBBBAAAEEEEAAESCACBBABAggRqEeEEgAAQQQQAABBBBAAAFEp4FAAggggAACCCCAAAIJIAIEECXCAQgggEACCCCAAAIIIIAoAggkgAACCCBwAAIIIJAAAggggCgZEEgAgQMQQACBBBBAAAEEDkgK9wfV+oLa+LwMvQAAAABJRU5ErkJggg==",Wi="./assets/plastic.b8ac74ff.png",Ki="data:image/png;base64,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",Br="./assets/elfManagement.436c8744.png";const U=$t("main",function(){const e=Me(1),t=f(()=>(+new Date(new Date().getFullYear(),11,e.value)-me.time)/1e3),l=H(!1),i=H(-1),o=H(""),r=H();function d(p){const w=Me(!1),b=Me(!1);return Ht(()=>{const C=p(),v=Ct(C.shouldNotify),S=Ct(()=>u(v)||u(b));return{...C,opened:w,shouldNotify:S,recentlyUpdated:b,[Bl]:us,[Nl]:function(){const{day:N,layer:D,symbol:z,opened:B,shouldNotify:E,story:F,completedStory:Z,recentlyUpdated:ae}=this;return{day:N,symbol:z,layer:D,opened:B,recentlyUpdated:ae,shouldNotify:E,onOpenLore(){var ie,xe;const oe=U.day.value>N;i.value=oe?N-1:-1;const ve=u((xe=(ie=Bt[D!=null?D:"trees"])==null?void 0:ie.name)!=null?xe:"");o.value=oe?`${ve} - Completed!`:ve,r.value=oe?`${F}
${Z}`:F,l.value=!0},onOpenLayer(){if(ae.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(me.tabs.includes(D!=null?D:"trees")){const oe=me.tabs.lastIndexOf(D!=null?D:"trees");me.tabs.splice(oe,1)}else me.tabs.push(D!=null?D:"trees"),U.minimized.value=!0;else me.tabs.splice(1,1/0,D!=null?D:"trees")},onUnlockLayer(){D&&(B.value=!0,setTimeout(()=>{var oe,ve;i.value=-1,o.value=u((ve=(oe=Bt[D!=null?D:"trees"])==null?void 0:oe.name)!=null?ve:""),r.value=F,me.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[d(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Li,story:"Oh no! Santa forgot about Christmas and it's only 25 days away! He's asked for your help due to your history getting large quantities of things in short amounts of time. Unfortunately you're really starting from scratch here - let's start with getting wood, which you'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),d(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Gi,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today's goal is to get a workshop built up for the elves to work in - and apparently, they need quite a lot of space to work!",completedStory:"The workshop complete, Santa once again dismisses you for the day. With a strong foundation, this workshop should suffice for supporting future work toward this impossible mission. Good Job!"})),d(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Qi,story:"Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),d(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:$i,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they've stopped practicing for 11 months!",completedStory:"The workshop now hums with the bustling elves working on everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),d(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Hi,story:"With the elves trained, we're almost ready to start working on these presents! Just a couple more pre-reqs first, starting with turning all this wood into wood pulp and finally into paper, which will be required for wrapping paper later on but in the meantime can be used to help write guides which will help these elves continue their education!",completedStory:"You look upon your rivers of book pulp as you hand out stacks of papers to elves to read through. You've continued getting closer and closer to preparing for Christmas, and can go to bed satisfied with your progress. Good Job!"})),d(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Vi,story:"You watch all these elves carrying incredibly large loads just in their open elf-sized hands, and realize there's probably a better way. You need to put the toys in boxes anyways, so why don't we get started working on those so the workers can take advantage as well?",completedStory:"Wow, those boxes are really convenient! The workshop feels more and more proper with every day. You tick another requirement on your list and start looking towards tomorrow. Good Job!"})),d(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:ji,story:"You woke up ready to make some toys, before realizing most toys these days are made out of more than just wood! You're sure you're close to really getting to work, but there's a few more materials you're going to need - like metal! Lots of things need metal!",completedStory:"The sounds of drills and metal clanging join the already loud din as yet another piece of the puzzle fits into place. You're making solid progress, Good Job!"})),d(()=>({day:8,shouldNotify:!1,layer:"cloth",symbol:zi,story:"Another resource you're going to need for gifts is cloth! Fortunately you think this should be pretty easy to prepare using a sheep farm - and as you've already proven with the tree farm, that's something you can handle!",completedStory:"You fall into a pile of wool, sighing contentedly as you look at all the progress you've made today. Good Job!"})),d(()=>({day:9,shouldNotify:!1,layer:"oil",symbol:Ji,story:"Looks like you just need one more thing before the toy factory can start running: plastic! Every toy nowadays is made with plastic! But wait, how are you going to get plastic? What can make plastic? Wait that's right, oil! You figured out you might as well repurpose your coal and ore drills into something that can get you oil, but unfortunately you'll need to mine much deeper that you're currently doing, so let's get to work!",completedStory:"It took a while, but you finally got enough oil for the next step! You deserve a good rest after all this digging work - tomorrow will be a busy day! Good Job!"})),d(()=>({day:10,shouldNotify:!1,layer:"plastic",symbol:Wi,story:"Now that plenty of oil has been prepared, it's time to start refining it into plastic! This should be incredibly useful not only for toys, but making tools and other items!",completedStory:"You've started refining massive amounts of oil into slightly less massive amounts of plastic. You have a slight pang of regret thinking of the environmental impact, but ultimately decide Christmas is worth it. Good Job!"})),d(()=>({day:11,shouldNotify:!1,layer:"dyes",symbol:Ki,story:"To make toys, we're going to need some color to make them look nice and enticing! We can't just give kids clear toys after all! To add some color to our toys, we'll need some dyes!",completedStory:"After all that effort, you finally have a rainbow of dyes to choose from! Now the children won't be able to resist the toys you have to offer, once you get them made of course..."})),d(()=>({day:12,shouldNotify:!1,layer:"management",symbol:Br,story:"You watch as the elves work, and you realize that they could probably be trained to help out better. Just then, Santa comes over to check on your progress. You reply that you're doing fine, except that the elves may need a bit of behavior management. Santa offers to help, saying that he doesn't want to leave you to do everything. Unfortunately for you, the behavior problems won't fix themselves, so let's get to work!",completedStory:"Woo! You are exhausted - this layer felt really long to you. It's great seeing the elves so productive, although you worry a bit about your own job security now! Good Job!"})),d(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"So after a good night's rest you decide that maybe making these elves able to do all the work for you isn't something to be scared of, but rather encouraged. Let's spend another day continuing to train them up and really get this place spinning. They are Santa's elves after all, they're supposed to be able to run everything without you!",completedStory:"The elves are doing an incredible job, and Santa does not seem keen on firing you - Score! Now you can get to work on guiding this properly trained highly functional group of hard workers to make Christmas as great as possible. Good Job!"})),d(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""}))];function m(){i.value=e.value-1,o.value="Day Complete!",r.value=c[e.value-1].completedStory,l.value=!0,e.value++,U.minimized.value=!1,me.devSpeed=0}return{name:"Calendar",days:c,day:e,timeUntilNewDay:t,loreScene:i,loreTitle:o,loreBody:r,showLoreModal:l,completeDay:m,minWidth:700,display:_(()=>n(x,null,[me.devSpeed===0?n("div",null,[s("Game Paused")]):null,me.devSpeed&&me.devSpeed!==1?n("div",null,[s("Dev Speed: "),Q(me.devSpeed),s("x")]):null,me.offlineTime?n("div",null,[s("Offline Time: "),ia(me.offlineTime)]):null,n(Ee,null,null),n("div",{class:"advent"},[c.reduce((p,w)=>(p[p.length-1].length===4&&p.push([]),p[p.length-1].push(w),p),[[]]).map(p=>it(...p))])]))}}),Nr=e=>[U,re,Ye,L,Re,j,nt,at,ft,de,Ze,Je,R],ja=f(()=>!1);function Dr(e,t){["0.0","0.1","0.2","0.3","0.4"].includes(e!=null?e:"")}var Ir=Object.freeze(Object.defineProperty({__proto__:null,main:U,getInitialLayers:Nr,hasWon:ja,fixOldSave:Dr},Symbol.toStringTag,{value:"Module"}));const Tr={class:"scene"},Pr=["src"],Fr=["src"],Ur=["src"],Rr=["src"],Or=["src"],qr=["src"],Lr=["src"],Gr={key:7,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},Qr=["src"],$r=["src"],Hr=["src"],Vr=["src"],jr=_e({__name:"Scene",props:{day:null},setup(e){return(t,l)=>(k(),T("div",Tr,[e.day>=7?(k(),T("img",{key:0,src:u(zi),class:"scene-item",style:{left:"4%",bottom:"3%",width:"40px",height:"40px"}},null,8,Pr)):G("",!0),e.day>=0?(k(),T("img",{key:1,src:u(Li),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,Fr)):G("",!0),e.day>=1?(k(),T("img",{key:2,src:u(Gi),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,Ur)):G("",!0),e.day>=2?(k(),T("img",{key:3,src:u(Qi),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,Rr)):G("",!0),e.day>=6?(k(),T("img",{key:4,src:u(ji),class:"scene-item",style:{left:"72%",bottom:"8%",width:"40px",height:"40px"}},null,8,Or)):G("",!0),e.day>=8?(k(),T("img",{key:5,src:u(Ji),class:"scene-item",style:{left:"80%",bottom:"6%"}},null,8,qr)):G("",!0),e.day>=3?(k(),T("img",{key:6,src:u($i),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,Lr)):G("",!0),e.day>=4?(k(),T("div",Gr,[e.day>=4?(k(),T("img",{key:0,src:u(Hi),class:"scene-item"},null,8,Qr)):G("",!0),e.day>=5?(k(),T("img",{key:1,src:u(Vi),class:"scene-item"},null,8,$r)):G("",!0),e.day>=9?(k(),T("img",{key:2,src:u(Wi),class:"scene-item"},null,8,Hr)):G("",!0),e.day>=10?(k(),T("img",{key:3,src:u(Ki),class:"scene-item"},null,8,Vr)):G("",!0)])):G("",!0)]))}});var zr=Ve(jr,[["__scopeId","data-v-47b4d886"]]);const Jr=_e({components:{Context:Si},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:K(Object,String,Function),required:!0},minimizedDisplay:K(Object,String,Function),minimized:{type:Object,required:!0},minWidth:{type:K(Number,String),required:!0},name:{type:K(String),required:!0},color:K(String),minimizable:K(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:l,minimized:i,minWidth:o,tab:r,minimizedDisplay:d}=Dt(e),c=ga(t),m=gl(d),p=f(()=>je.allowGoBack&&l.value>0&&!i.value);function w(){me.tabs.splice(u(e.index),1)}Rl(()=>C(i.value,u(o.value))),jt([i,Qo(o)],([v,S])=>C(v,S));function b(v){e.nodes.value=v}function C(v,S){const N=typeof S=="number"||Number.isNaN(parseInt(S))?S+"px":S,D=r.value();D!=null&&(v?(D.style.flexGrow="0",D.style.flexShrink="0",D.style.width="60px",D.style.minWidth=D.style.flexBasis="",D.style.margin="0"):(D.style.flexGrow="",D.style.flexShrink="",D.style.width="",D.style.minWidth=D.style.flexBasis=N,D.style.margin=""))}return{component:c,minimizedComponent:m,showGoBack:p,updateNodes:b,unref:u,goBack:w}}}),Wr={key:1};function Kr(e,t,l,i,o,r){const d=xl("Context");return k(),T("div",{class:"layer-container",style:At({"--layer-color":e.unref(e.color)})},[e.showGoBack?(k(),T("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):G("",!0),e.minimized.value?(k(),T("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.minimized.value=!1)},[e.minimizedComponent?(k(),be(rt(e.minimizedComponent),{key:0})):(k(),T("div",Wr,Te(e.unref(e.name)),1))])):(k(),T("div",{key:2,class:bt(["layer-tab",{showGoBack:e.showGoBack}])},[n(d,{onUpdateNodes:e.updateNodes},{default:ge(()=>[(k(),be(rt(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(k(),T("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.minimized.value=!0)}," \u25BC ")):G("",!0)],4)}var Xr=Ve(Jr,[["render",Kr],["__scopeId","data-v-259fef03"]]);const Xi=e=>(yl("data-v-4b4bda40"),e=e(),hl(),e),Yr=Xi(()=>h("h2",null,"Changelog",-1)),Zr=Xi(()=>h("details",{open:""},[h("summary",null,[s("v0.0 Initial Commit - "),h("time",null,"2021-09-04")]),s(" This is the first release :D "),h("ul",null,[h("li",{class:"feature"},"Did everything"),h("li",{class:"fix"},"Had some fun"),h("li",{class:"breaking"},"Removed everything"),h("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),eu=_e({__name:"Changelog",setup(e,{expose:t}){const l=H(!1);return t({open(){l.value=!0}}),(i,o)=>(k(),be(Et,{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=r=>l.value=r)},{header:ge(()=>[Yr]),body:ge(()=>[Zr]),_:1},8,["modelValue"]))}});var tu=Ve(eu,[["__scopeId","data-v-4b4bda40"]]);const lu={class:"info-modal-header"},au=["src","alt"],iu={class:"info-modal-title"},nu={key:0},ou=s(" - "),su={key:0},ru={key:0},uu=h("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),du=h("br",null,null,-1),cu=h("br",null,null,-1),pu=["href"],mu=h("span",{class:"material-icons info-modal-discord"},"discord",-1),vu=h("div",null,[h("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[h("span",{class:"material-icons info-modal-discord"},"discord"),s(" The Paper Pilot Community ")])],-1),fu=h("div",null,[h("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[h("span",{class:"material-icons info-modal-discord"},"discord"),s(" The Modding Tree ")])],-1),gu=h("br",null,null,-1);var yu=_e({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const l=e,{title:i,logo:o,author:r,discordName:d,discordLink:c,versionNumber:m,versionTitle:p}=je,w=Dt(l),b=H(!1),C=f(()=>ia(me.timePlayed)),v=f(()=>He(_(()=>n(x,null,[Fi.map(ce)]))));t({open(){b.value=!0}});function S(){var N;(N=u(w.changelog))==null||N.open()}return(N,D)=>(k(),be(Et,{class:"info-modal",modelValue:b.value,"onUpdate:modelValue":D[0]||(D[0]=z=>b.value=z)},{header:ge(()=>[h("div",lu,[u(o)?(k(),T("img",{key:0,class:"info-modal-logo",src:u(o),alt:u(i)},null,8,au)):G("",!0),h("div",iu,[h("h2",null,"- "+Te(u(i))+" -",1),h("h4",null,[s(" - v"+Te(u(m)),1),u(p)?(k(),T("span",nu,": "+Te(u(p)),1)):G("",!0),ou])])])]),body:ge(({shown:z})=>[z?(k(),T("div",su,[u(r)?(k(),T("div",ru,"By "+Te(u(r)),1)):G("",!0),uu,du,h("div",{class:"link",onClick:S},"Changelog"),cu,h("div",null,[u(c)?(k(),T("a",{key:0,href:u(c),class:"info-modal-discord-link",target:"_blank"},[mu,s(" "+Te(u(d)),1)],8,pu)):G("",!0)]),vu,fu,gu,h("div",null,"Time Played: "+Te(u(C)),1),(k(),be(rt(u(v))))])):G("",!0)]),_:1},8,["modelValue"]))}});const Yi=e=>(yl("data-v-0d685451"),e=e(),hl(),e),hu=Yi(()=>h("h2",null,"Options",-1)),bu=Yi(()=>h("hr",null,null,-1));var wu=_e({__name:"Options",setup(e,{expose:t}){const l=H(!1);t({open(){l.value=!0}});const i=Object.keys(jl).map(v=>({label:Ei(v),value:v})),o=f(()=>He(_(()=>n(x,null,[Pi.map(ce)])))),{showTPS:r,theme:d}=Dt(mt),{autosave:c,usingLog:m}=Dt(me),p=f({get(){return me.devSpeed===0},set(v){me.devSpeed=v?0:null}}),w=_(()=>n("span",null,[s("Autosave"),n(yt,{display:"Save-specific"},{default:()=>[s("*")]})])),b=_(()=>n("span",null,[s("Pause game"),n(yt,{display:"Save-specific"},{default:()=>[s("*")]})])),C=_(()=>n("span",null,[s("Use log for progress bar"),n(yt,{display:"Save-specific"},{default:()=>[s("*")]})]));return(v,S)=>(k(),be(Et,{modelValue:l.value,"onUpdate:modelValue":S[5]||(S[5]=N=>l.value=N)},{header:ge(()=>[hu]),body:ge(()=>[n(Va,{title:"Theme",options:u(i),modelValue:u(d),"onUpdate:modelValue":S[0]||(S[0]=N=>wt(d)?d.value=N:null)},null,8,["options","modelValue"]),(k(),be(rt(u(o)))),n(vl,{title:"Show TPS",modelValue:u(r),"onUpdate:modelValue":S[1]||(S[1]=N=>wt(r)?r.value=N:null)},null,8,["modelValue"]),bu,n(vl,{title:u(w),modelValue:u(c),"onUpdate:modelValue":S[2]||(S[2]=N=>wt(c)?c.value=N:null)},null,8,["title","modelValue"]),u(je).enablePausing?(k(),be(vl,{key:0,title:u(b),modelValue:u(p),"onUpdate:modelValue":S[3]||(S[3]=N=>wt(p)?p.value=N:null)},null,8,["title","modelValue"])):G("",!0),n(vl,{title:u(C),modelValue:u(m),"onUpdate:modelValue":S[4]||(S[4]=N=>wt(m)?m.value=N:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var Au=Ve(wu,[["__scopeId","data-v-0d685451"]]);const ku=["onSubmit"],Cu={class:"field"},Eu={key:0,class:"field-title"},_u=["placeholder"],Su=_e({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null,submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(e,{emit:t}){const l=e,i=gl(ol(l,"title"),"span"),o=Yt(null);ya(()=>{var m;(m=o.value)==null||m.focus()});const r=f({get(){return u(l.modelValue)||""},set(m){t("update:modelValue",m)}});function d(){t("submit")}function c(){l.submitOnBlur!==!1?t("submit"):t("cancel")}return(m,p)=>(k(),T("form",{onSubmit:Yl(d,["prevent"])},[h("div",Cu,[u(i)?(k(),T("span",Eu,[(k(),be(rt(u(i))))])):G("",!0),e.textArea?(k(),be(u(gn),{key:1,modelValue:u(r),"onUpdate:modelValue":p[0]||(p[0]=w=>wt(r)?r.value=w:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:o},null,8,["modelValue","placeholder","maxHeight"])):ha((k(),T("input",{key:2,type:"text","onUpdate:modelValue":p[1]||(p[1]=w=>wt(r)?r.value=w:null),placeholder:e.placeholder,class:bt({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:o},null,42,_u)),[[dn,u(r)]])])],40,ku))}});var Zi=Ve(Su,[["__scopeId","data-v-67b44a54"]]);const Mu={key:0},xu=["onClick","disabled"],Bu={key:0},Nu=["onClick"],Du=_e({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const i=Dt(e),o=H(!1);jt(o,c=>{t("confirmingChanged",c)});function r(){if(u(i.skipConfirm)){t("click");return}o.value&&t("click"),o.value=!o.value}function d(){o.value=!1}return(c,m)=>(k(),T("span",{class:bt(["container",{confirming:o.value}])},[o.value?(k(),T("span",Mu,"Are you sure?")):G("",!0),h("button",{onClick:Yl(r,["stop"]),class:"button danger",disabled:e.disabled},[o.value?(k(),T("span",Bu,"Yes")):Xt(c.$slots,"default",{key:1},void 0,!0)],8,xu),o.value?(k(),T("button",{key:1,class:"button",onClick:Yl(d,["stop"])},"No",8,Nu)):G("",!0)],2))}});var Iu=Ve(Du,[["__scopeId","data-v-2f8ef34c"]]);const Tu=["onClick"],Pu=_e({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=H(!1),i=H(null);function o(){t("click"),i.value&&clearTimeout(i.value),l.value=!1,Rl(()=>{l.value=!0,i.value=setTimeout(()=>l.value=!1,500)})}return(r,d)=>(k(),T("button",{onClick:Yl(o,["stop"]),class:bt(["feedback",{activated:l.value,left:e.left}])},[Xt(r.$slots,"default",{},void 0,!0)],10,Tu))}});var Fu=Ve(Pu,[["__scopeId","data-v-01a1b95c"]]);const wl=e=>(yl("data-v-5285ac49"),e=e(),hl(),e),Uu=wl(()=>h("div",{class:"handle material-icons"},"drag_handle",-1)),Ru={key:0,class:"actions"},Ou=wl(()=>h("span",{class:"material-icons"},"content_paste",-1)),qu=wl(()=>h("span",{class:"material-icons"},"content_copy",-1)),Lu=wl(()=>h("span",{class:"material-icons"},"edit",-1)),Gu=wl(()=>h("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Qu={key:1,class:"actions"},$u=wl(()=>h("span",{class:"material-icons"},"check",-1)),Hu=wl(()=>h("span",{class:"material-icons"},"close",-1)),Vu={key:2,class:"details"},ju={class:"save-version"},zu=wl(()=>h("br",null,null,-1)),Ju={key:0},Wu={key:1},Ku={key:3,class:"details"},Xu={key:4,class:"details error"},Yu=wl(()=>h("br",null,null,-1)),Zu=_e({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const l=e,{save:i}=Dt(l),o=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),r=H(!1),d=H(!1),c=H("");jt(r,()=>c.value=i.value.name||"");const m=f(()=>i.value&&i.value.id===me.id),p=f(()=>m.value?me.time:i.value&&i.value.time||0),w=ga(f(()=>{var C,v,S,N;return`Day ${(N=(S=(v=(C=i.value)==null?void 0:C.layers)==null?void 0:v.main)==null?void 0:S.day)!=null?N:1}`}));function b(){t("editName",c.value),r.value=!1}return(C,v)=>(k(),T("div",{class:bt(["save",{active:u(m)}])},[Uu,r.value?(k(),T("div",Qu,[h("button",{onClick:b,class:"button"},[n(yt,{display:"Save",direction:u(Fe).Left,class:"info"},{default:ge(()=>[$u]),_:1},8,["direction"])]),h("button",{onClick:v[5]||(v[5]=S=>r.value=!r.value),class:"button"},[n(yt,{display:"Cancel",direction:u(Fe).Left,class:"info"},{default:ge(()=>[Hu]),_:1},8,["direction"])])])):(k(),T("div",Ru,[u(i).error==null&&!d.value?(k(),be(Fu,{key:0,onClick:v[0]||(v[0]=S=>t("export")),class:"button",left:""},{default:ge(()=>[n(yt,{display:"Export",direction:u(Fe).Left,class:"info"},{default:ge(()=>[Ou]),_:1},8,["direction"])]),_:1})):G("",!0),u(i).error==null&&!d.value?(k(),T("button",{key:1,onClick:v[1]||(v[1]=S=>t("duplicate")),class:"button"},[n(yt,{display:"Duplicate",direction:u(Fe).Left,class:"info"},{default:ge(()=>[qu]),_:1},8,["direction"])])):G("",!0),u(i).error==null&&!d.value?(k(),T("button",{key:2,onClick:v[2]||(v[2]=S=>r.value=!r.value),class:"button"},[n(yt,{display:"Edit Name",direction:u(Fe).Left,class:"info"},{default:ge(()=>[Lu]),_:1},8,["direction"])])):G("",!0),n(Iu,{disabled:u(m),onClick:v[3]||(v[3]=S=>t("delete")),onConfirmingChanged:v[4]||(v[4]=S=>d.value=S)},{default:ge(()=>[n(yt,{display:"Delete",direction:u(Fe).Left,class:"info"},{default:ge(()=>[Gu]),_:1},8,["direction"])]),_:1},8,["disabled"])])),u(i).error==null&&!r.value?(k(),T("div",Vu,[h("button",{class:"button open",onClick:v[6]||(v[6]=S=>t("open"))},[h("h3",null,Te(u(i).name),1)]),h("span",ju,"v"+Te(u(i).modVersion),1),zu,u(p)?(k(),T("div",Ju,"Last played "+Te(u(o).format(u(p))),1)):G("",!0),u(w)?(k(),T("div",Wu,[(k(),be(rt(u(w))))])):G("",!0)])):u(i).error==null&&r.value?(k(),T("div",Ku,[n(Zi,{modelValue:c.value,"onUpdate:modelValue":v[7]||(v[7]=S=>c.value=S),class:"editname",onSubmit:b},null,8,["modelValue"])])):(k(),T("div",Xu,[s(" Error: Failed to load save with id "+Te(u(i).id),1),Yu,s(Te(u(i).error),1)]))],2))}});var ed=Ve(Zu,[["__scopeId","data-v-5285ac49"]]);const za=e=>(yl("data-v-3b9991aa"),e=e(),hl(),e),td=za(()=>h("h2",null,"Saves Manager",-1)),ld={class:"modal-footer"},ad={class:"field"},id=za(()=>h("span",{class:"field-title"},"Create Save",-1)),nd={class:"field-buttons"},od={class:"footer"},sd=za(()=>h("div",{style:{"flex-grow":"1"}},null,-1)),rd=_e({__name:"SavesManager",setup(e,{expose:t}){const l=H(!1),i=H(null);t({open(){l.value=!0}});const o=H(!1),r=H(""),d=H(null);jt(r,B=>{B?Rl(()=>{try{if(B[0]!=="{")if(B[0]==="e")B=decodeURIComponent(escape(atob(B)));else if(B[0]==="\u1BE1")B=El.decompressFromUTF16(B);else{console.warn("Unable to determine preset encoding",B),o.value=!0;return}const E=JSON.parse(B);if(typeof E!="object"){o.value=!0;return}const F=da();E.id=F,al(E),r.value="",o.value=!1,mt.saves.push(F)}catch{o.value=!0}}):o.value=!1});let c={},m=H(Object.keys(c).reduce((B,E)=>(B.push({label:E.split("/").slice(-1)[0].slice(0,-4),value:c[E]}),B),[]));const p=wa({});function w(B){if(p[B]==null){let E=localStorage.getItem(B);if(E==null)p[B]={error:"Save doesn't exist in localStorage",id:B};else if(E==="dW5kZWZpbmVk")p[B]={error:"Save is undefined",id:B};else try{if(E[0]!=="{")if(E[0]==="e")E=decodeURIComponent(escape(atob(E)));else if(E[0]==="\u1BE1")E=El.decompressFromUTF16(E);else return console.warn("Unable to determine preset encoding",E),o.value=!0,p[B]={error:"Unable to determine preset encoding",id:B},p[B];p[B]={...JSON.parse(E),id:B}}catch(F){p[B]={error:F,id:B},console.warn(`SavesManager: Failed to load info about save with id ${B}: + Cost: 50 ${l.displayName}
${we(1e11)} ${L.coal.displayName}`}})),Se=q(()=>({resource:O(l),cost:1e5,display:{title:"Efficient Drills",description:"Use metal and a bunch of R&D to make drilling stuff faster. Double coal and ore mining speed."},visibility:()=>y(de.depthMilestones[4].earned.value)})),Ue=Le(()=>({resource:O(l),cost(){return a.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:_(()=>n(M,null,[s("Mine 2.5x faster. Increase ore mining amount by")," ",Ce(Ue.amount.value),s(" ore per operation")]))},visibility:()=>y(a.gte(Ue.amount.value,1)||a.div(r.value,c.value).plus(i.value).gte(10)),style:{width:"200px"}})),fe=Le(()=>({resource:O(l),cost(){return a.pow(1.15,a.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:_(()=>n(M,null,[s("Automatically smelts")," ",Ce(a.times(fe.amount.value,10)),s(" ore per second")]))},visibility:()=>y(a.gte(fe.amount.value,1)||a.gte(Ue.amount.value,4)||a.gte(r.value,50)),style:{width:"200px"}})),Oe=Me(!0),De=Le(()=>({resource:L.coal,cost(){return a.pow(10,this.amount.value).times(1e12)},display:{title:"Hotter Forges",description:"More coal makes the fires burn hotter, getting just a little more metal out of each bit of ore",effectDisplay:_(()=>n(M,null,[s("Gain "),Ce(a.times(qe.value,100)),s("% more metal per ore")]))},visibility:()=>y(a.gte(De.amount.value,1)||Ie.bought.value),style:{width:"200px"}})),qe=f(()=>a.times(De.amount.value,.25));lt.on("update",oe=>{F.value=a.times(oe,E.value).plus(F.value);const $e=F.value.trunc();F.value=F.value.minus($e),o.value=a.add(o.value,a.times($e,z.value)),Oe.value&&N(a.min(v.value,a.times(p.value,oe)),b.value)});const[pe,tt]=sl(()=>[{title:"Auto Smelt Speed",modifier:m,base:0,unit:"/s",visible(){return a.gt(fe.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:w,base:1,visible(){return a.gt(b.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:D,base:1},{title:"Mining Speed",modifier:B,base:.1,unit:"/s"}]),X=H(!1),dt=_(()=>n(Et,{modelValue:X.value,"onUpdate:modelValue":oe=>X.value=oe},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:pe})),{total:We,trackerDisplay:ze}=bl({resource:l,goal:25e3,name:e,day:oi,color:t,modal:{show:X,display:dt}});return{name:e,day:oi,color:t,ore:o,bestOre:r,oreProgress:F,metal:l,bestMetal:i,totalMetal:We,simplePickaxe:ye,doublePickaxe:ee,crucible:ne,coalDrill:Be,industrialFurnace:Ie,efficientDrill:Se,oreDrill:Ue,industrialCrucible:fe,autoSmeltEnabled:Oe,hotterForge:De,generalTabCollapsed:tt,minWidth:700,display:_(()=>n(M,null,[ce(ze),n(Ee,null,null),n(Gt,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:_(()=>n(M,null,[Oe.value&&a.gte(fe.amount.value,1)?`+${Ai([[p.value,"smelting speed"],[ve.value,"ore gain"],[a.div(L.computedCoalGain.value,C),"coal gain"]],"/s",a.mul(c.value,b.value))}`:void 0]))},null),n(Ee,null,null),ce(S),a.gte(fe.amount.value,1)?n("div",{style:{width:"150px"}},[n(vl,{title:"Auto Smelt",modelValue:Oe.value,"onUpdate:modelValue":oe=>Oe.value=oe},null)]):void 0,n(Ee,null,null),n(Gt,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:_(()=>n(M,null,[ki(xe.value)]))},null),n(Ee,null,null),n("div",null,[s("Currently mining "),we(z.value),s(" ore every")," ",we(a.recip(E.value)),s(" seconds")]),ce(ae),n(Ee,null,null),nt(ye,ee,ne,Be,Ie,Se),nt(Ue,fe,De)])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),we(l.value),s(" "),l.displayName]))}}),Ar="coal",si=3,L=$t(Ar,function(){const e="Coal",t="#151716",l="#B2BeB5",i="var(--foreground)",o=ht(0,"coal"),r=ht(0,"ash"),d=Me(0),c=f(()=>a.times(d.value,1e3)),m=f(()=>a.times(d.value,.1)),p=f(()=>{let x=a.times(d.value,50);return R.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(x=x.times(5)),x}),w=Le(()=>({resource:re.logs,cost(){let x=a.times(F.amount.value,u(F.cost)).plus(this.amount.value);return a.gte(x,100)&&(x=a.pow(x,2).div(100)),a.gte(x,1e4)&&(x=a.pow(x,2).div(1e4)),x=a.pow(.95,j.books.smallFireBook.amount.value).times(x),x.pow(1.5).times(1e4)},display:_(()=>n(M,null,[n("h3",null,[s("Small Fire")]),n("br",null,null),s("Burn 1000 logs for 0.1 coal and 50 ash"),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),Q(c.value),s(" logs/sec"),n("br",null,null),s("+"),Q(m.value),s(" coal/sec"),n("br",null,null),s("+"),Q(p.value),s(" ash/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Y(u(w.cost)),s(" "),w.resource.displayName])),onPurchase(){d.value=a.add(d.value,1)},style:{color:i,width:"160px"}})),{min:b,max:C,add:v,remove:S}=il({active:d,buyable:w}),N=ht(w.amount,"small fires"),D=Me(0),z=f(()=>a.times(D.value,1e4)),B=f(()=>{let x=a.times(D.value,10);return R.elfTraining.bonfireElfTraining.milestones[0].earned.value&&(x=x.times(5)),x}),E=f(()=>{let x=a.times(D.value,1e3);return R.elfTraining.bonfireElfTraining.milestones[0].earned.value&&(x=x.times(5)),x}),F=Le(()=>({resource:N,cost(){return a.pow(.95,j.books.bonfireBook.amount.value).times(10)},display:_(()=>n(M,null,[n("h3",null,[s("Bonfire")]),n("br",null,null),s("Burn 10,000 logs for 10 coal and 1000 ash"),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),Q(z.value),s(" logs/sec"),n("br",null,null),s("+"),Q(B.value),s(" coal/sec"),n("br",null,null),s("+"),Q(E.value),s(" ash/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Y(u(F.cost)),s(" "),F.resource.displayName])),onPurchase(x){d.value=a.sub(d.value,x).max(0),D.value=a.add(D.value,1)},style:{color:i,width:"160px"},visibility:()=>y(oe.bought.value)})),{min:Z,max:ae,add:se,remove:ve}=il({buyable:F,active:D}),ie=Me(0),xe=f(()=>a.times(ie.value,1e6)),ye=f(()=>{let x=a.times(ie.value,1e4);return R.elfTraining.kilnElfTraining.milestones[0].earned.value&&(x=x.times(5)),x}),ee=f(()=>{let x=a.times(ie.value,1e4);return R.elfTraining.kilnElfTraining.milestones[0].earned.value&&(x=x.times(5)),x}),ne=Le(()=>({resource:re.logs,cost(){let x=this.amount.value;return a.gte(x,100)&&(x=a.pow(x,2).div(100)),a.gte(x,1e4)&&(x=a.pow(x,2).div(1e4)),x=a.pow(.95,j.books.kilnBook.amount.value).times(x),a.pow(1.1,x).times(1e7)},display:_(()=>n(M,null,[n("h3",null,[s("Charcoal Kiln")]),n("br",null,null),s("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("-"),Q(xe.value),s(" logs/sec"),n("br",null,null),s("+"),Q(ye.value),s(" coal/sec"),n("br",null,null),s("+"),Q(ee.value),s(" ash/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Y(u(ne.cost)),s(" "),ne.resource.displayName])),onPurchase(){ie.value=a.add(ie.value,1)},style:{color:i,width:"160px"},visibility:()=>y(ct.bought.value)})),{min:Be,max:Ie,add:Se,remove:Ue}=il({buyable:ne,active:ie}),fe=Me(0),Oe=f(()=>a.times(a.pow(fe.value,de.row2Upgrades[1].bought.value?2:1),5e7).times(it.efficientDrill.bought.value?2:1).times(R.elfTraining.smallfireElfTraining.milestones[2].earned.value?2:1).times(R.elfTraining.bonfireElfTraining.milestones[2].earned.value?2:1).times(R.elfTraining.kilnElfTraining.milestones[2].earned.value?2:1)),De=Le(()=>({resource:it.metal,cost(){let x=this.amount.value;a.gte(x,100)&&(x=a.pow(x,2).div(100)),a.gte(x,1e4)&&(x=a.pow(x,2).div(1e4));let Ot=a.pow(1.15,x).times(10);return R.elfTraining.fertilizerElfTraining.milestones[2].earned.value&&(Ot=Ot.div(a.add(re.totalLogs.value,Math.E).ln())),Ot},display:_(()=>n(M,null,[n("h3",null,[s("Mining Drill")]),n("br",null,null),s("Dig through the ground to find 50,000,000 coal"),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("+"),Q(Oe.value),s(" coal/sec"),n("br",null,null),n("br",null,null),s("Cost: "),Y(u(De.cost)),s(" "),De.resource.displayName])),onPurchase(){fe.value=a.add(fe.value,1)},style:{color:i,width:"160px"},visibility:()=>y(it.coalDrill.bought.value)})),{max:qe,min:pe,add:tt,remove:X}=il({buyable:De,active:fe}),dt=q(()=>({resource:O(o),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:i}})),We=q(()=>({resource:O(o),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:i}})),ze=q(()=>({resource:O(r),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:i}})),oe=q(()=>({resource:N,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){N.value=a.add(N.value,this.cost)},style:{color:i}})),$e=[dt,We,ze,oe],Ze=q(()=>({resource:O(o),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:i},visibility:()=>y(oe.bought.value)})),Mt=q(()=>({resource:O(o),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:i},visibility:()=>y(oe.bought.value)})),st=q(()=>({canAfford(){return a.gte(re.logs.value,1e5)&&a.gte(r.value,1e5)},onPurchase(){re.logs.value=a.sub(re.logs.value,1e5),r.value=a.sub(r.value,1e5)},display:_(()=>n(M,null,[n("h3",null,[s("Mulched Soil")]),n("br",null,null),s("Double the bonus from Fertilized Soil"),n("br",null,null),n("br",null,null),s("Cost: "),Y(1e5),s(" "),re.logs.displayName,n("br",null,null),Y(1e5),s(" "),r.displayName])),style:{color:i},visibility:()=>y(oe.bought.value)})),ct=q(()=>({resource:re.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:i},visibility:()=>y(oe.bought.value)})),Ke=[Ze,Mt,st,ct],Ge=q(()=>({resource:O(o),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:i},visibility:()=>y(de.depthMilestones[4].earned.value)})),_t=[Ge],xt=Le(()=>({resource:O(o),cost(){let x=this.amount.value;return a.gte(x,50)&&(x=a.pow(x,2).div(50)),a.gte(x,200)&&(x=a.pow(x,2).div(200)),a.gte(x,2e6)&&(x=a.pow(x,2).div(2e6)),x=a.pow(.95,j.books.heatedCuttersBook.amount.value).times(x),R.elfTraining.heatedCutterElfTraining.milestones[0].earned.value&&(x=a.pow(.95,j.books.heatedCuttersBook.amount.value).times(x)),a.add(x,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:_(()=>n(M,null,[s("Cutters cut down trees "),Q(Ut.value),s("x faster")]))},style:{color:i},visibility:()=>y(dt.bought.value)})),It=Le(()=>({resource:O(o),cost(){let x=this.amount.value;return a.gte(x,50)&&(x=a.pow(x,2).div(50)),a.gte(x,200)&&(x=a.pow(x,2).div(200)),a.gte(x,2e6)&&(x=a.pow(x,2).div(2e6)),x=a.pow(.95,j.books.heatedPlantersBook.amount.value).times(x),R.elfTraining.heatedPlanterElfTraining.milestones[0].earned.value&&(x=a.pow(.95,j.books.heatedPlantersBook.amount.value).times(x)),a.add(x,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:_(()=>n(M,null,[s("Planters plant trees "),Q(Ae.value),s("x faster")]))},style:{color:i},visibility:()=>y(We.bought.value)})),ue=Le(()=>({resource:O(r),cost(){let x=this.amount.value;return a.gte(x,50)&&(x=a.pow(x,2).div(50)),a.gte(x,200)&&(x=a.pow(x,2).div(200)),a.gte(x,2e6)&&(x=a.pow(x,2).div(2e6)),x=a.pow(.95,j.books.fertilizerBook.amount.value).times(x),R.elfTraining.fertilizerElfTraining.milestones[1].earned.value&&(x=a.pow(.95,j.books.fertilizerBook.amount.value).times(x)),a.add(x,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:_(()=>n(M,null,[s("Trees give "),Q(pt.value),s("x more logs")]))},style:{color:i},visibility:()=>y(ze.bought.value)})),$=[xt,It,ue],he=J(()=>[le(()=>({addend(){return a.times(xt.amount.value,.25)},description:"Heated Cutters",enabled(){return a.gt(xt.amount.value,0)}})),g(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:Ze.bought}))]),Ut=f(()=>he.apply(1)),Jt=J(()=>[le(()=>({addend(){return a.times(It.amount.value,.25)},description:"Heated Planters",enabled(){return a.gt(It.amount.value,0)}})),g(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:Mt.bought}))]),Ae=f(()=>Jt.apply(1)),Ne=J(()=>[le(()=>({addend(){return a.times(ue.amount.value,.25)},description:"Fertilized Soil",enabled(){return a.gt(ue.amount.value,0)}})),g(()=>({multiplier:2,description:"Mulched Soil",enabled:st.bought}))]),pt=f(()=>Ne.apply(1)),Tt=J(()=>[le(()=>({addend(){return m.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),le(()=>({addend(){return B.value},description:"Bonfires",enabled(){return a.gt(D.value,0)}})),le(()=>({addend(){return ye.value},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}})),le(()=>({addend(){return Oe.value},description:"Mining Drills",enabled(){return a.gt(fe.value,0)}})),g(()=>({multiplier:2,description:"Carry coal in boxes",enabled:ot.upgrades.coalUpgrade.bought})),g(()=>({multiplier:()=>a.div(ot.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:ot.upgrades.coalUpgrade.bought})),g(()=>({multiplier:()=>{let x=w.amount.value;return R.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(x=a.div(F.amount.value,10).add(x)),a.div(x,1e4).add(1)},description:"Small Fires Synergy",enabled:Re.elves.smallFireElf.bought})),g(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Re.elves.bonfireElf.bought})),g(()=>({multiplier:()=>a.div(ne.amount.value,100).times(Je.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Re.elves.kilnElf.bought})),g(()=>({multiplier:2,description:"Mining overalls",enabled:ft.metalUpgrades.metalUpgrade2.bought})),g(()=>({multiplier:3,description:"Mining helmet",enabled:ft.metalUpgrades.metalUpgrade3.bought})),g(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:ft.metalUpgrades.metalUpgrade4.bought})),g(()=>({multiplier:2,description:"12 Elves Trained",enabled:Re.milestones[11].earned})),ml(()=>({exponent:1.25,description:"3 Elves Trained",enabled:Re.milestones[2].earned,supportLowNumbers:!0})),g(()=>({multiplier:()=>a.mul(de.depth.value,.25).add(1),description:"5m Well Depth",enabled:de.depthMilestones[0].earned})),g(()=>({multiplier:de.extractorCoal,description:"Heavy Extractor",enabled:()=>a.gt(de.activeExtractor.value,0)})),ml(()=>({exponent:1.05,description:"Jack Level 2",enabled:R.elfTraining.heatedCutterElfTraining.milestones[1].earned}))]),rt=f(()=>Tt.apply(0)),Rt=J(()=>[le(()=>({addend(){return p.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),le(()=>({addend(){return E.value},description:"Bonfires",enabled(){return a.gt(D.value,0)}})),le(()=>({addend(){return ee.value},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}})),g(()=>({multiplier:2,description:"Carry ash in boxes",enabled:ot.upgrades.ashUpgrade.bought})),g(()=>({multiplier:()=>a.div(ot.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:ot.upgrades.ashUpgrade.bought})),g(()=>({multiplier:()=>{let x=w.amount.value;return R.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(x=a.div(F.amount.value,100).add(x)),a.div(x,1e3).add(1)},description:"Small Fires Synergy",enabled:Re.elves.smallFireElf.bought})),g(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Re.elves.bonfireElf.bought})),g(()=>({multiplier:()=>a.div(ne.amount.value,100).times(Je.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Re.elves.kilnElf.bought})),g(()=>({multiplier:4,description:"Mining boots",enabled:ft.metalUpgrades.metalUpgrade1.bought})),ml(()=>({exponent:1.1,description:"Joy Level 2",enabled:R.elfTraining.smallfireElfTraining.milestones[1].earned})),ml(()=>({exponent:1.1,description:"Faith Level 2",enabled:R.elfTraining.bonfireElfTraining.milestones[1].earned})),ml(()=>({exponent:1.1,description:"Snowball Level 2",enabled:R.elfTraining.kilnElfTraining.milestones[1].earned}))]),rl=f(()=>Rt.apply(0)),ul=J(()=>[le(()=>({addend(){return a.negate(c.value)},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),le(()=>({addend(){return a.negate(z.value)},description:"Bonfires",enabled(){return a.gt(D.value,0)}})),le(()=>({addend(){return a.negate(xe.value)},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}}))]),te=f(()=>ul.apply(0)),[V,Qe]=sl(()=>[{title:"Log Consumption",modifier:ul,base:0,visible(){return a.gt(d.value,0)||a.gt(D.value,0)||a.gt(ie.value,0)}},{title:"Coal Gain",modifier:Tt,base:0,visible(){return a.gt(d.value,0)||a.gt(D.value,0)||a.gt(ie.value,0)}},{title:"Ash Gain",modifier:Rt,base:0,visible(){return a.gt(d.value,0)||a.gt(D.value,0)||a.gt(ie.value,0)}}]),at=H(!1),Pt=_(()=>n(Et,{modelValue:at.value,"onUpdate:modelValue":x=>at.value=x},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:V}));lt.on("update",x=>{a.lt(U.day.value,si)||a.times(x,te.value).negate().gt(re.logs.value)||(re.logs.value=a.times(x,te.value).plus(re.logs.value),o.value=a.times(x,rt.value).plus(o.value),r.value=a.times(x,rl.value).plus(r.value),d.value=a.max(d.value,0))});const{total:Ft,trackerDisplay:Wt}=bl({resource:o,goal:1e7,name:e,day:si,color:t,modal:{show:at,display:Pt}});return{name:e,color:t,coal:o,totalCoal:Ft,computedCoalGain:rt,ash:r,activeFires:d,buildFire:w,activeBonfires:D,buildBonfire:F,activeKilns:ie,buildKiln:ne,activeDrills:fe,buildDrill:De,warmerCutters:dt,warmerPlanters:We,basicFertilizer:ze,unlockBonfire:oe,dedicatedCutters:Ze,dedicatedPlanters:Mt,betterFertilizer:st,unlockKiln:ct,efficientSmelther:Ge,heatedCutters:xt,heatedPlanters:It,moreFertilizer:ue,computedHeatedCutterEffect:Ut,computedHeatedPlanterEffect:Ae,computedFertilizerEffect:pt,generalTabCollapsed:Qe,minWidth:700,display:_(()=>n(M,null,[ce(Wt),n(Ee,null,null),n(Gt,{resource:o,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(rt.value,0)?`+${Q(rt.value)}/s`:void 0},null),n(Ee,null,null),n(Gt,{resource:r,color:l,style:"margin-bottom: 0",effectDisplay:a.gt(rl.value,0)?`+${Q(rl.value)}/s`:void 0},null),n(Ee,null,null),n(Vl,null,{default:()=>[n(Qt,null,{default:()=>[ce(w),n("div",null,[Y(a.floor(d.value)),s("/"),Y(a.floor(w.amount.value))]),nt(b,S,v,C)]}),oe.bought.value?n(M,null,[n(Ee,null,null),n(Qt,null,{default:()=>[ce(F),n("div",null,[Y(D.value),s("/"),Y(F.amount.value)]),nt(Z,ve,se,ae)]})]):void 0,ct.bought.value?n(M,null,[n(Ee,null,null),n(Qt,null,{default:()=>[ce(ne),n("div",null,[Y(ie.value),s("/"),Y(ne.amount.value)]),nt(Be,Ue,Se,Ie)]})]):void 0,it.coalDrill.bought.value?n(M,null,[n(Ee,null,null),n(Qt,null,{default:()=>[ce(De),n("div",null,[Y(fe.value),s("/"),Y(De.amount.value)]),nt(pe,X,tt,qe)]})]):void 0]}),n(Ee,null,null),Ml($e,Ke,_t),nt(...$)])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(o.value),s(" "),o.displayName]))}}),kr="elves",Wl=4,Re=$t(kr,function(){const e="Elves",t="red",l="#911D21",o=el(()=>({direction:Fe.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>U.day.value===Wl?a.div(Ge.value,6).times(.8333333333333334).add(a.div(a.add(L.coal.value,1).log10(),a.log10(1e9)).clamp(0,1).div(6)):1,display:_(()=>U.day.value===Wl?a.lt(Ge.value,6)?n(M,null,[Y(Ge.value),s("/6 elves")]):n(M,null,[Y(L.coal.value),s("/"),Y(1e9),s(" coal")]):"")})),r=fr(()=>({thingsToReset:[re,Ye,L],onReset(){setTimeout(()=>{Ae.earned.value?(re.row1Upgrades.forEach(te=>te.bought.value=!0),re.row2Upgrades.forEach(te=>te.bought.value=!0)):xt.earned.value&&(re.row1Upgrades[4].bought.value=!0,re.row2Upgrades[4].bought.value=!0),Ut.earned.value&&(Ye.foundationProgress.value=100),pt.earned.value&&(L.warmerCutters.bought.value=!0,L.warmerPlanters.bought.value=!0,L.basicFertilizer.bought.value=!0,L.unlockBonfire.bought.value=!0,L.dedicatedCutters.bought.value=!0,L.dedicatedPlanters.bought.value=!0,L.betterFertilizer.bought.value=!0,L.unlockKiln.bought.value=!0,L.efficientSmelther.bought.value=!0)})}})),d=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>a.gt(j.books.cuttersBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),c=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>a.gt(j.books.plantersBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),m=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>a.gt(j.books.expandersBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),p=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>a.gt(j.books.heatedCuttersBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),w=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>a.gt(j.books.heatedPlantersBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),b=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>a.gt(j.books.fertilizerBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),C=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>a.gt(j.books.smallFireBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),v=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>a.gt(j.books.bonfireBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),S=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>a.gt(j.books.kilnBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),N=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.paperBook.amount.value,.1).add(1),description:"The Book Thief",enabled:()=>a.gt(j.books.paperBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),D=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.boxBook.amount.value,.1).add(1),description:"Not a box",enabled:()=>a.gt(j.books.boxBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),z=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.clothBook.amount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>a.gt(j.books.clothBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),B=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.miningDrillBook.amount.value,.1).add(1),description:"Drills and Mills",enabled:()=>a.gt(j.books.miningDrillBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),E=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.heavyDrillBook.amount.value,.1).add(1),description:"Deep in the Earth",enabled:()=>a.gt(j.books.heavyDrillBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),F=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.oilBook.amount.value,.1).add(1),description:"Burning the Midnight Oil",enabled:()=>a.gt(j.books.oilBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),Z=J(()=>[g(()=>({multiplier:2,description:"6 Elves Trained",enabled:he.earned})),g(()=>({multiplier:()=>a.times(j.books.metalBook.amount.value,.1).add(1),description:"Physical Metallurgy",enabled:()=>a.gt(j.books.metalBook.amount.value,0)})),g(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ne.earned}))]),[ae,se]=sl(()=>[{title:"Holly Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:Ke.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:Ke.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:Ke.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:p,base:10,unit:"/s",visible:Ke.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:w,base:10,unit:"/s",visible:Ke.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:b,base:10,unit:"/s",visible:Ke.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:C,base:10,unit:"/s",visible:Ke.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:v,base:10,unit:"/s",visible:Ke.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:S,base:10,unit:"/s",visible:Ke.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:N,base:10,unit:"/s",visible:Ke.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:D,base:10,unit:"/s",visible:Ke.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:z,base:10,unit:"/s",visible:Ke.clothElf.bought},{title:"Peppermint Auto-Buy Frequency",modifier:B,base:10,unit:"/s",visible:R.elfTraining.expandersElfTraining.milestones[3].earned},{title:"Frosty Auto-Buy Frequency",modifier:E,base:10,unit:"/s",visible:R.elfTraining.fertilizerElfTraining.milestones[4].earned.value},{title:"Cocoa Auto-Buy Frequency",modifier:F,base:10,unit:"/s",visible:R.elfTraining.heatedCutterElfTraining.milestones[4].earned.value},{title:"Twinkle Auto-Buy Frequency",modifier:Z,base:10,unit:"/s",visible:R.elfTraining.expandersElfTraining.milestones[4].earned}]),ve=H(!1),ie=_(()=>n(Et,{modelValue:ve.value,"onUpdate:modelValue":te=>ve.value=te},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:ae})),xe=f(()=>{let te=a.pow(4,Ge.value).times(1e6);return a.gte(Ge.value,9)&&(te=a.times(te,1e15)),te});function ye(te){var Al,Dl;const V=Me(0),Qe=Me(0),at=te.hasToggle?Me(!1):H(!0),Pt=f(()=>te.cooldownModifier.apply(10)),Ft=Ct((Al=te.canBuy)!=null?Al:!0),Wt=Ct((Dl=te.buyMax)!=null?Dl:!1);function x(Kt){if(Ot.bought.value&&u(Ft)){V.value=a.add(V.value,Kt);const cl=a.recip(Pt.value);Qe.value+=Kt/cl.toNumber(),(Ia(te.buyable)?te.buyable:[te.buyable]).forEach(tl=>{var Il;for(;Wt||a.gte(V.value,cl);)if(te.customCost==null?u(tl.canPurchase):a.gte(tl.resource.value,te.customCost(tl.amount.value)))tl.amount.value=a.add(tl.amount.value,1),V.value=a.sub(V.value,cl),(Il=te.onAutoPurchase)==null||Il.call(te,tl);else{V.value=cl;break}})}}const Ot=q(()=>({...te,buyable:void 0,toggle:at,buyProgress:V,update:x,resource:L.coal,cost:xe,computedAutoBuyCooldown:Pt,amountOfTimesDone:Qe,name:te.name,display:()=>({title:te.name,description:_(()=>n(M,null,[te.description,Ot.bought.value?null:n(M,null,[" ",s("Training this elf will require resetting all your progress from days 1-3.")]),Ot.bought.value&&te.hasToggle===!0?n(M,null,[n(vl,{title:te.toggleDesc,"onUpdate:modelValue":Kt=>at.value=Kt,modelValue:at.value},null)]):null])),showCost:!Ot.bought.value}),style:"width: 190px",onPurchase(){var Kt;(Kt=te.onPurchase)==null||Kt.call(te),r.reset()}}));return Ot}const ee=ye({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:re.row1Buyables[0],cooldownModifier:d,buyMax:()=>R.elfTraining.cutterElfTraining.milestones[1].earned.value}),ne=ye({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:re.row1Buyables[1],cooldownModifier:c,buyMax:()=>R.elfTraining.planterElfTraining.milestones[1].earned.value}),Be=ye({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:re.row1Buyables[2],cooldownModifier:m,buyMax:()=>R.elfTraining.expandersElfTraining.milestones[1].earned.value}),Ie=[ee,ne,Be],Se=ye({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:L.heatedCutters,cooldownModifier:p,buyMax:()=>R.elfTraining.heatedCutterElfTraining.milestones[2].earned.value}),Ue=ye({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:L.heatedPlanters,cooldownModifier:w,buyMax:()=>R.elfTraining.heatedPlanterElfTraining.milestones[2].earned.value}),fe=ye({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:L.moreFertilizer,cooldownModifier:b}),Oe=[Se,Ue,fe],De=ye({name:"Joy",description:"Joy will automatically purchase small fires you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased small fires automatically. Small fires will start giving a boost to ash and coal gain.",buyable:L.buildFire,cooldownModifier:C,visibility:()=>y(ot.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){De.toggle.value&&(L.activeFires.value=a.add(L.activeFires.value,1))},onPurchase(){U.days[4].recentlyUpdated.value=!0}}),qe=ye({name:"Faith",description:"Faith will automatically purchase bonfires you can afford. You can toggle whether or not to enable the purchased bonfires automatically. Bonfires will start giving a boost to ash and coal gain.",buyable:L.buildBonfire,cooldownModifier:v,visibility:()=>y(ot.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const te=u(this.buyable.cost);L.activeFires.value=a.sub(L.activeFires.value,te).max(0),L.buildFire.amount.value=a.sub(L.buildFire.amount.value,te).max(0),qe.toggle.value&&(L.activeBonfires.value=a.add(L.activeBonfires.value,1))},onPurchase(){U.days[4].recentlyUpdated.value=!0},canBuy:L.unlockBonfire.bought}),pe=ye({name:"Snowball",description:"Snowball will automatically purchase kilns you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased kilns automatically. Kilns will start giving a boost to ash and coal gain.",buyable:L.buildKiln,cooldownModifier:S,visibility:()=>y(ot.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){pe.toggle.value&&(L.activeKilns.value=a.add(L.activeKilns.value,1))},onPurchase(){U.days[4].recentlyUpdated.value=!0},canBuy:L.unlockKiln.bought}),tt=[De,qe,pe],X=ye({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(j.books),cooldownModifier:N,visibility:()=>y(et.elfUpgrades.paperElf.bought.value)}),dt=ye({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:Object.values(ot.buyables),cooldownModifier:D,visibility:()=>y(et.elfUpgrades.boxElf.bought.value)}),We=ye({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[ft.buildPens,ft.betterShears,ft.fasterSpinning],cooldownModifier:z,visibility:()=>y(et.elfUpgrades.clothElf.bought.value)}),ze=[X,dt,We],oe=ye({name:"Peppermint",description:"Peppermint will automatically purchase all mining drills you can afford, without actually spending any resources.",buyable:L.buildDrill,cooldownModifier:B,visibility:()=>y(R.elfTraining.expandersElfTraining.milestones[3].earned.value),hasToggle:!0,toggleDesc:"Activate auto-purchased mining drills",onAutoPurchase(){oe.toggle.value&&(L.activeDrills.value=a.add(L.activeDrills.value,1))}}),$e=ye({name:"Frosty",description:"Frosty will automatically purchase all drill types in the oil section, without actually spending any resources.",buyable:[de.buildHeavy,de.buildHeavy2,de.buildExtractor],cooldownModifier:E,visibility:()=>y(R.elfTraining.fertilizerElfTraining.milestones[4].earned.value),hasToggle:!0,toggleDesc:"Activate auto-purchased oil drills",onAutoPurchase(te){$e.toggle.value&&(te===de.buildHeavy||te===de.buildHeavy||te===de.buildHeavy)&&(de.activeHeavy.value=a.add(de.activeHeavy.value,1))}}),Ze=ye({name:"Cocoa",description:"Cocoa will automatically purchase all oil-using machines you can afford, without actually spending any resources.",buyable:[de.buildPump,de.buildBurner,de.buildSmelter],cooldownModifier:F,visibility:()=>y(R.elfTraining.heatedCutterElfTraining.milestones[4].earned.value),hasToggle:!0,toggleDesc:"Activate auto-purchased oil-using machines",onAutoPurchase(te){$e.toggle.value&&(te===de.buildPump?de.activePump.value=a.add(de.activePump.value,1):te===de.buildBurner?de.activeBurner.value=a.add(de.activeBurner.value,1):te===de.buildSmelter&&(de.activeSmelter.value=a.add(de.activeSmelter.value,1)))}}),Mt=[oe,$e,Ze],st=ye({name:"Twinkle",description:"Twinkle will automatically purchase all metal buyables you can afford, without actually spending any resources.",buyable:[it.oreDrill,it.industrialCrucible,it.hotterForge],cooldownModifier:Z,visibility:()=>y(R.elfTraining.expandersElfTraining.milestones[4].earned.value)}),ct=[st],Ke={cuttersElf:ee,plantersElf:ne,expandersElf:Be,heatedCuttersElf:Se,heatedPlantersElf:Ue,fertilizerElf:fe,smallFireElf:De,bonfireElf:qe,kilnElf:pe,paperElf:X,boxElf:dt,clothElf:We,miningDrillElf:oe,heavyDrillElf:$e,oilElf:Ze,metalElf:st},Ge=f(()=>Object.values(Ke).filter(te=>te.bought.value).length),_t=P(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>a.gte(Ge.value,1)})),xt=P(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>a.gte(Ge.value,2),visibility:()=>y(_t.earned.value)})),It=P(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>a.gte(Ge.value,3),visibility:()=>y(xt.earned.value)})),ue=P(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(Ge.value,4),visibility:()=>y(It.earned.value)})),$=P(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>a.gte(Ge.value,5),visibility:()=>y(ue.earned.value)})),he=P(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>a.gte(Ge.value,6),visibility:()=>y($.earned.value)})),Ut=P(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>a.gte(Ge.value,7),visibility:()=>y(he.earned.value&&U.day.value>5)})),Jt=P(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>a.gte(Ge.value,8),visibility:()=>y(Ut.earned.value)})),Ae=P(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>a.gte(Ge.value,9),visibility:()=>y(Jt.earned.value)})),Ne=P(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>a.gte(Ge.value,10),visibility:()=>y(U.day.value>=10)})),pt=P(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>a.gte(Ge.value,11),visibility:()=>y(Ne.earned.value)})),Tt=P(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>a.gte(Ge.value,12),visibility:()=>y(pt.earned.value)})),rt=[_t,xt,It,ue,$,he,Ut,Jt,Ae,Ne,pt,Tt],Rt={manualMilestone:_t,researchMilestone:xt,coalGainMilestone:It,logGainMilestone:ue,forestMilestone:$,elvesMilestone:he,foundationMilestone:Ut,forestMilestone2:Jt,treeUpgradesMilestone:Ae,elvesMilestone2:Ne,coalUpgradesMilestone:pt,coalGainMilestone2:Tt},{collapseMilestones:rl,display:ul}=aa(Rt);return lt.on("update",te=>{a.lt(U.day.value,Wl)||Object.values(Ke).forEach(V=>V.update(te))}),Vt(()=>{U.day.value===Wl&&a.gte(Ge.value,6)&&a.gte(L.coal.value,1e9)&&U.completeDay()}),{name:e,color:t,elves:Ke,totalElves:Ge,milestones:rt,collapseMilestones:rl,generalTabCollapsed:se,minWidth:700,display:_(()=>n(M,null,[n("div",null,[U.day.value===Wl?`Reach ${Y(6)} trained elves and ${Y(1e9)} ${L.coal.displayName} to complete the day`:`${e} Complete!`," ",s("-")," ",n("button",{class:"button",style:"display: inline-block;",onClick:()=>ve.value=!0},[s("Check Modifiers")])]),ce(o),ce(ie),n(Ee,null,null),n("div",{style:"width: 600px"},[Ml(Ie,Oe,tt,ze,Mt,ct)]),ul()]))}}),Cr="management",Kl=12,ql=13,R=$t(Cr,()=>{const e="Management",t="green",l=el(()=>({direction:Fe.Right,width:600,height:25,fillStyle:`backgroundColor: ${t}`,progress:()=>U.day.value===Kl?dt.reduce((V,Qe)=>V+Math.min(1,Qe.level.value/3),0)/dt.length:U.day.value===ql?We.reduce((V,Qe)=>V+Math.min(1,Qe.level.value/5),0)/We.length:1,display:_(()=>U.day.value===Kl||U.day.value===ql?n(M,null,[Y(a.times(u(l.progress),U.day.value===ql?80:36)),s("/"),U.day.value===ql?80:36,s(" elf levels")]):"")})),i=f(()=>{let V=0;for(const Qe of Object.values(X))V+=Qe.level.value;return V}),o=f(()=>Object.values(X).reduce((V,Qe)=>V.add(Qe.exp.value),new a(0))),r=q(()=>({display:{title:"Teach the Elves",description:"The Elves probably need to be taught if they're to do better. Maybe you'll build a school so you can teach them?"},resource:re.logs,cost:1e21})),d=q(()=>({display:{title:"Add a Classroom?",description:"Yay, you have a school. Too bad it has pretty much nothing in it. Maybe you could add some classrooms to make it less boring and more enticing to the Elves?"},visibility:()=>y(r.bought.value),resource:ot.boxes,style:"width: 150px",cost:1e13})),c=J(()=>[g(()=>({multiplier:Tt,description:"Classroom Effect",enabled:d.bought}))]),m=f(()=>c.apply(1));function p(V,Qe,...at){const Pt=Me(0);let Ft=["Holly","Ivy","Hope","Jack","Mary","Noel","Joy","Faith","Snowball","Star","Bell","Gingersnap"].indexOf(V.name)+1;(V.name=="Star"||V.name=="Bell")&&(Ft/=3);const Wt=f(()=>a.pow(5,x.value).mul(4e3).mul(Ft)),x=f(()=>a.min(a.affordGeometricSeries(Pt.value,a.mul(4e3,Ft),5,0),Ne.amount.value).toNumber()),Ot=f(()=>a.sub(Pt.value,a.sumGeometricSeries(x.value,a.mul(4e3,Ft),5,0))),Al=el(()=>({direction:Fe.Right,width:160,height:12,style:()=>({"margin-top":"8px","box-shadow":oe.value[V.name]?"0 0 12px "+(ae.value==V.name?"black":"white"):""}),baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",borderStyle:()=>a.gte(x.value,Ne.amount.value)?"border-color: red":"",progress:()=>a.div(Ot.value,Wt.value),display:_(()=>a.gte(x.value,Ne.amount.value)?n(M,null,[s("Limit reached")]):n(M,null,[Q(Ot.value),s("/"),Q(Wt.value),s(" XP")]))})),{collapseMilestones:Dl,display:Kt}=aa(Qe),cl=J(()=>[g(()=>({multiplier:m,description:"Global XP Multiplier"})),g(()=>({multiplier:ze,description:"Focus Multiplier",enabled:()=>a.gt(Ze.value,0)&&oe.value[V.name]==!0})),...at]),tl=f(()=>cl.apply(.1));return Lt(()=>({display:{title:_(()=>n(M,null,[V.name,s(" - LV "),Y(x.value)])),description:_(()=>n(M,null,[V.name,s(" can buy buyables "),Y(V.computedAutoBuyCooldown.value)," ",s("times per second, gaining")," ",a.gte(x.value,Ne.amount.value)?0:Q(a.mul(tl.value,V.computedAutoBuyCooldown.value))," ",s("XP/sec."),ce(Al)]))},style:()=>({width:"190px",background:ae.value==V.name?"var(--foreground)":""}),onClick(){ae.value=V.name},canClick(){return ae.value!==V.name},name:V.name,state:Dl,displayMilestone:Kt,level:x,exp:Pt,milestones:Qe,timeForExp:V.computedAutoBuyCooldown,amountOfTimesDone:V.amountOfTimesDone,elfXPGainComputed:tl,elfXPGain:cl}))}const w=[P(()=>({display:{requirement:"Holly Level 1",effectDisplay:_(()=>n(M,null,[s("Multiply log gain by "),n("sup",null,[s("9")]),n(pl,null,{default:()=>[s("Cutter amount")]}),s(".")]))},shouldEarn:()=>ve.level.value>=1})),P(()=>({display:{requirement:"Holly Level 2",effectDisplay:"Holly now buys max."},visibility:()=>y(w[0].earned.value),shouldEarn:()=>ve.level.value>=2})),P(()=>({display:{requirement:"Holly Level 3",effectDisplay:_(()=>n(M,null,[s("Multiply all cloth actions' effectiveness by log"),n("sub",null,[s("10")]),s("Cutter amount.")]))},visibility:()=>y(w[1].earned.value),shouldEarn:()=>ve.level.value>=3})),P(()=>({display:{requirement:"Holly Level 4",effectDisplay:"Multiply auto cutting amount by 1.1 per day completed"},visibility:()=>y(w[2].earned.value&&U.day.value>=13),shouldEarn:()=>ve.level.value>=4})),P(()=>({display:{requirement:"Holly Level 5",effectDisplay:"Raise workshop expansion cost by 0.95"},visibility:()=>y(w[3].earned.value&&U.day.value>=13),shouldEarn:()=>ve.level.value>=5}))],b=[P(()=>({display:{requirement:"Ivy Level 1",effectDisplay:"Planters are now twice as efficent."},shouldEarn:()=>ie.level.value>=1})),P(()=>({display:{requirement:"Ivy Level 2",effectDisplay:"Ivy now buys max."},visibility:()=>y(b[0].earned.value),shouldEarn:()=>ie.level.value>=2})),P(()=>({display:{requirement:"Ivy Level 3",effectDisplay:_(()=>n(M,null,[s("Auto planting speed is multiplied by 2"),n("sup",null,[s("(log"),n("sub",null,[s("10")]),s("(logs)"),n("sup",null,[s("0.2")]),s(")")])]))},visibility:()=>y(b[1].earned.value),shouldEarn:()=>ie.level.value>=3})),P(()=>({display:{requirement:"Ivy Level 4",effectDisplay:"Divide planter cost by 10"},visibility:()=>y(b[2].earned.value&&U.day.value>=13),shouldEarn:()=>ie.level.value>=4})),P(()=>({display:{requirement:"Ivy Level 5",effectDisplay:"The lesser of auto planting and cutting amounts is increased to match the greater"},visibility:()=>y(b[3].earned.value&&U.day.value>=13),shouldEarn:()=>ie.level.value>=5}))],C=[P(()=>({display:{requirement:"Hope Level 1",effectDisplay:"Forest size grows by trees planted per second raised to ^0.99"},shouldEarn:()=>xe.level.value>=1})),P(()=>({display:{requirement:"Hope Level 2",effectDisplay:"Hope now buys max."},visibility:()=>y(C[0].earned.value),shouldEarn:()=>xe.level.value>=2})),P(()=>({display:{requirement:"Hope Level 3",effectDisplay:"The workshop can be expanded past 100%, but costs scale faster. It also buys max now."},visibility:()=>y(C[1].earned.value),shouldEarn:()=>xe.level.value>=3})),P(()=>({display:{requirement:"Hope Level 4",effectDisplay:"Unlock an elf that autobuys mining drills."},visibility:()=>y(C[2].earned.value&&U.day.value>=13),shouldEarn:()=>xe.level.value>=4})),P(()=>({display:{requirement:"Hope Level 5",effectDisplay:"Unlock an elf that autobuys metal buyables."},visibility:()=>y(C[3].earned.value&&U.day.value>=13),shouldEarn:()=>xe.level.value>=5}))],v=[P(()=>({display:{requirement:"Jack Level 1",effectDisplay:'"Fahrenheit 451" affects "Heated Cutters" twice.'},shouldEarn:()=>ee.level.value>=1})),P(()=>({display:{requirement:"Jack Level 2",effectDisplay:"Coal gain is raised to the ^1.05"},visibility:()=>y(v[0].earned.value),shouldEarn:()=>ee.level.value>=2})),P(()=>({display:{requirement:"Jack Level 3",effectDisplay:"Jack now buys max."},visibility:()=>y(v[1].earned.value),shouldEarn:()=>ee.level.value>=3})),P(()=>({display:{requirement:"Jack Level 4",effectDisplay:_(()=>n(M,null,[s("Oil gain is multiplied by "),n(pl,null,{default:()=>[s("total elf levels")]}),s(".")]))},visibility:()=>y(v[2].earned.value&&U.day.value>=13),shouldEarn:()=>ee.level.value>=4})),P(()=>({display:{requirement:"Jack Level 5",effectDisplay:"Unlock an elf that autobuys oil-using machines."},visibility:()=>y(v[3].earned.value&&U.day.value>=13),shouldEarn:()=>ee.level.value>=5}))],S=[P(()=>({display:{requirement:"Mary Level 1",effectDisplay:'"Tillamook Burn Country" affects "Heated Planters" twice.'},shouldEarn:()=>ne.level.value>=1})),P(()=>({display:{requirement:"Mary Level 2",effectDisplay:"Metal gain is raised to the 1.1."},visibility:()=>y(S[0].earned.value),shouldEarn:()=>ne.level.value>=2})),P(()=>({display:{requirement:"Mary Level 3",effectDisplay:"Mary now buys max."},visibility:()=>y(S[1].earned.value),shouldEarn:()=>ne.level.value>=3})),P(()=>({display:{requirement:"Mary Level 4",effectDisplay:"Double automatic tree planting speed"},visibility:()=>y(S[2].earned.value&&U.day.value>=13),shouldEarn:()=>ne.level.value>=4})),P(()=>({display:{requirement:"Mary Level 5",effectDisplay:_(()=>n(M,null,[s("Auto smelting speed is multiplied by "),n(pl,null,{default:()=>[s("total XP/1000")]}),s(".")]))},visibility:()=>y(S[3].earned.value&&U.day.value>=13),shouldEarn:()=>ne.level.value>=5}))],N=[P(()=>({display:{requirement:"Noel Level 1",effectDisplay:_(()=>n(M,null,[s("Log gain is multiplied by "),n(pl,null,{default:()=>[s("total elf levels")]}),s(".")]))},shouldEarn:()=>Be.level.value>=1})),P(()=>({display:{requirement:"Noel Level 2",effectDisplay:`"The Garden Tree's Handbook" affects "Fertilized Soil" twice`},visibility:()=>y(N[0].earned.value),shouldEarn:()=>Be.level.value>=2})),P(()=>({display:{requirement:"Noel Level 3",effectDisplay:"Divide the mining drill cost by ln(Total logs + e)"},visibility:()=>y(N[1].earned.value),shouldEarn:()=>Be.level.value>=3})),P(()=>({display:{requirement:"Noel Level 4",effectDisplay:_(()=>n(M,null,[s("Reduce oil refinery cost by (Plastic amount)"),n("sup",null,[s("2")])]))},visibility:()=>y(N[2].earned.value&&U.day.value>=13),shouldEarn:()=>Be.level.value>=4})),P(()=>({display:{requirement:"Noel Level 5",effectDisplay:"Unlock an elf that autobuys drills and extractors"},visibility:()=>y(N[3].earned.value&&U.day.value>=13),shouldEarn:()=>ne.level.value>=5}))],D=[P(()=>({display:{requirement:"Joy Level 1",effectDisplay:"Small Fire synergy counts bonfires at reduced rate."},shouldEarn:()=>Se.level.value>=1})),P(()=>({display:{requirement:"Joy Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>y(D[0].earned.value),shouldEarn:()=>Se.level.value>=2})),P(()=>({display:{requirement:"Joy Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>y(D[1].earned.value),shouldEarn:()=>Se.level.value>=3})),P(()=>({display:{requirement:"Joy Level 4",effectDisplay:"Metal gain is boosted by heavy drills"},visibility:()=>y(D[2].earned.value&&U.day.value>=13),shouldEarn:()=>Se.level.value>=4})),P(()=>({display:{requirement:"Joy Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>y(D[3].earned.value&&U.day.value>=13),shouldEarn:()=>Se.level.value>=5}))],z=[P(()=>({display:{requirement:"Faith Level 1",effectDisplay:"Multiply bonfire efficiency by 5."},shouldEarn:()=>Ue.level.value>=1})),P(()=>({display:{requirement:"Faith Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>y(z[0].earned.value),shouldEarn:()=>Ue.level.value>=2})),P(()=>({display:{requirement:"Faith Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>y(z[1].earned.value),shouldEarn:()=>Ue.level.value>=3})),P(()=>({display:{requirement:"Faith Level 4",effectDisplay:"Oil gain is boosted by heavy drill drills"},visibility:()=>y(z[2].earned.value&&U.day.value>=13),shouldEarn:()=>Ue.level.value>=4})),P(()=>({display:{requirement:"Faith Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>y(z[3].earned.value&&U.day.value>=13),shouldEarn:()=>Ue.level.value>=5}))],B=[P(()=>({display:{requirement:"Snowball Level 1",effectDisplay:"Multiply kiln efficiency by 5."},shouldEarn:()=>fe.level.value>=1})),P(()=>({display:{requirement:"Snowball Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>y(B[0].earned.value),shouldEarn:()=>fe.level.value>=2})),P(()=>({display:{requirement:"Snowball Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>y(B[1].earned.value),shouldEarn:()=>fe.level.value>=3})),P(()=>({display:{requirement:"Snowball Level 4",effectDisplay:"Plastic gain is boosted by heavy extractors"},visibility:()=>y(B[2].earned.value&&U.day.value>=13),shouldEarn:()=>fe.level.value>=4})),P(()=>({display:{requirement:"Snowball Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>y(B[3].earned.value&&U.day.value>=13),shouldEarn:()=>fe.level.value>=5}))],E=[P(()=>({display:{requirement:"Star Level 1",effectDisplay:"Book cost is divided by total books bought."},shouldEarn:()=>De.level.value>=1})),P(()=>({display:{requirement:"Star Level 2",effectDisplay:"Pulp requires 10x less ash"},visibility:()=>y(E[0].earned.value),shouldEarn:()=>De.level.value>=2})),P(()=>({display:{requirement:"Star Level 3",effectDisplay:"Book cost scaling 5x -> 4x"},visibility:()=>y(E[1].earned.value),shouldEarn:()=>De.level.value>=3})),P(()=>({display:{requirement:"Star Level 4",effectDisplay:_(()=>n(M,null,[s("Multiply XP requirements by 0.95"),n("sup",null,[s("(total books)")])]))},visibility:()=>y(E[2].earned.value&&U.day.value>=13),shouldEarn:()=>De.level.value>=4})),P(()=>({display:{requirement:"Star Level 5",effectDisplay:"Gain 5 free books for all elves that are at level 5 or above."},visibility:()=>y(E[3].earned.value&&U.day.value>=13),shouldEarn:()=>De.level.value>=5}))],F=[P(()=>({display:{requirement:"Bell Level 1",effectDisplay:_(()=>n(M,null,[s("Every box buyable adds "),n(pl,null,{default:()=>[s("level")]}),s(" levels to same-row box buyables.")]))},shouldEarn:()=>qe.level.value>=1})),P(()=>({display:{requirement:"Bell Level 2",effectDisplay:"Box gain ^1.1"},visibility:()=>y(F[0].earned.value),shouldEarn:()=>qe.level.value>=2})),P(()=>({display:{requirement:"Bell Level 3",effectDisplay:"All box buyables scaling bases -1"},visibility:()=>y(F[1].earned.value),shouldEarn:()=>qe.level.value>=3})),P(()=>({display:{requirement:"Bell Level 4",effectDisplay:"Unlock a second row of box buyables"},visibility:()=>y(F[2].earned.value&&U.day.value>=13),shouldEarn:()=>qe.level.value>=4})),P(()=>({display:{requirement:"Bell Level 5",effectDisplay:"Unlock another row of box upgrades"},visibility:()=>y(F[3].earned.value&&U.day.value>=13),shouldEarn:()=>qe.level.value>=5}))],Z=[P(()=>({display:{requirement:"Gingersnap Level 1",effectDisplay:"Multiply all primary dye colors by ln(cloth + e)."},shouldEarn:()=>pe.level.value>=1})),P(()=>({display:{requirement:"Gingersnap Level 2",effectDisplay:_(()=>n(M,null,[s("Multiply all cloth actions' effectiveness by log"),n("sub",null,[s("10")]),s("(dye sum + 10)")]))},visibility:()=>y(Z[0].earned.value),shouldEarn:()=>pe.level.value>=2})),P(()=>({display:{requirement:"Gingersnap Level 3",effectDisplay:"Double all dye colors and cloth actions, but reset all dyes."},visibility:()=>y(Z[1].earned.value),shouldEarn:()=>pe.level.value>=3,onComplete(){["red","yellow","blue","orange","green","purple"].forEach(V=>{Je.dyes[V].amount.value=0,Je.dyes[V].buyable.amount.value=0})}})),P(()=>({display:{requirement:"Gingersnap Level 4",effectDisplay:_(()=>n(M,null,[s("Multiply ALL dye gain by")," ",n(ir,null,{default:()=>[n("div",null,[n(pl,null,{default:()=>[s("classrooms")]})]),n("div",null,[s("2")])]}),s("+1, but reset all dyes.")]))},visibility:()=>y(Z[2].earned.value&&U.day.value>=13),shouldEarn:()=>pe.level.value>=4,onComplete(){["red","yellow","blue","orange","green","purple"].forEach(V=>{Je.dyes[V].amount.value=0,Je.dyes[V].buyable.amount.value=0})}})),P(()=>({display:{requirement:"Gingersnap Level 5",effectDisplay:"Well depth divides metal machine costs"},visibility:()=>y(Z[3].earned.value&&U.day.value>=13),shouldEarn:()=>pe.level.value>=5}))],ae=Me("Holly"),se=_(()=>{const V=Object.values(X).find(Qe=>Qe.name===ae.value);return V==null?(console.warn("This should not happen.",ae.value),""):n(M,null,[ae.value,s("'s milestones: "),V.displayMilestone()])}),ve=p(Re.elves.cuttersElf,w),ie=p(Re.elves.plantersElf,b),xe=p(Re.elves.expandersElf,C),ye=[ve,ie,xe],ee=p(Re.elves.heatedCuttersElf,v),ne=p(Re.elves.heatedPlantersElf,S),Be=p(Re.elves.fertilizerElf,N),Ie=[ee,ne,Be],Se=p(Re.elves.smallFireElf,D),Ue=p(Re.elves.bonfireElf,z),fe=p(Re.elves.kilnElf,B),Oe=[Se,Ue,fe],De=p(Re.elves.paperElf,E),qe=p(Re.elves.boxElf,F),pe=p(Re.elves.clothElf,Z),tt=[De,qe,pe],X={cutterElfTraining:ve,planterElfTraining:ie,expandersElfTraining:xe,heatedCutterElfTraining:ee,heatedPlanterElfTraining:ne,fertilizerElfTraining:Be,smallfireElfTraining:Se,bonfireElfTraining:Ue,kilnElfTraining:fe,paperElfTraining:De,boxElfTraining:qe,clothElfTraining:pe},dt=[ve,ie,xe,ee,ne,Be,Se,Ue,fe,De,qe,pe],We=[ve,ie,xe,ee,ne,Be,Se,Ue,fe,De,qe,pe];lt.on("update",V=>{if(!(U.day.value=1&&(Qe.amountOfTimesDone.value-=at,a.lt(Qe.level.value,Ne.amount.value)&&(Qe.exp.value=a.mul(Qe.elfXPGainComputed.value,at).add(Qe.exp.value)))}Ze.value=Math.max(Ze.value-V,0),$e.value=Math.max($e.value-V,0),a.eq(Ze.value,0)&&(oe.value={},ze.value=a.pow(Ke.value,1-Math.abs(Math.sin(Date.now()/1e3*2))))}});const ze=Me(1),oe=Me({}),$e=Me(0),Ze=Me(0),Mt=J(()=>[g(()=>({multiplier:2,description:"Focus Upgrade 1",enabled:$.bought}))]),st=J(()=>[le(()=>({addend:1,description:"Focus Upgrade 2",enabled:he.bought}))]),ct=J(()=>[le(()=>({addend:-5,description:"Focus Upgrade 3",enabled:Ut.bought}))]),Ke=f(()=>Mt.apply(10)),Ge=f(()=>st.apply(3)),_t=f(()=>Number(ct.apply(15))),xt=el(()=>({direction:Fe.Right,width:566,height:25,style:"border-radius: 4px 4px 0 0",borderStyle:"border-radius: 4px 4px 0 0",fillStyle:()=>({background:Ze.value>0?t:"#7f7f00",opacity:Ze.value>0?Ze.value/10:1,transition:"none"}),progress:()=>a.sub(ze.value,1).div(a.sub(Ke.value,1)).toNumber(),display:_(()=>n(M,null,[Q(ze.value),s("x"),Ze.value>0?n(M,null,[" ",s("to "),Object.keys(oe.value).join(", ")," ",s("for "),Hl(Ze.value)]):""]))})),It=Lt(()=>({display:{title:"Focus",description:_(()=>n(M,null,[s("Motivate elves to focus, multiplying 3 random elves' XP gain by up to")," ",Q(Ke.value),s("x for 10 seconds, equal to the focus bars' effect."),a.gte($e.value,0)?n(M,null,[n("br",null,null),s("Reroll cooldown: "),Hl($e.value)]):""]))},style:{width:"300px"},canClick:()=>a.eq($e.value,0),onClick(){$e.value=_t.value,Ze.value=10,ue(12,Ge.value)}}));function ue(V,Qe){var Ft,Wt;let at=0;oe.value={};const Pt=a.min(Qe,V);for(;Pt.gt(at);){const x=(Wt=(Ft=Object.values(X)[Math.floor(Math.random()*V)])==null?void 0:Ft.name)!=null?Wt:"";oe.value[x]||(oe.value[x]=!0,at++)}}const $=q(()=>({display:{title:"Focus Booster",description:"Multiplies the maximum experience multiplier from focus by 2"},resource:re.logs,cost:1e25})),he=q(()=>({display:{title:"Focus Buffer",description:"Increase elves affected by focus by 1"},resource:re.logs,cost:1e30})),Ut=q(()=>({display:{title:"Focus Upgrader",description:"Focus can now be rerolled every 10 seconds"},resource:re.logs,cost:1e35})),Jt=[$,he,Ut],Ae=f(()=>{const V=a.pow(10,Ne.amount.value),Qe=a.pow(5,Ne.amount.value),at=a.pow(1e4,Ne.amount.value),Pt=a.pow(2e3,Ne.amount.value);return{wood:at.mul(1e21),coal:Pt.mul(1e32),paper:Pt.mul(1e18),boxes:at.mul(1e13),metalIngots:Qe.mul(1e12),cloth:V.mul(1e4),plastic:Qe.mul(1e6),dye:a.add(Ne.amount.value,1).mul(1e4)}}),Ne=Le(()=>({display:_(()=>n(M,null,[n("h3",null,[s("Build a School")]),n("div",null,[s("You gotta start somewhere, right? Each school increases the maximum level for elves by 1, up to 5.")]),n("div",null,[s("You have "),Y(Ne.amount.value),s(" schools, which are currently letting elves learn up to level "),Y(Ne.amount.value),s(".")]),n("div",null,[s("Costs "),Q(Ae.value.wood),s(" logs, "),Q(Ae.value.coal)," ",s("coal, "),Q(Ae.value.paper),s(" paper, "),Q(Ae.value.boxes)," ",s("boxes, "),Q(Ae.value.metalIngots),s(" metal ingots,")," ",Q(Ae.value.cloth),s(" cloth, "),Q(Ae.value.plastic)," ",s("plastic, and requires "),Q(Ae.value.dye),s(" of red, yellow, and blue dye")])])),canPurchase(){return Ae.value.wood.lte(re.logs.value)&&Ae.value.coal.lte(L.coal.value)&&Ae.value.paper.lte(j.paper.value)&&Ae.value.boxes.lte(ot.boxes.value)&&Ae.value.metalIngots.lte(it.metal.value)&&Ae.value.cloth.lte(ft.cloth.value)&&Ae.value.plastic.lte(et.plastic.value)&&Ae.value.dye.lte(Je.dyes.blue.amount.value)&&Ae.value.dye.lte(Je.dyes.red.amount.value)&&Ae.value.dye.lte(Je.dyes.yellow.amount.value)},onPurchase(){re.logs.value=a.sub(re.logs.value,Ae.value.wood),L.coal.value=a.sub(L.coal.value,Ae.value.coal),j.paper.value=a.sub(j.paper.value,Ae.value.paper),ot.boxes.value=a.sub(ot.boxes.value,Ae.value.boxes),it.metal.value=a.sub(it.metal.value,Ae.value.metalIngots),ft.cloth.value=a.sub(ft.cloth.value,Ae.value.cloth),et.plastic.value=a.sub(et.plastic.value,Ae.value.plastic),this.amount.value=a.add(this.amount.value,1)},purchaseLimit:5,visibility:f(()=>y(r.bought.value)),style:"width: 600px"})),pt=f(()=>{const V=a.add(rt.amount.value,1).pow(1.5);return{wood:V.mul(1e21),paper:V.mul(1e18),boxes:V.mul(1e13),metalIngots:V.mul(1e12)}}),Tt=f(()=>a.add(rt.amount.value,1).pow(.9)),rt=Le(()=>({display:_(()=>n(M,null,[n("h3",null,[s("Build a Classroom")]),n("div",null,[s("Hopefully it makes the school a bit less boring. Multiplies elves' XP gain by")," ",n(pl,null,{default:()=>[s("Classrooms + 1")]}),s(".")]),n("div",null,[s("You have "),Y(rt.amount.value),s(" classrooms, which are currently multiplying elves' XP gain by "),Q(Tt.value)]),n("div",null,[s("Costs "),Q(pt.value.wood),s(" logs,"),Q(pt.value.paper),s(" paper, "),Q(pt.value.boxes)," ",s("boxes, "),Q(pt.value.metalIngots),s(" metal ingots")])])),canPurchase(){return pt.value.wood.lte(re.logs.value)&&pt.value.paper.lte(j.paper.value)&&pt.value.boxes.lte(ot.boxes.value)&&pt.value.metalIngots.lte(it.metal.value)},onPurchase(){re.logs.value=a.sub(re.logs.value,pt.value.wood),j.paper.value=a.sub(j.paper.value,pt.value.paper),ot.boxes.value=a.sub(ot.boxes.value,pt.value.boxes),it.metal.value=a.sub(it.metal.value,pt.value.metalIngots),this.amount.value=a.add(this.amount.value,1)},visibility:f(()=>y(d.bought.value)),style:"width: 600px"})),[Rt,rl]=sl(()=>[{title:"Elves affected by Focus",modifier:st,base:3},{title:"Maximum Focus Effect",modifier:Mt,base:10},{title:"Focus Cooldown",modifier:ct,unit:" secs",base:15},{title:"Global XP Gain",modifier:c,unit:" XP"},{title:"Holly XP Gain per Action",modifier:ve.elfXPGain,base:.1,unit:" XP"},{title:"Ivy XP Gain per Action",modifier:ie.elfXPGain,base:.1,unit:" XP"},{title:"Hope XP Gain per Action",modifier:xe.elfXPGain,base:.1,unit:" XP"},{title:"Jack XP Gain per Action",modifier:ee.elfXPGain,base:.1,unit:" XP"},{title:"Mary XP Gain per Action",modifier:ne.elfXPGain,base:.1,unit:" XP"},{title:"Noel XP Gain per Action",modifier:Be.elfXPGain,base:.1,unit:" XP"},{title:"Joy XP Gain per Action",modifier:Se.elfXPGain,base:.1,unit:" XP"},{title:"Faith XP Gain per Action",modifier:Ue.elfXPGain,base:.1,unit:" XP"},{title:"Snowball XP Gain per Action",modifier:fe.elfXPGain,base:.1,unit:" XP"},{title:"Star XP Gain per Action",modifier:De.elfXPGain,base:.1,unit:" XP"},{title:"Bell XP Gain per Action",modifier:qe.elfXPGain,base:.1,unit:" XP"},{title:"Gingersnap XP Gain per Action",modifier:pe.elfXPGain,base:.1,unit:" XP"}]),ul=H(!1),te=_(()=>n(Et,{modelValue:ul.value,"onUpdate:modelValue":V=>ul.value=V},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:Rt}));return{name:e,day:Kl,color:t,minWidth:700,elfTraining:X,totalElfLevels:i,totalElfExp:o,currentShown:ae,generalTabCollapsed:rl,teaching:r,schools:Ne,classrooms:rt,classroomUpgrade:d,focusMultiplier:ze,upgrades:Jt,focusTargets:oe,focusCooldown:$e,focusTime:Ze,display:_(()=>n(M,null,[U.day.value===Kl?"Get all elves to level 3.":U.day.value===ql&&U.days[ql-1].opened.value?"Get all elves to level 5.":`${e} Complete!`," ",s("-"),n("button",{class:"button",style:"display: inline-block;",onClick:()=>ul.value=!0},[s("Check Modifiers")]),ce(te),ce(l),n("br",null,null),Zt(Ne,rt),Ml([r,d]),n(Ee,null,null),a.gt(Ne.amount.value,0)?n(M,null,[n("br",null,null),s("Click on an elf to see their milestones."),n("br",null,null),n("br",null,null),ce(It),Ml(Jt),n("br",null,null),Ml([xt],ye,Ie,Oe,tt),n(Ee,null,null),se()]):""]))}}),Er="cloth",ri=8,ft=$t(Er,function(){const e="Cloth",t="white",l=ht(0,"cloth"),i=ht(0,"wool"),o=ht(10,"sheep"),r=Me(0),d=el(()=>({direction:Fe.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>a.div(r.value,X.value)})),c=Lt(()=>({display:{title:"Breed sheep",description:_(()=>n(M,null,[s("Breed "),Ce(a.floor(pe.value)),s(" sheep"),n("br",null,null),ce(d)]))},style:{minHeight:"80px"},canClick:()=>a.gte(r.value,X.value),onClick(){if(a.lt(r.value,X.value))return;const ue=a.floor(pe.value);o.value=a.add(o.value,ue),r.value=0}})),m=Me(0),p=el(()=>({direction:Fe.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>a.div(m.value,oe.value)})),w=Lt(()=>({display:{title:"Shear sheep",description:_(()=>n(M,null,[s("Shear up to "),Ce(a.floor(We.value)),s(" sheep"),n("br",null,null),ce(p)]))},style:{minHeight:"80px"},canClick:()=>a.gte(m.value,oe.value),onClick(){if(a.lt(m.value,oe.value))return;const ue=a.min(o.value,We.value).floor();i.value=a.add(i.value,ue),m.value=0}})),b=Me(0),C=el(()=>({direction:Fe.Right,width:100,height:10,style:"margin-top: 8px",borderStyle:"border-color: black",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s; background: black",progress:()=>a.div(b.value,st.value)})),v=Lt(()=>({display:{title:"Spinning wool",description:_(()=>n(M,null,[s("Spin "),Ce(a.floor(Ze.value)),s(" wool"),n("br",null,null),ce(C)]))},style:{minHeight:"80px"},canClick:()=>a.gte(b.value,st.value),onClick(){if(a.lt(b.value,st.value))return;const ue=a.min(i.value,Ze.value).floor();l.value=a.add(l.value,ue),i.value=a.sub(i.value,ue),b.value=0}})),S=$l(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{c.canClick.value&&c.onClick()}})),N=$l(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{w.canClick.value&&w.onClick()}})),D=$l(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{v.canClick.value&&v.onClick()}})),z=Le(()=>({resource:re.logs,cost(){let ue=this.amount.value;return a.gte(ue,100)&&(ue=a.pow(ue,2).div(100)),ue=a.pow(.95,j.books.clothBook.amount.value).times(ue),a.pow(1.5,ue).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),B=Le(()=>({resource:it.metal,cost(){let ue=this.amount.value;return a.gte(ue,100)&&(ue=a.pow(ue,2).div(100)),ue=a.pow(.95,j.books.clothBook.amount.value).times(ue),a.pow(1.4,ue).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),E=Le(()=>({resource:j.paper,cost(){let ue=this.amount.value;return a.gte(ue,100)&&(ue=a.pow(ue,2).div(100)),ue=a.pow(.95,j.books.clothBook.amount.value).times(ue),a.pow(1.3,ue).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),F=q(()=>({resource:O(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),Z=q(()=>({resource:O(i),cost:150,visibility:()=>y(F.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),ae=q(()=>({resource:O(o),cost:200,visibility:()=>y(Z.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),ve={treesUpgrade4:q(()=>({resource:O(l),cost:1e3,visibility:()=>y(et.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x log gain"}})),treesUpgrade3:ae,treesUpgrade2:Z,treesUpgrade1:F},ie=q(()=>({resource:O(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),xe=q(()=>({resource:O(i),cost:225,visibility:()=>y(ie.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),ye=q(()=>({resource:O(o),cost:300,visibility:()=>y(xe.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),ne={metalUpgrade4:q(()=>({resource:O(l),cost:2e3,visibility:()=>y(et.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:ye,metalUpgrade2:xe,metalUpgrade1:ie},Be=q(()=>({resource:O(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),Ie=q(()=>({resource:O(i),cost:200,visibility:()=>y(Be.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),Se=q(()=>({resource:O(o),cost:400,visibility:()=>y(Ie.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),fe={paperUpgrade4:q(()=>({resource:O(l),cost:4e3,visibility:()=>y(et.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:Se,paperUpgrade2:Ie,paperUpgrade1:Be},Oe=f(()=>a.add(re.computedAutoCuttingAmount.value,1).root(9)),De=f(()=>a.add(Je.dyeSum.value,10).log10()),qe=J(()=>[le(()=>({addend:z.amount,description:"Build more pens"})),g(()=>({multiplier:()=>a.div(et.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(et.buyables.clothGains.amount.value,1)})),g(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:j.upgrades.clothUpgrade.bought})),g(()=>({multiplier:De,description:"Gingersnap Level 2",enabled:R.elfTraining.clothElfTraining.milestones[1].earned})),g(()=>({multiplier:Oe,description:"Holly Level 3",enabled:R.elfTraining.cutterElfTraining.milestones[2].earned})),g(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone5.earned}))]),pe=f(()=>qe.apply(1)),tt=J(()=>[]),X=f(()=>tt.apply(1)),dt=J(()=>[le(()=>({addend:B.amount,description:"Make stronger shears"})),g(()=>({multiplier:()=>a.div(et.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(et.buyables.clothGains.amount.value,1)})),g(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:j.upgrades.clothUpgrade.bought})),g(()=>({multiplier:De,description:"Gingersnap Level 2",enabled:R.elfTraining.clothElfTraining.milestones[1].earned})),g(()=>({multiplier:Oe,description:"Holly Level 3",enabled:R.elfTraining.cutterElfTraining.milestones[2].earned})),g(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone5.earned}))]),We=f(()=>dt.apply(1)),ze=J(()=>[]),oe=f(()=>ze.apply(1)),$e=J(()=>[le(()=>({addend:E.amount,description:"Learn how to spin"})),g(()=>({multiplier:()=>a.div(et.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(et.buyables.clothGains.amount.value,1)})),g(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:j.upgrades.clothUpgrade.bought})),g(()=>({multiplier:De,description:"Gingersnap Level 2",enabled:R.elfTraining.clothElfTraining.milestones[1].earned})),g(()=>({multiplier:Oe,description:"Holly Level 3",enabled:R.elfTraining.cutterElfTraining.milestones[2].earned})),g(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone5.earned}))]),Ze=f(()=>$e.apply(1)),Mt=J(()=>[]),st=f(()=>Mt.apply(1)),[ct,Ke]=sl(()=>[{title:"Sheep Gain",modifier:qe,base:1},{title:"Sheep Breeding Cooldown",modifier:tt,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:dt,base:1},{title:"Shearing Cooldown",modifier:ze,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:$e,base:1},{title:"Spinning Cooldown",modifier:Mt,base:1,visible:!1,unit:"s"}]),Ge=H(!1),_t=_(()=>n(Et,{modelValue:Ge.value,"onUpdate:modelValue":ue=>Ge.value=ue},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:ct}));lt.on("update",ue=>{a.lt(U.day.value,ri)||(a.gte(r.value,X.value)?r.value=X.value:(r.value=a.add(r.value,ue),c.isHolding.value&&c.onClick()),a.gte(m.value,oe.value)?m.value=oe.value:(m.value=a.add(m.value,ue),w.isHolding.value&&w.onClick()),a.gte(b.value,st.value)?b.value=st.value:(b.value=a.add(b.value,ue),v.isHolding.value&&v.onClick()))});const{total:xt,trackerDisplay:It}=bl({resource:l,goal:1e3,name:e,day:ri,color:t,textColor:"var(--feature-foreground)",modal:{show:Ge,display:_t}});return{name:e,color:t,cloth:l,totalCloth:xt,wool:i,sheep:o,buildPens:z,betterShears:B,fasterSpinning:E,treesUpgrades:ve,metalUpgrades:ne,paperUpgrades:fe,generalTabCollapsed:Ke,breedingProgress:r,shearingProgress:m,spinningProgress:b,breedSheepHK:S,shearSheepHK:N,spinWoolHK:D,minWidth:700,display:_(()=>n(M,null,[ce(It),n(Ee,null,null),n(Gt,{resource:l,style:"margin-bottom: 0"},null),n(Gt,{resource:i,style:"margin-bottom: 0"},null),n(Gt,{resource:o,style:"margin-bottom: 0"},null),nt(c,w,v),nt(z,B,E),n(Ee,null,null),n(Vl,null,{default:()=>[Zt(...Object.values(ve)),Zt(...Object.values(ne)),Zt(...Object.values(fe))]})])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(l.value),s(" "),l.displayName]))}}),_r="dyes",Sr=11,Je=$t(_r,function(){const e="Dyes",t="#D4D4F4";function l(v){const S=ht(0,v.name),N=J(()=>{const B=[le(()=>({addend:()=>a.add(z.amount.value,1),description:`${v.name} Chambers`}))];return(v.color==="red"||v.color==="yellow")&&B.push(g(()=>({multiplier:o.orange1,description:"Orange Dye Boost 1"}))),(v.color=="yellow"||v.color=="blue")&&B.push(g(()=>({multiplier:o.green1,description:"Green Dye Boost 1"}))),(v.color=="red"||v.color=="blue")&&B.push(g(()=>({multiplier:o.purple1,description:"Purple Dye Boost 1"}))),(v.color=="red"||v.color=="yellow"||v.color=="blue")&&(B.push(g(()=>({multiplier:2,description:"Wetter Dyes",enabled:c.yellowDyeUpg.bought}))),B.push(g(()=>({multiplier:()=>a.add(ft.cloth.value,Math.E).ln(),description:"Gingersnap Level 1",enabled:R.elfTraining.clothElfTraining.milestones[0].earned})))),B.push(g(()=>({multiplier:2,description:"Gingersnap Level 3",enabled:R.elfTraining.clothElfTraining.milestones[2].earned}))),B}),D=f(()=>N.apply(0)),z=Le(()=>{const B=Ct(v.costs);return{...v,style:()=>({backgroundColor:u(z.canPurchase)?t:"#545454",minWidth:"200px"}),display:_(()=>n("span",null,[n("h3",null,[v.name,s(" Chambers")]),n("br",null,null),s("Create "),Q(D.value),s(" "),v.name,v.dyesToReset.length>0?", but reset "+v.dyesToReset.map(E=>E.name).join(", "):"",s("."),n("br",null,null),n("br",null,null),n("span",{class:"white-space: pre-wrap"},[s("Currently:")," ",v.listedBoosts.filter(E=>u(E.visible)).map(E=>ce(_(()=>n("div",null,[u(E.desc)]))))]),n("br",null,null),n("div",null,[s("Cost:")," ",u(B).map(E=>ce(_(()=>{var F,Z;return n("div",null,[Q(u(a.pow((F=u(z.cost))!=null?F:a.dInf,u((Z=E.root)!=null?Z:1)).times(u(E.base))))," ",E.res.displayName,n("br",null,null)])})))])])),cost(){let E=z.amount.value;return a.gte(E,25)&&(E=a.pow(E,2).div(20)),a.gte(E,10)&&(E=a.pow(E,2).div(5)),a.div(E,10).plus(1)},canPurchase:f(E=>{var Z;if(u(z.visibility)!=kt.Visible)return!1;const F=(Z=E!=null?E:u(z.cost))!=null?Z:a.dInf;return u(B).every(ae=>{var se;return a.div(ae.res.value,u(ae.base)).root(u((se=ae.root)!=null?se:1)).gte(F)})}),onPurchase(E){var Z;const F=(Z=E!=null?E:u(z.cost))!=null?Z:a.dInf;u(B).forEach(ae=>{var se;ae.res.value=a.sub(ae.res.value,a.pow(F,u((se=ae.root)!=null?se:1)).times(u(ae.base)))}),S.value=a.add(S.value,D.value),z.amount.value=a.add(z.amount.value,1),v.dyesToReset.forEach(ae=>ae.reset())}}});return{name:v.name,amount:S,buyable:z,toGenerate:N,computedToGenerate:D,display:_(()=>n(Gt,{resource:S,color:v.color,style:"margin: 0; width: 200px; width: 180px; padding: 10px;",sticky:!1},null))}}const i={red:l({name:"Red Dye",color:"red",costs:()=>[{base:"2e18",root:5,res:re.logs},{base:f(()=>c.yellowDyeUpg2.bought.value?"2.5e5":"5e5"),root:2,res:de.oil}],listedBoosts:[{visible:!0,desc:f(()=>`+${Q(o.red1.value)} effective Oil Pumps (does not impact coal consumption)`)}],dyesToReset:[]}),yellow:l({name:"Yellow Dye",color:"yellow",costs:()=>[{base:"1e18",root:5,res:re.logs},{base:f(()=>c.yellowDyeUpg2.bought.value?"5e5":"1e6"),root:2,res:de.oil}],listedBoosts:[{visible:!0,desc:f(()=>`x${Q(o.yellow1.value)} Paper & Plastic gain`)}],dyesToReset:[]}),blue:l({name:"Blue Dye",color:"blue",costs:()=>[{base:"5e17",root:5,res:re.logs},{base:f(()=>c.yellowDyeUpg2.bought.value?"1e6":"2e6"),root:2,res:de.oil}],listedBoosts:[{visible:!0,desc:f(()=>`+${Y(o.blue1.value)} forest size (after all other modifiers).`)}],dyesToReset:[]}),orange:l({name:"Orange Dye",color:"orange",costs:()=>[{base:15,root:2,res:i.red.amount},{base:10,root:2,res:i.yellow.amount}],listedBoosts:[{visible:!0,desc:f(()=>`x${Q(o.orange1.value)} Red and Yellow Dye gain`)},{visible:!0,desc:f(()=>`/${Q(o.orange2.value)} Box buyable costs.`)}],dyesToReset:[{name:"Red Dye",reset(){i.red.amount.value=0,i.red.buyable.amount.value=0}},{name:"Yellow Dye",reset(){i.yellow.amount.value=0,i.yellow.buyable.amount.value=0}}]}),green:l({name:"Green Dye",color:"green",costs:()=>[{base:15,root:2,res:i.yellow.amount},{base:10,root:2,res:i.blue.amount}],listedBoosts:[{visible:!0,desc:f(()=>`x${Q(o.green1.value)} Yellow and Blue Dye gain`)},{visible:!0,desc:f(()=>`+${Y(a.sub(o.green2.value,1).times(100))}% Kiln synergy effect.`)}],dyesToReset:[{name:"Yellow Dye",reset(){i.yellow.amount.value=0,i.yellow.buyable.amount.value=0}},{name:"Blue Dye",reset(){i.blue.amount.value=0,i.blue.buyable.amount.value=0}}]}),purple:l({name:"Purple Dye",color:"purple",costs:()=>[{base:15,root:2,res:i.blue.amount},{base:10,root:2,res:i.red.amount}],listedBoosts:[{visible:!0,desc:f(()=>`x${Q(o.purple1.value)} Red and Blue Dye gain`)},{visible:!0,desc:f(()=>`x${Q(o.purple2.value)} Smelting Speed and Ore Purity`)}],dyesToReset:[{name:"Blue Dye",reset(){i.blue.amount.value=0,i.blue.buyable.amount.value=0}},{name:"Red Dye",reset(){i.red.amount.value=0,i.red.buyable.amount.value=0}}]})},o={red1:f(()=>a.pow(a.add(i.red.amount.value,1).log2().plus(1).log2().div(2),c.blueDyeUpg2.bought.value?1.5:1)),yellow1:f(()=>a.add(i.yellow.amount.value,1).log2().plus(1)),blue1:f(()=>a.add(i.blue.amount.value,1).log2().sqrt().times(5e6)),orange1:f(()=>a.pow(2,a.add(i.orange.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),orange2:f(()=>a.add(i.orange.amount.value,1).log2().plus(1)),green1:f(()=>a.pow(2,a.add(i.green.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),green2:f(()=>a.add(i.green.amount.value,1).log2().plus(1).pow(c.coalUpg.bought.value?2:1)),purple1:f(()=>a.pow(2,a.add(i.purple.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),purple2:f(()=>a.add(i.purple.amount.value,1).log2().plus(1))},[r,d]=sl(()=>[{title:"Red Dye Creation",modifier:i.red.toGenerate,base:0},{title:"Yellow Dye Creation",modifier:i.yellow.toGenerate,base:0},{title:"Blue Dye Creation",modifier:i.blue.toGenerate,base:0},{title:"Orange Dye Creation",modifier:i.orange.toGenerate,base:0},{title:"Green Dye Creation",modifier:i.green.toGenerate,base:0},{title:"Purple Dye Creation",modifier:i.purple.toGenerate,base:0}]),c={blueDyeUpg:q(()=>({visibility:()=>y(a.add(i.orange.amount.value,i.green.amount.value).add(i.purple.amount.value).gte(1)||c.blueDyeUpg.bought.value),display:{title:"Is Blue Dye just Water?",description:_(()=>n(M,null,[s("Multiply Log gain by log"),n("sub",null,[s("10")]),s("(Auto Cutting Amount)+1.")]))},cost:1e3,resource:O(i.blue.amount),onPurchase(){i.blue.amount.value=0,i.blue.buyable.amount.value=0}})),redDyeUpg:q(()=>({visibility:()=>y(a.add(i.orange.amount.value,i.green.amount.value).add(i.purple.amount.value).gte(10)||c.redDyeUpg.bought.value),display:{title:"Glistening Paint",description:_(()=>n(M,null,[s("Multiply Ore Purity by log"),n("sub",null,[s("10")]),s("(Cloth)+1.")]))},cost:1500,resource:O(i.red.amount),onPurchase(){i.red.amount.value=0,i.red.buyable.amount.value=0}})),yellowDyeUpg:q(()=>({visibility:()=>y(a.add(i.orange.amount.value,i.green.amount.value).add(i.purple.amount.value).gte(100)||c.yellowDyeUpg.bought.value),display:{title:"Wetter Dyes",description:"Double Red, Yellow, and Blue Dye gain, but reset their amounts."},cost:2e3,resource:O(i.yellow.amount),onPurchase(){i.red.amount.value=0,i.red.buyable.amount.value=0,i.yellow.amount.value=0,i.yellow.buyable.amount.value=0,i.blue.amount.value=0,i.blue.buyable.amount.value=0}})),yellowDyeUpg2:q(()=>({visibility:()=>y(c.yellowDyeUpg.bought.value),display:{title:"Golden Wash",description:"Halve the Oil cost of Red, Yellow, and Blue Dyes."},cost:5e3,resource:O(i.yellow.amount),onPurchase(){i.yellow.amount.value=0,i.yellow.buyable.amount.value=0}})),redDyeUpg2:q(()=>({visibility:()=>y(c.redDyeUpg.bought.value),display:{title:"De Louvre",description:_(()=>n(M,null,[s("Multiply Smelting Speed by "),n(pl,null,{default:()=>[s("Refineries+1")]}),s(".")]))},cost:6e3,resource:O(i.red.amount),onPurchase(){i.red.amount.value=0,i.red.buyable.amount.value=0}})),blueDyeUpg2:q(()=>({visibility:()=>y(c.blueDyeUpg.bought.value),display:{title:"Hydrophobia",description:"Raise Red Dye's effect ^1.5."},cost:7500,resource:O(i.blue.amount),onPurchase(){i.blue.amount.value=0,i.blue.buyable.amount.value=0}})),coalUpg:q(()=>({visibility:()=>y(c.blueDyeUpg2.bought.value&&c.redDyeUpg2.bought.value&&c.yellowDyeUpg2.bought.value),display:{title:"Denser Spectrum",description:"Orange, Green, and Purple Dyes' first effect is raised ^1.2, and Green Dye's second effect is squared. Buying this resets Red, Yellow, and Blue Dyes."},cost:"5e30",resource:L.coal,onPurchase(){i.red.amount.value=0,i.red.buyable.amount.value=0,i.yellow.amount.value=0,i.yellow.buyable.amount.value=0,i.blue.amount.value=0,i.blue.buyable.amount.value=0}}))},m=H(!1),p=_(()=>n(Et,{modelValue:m.value,"onUpdate:modelValue":v=>m.value=v},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:r})),w=ht(f(()=>Object.values(i).reduce((v,S)=>a.add(v,S.amount.value),0)),"Sum of Dyes"),{total:b,trackerDisplay:C}=bl({resource:w,goal:6e4,name:e,day:Sr,color:t,textColor:"var(--feature-foreground)",modal:{show:m,display:p},ignoreTotal:!0});return{name:e,color:t,dyes:i,dyeSum:w,boosts:o,totalDyeSum:b,minWidth:700,generalTabCollapsed:d,upgrades:c,display:_(()=>n(M,null,[ce(C),n(Ee,null,null),n("div",{style:"width: 620px"},[nt(i.red.display,i.yellow.display,i.blue.display),nt(i.red.buyable,i.yellow.buyable,i.blue.buyable),n(Ee,null,null),nt(i.orange.display,i.green.display,i.purple.display),nt(i.orange.buyable,i.green.buyable,i.purple.buyable)]),n(Ee,null,null),n("div",{class:"row",style:"vertical-align: top"},[Zt(c.redDyeUpg,c.redDyeUpg2),Zt(c.yellowDyeUpg,c.yellowDyeUpg2),Zt(c.blueDyeUpg,c.blueDyeUpg2)]),ce(c.coalUpg)]))}}),Mr="boxes",Da=6,ot=$t(Mr,function(){const e="Boxes",t="#964B00",l=ht(0,"boxes"),i=J(()=>[g(()=>({multiplier:2,description:"1000% Foundation Completed",enabled:Ye.milestones.extraExpansionMilestone5.earned})),ml(()=>({exponent:1.1,description:"Bell Level 2",enabled:R.elfTraining.boxElfTraining.milestones[1].earned}))]),o=qi(()=>({scaling:Ha(1e10,1),baseResource:re.logs,gainResource:O(l),roundUpCost:!0,gainModifier:i})),r=Lt(()=>({display:_(()=>n(M,null,[n("span",{style:"font-size: large"},[s("Create "),Y(o.currentGain.value),s(" "),l.displayName]),n("br",null,null),n("span",{style:"font-size: large"},[s("Cost:")," ",oa(re.logs,a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value)," ",re.logs.displayName])])),canClick:()=>a.gte(o.actualGain.value,1),onClick(){!u(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"})),d=q(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){U.days[3].recentlyUpdated.value=!0},resource:O(l),cost:100})),c=q(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){U.days[3].recentlyUpdated.value=!0},resource:O(l),cost:1e3})),m=q(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){U.days[3].recentlyUpdated.value=!0},resource:O(l),cost:4e3})),p={logsUpgrade:d,ashUpgrade:c,coalUpgrade:m},w=q(()=>({resource:O(l),cost:1e8,visibility:()=>y(et.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),b=q(()=>({resource:O(l),cost:1e9,visibility:()=>y(et.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),C=q(()=>({resource:O(l),cost:1e10,visibility:()=>y(et.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),v={oreUpgrade:w,metalUpgrade:b,plasticUpgrade:C},S=q(()=>({resource:O(l),cost:1e16,visibility:()=>y(R.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry cloth in boxes",description:"Double all cloth actions"}})),N=q(()=>({resource:O(l),cost:1e17,visibility:()=>y(R.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry dye in boxes",description:"Double all dye gain"}})),D=q(()=>({resource:O(l),cost:1e18,visibility:()=>y(R.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry experience in boxes???",description:"Double xp gain"}})),z={clothUpgrade:S,dyeUpgrade:N,xpUpgrade:D},B=Le(()=>({display:{title:"Carry more logs",description:_(()=>n(M,null,[s("Use boxes to carry even more logs, boosting their gain"),n("br",null,null),n("br",null,null),n("div",null,[s("Amount: "),Y(B.amount.value),a.gt(B.freeLevels.value,0)?n(M,null,[s(" (+"),Y(B.freeLevels.value),s(")")]):null])])),effectDisplay:_(()=>n(M,null,[Q(a.div(B.totalAmount.value,2).add(1)),s("x")])),showAmount:!1},resource:O(l),cost(){let ee=this.amount.value;ee=a.pow(.95,j.books.boxBook.amount.value).times(ee);let ne=3;return R.elfTraining.boxElfTraining.milestones[2].earned.value&&ne--,a.pow(ne,ee).times(100).div(Je.boosts.orange2.value)},visibility:()=>y(d.bought.value),freeLevels:f(()=>R.elfTraining.boxElfTraining.milestones[0].earned.value?a.max(E.amount.value,1).sqrt().floor().add(a.max(F.amount.value,1).sqrt().floor()):0),totalAmount:f(()=>a.add(B.amount.value,B.freeLevels.value))})),E=Le(()=>({display:{title:"Carry more ash",description:_(()=>n(M,null,[s("Use boxes to carry even more ash, boosting its gain"),n("br",null,null),n("br",null,null),n("div",null,[s("Amount: "),Y(E.amount.value),a.gt(E.freeLevels.value,0)?n(M,null,[s(" (+"),Y(E.freeLevels.value),s(")")]):null])])),effectDisplay:_(()=>n(M,null,[Q(a.div(E.totalAmount.value,2).add(1)),s("x")])),showAmount:!1},resource:O(l),cost(){let ee=this.amount.value;ee=a.pow(.95,j.books.boxBook.amount.value).times(ee);let ne=5;return R.elfTraining.boxElfTraining.milestones[2].earned.value&&ne--,a.pow(ne,ee).times(1e3).div(Je.boosts.orange2.value)},visibility:()=>y(c.bought.value),freeLevels:f(()=>R.elfTraining.boxElfTraining.milestones[0].earned.value?a.max(B.amount.value,1).sqrt().floor().add(a.max(F.amount.value,1).sqrt().floor()):0),totalAmount:f(()=>a.add(E.amount.value,E.freeLevels.value))})),F=Le(()=>({display:{title:"Carry more coal",description:_(()=>n(M,null,[s("Use boxes to carry even more coal, boosting its gain"),n("br",null,null),n("br",null,null),n("div",null,[s("Amount: "),Y(F.amount.value),a.gt(F.freeLevels.value,0)?n(M,null,[s(" (+"),Y(F.freeLevels.value),s(")")]):null])])),effectDisplay:_(()=>n(M,null,[Q(a.div(F.totalAmount.value,2).add(1)),s("x")])),showAmount:!1},resource:O(l),cost(){let ee=this.amount.value;ee=a.pow(.95,j.books.boxBook.amount.value).times(ee);let ne=7;return R.elfTraining.boxElfTraining.milestones[2].earned.value&&ne--,a.pow(ne,ee).times(1e3).div(Je.boosts.orange2.value)},visibility:()=>y(m.bought.value),freeLevels:f(()=>R.elfTraining.boxElfTraining.milestones[0].earned.value?a.max(B.amount.value,1).sqrt().floor().add(a.max(E.amount.value,1).sqrt().floor()):0),totalAmount:f(()=>a.add(F.amount.value,F.freeLevels.value))})),Z={logBoxesBuyable:B,ashBoxesBuyable:E,coalBoxesBuyable:F};lt.on("update",ee=>{a.lt(U.day.value,Da)||(l.value=a.times(ee,et.buyables.passiveBoxes.amount.value).times(o.currentGain.value).div(100).add(l.value))});const[ae,se]=sl(()=>[{title:"Boxes Gain",modifier:i,base:1}]),ve=H(!1),ie=_(()=>n(Et,{modelValue:ve.value,"onUpdate:modelValue":ee=>ve.value=ee},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:ae})),{total:xe,trackerDisplay:ye}=bl({resource:l,goal:5e4,name:e,day:Da,color:t,modal:{display:ie,show:ve}});return{name:e,day:Da,color:t,boxes:l,totalBoxes:xe,boxesConversion:o,upgrades:p,row2Upgrades:v,row3Upgrades:z,buyables:Z,minWidth:700,generalTabCollapsed:se,display:_(()=>n(M,null,[ce(ye),n(Ee,null,null),n(Gt,{resource:l,color:t,style:"margin-bottom: 0"},null),n(Ee,null,null),ce(r),n(Ee,null,null),Ml(Object.values(p),Object.values(v),Object.values(z)),n(Ee,null,null),nt(...Object.values(Z))])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(l.value),s(" "),l.displayName]))}}),xr="trees",ui=1,di=.1,re=$t(xr,function(){const e="Trees",t="#4BDC13",l="green",i=ht(0,"logs"),o=ht(0,"saplings"),r=H(0),d=J(()=>[le(()=>({addend:()=>a.times(se.amount.value,10),description:"Expand Forest",enabled:E.bought})),le(()=>({addend:()=>a.div(Ye.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Ye.milestones.morePlantsMilestone1.earned})),g(()=>({multiplier:2,description:"5 Elves Trained",enabled:Re.milestones[4].earned})),g(()=>({multiplier:2,description:"8 Elves Trained",enabled:Re.milestones[7].earned})),g(()=>({multiplier:4,description:"Lumberjack Boots",enabled:ft.treesUpgrades.treesUpgrade1.bought})),le(()=>({addend:Je.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>a.gte(Je.dyes.blue.amount.value,1)})),le(()=>({addend:()=>a.pow(xe.value,.99),description:"Hope Level 1",enabled:R.elfTraining.expandersElfTraining.milestones[0].earned}))]),c=ht(f(()=>a.sub(d.apply(10),o.value)),"trees"),m=f(()=>d.apply(10)),p=q(()=>({resource:O(i),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),w=q(()=>({resource:O(i),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),b=q(()=>({resource:O(i),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),C=q(()=>({resource:O(i),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),v=q(()=>({resource:O(i),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),S=[p,w,b,C,v],N=q(()=>({resource:O(i),cost:50,visibility:()=>y(v.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),D=q(()=>({resource:O(i),cost:50,visibility:()=>y(v.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),z=q(()=>({resource:O(i),cost:150,visibility:()=>y(v.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),B=q(()=>({resource:O(i),cost:150,visibility:()=>y(v.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),E=q(()=>({resource:O(i),cost:300,visibility:()=>y(v.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),F=[N,D,z,B,E],Z=Le(()=>({resource:O(i),cost(){let $=this.amount.value;return a.gte($,50)&&($=a.pow($,2).div(50)),a.gte($,200)&&($=a.pow($,2).div(200)),a.gte($,2e6)&&($=a.pow($,2).div(2e6)),$=a.pow(.95,j.books.cuttersBook.amount.value).times($),a.times(100,$).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>y(E.bought.value)})),ae=Le(()=>({resource:O(i),cost(){let $=this.amount.value;a.gte($,50)&&($=a.pow($,2).div(50)),a.gte($,200)&&($=a.pow($,2).div(200)),a.gte($,2e6)&&($=a.pow($,2).div(2e6)),$=a.pow(.95,j.books.plantersBook.amount.value).times($);let he=a.times(100,$).add(200);return R.elfTraining.planterElfTraining.milestones[3].earned.value&&(he=a.div(he,10)),he},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>y(E.bought.value)})),se=Le(()=>({resource:O(i),cost(){let $=this.amount.value;return a.gte($,100)&&($=a.pow($,2).div(100)),a.gte($,1e5)&&($=a.pow($,2).div(1e5)),a.gte($,1e15)&&($=a.pow($,10).div(1e135)),$=a.pow(.95,j.books.expandersBook.amount.value).times($),a.pow(a.add($,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>y(E.bought.value)})),ve=[Z,ae,se],ie=J(()=>[le(()=>({addend:1,description:"Wooden Fingers",enabled:p.bought})),le(()=>({addend:Be,description:"Smart Knives",enabled:z.bought}))]),xe=f(()=>ie.apply(1)),ye=J(()=>[g(()=>({multiplier:.5,description:"Sharper Fingers",enabled:N.bought})),g(()=>({multiplier:()=>a.pow(.5,Re.totalElves.value),description:"1 Elf Trained",enabled:Re.milestones[0].earned}))]),ee=f(()=>ye.apply(1)),ne=J(()=>[le(()=>({addend:1,description:"Automated Knives",enabled:b.bought})),le(()=>({addend:Z.amount,description:"Generic Cutters",enabled:E.bought})),le(()=>({addend:()=>Ye.milestones.extraExpansionMilestone1.earned?a.pow(1.02,Ye.foundationProgress.value):a.div(Ye.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Ye.milestones.autoCutMilestone1.earned})),g(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Ye.milestones.autoCutMilestone2.earned})),g(()=>({multiplier:2,description:"Warmer Cutters",enabled:L.warmerCutters.bought})),g(()=>({multiplier:L.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>a.gt(L.heatedCutters.amount.value,0)})),g(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:ft.treesUpgrades.treesUpgrade2.bought})),g(()=>({multiplier:()=>a.pow(1.1,U.day.value),description:"Holly Level 4",enabled:R.elfTraining.cutterElfTraining.milestones[3].earned})),le(()=>({addend:()=>a.sub(Ie.value,pe.value).max(0),description:"Ivy Level 5",enabled:R.elfTraining.planterElfTraining.milestones[4].earned}))]),Be=f(()=>ne.apply(0)),Ie=H(0);setInterval(()=>jt(Be,$=>{Ie.value=$}),0);const Se=J(()=>[le(()=>({addend:1,description:"Leafy Fingers",enabled:w.bought})),le(()=>({addend:qe,description:"Smart Spades",enabled:B.bought}))]),Ue=f(()=>Se.apply(1)),fe=J(()=>[g(()=>({multiplier:.5,description:"Greener Fingers",enabled:D.bought})),g(()=>({multiplier:()=>a.pow(.5,Re.totalElves.value),description:"1 Elf Trained",enabled:Re.milestones[0].earned}))]),Oe=f(()=>fe.apply(1)),De=J(()=>[le(()=>({addend:1,description:"Automated Spade",enabled:C.bought})),le(()=>({addend:()=>a.div(ae.amount.value,2),description:"Generic Planters",enabled:E.bought})),le(()=>({addend:()=>a.div(Ye.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Ye.milestones.autoPlantMilestone1.earned})),g(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Ye.milestones.autoPlantMilestone2.earned})),g(()=>({multiplier:2,description:"Warmer Planters",enabled:L.warmerPlanters.bought})),g(()=>({multiplier:L.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>a.gt(L.heatedPlanters.amount.value,0)})),g(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:ft.treesUpgrades.treesUpgrade3.bought})),g(()=>({multiplier:2,description:"Ivy Level 1",enabled:R.elfTraining.planterElfTraining.milestones[0].earned})),g(()=>({multiplier:()=>a.pow(c.value,.2).log10().pow_base(2),description:"Ivy Level 3",enabled:R.elfTraining.planterElfTraining.milestones[2].earned})),g(()=>({multiplier:2,description:"Mary Level 4",enabled:R.elfTraining.heatedPlanterElfTraining.milestones[3].earned})),le(()=>({addend:()=>a.sub(pe.value,Ie.value).max(0),description:"Ivy Level 5",enabled:R.elfTraining.planterElfTraining.milestones[4].earned}))]),qe=f(()=>De.apply(0)),pe=H(0);setInterval(()=>jt(qe,$=>{pe.value=$}),0);const tt=J(()=>[g(()=>({multiplier:1.25,description:"Research I",enabled:v.bought})),g(()=>({multiplier:1.25,description:"Research II",enabled:E.bought})),g(()=>({multiplier:()=>a.div(Ye.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Ye.milestones.logGainMilestone1.earned})),g(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Ye.milestones.logGainMilestone2.earned})),g(()=>({multiplier:1.25,description:"Ashy Soil",enabled:L.basicFertilizer.bought})),g(()=>({multiplier:L.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>a.gt(L.moreFertilizer.amount.value,0)})),g(()=>({multiplier:2,description:"4 Elves Trained",enabled:Re.milestones[3].earned})),g(()=>({multiplier:2,description:"Carry logs in boxes",enabled:ot.upgrades.logsUpgrade.bought})),g(()=>({multiplier:()=>a.div(ot.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:ot.upgrades.logsUpgrade.bought})),g(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:ft.treesUpgrades.treesUpgrade4.bought})),g(()=>({multiplier:f(()=>a.add(Be.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:Je.upgrades.blueDyeUpg.bought})),g(()=>({multiplier:f(()=>a.add(Be.value,1).root(9)),description:"Holly Level 1",enabled:R.elfTraining.cutterElfTraining.milestones[0].earned})),g(()=>({multiplier:()=>a.sqrt(R.totalElfLevels.value),description:"Noel Level 1",enabled:R.elfTraining.fertilizerElfTraining.milestones[0].earned})),ml(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Ye.milestones.logGainMilestone3.earned}))]),X=Me(0),dt=el(()=>({direction:Fe.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(X.value,ee.value)})),We=Lt(()=>({display:{title:"Cut trees",description:_(()=>n(M,null,[s("Cut down up to "),Y(a.floor(xe.value))," ",s("tree"),a.eq(xe.value,1)?"":"s",s(" at once!"),n("br",null,null),ce(dt)]))},style:{minHeight:"80px"},canClick:()=>a.gte(c.value,1)&&a.gte(X.value,ee.value),onClick(){if(a.lt(X.value,ee.value))return;const $=a.floor(a.min(c.value,a.times(xe.value,a.div(X.value,ee.value).floor())));i.value=a.add(i.value,a.times(tt.apply(1),$)),o.value=a.add(o.value,$),X.value=0}})),ze=Me(0),oe=el(()=>({direction:Fe.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(ze.value,Oe.value)})),$e=Lt(()=>({display:{title:"Plant trees",description:_(()=>n(M,null,[s("Plant up to "),Y(a.floor(Ue.value))," ",s("tree"),a.eq(Ue.value,1)?"":"s",s(" at once!"),n("br",null,null),ce(oe)]))},style:{minHeight:"80px"},canClick:()=>a.gte(o.value,1)&&a.gte(ze.value,Oe.value),onClick(){if(a.lt(ze.value,Oe.value))return;const $=a.floor(a.min(o.value,a.times(Ue.value,a.div(ze.value,Oe.value).floor())));o.value=a.sub(o.value,$),ze.value=0}})),[Ze,Mt]=sl(()=>[{title:"Logs per Tree",modifier:tt,base:1,visible:v.bought},{title:"Manual Cutting Amount",modifier:ie,base:1,visible:p.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:ye,base:1,visible:p.bought,unit:"s"},{title:"Manual Planting Amount",modifier:Se,base:1,visible:w.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:fe,base:1,visible:w.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:ne,base:0,visible:b.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:De,base:0,visible:C.bought,unit:"/s"},{title:"Forest Size",modifier:d,base:10,visible:E.bought}]),st=H(!1),ct=_(()=>n(Et,{modelValue:st.value,"onUpdate:modelValue":$=>st.value=$},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:Ze}));lt.on("update",$=>{if(a.lt(U.day.value,ui))return;a.gte(X.value,ee.value)?X.value=ee.value:(X.value=a.add(X.value,$),We.isHolding.value&&We.onClick()),a.gte(ze.value,Oe.value)?ze.value=Oe.value:(ze.value=a.add(ze.value,$),$e.isHolding.value&&$e.onClick());const he=a.min(c.value,a.times(Be.value,$)),Ut=a.mul(tt.apply(1),he),Jt=a.div(Ut,$);r.value=a.mul(Jt,di).add(a.mul(r.value,a.dOne.sub(di))),i.value=a.add(i.value,Ut),o.value=a.add(o.value,he);const Ae=a.min(o.value,a.times(qe.value,$));o.value=a.sub(o.value,Ae)});const Ke=f(()=>a.sub(Be.value,qe.value)),Ge=f(()=>a.sub(qe.value,Be.value)),_t=$l(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{We.canClick.value&&We.onClick()}})),xt=$l(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{$e.canClick.value&&$e.onClick()}})),{total:It,trackerDisplay:ue}=bl({resource:i,goal:1e4,name:e,day:ui,color:l,modal:{show:st,display:ct}});return{name:e,color:t,logs:i,totalLogs:It,trees:c,saplings:o,cutTree:We,plantTree:$e,cutTreeHK:_t,plantTreeHK:xt,row1Upgrades:S,row2Upgrades:F,row1Buyables:ve,manualCutProgress:X,manualPlantProgress:ze,generalTabCollapsed:Mt,computedAutoCuttingAmount:Be,minWidth:700,display:_(()=>n(M,null,[ce(ue),n(Ee,null,null),n(Gt,{resource:i,color:t,style:"margin-bottom: 0",productionDisplay:a.gt(Be.value,0)?`+${Q(r.value)}/s average
equilibrium: +${Ci([[Be.value,"cutting speed"],[qe.value,"planting speed"],[a.mul(m.value,20),"forest cap"]],"/s",tt.apply(1))}`:void 0},null),n(Gt,{resource:o,color:l,style:"margin-bottom: 0",productionDisplay:va(Ke.value)},null),n(Gt,{resource:c,color:l,style:"margin-bottom: 0",productionDisplay:va(Ge.value)},null),n(Ee,null,null),nt(We,$e),n("div",null,[s("Tip: You can hold down on actions to perform them automatically")]),n(Ee,null,null),Ml(S,F),n(Ee,null,null),nt(...ve)])),minimizedDisplay:_(()=>n("div",null,[e,s(" - "),Q(i.value),s(" "),i.displayName]))}});var Li="./assets/tree.35808197.png",Gi="./assets/sws.714ad454.png",Qi="data:image/png;base64,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",$i="./assets/elf.9fbfa563.png",Hi="./assets/paperStacks.4c96ec8c.png",Vi="data:image/png;base64,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",ji="./assets/metal.7407f5d1.png",zi="./assets/cloth.7bcd7f37.png",Ji="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAE/ElEQVR42u3dW3baMBRAURhzO4x2zO5P25WPPAhIuq99JhAsayNwbHG/rusm6f3ugEiASIBIgEiASIBIgEiASIBIgNQ+mPv9/8Fc13V3ejUeyFsUnwWMRgF5FAYoGgXkWRiQqD2QFThAUUsgq3FAIkAgESCQCJDtQCARIJAIEEAECCQCJArISSQfHRekgIxG4h4yQCBZdAyQADLi+0jlGyw/e+2dAY+7mzdqgr76ek9OQjeENgBSDUl2IO51awjkJJRXTnTWd2T/WxoCJDOSla9r1UQ7faGjMpKWmzZk+riQCUgEjOpIWu9qsmNCfOckZ3nAKxpGZSRjtv2JeCePXj0ywQBkEJZHTnLk6pERBiDDsHx1oqOAZMZREYmdFZ+YYBlXkAowABmAJuqd/LO/WwkHIDqGoxoM30F0DEhFHIBoO5CqMADRFiBwAALIA5MKDkCWTbTIk7Hj41V1HIAknmCnT06HyQxHUiDVd0+EoxeOVEA6PKMASC8caYBkmFjVn7WAoymQrBPr7ZfjTvdBwVEISPVbJcDojQMQwQGI4ABEcAAiMAARMIAAAgwggKg8FEAECSACBBBB0gsIJIAAAogAgUS+gwAiQCARHAmBQAIIIJCoGKCU+2JBAgwgkKgAFiuIQPElXZAUBgKGsiJxq4kgyQgEDFVAEgIEDlVBchwIHAIEDDVBcgQIHAIEDgEChwABRJDsBgKHAIFDgAAiQOAQIIAIEEAECCASIBIgUk4cgAgQQAQHIAKkBhBI1AXHNiCgqAOO7UAgUWUcR4DAooowQoAAo0o4woFAoqwwrCACAxCBURQIHMoMIxQIHLKCAKIGWGxeLVCyAIFD1ZAAIlAyAInG8dXgwgvJWCDfHVRYIDkKJGLCrRhEUABpB2T14EEyG0mr50F2DRokgJQHsn13C0hGImnxyO2RgSoI5N+4dMUNSLblNvlEm3a1rjSQbjiyT6iJV+0ASQYk8yRaOQ5VoACSEMjfY/t1u91+JJknv6/r+ukNoRCQDpd2AckNBRBAUgHJhgWQpDgSvpseBxI9FuVvNekOJNEqEooj4ryXv5u3+8crQOLmQYvnQSasHoCcnxdtth4FpAaQj85T0EWPK9O5BaTPl/WngDzyujPvVQVIkZMXDGT56gELIIC88NonQgFkKBBImgLJdoICkSy5gvXs658Cpdw/CgFZC+TVY+gOpRSQlJsbNwACCSDdgGz5ByEkh4DsmDhZT0AnIJAcBLJyAmUf+AAkKYF0RAIIIJBEApmwbAPSF0nqnz+oMsiAAHJ08CsO7uG7e0ts1NABSaqfga48oAeBbH8GZOWKWB1JKJBOdQEy5fI8IH2/h5RaQcp/MgAEkN3HAYhOfsyyggACSCcglZEAAggggAACCCCAAAIIIDV3cwdEp5AAAgggnYC4zKt2QFYiAUQtgaxA4l4stQbyChK3u2sEkGeRAKIxQL4DxTPpikSS5kdz3sNiVxMB8g4UG8cJkInnEhBABAggAgQQAQIIIIAAAgggkAACCCCAACJAABEggAgQAQKIAAFEgAAiQACBBBBAAAEEEEAAESCACBBABAggRqEeEEgAAQQQQAABBBBAAAFEp4FAAggggAACCCCAAAIJIAIEECXCAQgggEACCCCAAAIIIIAoAggkgAACCCBwAAIIIJAAAggggCgZEEgAgQMQQACBBBBAAAEEDkgK9wfV+oLa+LwMvQAAAABJRU5ErkJggg==",Wi="./assets/plastic.b8ac74ff.png",Ki="data:image/png;base64,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",Br="./assets/elfManagement.436c8744.png";const U=$t("main",function(){const e=Me(1),t=f(()=>(+new Date(new Date().getFullYear(),11,e.value)-me.time)/1e3),l=H(!1),i=H(-1),o=H(""),r=H();function d(p){const w=Me(!1),b=Me(!1);return Ht(()=>{const C=p(),v=Ct(C.shouldNotify),S=Ct(()=>u(v)||u(b));return{...C,opened:w,shouldNotify:S,recentlyUpdated:b,[Bl]:us,[Nl]:function(){const{day:N,layer:D,symbol:z,opened:B,shouldNotify:E,story:F,completedStory:Z,recentlyUpdated:ae}=this;return{day:N,symbol:z,layer:D,opened:B,recentlyUpdated:ae,shouldNotify:E,onOpenLore(){var ie,xe;const se=U.day.value>N;i.value=se?N-1:-1;const ve=u((xe=(ie=Bt[D!=null?D:"trees"])==null?void 0:ie.name)!=null?xe:"");o.value=se?`${ve} - Completed!`:ve,r.value=se?`${F}
${Z}`:F,l.value=!0},onOpenLayer(){if(ae.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(me.tabs.includes(D!=null?D:"trees")){const se=me.tabs.lastIndexOf(D!=null?D:"trees");me.tabs.splice(se,1)}else me.tabs.push(D!=null?D:"trees"),U.minimized.value=!0;else me.tabs.splice(1,1/0,D!=null?D:"trees")},onUnlockLayer(){D&&(B.value=!0,setTimeout(()=>{var se,ve;i.value=-1,o.value=u((ve=(se=Bt[D!=null?D:"trees"])==null?void 0:se.name)!=null?ve:""),r.value=F,me.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[d(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Li,story:"Oh no! Santa forgot about Christmas and it's only 25 days away! He's asked for your help due to your history getting large quantities of things in short amounts of time. Unfortunately you're really starting from scratch here - let's start with getting wood, which you'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),d(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Gi,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today's goal is to get a workshop built up for the elves to work in - and apparently, they need quite a lot of space to work!",completedStory:"The workshop complete, Santa once again dismisses you for the day. With a strong foundation, this workshop should suffice for supporting future work toward this impossible mission. Good Job!"})),d(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Qi,story:"Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),d(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:$i,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they've stopped practicing for 11 months!",completedStory:"The workshop now hums with the bustling elves working on everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),d(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Hi,story:"With the elves trained, we're almost ready to start working on these presents! Just a couple more pre-reqs first, starting with turning all this wood into wood pulp and finally into paper, which will be required for wrapping paper later on but in the meantime can be used to help write guides which will help these elves continue their education!",completedStory:"You look upon your rivers of book pulp as you hand out stacks of papers to elves to read through. You've continued getting closer and closer to preparing for Christmas, and can go to bed satisfied with your progress. Good Job!"})),d(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Vi,story:"You watch all these elves carrying incredibly large loads just in their open elf-sized hands, and realize there's probably a better way. You need to put the toys in boxes anyways, so why don't we get started working on those so the workers can take advantage as well?",completedStory:"Wow, those boxes are really convenient! The workshop feels more and more proper with every day. You tick another requirement on your list and start looking towards tomorrow. Good Job!"})),d(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:ji,story:"You woke up ready to make some toys, before realizing most toys these days are made out of more than just wood! You're sure you're close to really getting to work, but there's a few more materials you're going to need - like metal! Lots of things need metal!",completedStory:"The sounds of drills and metal clanging join the already loud din as yet another piece of the puzzle fits into place. You're making solid progress, Good Job!"})),d(()=>({day:8,shouldNotify:!1,layer:"cloth",symbol:zi,story:"Another resource you're going to need for gifts is cloth! Fortunately you think this should be pretty easy to prepare using a sheep farm - and as you've already proven with the tree farm, that's something you can handle!",completedStory:"You fall into a pile of wool, sighing contentedly as you look at all the progress you've made today. Good Job!"})),d(()=>({day:9,shouldNotify:!1,layer:"oil",symbol:Ji,story:"Looks like you just need one more thing before the toy factory can start running: plastic! Every toy nowadays is made with plastic! But wait, how are you going to get plastic? What can make plastic? Wait that's right, oil! You figured out you might as well repurpose your coal and ore drills into something that can get you oil, but unfortunately you'll need to mine much deeper that you're currently doing, so let's get to work!",completedStory:"It took a while, but you finally got enough oil for the next step! You deserve a good rest after all this digging work - tomorrow will be a busy day! Good Job!"})),d(()=>({day:10,shouldNotify:!1,layer:"plastic",symbol:Wi,story:"Now that plenty of oil has been prepared, it's time to start refining it into plastic! This should be incredibly useful not only for toys, but making tools and other items!",completedStory:"You've started refining massive amounts of oil into slightly less massive amounts of plastic. You have a slight pang of regret thinking of the environmental impact, but ultimately decide Christmas is worth it. Good Job!"})),d(()=>({day:11,shouldNotify:!1,layer:"dyes",symbol:Ki,story:"To make toys, we're going to need some color to make them look nice and enticing! We can't just give kids clear toys after all! To add some color to our toys, we'll need some dyes!",completedStory:"After all that effort, you finally have a rainbow of dyes to choose from! Now the children won't be able to resist the toys you have to offer, once you get them made of course..."})),d(()=>({day:12,shouldNotify:!1,layer:"management",symbol:Br,story:"You watch as the elves work, and you realize that they could probably be trained to help out better. Just then, Santa comes over to check on your progress. You reply that you're doing fine, except that the elves may need a bit of behavior management. Santa offers to help, saying that he doesn't want to leave you to do everything. Unfortunately for you, the behavior problems won't fix themselves, so let's get to work!",completedStory:"Woo! You are exhausted - this layer felt really long to you. It's great seeing the elves so productive, although you worry a bit about your own job security now! Good Job!"})),d(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"So after a good night's rest you decide that maybe making these elves able to do all the work for you isn't something to be scared of, but rather encouraged. Let's spend another day continuing to train them up and really get this place spinning. They are Santa's elves after all, they're supposed to be able to run everything without you!",completedStory:"The elves are doing an incredible job, and Santa does not seem keen on firing you - Score! Now you can get to work on guiding this properly trained highly functional group of hard workers to make Christmas as great as possible. Good Job!"})),d(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),d(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""}))];function m(){i.value=e.value-1,o.value="Day Complete!",r.value=c[e.value-1].completedStory,l.value=!0,e.value++,U.minimized.value=!1,me.devSpeed=0}return{name:"Calendar",days:c,day:e,timeUntilNewDay:t,loreScene:i,loreTitle:o,loreBody:r,showLoreModal:l,completeDay:m,minWidth:700,display:_(()=>n(M,null,[me.devSpeed===0?n("div",null,[s("Game Paused")]):null,me.devSpeed&&me.devSpeed!==1?n("div",null,[s("Dev Speed: "),Q(me.devSpeed),s("x")]):null,me.offlineTime?n("div",null,[s("Offline Time: "),Hl(me.offlineTime)]):null,n(Ee,null,null),n("div",{class:"advent"},[c.reduce((p,w)=>(p[p.length-1].length===4&&p.push([]),p[p.length-1].push(w),p),[[]]).map(p=>nt(...p))])]))}}),Nr=e=>[U,re,Ye,L,Re,j,ot,it,ft,de,et,Je,R],ja=f(()=>!1);function Dr(e,t){["0.0","0.1","0.2","0.3","0.4"].includes(e!=null?e:"")}var Ir=Object.freeze(Object.defineProperty({__proto__:null,main:U,getInitialLayers:Nr,hasWon:ja,fixOldSave:Dr},Symbol.toStringTag,{value:"Module"}));const Tr={class:"scene"},Pr=["src"],Fr=["src"],Ur=["src"],Rr=["src"],Or=["src"],qr=["src"],Lr=["src"],Gr={key:7,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},Qr=["src"],$r=["src"],Hr=["src"],Vr=["src"],jr=_e({__name:"Scene",props:{day:null},setup(e){return(t,l)=>(k(),T("div",Tr,[e.day>=7?(k(),T("img",{key:0,src:u(zi),class:"scene-item",style:{left:"4%",bottom:"3%",width:"40px",height:"40px"}},null,8,Pr)):G("",!0),e.day>=0?(k(),T("img",{key:1,src:u(Li),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,Fr)):G("",!0),e.day>=1?(k(),T("img",{key:2,src:u(Gi),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,Ur)):G("",!0),e.day>=2?(k(),T("img",{key:3,src:u(Qi),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,Rr)):G("",!0),e.day>=6?(k(),T("img",{key:4,src:u(ji),class:"scene-item",style:{left:"72%",bottom:"8%",width:"40px",height:"40px"}},null,8,Or)):G("",!0),e.day>=8?(k(),T("img",{key:5,src:u(Ji),class:"scene-item",style:{left:"80%",bottom:"6%"}},null,8,qr)):G("",!0),e.day>=3?(k(),T("img",{key:6,src:u($i),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,Lr)):G("",!0),e.day>=4?(k(),T("div",Gr,[e.day>=4?(k(),T("img",{key:0,src:u(Hi),class:"scene-item"},null,8,Qr)):G("",!0),e.day>=5?(k(),T("img",{key:1,src:u(Vi),class:"scene-item"},null,8,$r)):G("",!0),e.day>=9?(k(),T("img",{key:2,src:u(Wi),class:"scene-item"},null,8,Hr)):G("",!0),e.day>=10?(k(),T("img",{key:3,src:u(Ki),class:"scene-item"},null,8,Vr)):G("",!0)])):G("",!0)]))}});var zr=Ve(jr,[["__scopeId","data-v-47b4d886"]]);const Jr=_e({components:{Context:Si},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:K(Object,String,Function),required:!0},minimizedDisplay:K(Object,String,Function),minimized:{type:Object,required:!0},minWidth:{type:K(Number,String),required:!0},name:{type:K(String),required:!0},color:K(String),minimizable:K(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:l,minimized:i,minWidth:o,tab:r,minimizedDisplay:d}=Dt(e),c=ga(t),m=gl(d),p=f(()=>je.allowGoBack&&l.value>0&&!i.value);function w(){me.tabs.splice(u(e.index),1)}Rl(()=>C(i.value,u(o.value))),jt([i,Qo(o)],([v,S])=>C(v,S));function b(v){e.nodes.value=v}function C(v,S){const N=typeof S=="number"||Number.isNaN(parseInt(S))?S+"px":S,D=r.value();D!=null&&(v?(D.style.flexGrow="0",D.style.flexShrink="0",D.style.width="60px",D.style.minWidth=D.style.flexBasis="",D.style.margin="0"):(D.style.flexGrow="",D.style.flexShrink="",D.style.width="",D.style.minWidth=D.style.flexBasis=N,D.style.margin=""))}return{component:c,minimizedComponent:m,showGoBack:p,updateNodes:b,unref:u,goBack:w}}}),Wr={key:1};function Kr(e,t,l,i,o,r){const d=xl("Context");return k(),T("div",{class:"layer-container",style:At({"--layer-color":e.unref(e.color)})},[e.showGoBack?(k(),T("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):G("",!0),e.minimized.value?(k(),T("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.minimized.value=!1)},[e.minimizedComponent?(k(),be(ut(e.minimizedComponent),{key:0})):(k(),T("div",Wr,Te(e.unref(e.name)),1))])):(k(),T("div",{key:2,class:bt(["layer-tab",{showGoBack:e.showGoBack}])},[n(d,{onUpdateNodes:e.updateNodes},{default:ge(()=>[(k(),be(ut(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(k(),T("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.minimized.value=!0)}," \u25BC ")):G("",!0)],4)}var Xr=Ve(Jr,[["render",Kr],["__scopeId","data-v-259fef03"]]);const Xi=e=>(yl("data-v-4b4bda40"),e=e(),hl(),e),Yr=Xi(()=>h("h2",null,"Changelog",-1)),Zr=Xi(()=>h("details",{open:""},[h("summary",null,[s("v0.0 Initial Commit - "),h("time",null,"2021-09-04")]),s(" This is the first release :D "),h("ul",null,[h("li",{class:"feature"},"Did everything"),h("li",{class:"fix"},"Had some fun"),h("li",{class:"breaking"},"Removed everything"),h("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),eu=_e({__name:"Changelog",setup(e,{expose:t}){const l=H(!1);return t({open(){l.value=!0}}),(i,o)=>(k(),be(Et,{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=r=>l.value=r)},{header:ge(()=>[Yr]),body:ge(()=>[Zr]),_:1},8,["modelValue"]))}});var tu=Ve(eu,[["__scopeId","data-v-4b4bda40"]]);const lu={class:"info-modal-header"},au=["src","alt"],iu={class:"info-modal-title"},nu={key:0},ou=s(" - "),su={key:0},ru={key:0},uu=h("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),du=h("br",null,null,-1),cu=h("br",null,null,-1),pu=["href"],mu=h("span",{class:"material-icons info-modal-discord"},"discord",-1),vu=h("div",null,[h("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[h("span",{class:"material-icons info-modal-discord"},"discord"),s(" The Paper Pilot Community ")])],-1),fu=h("div",null,[h("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[h("span",{class:"material-icons info-modal-discord"},"discord"),s(" The Modding Tree ")])],-1),gu=h("br",null,null,-1);var yu=_e({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const l=e,{title:i,logo:o,author:r,discordName:d,discordLink:c,versionNumber:m,versionTitle:p}=je,w=Dt(l),b=H(!1),C=f(()=>Hl(me.timePlayed)),v=f(()=>He(_(()=>n(M,null,[Fi.map(ce)]))));t({open(){b.value=!0}});function S(){var N;(N=u(w.changelog))==null||N.open()}return(N,D)=>(k(),be(Et,{class:"info-modal",modelValue:b.value,"onUpdate:modelValue":D[0]||(D[0]=z=>b.value=z)},{header:ge(()=>[h("div",lu,[u(o)?(k(),T("img",{key:0,class:"info-modal-logo",src:u(o),alt:u(i)},null,8,au)):G("",!0),h("div",iu,[h("h2",null,"- "+Te(u(i))+" -",1),h("h4",null,[s(" - v"+Te(u(m)),1),u(p)?(k(),T("span",nu,": "+Te(u(p)),1)):G("",!0),ou])])])]),body:ge(({shown:z})=>[z?(k(),T("div",su,[u(r)?(k(),T("div",ru,"By "+Te(u(r)),1)):G("",!0),uu,du,h("div",{class:"link",onClick:S},"Changelog"),cu,h("div",null,[u(c)?(k(),T("a",{key:0,href:u(c),class:"info-modal-discord-link",target:"_blank"},[mu,s(" "+Te(u(d)),1)],8,pu)):G("",!0)]),vu,fu,gu,h("div",null,"Time Played: "+Te(u(C)),1),(k(),be(ut(u(v))))])):G("",!0)]),_:1},8,["modelValue"]))}});const Yi=e=>(yl("data-v-0d685451"),e=e(),hl(),e),hu=Yi(()=>h("h2",null,"Options",-1)),bu=Yi(()=>h("hr",null,null,-1));var wu=_e({__name:"Options",setup(e,{expose:t}){const l=H(!1);t({open(){l.value=!0}});const i=Object.keys(zl).map(v=>({label:Ei(v),value:v})),o=f(()=>He(_(()=>n(M,null,[Pi.map(ce)])))),{showTPS:r,theme:d}=Dt(mt),{autosave:c,usingLog:m}=Dt(me),p=f({get(){return me.devSpeed===0},set(v){me.devSpeed=v?0:null}}),w=_(()=>n("span",null,[s("Autosave"),n(yt,{display:"Save-specific"},{default:()=>[s("*")]})])),b=_(()=>n("span",null,[s("Pause game"),n(yt,{display:"Save-specific"},{default:()=>[s("*")]})])),C=_(()=>n("span",null,[s("Use log for progress bar"),n(yt,{display:"Save-specific"},{default:()=>[s("*")]})]));return(v,S)=>(k(),be(Et,{modelValue:l.value,"onUpdate:modelValue":S[5]||(S[5]=N=>l.value=N)},{header:ge(()=>[hu]),body:ge(()=>[n(Va,{title:"Theme",options:u(i),modelValue:u(d),"onUpdate:modelValue":S[0]||(S[0]=N=>wt(d)?d.value=N:null)},null,8,["options","modelValue"]),(k(),be(ut(u(o)))),n(vl,{title:"Show TPS",modelValue:u(r),"onUpdate:modelValue":S[1]||(S[1]=N=>wt(r)?r.value=N:null)},null,8,["modelValue"]),bu,n(vl,{title:u(w),modelValue:u(c),"onUpdate:modelValue":S[2]||(S[2]=N=>wt(c)?c.value=N:null)},null,8,["title","modelValue"]),u(je).enablePausing?(k(),be(vl,{key:0,title:u(b),modelValue:u(p),"onUpdate:modelValue":S[3]||(S[3]=N=>wt(p)?p.value=N:null)},null,8,["title","modelValue"])):G("",!0),n(vl,{title:u(C),modelValue:u(m),"onUpdate:modelValue":S[4]||(S[4]=N=>wt(m)?m.value=N:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var Au=Ve(wu,[["__scopeId","data-v-0d685451"]]);const ku=["onSubmit"],Cu={class:"field"},Eu={key:0,class:"field-title"},_u=["placeholder"],Su=_e({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null,submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(e,{emit:t}){const l=e,i=gl(ol(l,"title"),"span"),o=Yt(null);ya(()=>{var m;(m=o.value)==null||m.focus()});const r=f({get(){return u(l.modelValue)||""},set(m){t("update:modelValue",m)}});function d(){t("submit")}function c(){l.submitOnBlur!==!1?t("submit"):t("cancel")}return(m,p)=>(k(),T("form",{onSubmit:Zl(d,["prevent"])},[h("div",Cu,[u(i)?(k(),T("span",Eu,[(k(),be(ut(u(i))))])):G("",!0),e.textArea?(k(),be(u(gn),{key:1,modelValue:u(r),"onUpdate:modelValue":p[0]||(p[0]=w=>wt(r)?r.value=w:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:o},null,8,["modelValue","placeholder","maxHeight"])):ha((k(),T("input",{key:2,type:"text","onUpdate:modelValue":p[1]||(p[1]=w=>wt(r)?r.value=w:null),placeholder:e.placeholder,class:bt({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:o},null,42,_u)),[[dn,u(r)]])])],40,ku))}});var Zi=Ve(Su,[["__scopeId","data-v-67b44a54"]]);const Mu={key:0},xu=["onClick","disabled"],Bu={key:0},Nu=["onClick"],Du=_e({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const i=Dt(e),o=H(!1);jt(o,c=>{t("confirmingChanged",c)});function r(){if(u(i.skipConfirm)){t("click");return}o.value&&t("click"),o.value=!o.value}function d(){o.value=!1}return(c,m)=>(k(),T("span",{class:bt(["container",{confirming:o.value}])},[o.value?(k(),T("span",Mu,"Are you sure?")):G("",!0),h("button",{onClick:Zl(r,["stop"]),class:"button danger",disabled:e.disabled},[o.value?(k(),T("span",Bu,"Yes")):Xt(c.$slots,"default",{key:1},void 0,!0)],8,xu),o.value?(k(),T("button",{key:1,class:"button",onClick:Zl(d,["stop"])},"No",8,Nu)):G("",!0)],2))}});var Iu=Ve(Du,[["__scopeId","data-v-2f8ef34c"]]);const Tu=["onClick"],Pu=_e({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=H(!1),i=H(null);function o(){t("click"),i.value&&clearTimeout(i.value),l.value=!1,Rl(()=>{l.value=!0,i.value=setTimeout(()=>l.value=!1,500)})}return(r,d)=>(k(),T("button",{onClick:Zl(o,["stop"]),class:bt(["feedback",{activated:l.value,left:e.left}])},[Xt(r.$slots,"default",{},void 0,!0)],10,Tu))}});var Fu=Ve(Pu,[["__scopeId","data-v-01a1b95c"]]);const wl=e=>(yl("data-v-5285ac49"),e=e(),hl(),e),Uu=wl(()=>h("div",{class:"handle material-icons"},"drag_handle",-1)),Ru={key:0,class:"actions"},Ou=wl(()=>h("span",{class:"material-icons"},"content_paste",-1)),qu=wl(()=>h("span",{class:"material-icons"},"content_copy",-1)),Lu=wl(()=>h("span",{class:"material-icons"},"edit",-1)),Gu=wl(()=>h("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Qu={key:1,class:"actions"},$u=wl(()=>h("span",{class:"material-icons"},"check",-1)),Hu=wl(()=>h("span",{class:"material-icons"},"close",-1)),Vu={key:2,class:"details"},ju={class:"save-version"},zu=wl(()=>h("br",null,null,-1)),Ju={key:0},Wu={key:1},Ku={key:3,class:"details"},Xu={key:4,class:"details error"},Yu=wl(()=>h("br",null,null,-1)),Zu=_e({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const l=e,{save:i}=Dt(l),o=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),r=H(!1),d=H(!1),c=H("");jt(r,()=>c.value=i.value.name||"");const m=f(()=>i.value&&i.value.id===me.id),p=f(()=>m.value?me.time:i.value&&i.value.time||0),w=ga(f(()=>{var C,v,S,N;return`Day ${(N=(S=(v=(C=i.value)==null?void 0:C.layers)==null?void 0:v.main)==null?void 0:S.day)!=null?N:1}`}));function b(){t("editName",c.value),r.value=!1}return(C,v)=>(k(),T("div",{class:bt(["save",{active:u(m)}])},[Uu,r.value?(k(),T("div",Qu,[h("button",{onClick:b,class:"button"},[n(yt,{display:"Save",direction:u(Fe).Left,class:"info"},{default:ge(()=>[$u]),_:1},8,["direction"])]),h("button",{onClick:v[5]||(v[5]=S=>r.value=!r.value),class:"button"},[n(yt,{display:"Cancel",direction:u(Fe).Left,class:"info"},{default:ge(()=>[Hu]),_:1},8,["direction"])])])):(k(),T("div",Ru,[u(i).error==null&&!d.value?(k(),be(Fu,{key:0,onClick:v[0]||(v[0]=S=>t("export")),class:"button",left:""},{default:ge(()=>[n(yt,{display:"Export",direction:u(Fe).Left,class:"info"},{default:ge(()=>[Ou]),_:1},8,["direction"])]),_:1})):G("",!0),u(i).error==null&&!d.value?(k(),T("button",{key:1,onClick:v[1]||(v[1]=S=>t("duplicate")),class:"button"},[n(yt,{display:"Duplicate",direction:u(Fe).Left,class:"info"},{default:ge(()=>[qu]),_:1},8,["direction"])])):G("",!0),u(i).error==null&&!d.value?(k(),T("button",{key:2,onClick:v[2]||(v[2]=S=>r.value=!r.value),class:"button"},[n(yt,{display:"Edit Name",direction:u(Fe).Left,class:"info"},{default:ge(()=>[Lu]),_:1},8,["direction"])])):G("",!0),n(Iu,{disabled:u(m),onClick:v[3]||(v[3]=S=>t("delete")),onConfirmingChanged:v[4]||(v[4]=S=>d.value=S)},{default:ge(()=>[n(yt,{display:"Delete",direction:u(Fe).Left,class:"info"},{default:ge(()=>[Gu]),_:1},8,["direction"])]),_:1},8,["disabled"])])),u(i).error==null&&!r.value?(k(),T("div",Vu,[h("button",{class:"button open",onClick:v[6]||(v[6]=S=>t("open"))},[h("h3",null,Te(u(i).name),1)]),h("span",ju,"v"+Te(u(i).modVersion),1),zu,u(p)?(k(),T("div",Ju,"Last played "+Te(u(o).format(u(p))),1)):G("",!0),u(w)?(k(),T("div",Wu,[(k(),be(ut(u(w))))])):G("",!0)])):u(i).error==null&&r.value?(k(),T("div",Ku,[n(Zi,{modelValue:c.value,"onUpdate:modelValue":v[7]||(v[7]=S=>c.value=S),class:"editname",onSubmit:b},null,8,["modelValue"])])):(k(),T("div",Xu,[s(" Error: Failed to load save with id "+Te(u(i).id),1),Yu,s(Te(u(i).error),1)]))],2))}});var ed=Ve(Zu,[["__scopeId","data-v-5285ac49"]]);const za=e=>(yl("data-v-3b9991aa"),e=e(),hl(),e),td=za(()=>h("h2",null,"Saves Manager",-1)),ld={class:"modal-footer"},ad={class:"field"},id=za(()=>h("span",{class:"field-title"},"Create Save",-1)),nd={class:"field-buttons"},od={class:"footer"},sd=za(()=>h("div",{style:{"flex-grow":"1"}},null,-1)),rd=_e({__name:"SavesManager",setup(e,{expose:t}){const l=H(!1),i=H(null);t({open(){l.value=!0}});const o=H(!1),r=H(""),d=H(null);jt(r,B=>{B?Rl(()=>{try{if(B[0]!=="{")if(B[0]==="e")B=decodeURIComponent(escape(atob(B)));else if(B[0]==="\u1BE1")B=El.decompressFromUTF16(B);else{console.warn("Unable to determine preset encoding",B),o.value=!0;return}const E=JSON.parse(B);if(typeof E!="object"){o.value=!0;return}const F=da();E.id=F,al(E),r.value="",o.value=!1,mt.saves.push(F)}catch{o.value=!0}}):o.value=!1});let c={},m=H(Object.keys(c).reduce((B,E)=>(B.push({label:E.split("/").slice(-1)[0].slice(0,-4),value:c[E]}),B),[]));const p=wa({});function w(B){if(p[B]==null){let E=localStorage.getItem(B);if(E==null)p[B]={error:"Save doesn't exist in localStorage",id:B};else if(E==="dW5kZWZpbmVk")p[B]={error:"Save is undefined",id:B};else try{if(E[0]!=="{")if(E[0]==="e")E=decodeURIComponent(escape(atob(E)));else if(E[0]==="\u1BE1")E=El.decompressFromUTF16(E);else return console.warn("Unable to determine preset encoding",E),o.value=!0,p[B]={error:"Unable to determine preset encoding",id:B},p[B];p[B]={...JSON.parse(E),id:B}}catch(F){p[B]={error:F,id:B},console.warn(`SavesManager: Failed to load info about save with id ${B}: ${F} -${E}`)}}return p[B]}jt(l,B=>{B&&Object.keys(p).forEach(E=>delete p[E])});const b=f(()=>mt.saves.reduce((B,E)=>(B[E]=w(E),B),{}));function C(B){let E;switch(me.id===B?E=Di(me[vt]):E=JSON.stringify(b.value[B]),je.exportEncoding){default:console.warn(`Unknown save encoding: ${je.exportEncoding}. Defaulting to lz`);case"lz":E=El.compressToUTF16(E);break;case"base64":E=btoa(unescape(encodeURIComponent(E)));break;case"plain":break}const F=document.createElement("textarea");F.value=E,document.body.appendChild(F),F.select(),F.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(F)}function v(B){me.id===B&&al();const E={...b.value[B],id:da()};al(E),mt.saves.push(E.id)}function S(B){mt.saves=mt.saves.filter(E=>E!==B),localStorage.removeItem(B),p[B]=void 0}function N(B){b.value[me.id].time=me.time,al(),p[me.id]=void 0,Ul(b.value[B]),p[B]=void 0}function D(B){if(d.value=B,Rl(()=>{d.value=null}),B[0]!=="{")if(B[0]==="e")B=decodeURIComponent(escape(atob(B)));else if(B[0]==="\u1BE1")B=El.decompressFromUTF16(B);else{console.warn("Unable to determine preset encoding",B);return}const E=JSON.parse(B);E.id=da(),al(E),mt.saves.push(E.id),N(E.id)}function z(B,E){const F=b.value[B];F&&(F.name=E,me.id===B?(me.name=E,al()):(al(F),p[B]=void 0))}return(B,E)=>(k(),be(Et,{modelValue:l.value,"onUpdate:modelValue":E[4]||(E[4]=F=>l.value=F),ref_key:"modal",ref:i},{header:ge(()=>[td]),body:ge(({shown:F})=>[F?(k(),be(u(fn),{key:0,list:u(mt).saves,handle:".handle",itemKey:Z=>Z},{item:ge(({element:Z})=>[n(ed,{save:u(b)[Z],onOpen:ae=>N(Z),onExport:ae=>C(Z),onEditName:ae=>z(Z,ae),onDuplicate:ae=>v(Z),onDelete:ae=>S(Z)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):G("",!0)]),footer:ge(()=>[h("div",ld,[n(Zi,{modelValue:r.value,"onUpdate:modelValue":E[0]||(E[0]=F=>r.value=F),title:"Import Save",placeholder:"Paste your save here!",class:bt({importingFailed:o.value})},null,8,["modelValue","class"]),h("div",ad,[id,h("div",nd,[h("button",{class:"button",onClick:E[1]||(E[1]=F=>N(u(Ql)().id))},"New Game"),Object.keys(u(m)).length>0?(k(),be(Va,{key:0,options:u(m),modelValue:d.value,"onUpdate:modelValue":E[2]||(E[2]=F=>D(F)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):G("",!0)])]),h("div",od,[sd,h("button",{class:"button modal-default-button",onClick:E[3]||(E[3]=F=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var en=Ve(rd,[["__scopeId","data-v-3b9991aa"]]);const zt=e=>(yl("data-v-8495e562"),e=e(),hl(),e),ud=["src","alt"],dd={key:1,class:"title"},cd=zt(()=>h("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),pd={class:"discord"},md={class:"discord-links"},vd={key:0},fd=["href"],gd=zt(()=>h("li",null,[h("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),yd=zt(()=>h("li",null,[h("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),hd={href:"https://forums.moddingtree.com/",target:"_blank"},bd=zt(()=>h("span",{class:"material-icons"},"forum",-1)),wd=zt(()=>h("span",{class:"material-icons"},"info",-1)),Ad=zt(()=>h("span",{class:"material-icons"},"library_books",-1)),kd=zt(()=>h("span",{class:"material-icons"},"settings",-1)),Cd=zt(()=>h("span",{class:"material-icons"},"library_books",-1)),Ed=zt(()=>h("span",{class:"material-icons"},"settings",-1)),_d=zt(()=>h("span",{class:"material-icons"},"info",-1)),Sd={href:"https://forums.moddingtree.com/",target:"_blank"},Md=zt(()=>h("span",{class:"material-icons"},"forum",-1)),xd={class:"discord"},Bd={class:"discord-links"},Nd={key:0},Dd=["href"],Id=zt(()=>h("li",null,[h("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Td=zt(()=>h("li",null,[h("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Pd=_e({__name:"Nav",setup(e){const t=H(null),l=H(null),i=H(null),o=H(null),{useHeader:r,banner:d,title:c,discordName:m,discordLink:p,versionNumber:w}=je;function b(){window.open(p,"mywindow")}return(C,v)=>(k(),T(x,null,[u(r)?(k(),T("div",Ol({key:0,class:"nav"},C.$attrs),[u(d)?(k(),T("img",{key:0,src:u(d),class:"banner",alt:u(c)},null,8,ud)):(k(),T("div",dd,Te(u(c)),1)),h("div",{onClick:v[0]||(v[0]=S=>{var N;return(N=o.value)==null?void 0:N.open()}),class:"version-container"},[n(yt,{display:"Changelog",direction:u(Fe).Down,class:"version"},{default:ge(()=>[h("span",null,"v"+Te(u(w)),1)]),_:1},8,["direction"])]),cd,h("div",pd,[h("span",{onClick:b,class:"material-icons"},"discord"),h("ul",md,[u(p)?(k(),T("li",vd,[h("a",{href:u(p),target:"_blank"},Te(u(m)),9,fd)])):G("",!0),gd,yd])]),h("div",null,[h("a",hd,[n(yt,{display:"Forums",direction:u(Fe).Down,yoffset:"5px"},{default:ge(()=>[bd]),_:1},8,["direction"])])]),h("div",{onClick:v[1]||(v[1]=S=>{var N;return(N=t.value)==null?void 0:N.open()})},[n(yt,{display:"Info",direction:u(Fe).Down,class:"info"},{default:ge(()=>[wd]),_:1},8,["direction"])]),h("div",{onClick:v[2]||(v[2]=S=>{var N;return(N=l.value)==null?void 0:N.open()})},[n(yt,{display:"Saves",direction:u(Fe).Down,xoffset:"-20px"},{default:ge(()=>[Ad]),_:1},8,["direction"])]),h("div",{onClick:v[3]||(v[3]=S=>{var N;return(N=i.value)==null?void 0:N.open()})},[n(yt,{display:"Options",direction:u(Fe).Down,xoffset:"-66px"},{default:ge(()=>[kd]),_:1},8,["direction"])])],16)):(k(),T("div",Ol({key:1,class:"overlay-nav"},C.$attrs),[h("div",{onClick:v[4]||(v[4]=S=>{var N;return(N=o.value)==null?void 0:N.open()}),class:"version-container"},[n(yt,{display:"Changelog",direction:u(Fe).Right,xoffset:"25%",class:"version"},{default:ge(()=>[h("span",null,"v"+Te(u(w)),1)]),_:1},8,["direction"])]),h("div",{onClick:v[5]||(v[5]=S=>{var N;return(N=l.value)==null?void 0:N.open()})},[n(yt,{display:"Saves",direction:u(Fe).Right},{default:ge(()=>[Cd]),_:1},8,["direction"])]),h("div",{onClick:v[6]||(v[6]=S=>{var N;return(N=i.value)==null?void 0:N.open()})},[n(yt,{display:"Options",direction:u(Fe).Right},{default:ge(()=>[Ed]),_:1},8,["direction"])]),h("div",{onClick:v[7]||(v[7]=S=>{var N;return(N=t.value)==null?void 0:N.open()})},[n(yt,{display:"Info",direction:u(Fe).Right},{default:ge(()=>[_d]),_:1},8,["direction"])]),h("div",null,[h("a",Sd,[n(yt,{display:"Forums",direction:u(Fe).Right,xoffset:"7px"},{default:ge(()=>[Md]),_:1},8,["direction"])])]),h("div",xd,[h("span",{onClick:b,class:"material-icons"},"discord"),h("ul",Bd,[u(p)?(k(),T("li",Nd,[h("a",{href:u(p),target:"_blank"},Te(u(m)),9,Dd)])):G("",!0),Id,Td])])],16)),n(yu,{ref_key:"info",ref:t,changelog:o.value},null,8,["changelog"]),n(en,{ref_key:"savesManager",ref:l},null,512),n(Au,{ref_key:"options",ref:i},null,512),n(tu,{ref_key:"changelog",ref:o},null,512)],64))}});var tn=Ve(Pd,[["__scopeId","data-v-8495e562"]]);const Ja=e=>(yl("data-v-e251e576"),e=e(),hl(),e),Fd={class:"inner-tab"},Ud={key:1},Rd=Ja(()=>h("br",null,null,-1)),Od=s(" You can help continue the "),qd=Ja(()=>h("i",null,"advent",-1)),Ld=s("ure at: "),Gd=Ja(()=>h("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[h("span",{class:"material-icons info-modal-discord"},"discord"),s(" The Paper Pilot Community ")],-1)),Qd=_e({__name:"Game",setup(e){const t=ol(me,"tabs"),l=f(()=>Object.keys(Bt)),i=je.useHeader,o=gl(U.loreBody);function r(d){const{display:c,minimized:m,minWidth:p,name:w,color:b,minimizable:C,nodes:v,minimizedDisplay:S}=d;return{display:c,minimized:m,minWidth:p,name:w,color:b,minimizable:C,nodes:v,minimizedDisplay:S}}return(d,c)=>(k(),T("div",{class:bt(["tabs-container",{useHeader:u(i)}])},[(k(!0),T(x,null,mi(u(t),(m,p)=>{var w,b;return k(),T("div",{key:p,class:bt(["tab",u((w=u(Bt)[m])==null?void 0:w.classes)]),ref_for:!0,ref:`tab-${p}`,style:At(u((b=u(Bt)[m])==null?void 0:b.style))},[p===0&&!u(i)?(k(),be(tn,{key:0})):G("",!0),h("div",Fd,[u(l).includes(m)?(k(),be(Xr,Ol({key:0},r(u(Bt)[m]),{index:p,tab:()=>{var C;return(C=d.$refs[`tab-${p}`])==null?void 0:C[0]}}),null,16,["index","tab"])):(k(),be(rt(m),{key:1,index:p},null,8,["index"]))])],6)}),128)),n(Et,{modelValue:u(U).showLoreModal.value,"onUpdate:modelValue":c[0]||(c[0]=m=>u(U).showLoreModal.value=m)},{header:ge(()=>[h("h2",null,Te(u(U).loreTitle.value),1)]),body:ge(()=>[u(o)?(k(),be(rt(u(o)),{key:0})):G("",!0),u(U).loreScene.value!==-1?(k(),T("div",Ud,[n(zr,{day:u(U).loreScene.value},null,8,["day"]),Rd,Od,qd,Ld,Gd])):G("",!0)]),_:1},8,["modelValue"])],2))}});var $d=Ve(Qd,[["__scopeId","data-v-e251e576"]]);const sa=e=>(yl("data-v-4a50ce42"),e=e(),hl(),e),Hd={class:"game-over-modal-header"},Vd=["src","alt"],jd={class:"game-over-modal-title"},zd=sa(()=>h("h2",null,"Congratulations!",-1)),Jd={key:0},Wd=sa(()=>h("br",null,null,-1)),Kd=sa(()=>h("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Xd=sa(()=>h("br",null,null,-1)),Yd=["href"],Zd=sa(()=>h("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),ec=_e({__name:"GameOverScreen",setup(e){const{title:t,logo:l,discordName:i,discordLink:o,versionNumber:r,versionTitle:d}=je,c=f(()=>ia(me.timePlayed)),m=f(()=>ja.value&&!me.keepGoing),p=ol(me,"autosave");function w(){me.keepGoing=!0}function b(){Ul(Ql())}return(C,v)=>(k(),be(Et,{"model-value":u(m)},{header:ge(()=>[h("div",Hd,[u(l)?(k(),T("img",{key:0,class:"game-over-modal-logo",src:u(l),alt:u(t)},null,8,Vd)):G("",!0),h("div",jd,[zd,h("h4",null,"You've beaten "+Te(u(t))+" v"+Te(u(r))+": "+Te(u(d)),1)])])]),body:ge(({shown:S})=>[S?(k(),T("div",Jd,[h("div",null,"It took you "+Te(u(c))+" to beat the game.",1),Wd,Kd,Xd,h("div",null,[h("a",{href:u(o),class:"game-over-modal-discord-link"},[Zd,s(" "+Te(u(i)),1)],8,Yd)]),n(vl,{title:"Autosave",modelValue:u(p),"onUpdate:modelValue":v[0]||(v[0]=N=>wt(p)?p.value=N:null)},null,8,["modelValue"])])):G("",!0)]),footer:ge(()=>[h("div",{class:"game-over-footer"},[h("button",{onClick:w,class:"button"},"Keep Going"),h("button",{onClick:b,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var tc=Ve(ec,[["__scopeId","data-v-4a50ce42"]]);const Ea=e=>(yl("data-v-3de07c06"),e=e(),hl(),e),lc=Ea(()=>h("div",{class:"nan-modal-header"},[h("h2",null,"NaN value detected!")],-1)),ac={key:0},ic=Ea(()=>h("br",null,null,-1)),nc=["href"],oc=Ea(()=>h("span",{class:"material-icons nan-modal-discord"},"discord",-1)),sc=Ea(()=>h("br",null,null,-1)),rc={class:"nan-footer"},uc=_e({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:l}=je,i=ol(me,"autosave"),o=ol(gt,"hasNaN"),r=H(null),d=f(()=>{var v;return(v=gt.NaNPath)==null?void 0:v.join(".")}),c=f(()=>{var v;return(v=gt.NaNPath)==null?void 0:v.slice(-1)[0]}),m=f(()=>gt.NaNReceiver&&c.value?gt.NaNReceiver[c.value]:null),p=f({get(){return me.devSpeed===0},set(v){me.devSpeed=v?null:0}});function w(){gt.NaNReceiver&&c.value&&(gt.NaNReceiver[c.value]=new a(0),gt.hasNaN=!1)}function b(){gt.NaNReceiver&&c.value&&(gt.NaNReceiver[c.value]=new a(1),gt.hasNaN=!1)}function C(){gt.NaNReceiver&&c.value&&(gt.NaNReceiver[c.value]=new a(NaN),gt.hasNaN=!1)}return(v,S)=>(k(),T(x,null,[n(Et,Ol({modelValue:u(o),"onUpdate:modelValue":S[4]||(S[4]=N=>wt(o)?o.value=N:null)},v.$attrs),{header:ge(()=>[lc]),body:ge(()=>[h("div",null,[s(' Attempted to assign "'+Te(u(d))+'" to NaN',1),u(m)?(k(),T("span",ac,Te(" ")+"(previously "+Te(u(Q)(u(m)))+")",1)):G("",!0),s(". Auto-saving has been "+Te(u(i)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),ic,h("div",null,[h("a",{href:u(l),class:"nan-modal-discord-link"},[oc,s(" "+Te(u(t)),1)],8,nc)]),sc,n(vl,{title:"Autosave",modelValue:u(i),"onUpdate:modelValue":S[0]||(S[0]=N=>wt(i)?i.value=N:null)},null,8,["modelValue"]),u(je).enablePausing?(k(),be(vl,{key:0,title:"Pause game",modelValue:u(p),"onUpdate:modelValue":S[1]||(S[1]=N=>wt(p)?p.value=N:null)},null,8,["modelValue"])):G("",!0)]),footer:ge(()=>[h("div",rc,[h("button",{onClick:S[2]||(S[2]=N=>{var D;return(D=r.value)==null?void 0:D.open()}),class:"button"},"Open Saves Manager"),h("button",{onClick:w,class:"button"},"Set to 0"),h("button",{onClick:b,class:"button"},"Set to 1"),u(m)&&u(a).neq(u(m),0)&&u(a).neq(u(m),1)?(k(),T("button",{key:0,onClick:S[3]||(S[3]=N=>o.value=!1),class:"button"}," Set to previous ")):G("",!0),h("button",{onClick:C,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),n(en,{ref_key:"savesManager",ref:r},null,512)],64))}});var dc=Ve(uc,[["__scopeId","data-v-3de07c06"]]);const cc={key:0,class:"tpsDisplay"},pc={key:0,class:"low"},mc=_e({__name:"TPS",setup(e){const t=f(()=>a.div(gt.lastTenTicks.length,gt.lastTenTicks.reduce((r,d)=>r+d,0))),l=H([]);Vt(()=>{l.value.push(Math.round(t.value.toNumber())),l.value.length>10&&(l.value=l.value.slice(1))});const i=f(()=>l.value.reduce((r,d)=>a.max(r,d),0)),o=f(()=>a.sub(t.value,i.value).gt(1));return(r,d)=>u(t).isNan()?G("",!0):(k(),T("div",cc,[s(" TPS: "+Te(u(Y)(u(t)))+" ",1),n(ba,{name:"fade"},{default:ge(()=>[u(o)?(k(),T("span",pc,Te(u(Y)(u(i))),1)):G("",!0)]),_:1})]))}});var vc=Ve(mc,[["__scopeId","data-v-46a3ed5b"]]);var fc=_e({__name:"App",setup(e){const t=je.useHeader,l=f(()=>jl[mt.theme].variables),i=ol(mt,"showTPS"),o=f(()=>He(_(()=>n(x,null,[Ro.map(ce)]))));return(r,d)=>(k(),T(x,null,[h("div",{id:"modal-root",style:At(u(l))},null,4),h("div",{class:bt(["app",{useHeader:u(t)}]),style:At(u(l))},[u(t)?(k(),be(tn,{key:0})):G("",!0),n($d),u(u(i))?(k(),be(vc,{key:1})):G("",!0),n(tc),n(dc),(k(),be(rt(u(o))))],6)],64))}});var gc=Ve(fc,[["__scopeId","data-v-580927bb"]]);function yc(e={}){const{immediate:t=!1,onNeedRefresh:l,onOfflineReady:i,onRegistered:o,onRegisterError:r}=e;let d,c;const m=async(p=!0)=>{p&&(d==null||d.addEventListener("controlling",w=>{w.isUpdate&&window.location.reload()})),c&&c.waiting&&await hn(c.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){d=new yn("./sw.js",{scope:"./",type:"classic"}),d.addEventListener("activated",p=>{p.isUpdate||i==null||i()});{const p=()=>{l==null||l()};d.addEventListener("waiting",p),d.addEventListener("externalwaiting",p)}d.register({immediate:t}).then(p=>{c=p,o==null||o(p)}).catch(p=>{r==null||r(p)})}return m}function hc(e={}){const{immediate:t=!0,onNeedRefresh:l,onOfflineReady:i,onRegistered:o,onRegisterError:r}=e,d=H(!1),c=H(!1);return{updateServiceWorker:yc({immediate:t,onNeedRefresh(){d.value=!0,l==null||l()},onOfflineReady(){c.value=!0,i==null||i()},onRegistered:o,onRegisterError:r}),offlineReady:c,needRefresh:d}}document.title=je.title;window.projInfo=je;if(je.id==="")throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c -Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await Io();const{globalBus:e}=await pa(()=>Promise.resolve().then(function(){return fo}),void 0),{startGameLoop:t}=await pa(()=>import("./gameLoop.3a885249.js"),["assets/gameLoop.3a885249.js","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"]),l=window.vue=cn(gc);e.emit("setupVue",l),l.mount("#app"),Rl(()=>{const i=fi(),{updateServiceWorker:o}=hc({onNeedRefresh(){i.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){o()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(r){r&&setInterval(()=>r.update(),60*60*1e3)}})}),t()});export{a as D,pa as _,gt as a,je as b,Ir as c,tt as g,Ga as l,me as p,mt as s}; +${E}`)}}return p[B]}jt(l,B=>{B&&Object.keys(p).forEach(E=>delete p[E])});const b=f(()=>mt.saves.reduce((B,E)=>(B[E]=w(E),B),{}));function C(B){let E;switch(me.id===B?E=Di(me[vt]):E=JSON.stringify(b.value[B]),je.exportEncoding){default:console.warn(`Unknown save encoding: ${je.exportEncoding}. Defaulting to lz`);case"lz":E=El.compressToUTF16(E);break;case"base64":E=btoa(unescape(encodeURIComponent(E)));break;case"plain":break}const F=document.createElement("textarea");F.value=E,document.body.appendChild(F),F.select(),F.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(F)}function v(B){me.id===B&&al();const E={...b.value[B],id:da()};al(E),mt.saves.push(E.id)}function S(B){mt.saves=mt.saves.filter(E=>E!==B),localStorage.removeItem(B),p[B]=void 0}function N(B){b.value[me.id].time=me.time,al(),p[me.id]=void 0,Ul(b.value[B]),p[B]=void 0}function D(B){if(d.value=B,Rl(()=>{d.value=null}),B[0]!=="{")if(B[0]==="e")B=decodeURIComponent(escape(atob(B)));else if(B[0]==="\u1BE1")B=El.decompressFromUTF16(B);else{console.warn("Unable to determine preset encoding",B);return}const E=JSON.parse(B);E.id=da(),al(E),mt.saves.push(E.id),N(E.id)}function z(B,E){const F=b.value[B];F&&(F.name=E,me.id===B?(me.name=E,al()):(al(F),p[B]=void 0))}return(B,E)=>(k(),be(Et,{modelValue:l.value,"onUpdate:modelValue":E[4]||(E[4]=F=>l.value=F),ref_key:"modal",ref:i},{header:ge(()=>[td]),body:ge(({shown:F})=>[F?(k(),be(u(fn),{key:0,list:u(mt).saves,handle:".handle",itemKey:Z=>Z},{item:ge(({element:Z})=>[n(ed,{save:u(b)[Z],onOpen:ae=>N(Z),onExport:ae=>C(Z),onEditName:ae=>z(Z,ae),onDuplicate:ae=>v(Z),onDelete:ae=>S(Z)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):G("",!0)]),footer:ge(()=>[h("div",ld,[n(Zi,{modelValue:r.value,"onUpdate:modelValue":E[0]||(E[0]=F=>r.value=F),title:"Import Save",placeholder:"Paste your save here!",class:bt({importingFailed:o.value})},null,8,["modelValue","class"]),h("div",ad,[id,h("div",nd,[h("button",{class:"button",onClick:E[1]||(E[1]=F=>N(u(Ql)().id))},"New Game"),Object.keys(u(m)).length>0?(k(),be(Va,{key:0,options:u(m),modelValue:d.value,"onUpdate:modelValue":E[2]||(E[2]=F=>D(F)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):G("",!0)])]),h("div",od,[sd,h("button",{class:"button modal-default-button",onClick:E[3]||(E[3]=F=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var en=Ve(rd,[["__scopeId","data-v-3b9991aa"]]);const zt=e=>(yl("data-v-8495e562"),e=e(),hl(),e),ud=["src","alt"],dd={key:1,class:"title"},cd=zt(()=>h("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),pd={class:"discord"},md={class:"discord-links"},vd={key:0},fd=["href"],gd=zt(()=>h("li",null,[h("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),yd=zt(()=>h("li",null,[h("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),hd={href:"https://forums.moddingtree.com/",target:"_blank"},bd=zt(()=>h("span",{class:"material-icons"},"forum",-1)),wd=zt(()=>h("span",{class:"material-icons"},"info",-1)),Ad=zt(()=>h("span",{class:"material-icons"},"library_books",-1)),kd=zt(()=>h("span",{class:"material-icons"},"settings",-1)),Cd=zt(()=>h("span",{class:"material-icons"},"library_books",-1)),Ed=zt(()=>h("span",{class:"material-icons"},"settings",-1)),_d=zt(()=>h("span",{class:"material-icons"},"info",-1)),Sd={href:"https://forums.moddingtree.com/",target:"_blank"},Md=zt(()=>h("span",{class:"material-icons"},"forum",-1)),xd={class:"discord"},Bd={class:"discord-links"},Nd={key:0},Dd=["href"],Id=zt(()=>h("li",null,[h("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Td=zt(()=>h("li",null,[h("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Pd=_e({__name:"Nav",setup(e){const t=H(null),l=H(null),i=H(null),o=H(null),{useHeader:r,banner:d,title:c,discordName:m,discordLink:p,versionNumber:w}=je;function b(){window.open(p,"mywindow")}return(C,v)=>(k(),T(M,null,[u(r)?(k(),T("div",Ol({key:0,class:"nav"},C.$attrs),[u(d)?(k(),T("img",{key:0,src:u(d),class:"banner",alt:u(c)},null,8,ud)):(k(),T("div",dd,Te(u(c)),1)),h("div",{onClick:v[0]||(v[0]=S=>{var N;return(N=o.value)==null?void 0:N.open()}),class:"version-container"},[n(yt,{display:"Changelog",direction:u(Fe).Down,class:"version"},{default:ge(()=>[h("span",null,"v"+Te(u(w)),1)]),_:1},8,["direction"])]),cd,h("div",pd,[h("span",{onClick:b,class:"material-icons"},"discord"),h("ul",md,[u(p)?(k(),T("li",vd,[h("a",{href:u(p),target:"_blank"},Te(u(m)),9,fd)])):G("",!0),gd,yd])]),h("div",null,[h("a",hd,[n(yt,{display:"Forums",direction:u(Fe).Down,yoffset:"5px"},{default:ge(()=>[bd]),_:1},8,["direction"])])]),h("div",{onClick:v[1]||(v[1]=S=>{var N;return(N=t.value)==null?void 0:N.open()})},[n(yt,{display:"Info",direction:u(Fe).Down,class:"info"},{default:ge(()=>[wd]),_:1},8,["direction"])]),h("div",{onClick:v[2]||(v[2]=S=>{var N;return(N=l.value)==null?void 0:N.open()})},[n(yt,{display:"Saves",direction:u(Fe).Down,xoffset:"-20px"},{default:ge(()=>[Ad]),_:1},8,["direction"])]),h("div",{onClick:v[3]||(v[3]=S=>{var N;return(N=i.value)==null?void 0:N.open()})},[n(yt,{display:"Options",direction:u(Fe).Down,xoffset:"-66px"},{default:ge(()=>[kd]),_:1},8,["direction"])])],16)):(k(),T("div",Ol({key:1,class:"overlay-nav"},C.$attrs),[h("div",{onClick:v[4]||(v[4]=S=>{var N;return(N=o.value)==null?void 0:N.open()}),class:"version-container"},[n(yt,{display:"Changelog",direction:u(Fe).Right,xoffset:"25%",class:"version"},{default:ge(()=>[h("span",null,"v"+Te(u(w)),1)]),_:1},8,["direction"])]),h("div",{onClick:v[5]||(v[5]=S=>{var N;return(N=l.value)==null?void 0:N.open()})},[n(yt,{display:"Saves",direction:u(Fe).Right},{default:ge(()=>[Cd]),_:1},8,["direction"])]),h("div",{onClick:v[6]||(v[6]=S=>{var N;return(N=i.value)==null?void 0:N.open()})},[n(yt,{display:"Options",direction:u(Fe).Right},{default:ge(()=>[Ed]),_:1},8,["direction"])]),h("div",{onClick:v[7]||(v[7]=S=>{var N;return(N=t.value)==null?void 0:N.open()})},[n(yt,{display:"Info",direction:u(Fe).Right},{default:ge(()=>[_d]),_:1},8,["direction"])]),h("div",null,[h("a",Sd,[n(yt,{display:"Forums",direction:u(Fe).Right,xoffset:"7px"},{default:ge(()=>[Md]),_:1},8,["direction"])])]),h("div",xd,[h("span",{onClick:b,class:"material-icons"},"discord"),h("ul",Bd,[u(p)?(k(),T("li",Nd,[h("a",{href:u(p),target:"_blank"},Te(u(m)),9,Dd)])):G("",!0),Id,Td])])],16)),n(yu,{ref_key:"info",ref:t,changelog:o.value},null,8,["changelog"]),n(en,{ref_key:"savesManager",ref:l},null,512),n(Au,{ref_key:"options",ref:i},null,512),n(tu,{ref_key:"changelog",ref:o},null,512)],64))}});var tn=Ve(Pd,[["__scopeId","data-v-8495e562"]]);const Ja=e=>(yl("data-v-e251e576"),e=e(),hl(),e),Fd={class:"inner-tab"},Ud={key:1},Rd=Ja(()=>h("br",null,null,-1)),Od=s(" You can help continue the "),qd=Ja(()=>h("i",null,"advent",-1)),Ld=s("ure at: "),Gd=Ja(()=>h("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[h("span",{class:"material-icons info-modal-discord"},"discord"),s(" The Paper Pilot Community ")],-1)),Qd=_e({__name:"Game",setup(e){const t=ol(me,"tabs"),l=f(()=>Object.keys(Bt)),i=je.useHeader,o=gl(U.loreBody);function r(d){const{display:c,minimized:m,minWidth:p,name:w,color:b,minimizable:C,nodes:v,minimizedDisplay:S}=d;return{display:c,minimized:m,minWidth:p,name:w,color:b,minimizable:C,nodes:v,minimizedDisplay:S}}return(d,c)=>(k(),T("div",{class:bt(["tabs-container",{useHeader:u(i)}])},[(k(!0),T(M,null,mi(u(t),(m,p)=>{var w,b;return k(),T("div",{key:p,class:bt(["tab",u((w=u(Bt)[m])==null?void 0:w.classes)]),ref_for:!0,ref:`tab-${p}`,style:At(u((b=u(Bt)[m])==null?void 0:b.style))},[p===0&&!u(i)?(k(),be(tn,{key:0})):G("",!0),h("div",Fd,[u(l).includes(m)?(k(),be(Xr,Ol({key:0},r(u(Bt)[m]),{index:p,tab:()=>{var C;return(C=d.$refs[`tab-${p}`])==null?void 0:C[0]}}),null,16,["index","tab"])):(k(),be(ut(m),{key:1,index:p},null,8,["index"]))])],6)}),128)),n(Et,{modelValue:u(U).showLoreModal.value,"onUpdate:modelValue":c[0]||(c[0]=m=>u(U).showLoreModal.value=m)},{header:ge(()=>[h("h2",null,Te(u(U).loreTitle.value),1)]),body:ge(()=>[u(o)?(k(),be(ut(u(o)),{key:0})):G("",!0),u(U).loreScene.value!==-1?(k(),T("div",Ud,[n(zr,{day:u(U).loreScene.value},null,8,["day"]),Rd,Od,qd,Ld,Gd])):G("",!0)]),_:1},8,["modelValue"])],2))}});var $d=Ve(Qd,[["__scopeId","data-v-e251e576"]]);const sa=e=>(yl("data-v-4a50ce42"),e=e(),hl(),e),Hd={class:"game-over-modal-header"},Vd=["src","alt"],jd={class:"game-over-modal-title"},zd=sa(()=>h("h2",null,"Congratulations!",-1)),Jd={key:0},Wd=sa(()=>h("br",null,null,-1)),Kd=sa(()=>h("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Xd=sa(()=>h("br",null,null,-1)),Yd=["href"],Zd=sa(()=>h("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),ec=_e({__name:"GameOverScreen",setup(e){const{title:t,logo:l,discordName:i,discordLink:o,versionNumber:r,versionTitle:d}=je,c=f(()=>Hl(me.timePlayed)),m=f(()=>ja.value&&!me.keepGoing),p=ol(me,"autosave");function w(){me.keepGoing=!0}function b(){Ul(Ql())}return(C,v)=>(k(),be(Et,{"model-value":u(m)},{header:ge(()=>[h("div",Hd,[u(l)?(k(),T("img",{key:0,class:"game-over-modal-logo",src:u(l),alt:u(t)},null,8,Vd)):G("",!0),h("div",jd,[zd,h("h4",null,"You've beaten "+Te(u(t))+" v"+Te(u(r))+": "+Te(u(d)),1)])])]),body:ge(({shown:S})=>[S?(k(),T("div",Jd,[h("div",null,"It took you "+Te(u(c))+" to beat the game.",1),Wd,Kd,Xd,h("div",null,[h("a",{href:u(o),class:"game-over-modal-discord-link"},[Zd,s(" "+Te(u(i)),1)],8,Yd)]),n(vl,{title:"Autosave",modelValue:u(p),"onUpdate:modelValue":v[0]||(v[0]=N=>wt(p)?p.value=N:null)},null,8,["modelValue"])])):G("",!0)]),footer:ge(()=>[h("div",{class:"game-over-footer"},[h("button",{onClick:w,class:"button"},"Keep Going"),h("button",{onClick:b,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var tc=Ve(ec,[["__scopeId","data-v-4a50ce42"]]);const Ea=e=>(yl("data-v-3de07c06"),e=e(),hl(),e),lc=Ea(()=>h("div",{class:"nan-modal-header"},[h("h2",null,"NaN value detected!")],-1)),ac={key:0},ic=Ea(()=>h("br",null,null,-1)),nc=["href"],oc=Ea(()=>h("span",{class:"material-icons nan-modal-discord"},"discord",-1)),sc=Ea(()=>h("br",null,null,-1)),rc={class:"nan-footer"},uc=_e({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:l}=je,i=ol(me,"autosave"),o=ol(gt,"hasNaN"),r=H(null),d=f(()=>{var v;return(v=gt.NaNPath)==null?void 0:v.join(".")}),c=f(()=>{var v;return(v=gt.NaNPath)==null?void 0:v.slice(-1)[0]}),m=f(()=>gt.NaNReceiver&&c.value?gt.NaNReceiver[c.value]:null),p=f({get(){return me.devSpeed===0},set(v){me.devSpeed=v?null:0}});function w(){gt.NaNReceiver&&c.value&&(gt.NaNReceiver[c.value]=new a(0),gt.hasNaN=!1)}function b(){gt.NaNReceiver&&c.value&&(gt.NaNReceiver[c.value]=new a(1),gt.hasNaN=!1)}function C(){gt.NaNReceiver&&c.value&&(gt.NaNReceiver[c.value]=new a(NaN),gt.hasNaN=!1)}return(v,S)=>(k(),T(M,null,[n(Et,Ol({modelValue:u(o),"onUpdate:modelValue":S[4]||(S[4]=N=>wt(o)?o.value=N:null)},v.$attrs),{header:ge(()=>[lc]),body:ge(()=>[h("div",null,[s(' Attempted to assign "'+Te(u(d))+'" to NaN',1),u(m)?(k(),T("span",ac,Te(" ")+"(previously "+Te(u(Q)(u(m)))+")",1)):G("",!0),s(". Auto-saving has been "+Te(u(i)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),ic,h("div",null,[h("a",{href:u(l),class:"nan-modal-discord-link"},[oc,s(" "+Te(u(t)),1)],8,nc)]),sc,n(vl,{title:"Autosave",modelValue:u(i),"onUpdate:modelValue":S[0]||(S[0]=N=>wt(i)?i.value=N:null)},null,8,["modelValue"]),u(je).enablePausing?(k(),be(vl,{key:0,title:"Pause game",modelValue:u(p),"onUpdate:modelValue":S[1]||(S[1]=N=>wt(p)?p.value=N:null)},null,8,["modelValue"])):G("",!0)]),footer:ge(()=>[h("div",rc,[h("button",{onClick:S[2]||(S[2]=N=>{var D;return(D=r.value)==null?void 0:D.open()}),class:"button"},"Open Saves Manager"),h("button",{onClick:w,class:"button"},"Set to 0"),h("button",{onClick:b,class:"button"},"Set to 1"),u(m)&&u(a).neq(u(m),0)&&u(a).neq(u(m),1)?(k(),T("button",{key:0,onClick:S[3]||(S[3]=N=>o.value=!1),class:"button"}," Set to previous ")):G("",!0),h("button",{onClick:C,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),n(en,{ref_key:"savesManager",ref:r},null,512)],64))}});var dc=Ve(uc,[["__scopeId","data-v-3de07c06"]]);const cc={key:0,class:"tpsDisplay"},pc={key:0,class:"low"},mc=_e({__name:"TPS",setup(e){const t=f(()=>a.div(gt.lastTenTicks.length,gt.lastTenTicks.reduce((r,d)=>r+d,0))),l=H([]);Vt(()=>{l.value.push(Math.round(t.value.toNumber())),l.value.length>10&&(l.value=l.value.slice(1))});const i=f(()=>l.value.reduce((r,d)=>a.max(r,d),0)),o=f(()=>a.sub(t.value,i.value).gt(1));return(r,d)=>u(t).isNan()?G("",!0):(k(),T("div",cc,[s(" TPS: "+Te(u(Y)(u(t)))+" ",1),n(ba,{name:"fade"},{default:ge(()=>[u(o)?(k(),T("span",pc,Te(u(Y)(u(i))),1)):G("",!0)]),_:1})]))}});var vc=Ve(mc,[["__scopeId","data-v-46a3ed5b"]]);var fc=_e({__name:"App",setup(e){const t=je.useHeader,l=f(()=>zl[mt.theme].variables),i=ol(mt,"showTPS"),o=f(()=>He(_(()=>n(M,null,[Ro.map(ce)]))));return(r,d)=>(k(),T(M,null,[h("div",{id:"modal-root",style:At(u(l))},null,4),h("div",{class:bt(["app",{useHeader:u(t)}]),style:At(u(l))},[u(t)?(k(),be(tn,{key:0})):G("",!0),n($d),u(u(i))?(k(),be(vc,{key:1})):G("",!0),n(tc),n(dc),(k(),be(ut(u(o))))],6)],64))}});var gc=Ve(fc,[["__scopeId","data-v-580927bb"]]);function yc(e={}){const{immediate:t=!1,onNeedRefresh:l,onOfflineReady:i,onRegistered:o,onRegisterError:r}=e;let d,c;const m=async(p=!0)=>{p&&(d==null||d.addEventListener("controlling",w=>{w.isUpdate&&window.location.reload()})),c&&c.waiting&&await hn(c.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){d=new yn("./sw.js",{scope:"./",type:"classic"}),d.addEventListener("activated",p=>{p.isUpdate||i==null||i()});{const p=()=>{l==null||l()};d.addEventListener("waiting",p),d.addEventListener("externalwaiting",p)}d.register({immediate:t}).then(p=>{c=p,o==null||o(p)}).catch(p=>{r==null||r(p)})}return m}function hc(e={}){const{immediate:t=!0,onNeedRefresh:l,onOfflineReady:i,onRegistered:o,onRegisterError:r}=e,d=H(!1),c=H(!1);return{updateServiceWorker:yc({immediate:t,onNeedRefresh(){d.value=!0,l==null||l()},onOfflineReady(){c.value=!0,i==null||i()},onRegistered:o,onRegisterError:r}),offlineReady:c,needRefresh:d}}document.title=je.title;window.projInfo=je;if(je.id==="")throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c +Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await Io();const{globalBus:e}=await pa(()=>Promise.resolve().then(function(){return fo}),void 0),{startGameLoop:t}=await pa(()=>import("./gameLoop.4c2ba2f1.js"),["assets/gameLoop.4c2ba2f1.js","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"]),l=window.vue=cn(gc);e.emit("setupVue",l),l.mount("#app"),Rl(()=>{const i=fi(),{updateServiceWorker:o}=hc({onNeedRefresh(){i.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){o()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(r){r&&setInterval(()=>r.update(),60*60*1e3)}})}),t()});export{a as D,pa as _,gt as a,je as b,Ir as c,lt as g,Ga as l,me as p,mt as s}; diff --git a/index.html b/index.html index 444926a..057d3d7 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ Advent Incremental - + diff --git a/sw.js b/sw.js index 0d3cadb..4bd0acc 100644 --- a/sw.js +++ b/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let t={};const o=e=>i(e,r),u={module:{uri:r},exports:t,require:o};s[r]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(l(...e),t)))}}define(["./workbox-958fa2bd"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/@fontsource.c175eac8.css",revision:null},{url:"assets/@vue.4ce677c2.js",revision:null},{url:"assets/gameLoop.3a885249.js",revision:null},{url:"assets/index.40999a53.css",revision:null},{url:"assets/index.9b588766.js",revision:null},{url:"assets/is-plain-object.906d88e8.js",revision:null},{url:"assets/lz-string.731cedc5.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.29100d8a.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.a2bfab1d.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.6f567382.js",revision:null},{url:"assets/vue.92681fcb.js",revision:null},{url:"assets/vuedraggable.7949458c.js",revision:null},{url:"assets/workbox-window.8d14e8b7.js",revision:null},{url:"index.html",revision:"76e3ecf93d3c54010b1c20a9bddee121"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"5f32ad2a77eb001e1b6a588835dc1efc"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))})); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()})).then((()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e})));self.define=(n,l)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let t={};const o=e=>i(e,r),u={module:{uri:r},exports:t,require:o};s[r]=Promise.all(n.map((e=>u[e]||o(e)))).then((e=>(l(...e),t)))}}define(["./workbox-958fa2bd"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"assets/@fontsource.c175eac8.css",revision:null},{url:"assets/@vue.4ce677c2.js",revision:null},{url:"assets/gameLoop.4c2ba2f1.js",revision:null},{url:"assets/index.0516c815.js",revision:null},{url:"assets/index.40999a53.css",revision:null},{url:"assets/is-plain-object.906d88e8.js",revision:null},{url:"assets/lz-string.731cedc5.js",revision:null},{url:"assets/nanoevents.1080beb7.js",revision:null},{url:"assets/sortablejs.29100d8a.js",revision:null},{url:"assets/vue-next-select.9e6f4164.css",revision:null},{url:"assets/vue-next-select.a2bfab1d.js",revision:null},{url:"assets/vue-textarea-autosize.35804eaf.js",revision:null},{url:"assets/vue-toastification.4b5f8ac8.css",revision:null},{url:"assets/vue-toastification.6f567382.js",revision:null},{url:"assets/vue.92681fcb.js",revision:null},{url:"assets/vuedraggable.7949458c.js",revision:null},{url:"assets/workbox-window.8d14e8b7.js",revision:null},{url:"index.html",revision:"766cebeb32a969d5ef1354bcef95222a"},{url:"favicon.ico",revision:"eead31eb5b19fa3bdc34af83d898c0b7"},{url:"robots.txt",revision:"5e0bd1c281a62a380d7a948085bfe2d1"},{url:"apple-touch-icon.png",revision:"26e53bb981d06c8069ffd9d2a14fce0e"},{url:"pwa-192x192.png",revision:"a16785d9e890858c5b508e0ef6954aaf"},{url:"pwa-512x512.png",revision:"b84004b93fd62ef6599ff179372861a1"},{url:"manifest.webmanifest",revision:"5f32ad2a77eb001e1b6a588835dc1efc"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));