mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-23 17:01:49 +00:00
19 lines
260 KiB
JavaScript
19 lines
260 KiB
JavaScript
/* empty css */import"./vue.92681fcb.js";import{Z as f,l as ht,aa as we,t as V,ay as ra,ar as _l,aE as k,a0 as I,aK as Qt,a1 as g,O as S,aG as Zl,A as Bt,_ as he,a8 as n,b6 as ce,b8 as ua,bs as oi,C as u,aq as Sl,bu as Ll,bb as da,T as tn,a7 as s,u as ca,j as ln,bv as Ea,q as jl,b1 as Xt,G as ct,aC as si,w as $t,b2 as qt,ao as an,I as yt,aN as it,$ as G,J as Ne,aH as ol,aF as sl,z as Yt,al as la,aL as gl,H as nn,aJ as ri,bn as on,br as sn,be as rn}from"./@vue.4ce677c2.js";import{c as ui}from"./nanoevents.1080beb7.js";import{L as ml}from"./lz-string.731cedc5.js";import{i as un}from"./is-plain-object.906d88e8.js";import{Y as dn}from"./vue-next-select.a2bfab1d.js";import{s as cn,u as di}from"./vue-toastification.6f567382.js";import{D as pn}from"./vuedraggable.7949458c.js";import{p as mn}from"./vue-textarea-autosize.35804eaf.js";import{v as vn,n as fn}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const gn=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)}};gn();const hn="modulepreload",Ha={},yn="./",aa=function(t,l){return!l||l.length===0?t():Promise.all(l.map(i=>{if(i=`${yn}${i}`,i in Ha)return;Ha[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":hn,o||(d.as="script",d.crossOrigin=""),d.href=i,document.head.appendChild(d),o)return new Promise((c,p)=>{d.addEventListener("load",c),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},bn="./projInfo-schema.json",wn="Advent Incremental",An="An incremental game you play a day at a time, leading up to Christmas!",Cn="advent-incremental",kn="thepaperpilot and friends",En="",_n="",Sn="0.5",Bn="Initial Commit",Mn=!0,Nn=!1,xn=2,In=!0,Dn=null,Pn="",Tn=["main"],Fn=3600,Un=0,Rn=!0,On="base64";var Ve={$schema:bn,title:wn,description:An,id:Cn,author:kn,discordName:En,discordLink:_n,versionNumber:Sn,versionTitle:Bn,allowGoBack:Mn,defaultShowSmall:Nn,defaultDecimalsShown:xn,useHeader:In,banner:Dn,logo:Pn,initialTabs:Tn,maxTickLength:Fn,offlineLimit:Un,enablePausing:Rn,exportEncoding:On};const ba=17,qn=9e15,Gn=Math.log10(9e15),Ln=1/9e15,Qn=308,$n=-324,ja=5,Vn=function(){const e=[];for(let l=$n+1;l<=Qn;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),Cl=[2,Math.E,3,4,5,6,7,8,9,10],Hn=[[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]],jn=[[-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]],C=function(t){return a.fromValue_noAlloc(t)},ye=function(e,t,l){return a.fromComponents(e,t,l)},De=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)))},wa=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},Wn=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},ci=.5671432904097838,Wa=function(e,t=1e-10){let l,i;if(!Number.isFinite(e)||e===0)return e;if(e===1)return ci;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)<t*Math.abs(i))return i;l=i}throw Error(`Iteration failed to converge: ${e.toString()}`)};function Ja(e,t=1e-10){let l,i,o,r;if(!Number.isFinite(e.mag)||e===a.dZero)return e;if(e===a.dOne)return C(ci);a.abs(e),l=a.ln(e);for(let d=0;d<100;++d){if(i=a.exp(-l),o=l.sub(e.mul(i)),r=l.sub(o.div(l.add(1).sub(l.add(2).mul(o).div(a.mul(2,l).add(2))))),a.abs(r.sub(l)).lt(a.abs(r).mul(t)))return r;l=r}throw Error(`Iteration failed to converge: ${e.toString()}`)}const x=class{constructor(e){this.sign=Number.NaN,this.mag=Number.NaN,this.layer=Number.NaN,e instanceof x||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)}get m(){if(this.sign===0)return 0;if(this.layer===0){const e=Math.floor(Math.log10(this.mag));let t;return this.mag===5e-324?t=5:t=this.mag/Vn(e),this.sign*t}else if(this.layer===1){const e=this.mag-Math.floor(this.mag);return this.sign*Math.pow(10,e)}else return this.sign}set m(e){this.layer<=2?this.fromMantissaExponent(e,this.e):(this.sign=Math.sign(e),this.sign===0&&(this.layer,this.exponent))}get e(){return this.sign===0?0:this.layer===0?Math.floor(Math.log10(this.mag)):this.layer===1?Math.floor(this.mag):this.layer===2?Math.floor(Math.sign(this.mag)*Math.pow(10,Math.abs(this.mag))):this.mag*Number.POSITIVE_INFINITY}set e(e){this.fromMantissaExponent(this.m,e)}get s(){return this.sign}set s(e){e===0?(this.sign=0,this.layer=0,this.mag=0):this.sign=e}get mantissa(){return this.m}set mantissa(e){this.m=e}get exponent(){return this.e}set exponent(e){this.e=e}static fromComponents(e,t,l){return new x().fromComponents(e,t,l)}static fromComponents_noNormalize(e,t,l){return new x().fromComponents_noNormalize(e,t,l)}static fromMantissaExponent(e,t){return new x().fromMantissaExponent(e,t)}static fromMantissaExponent_noNormalize(e,t){return new x().fromMantissaExponent_noNormalize(e,t)}static fromDecimal(e){return new x().fromDecimal(e)}static fromNumber(e){return new x().fromNumber(e)}static fromString(e){return new x().fromString(e)}static fromValue(e){return new x().fromValue(e)}static fromValue_noAlloc(e){return e instanceof x?e:new x(e)}static abs(e){return C(e).abs()}static neg(e){return C(e).neg()}static negate(e){return C(e).neg()}static negated(e){return C(e).neg()}static sign(e){return C(e).sign}static sgn(e){return C(e).sign}static round(e){return C(e).round()}static floor(e){return C(e).floor()}static ceil(e){return C(e).ceil()}static trunc(e){return C(e).trunc()}static add(e,t){return C(e).add(t)}static plus(e,t){return C(e).add(t)}static sub(e,t){return C(e).sub(t)}static subtract(e,t){return C(e).sub(t)}static minus(e,t){return C(e).sub(t)}static mul(e,t){return C(e).mul(t)}static multiply(e,t){return C(e).mul(t)}static times(e,t){return C(e).mul(t)}static div(e,t){return C(e).div(t)}static divide(e,t){return C(e).div(t)}static recip(e){return C(e).recip()}static reciprocal(e){return C(e).recip()}static reciprocate(e){return C(e).reciprocate()}static cmp(e,t){return C(e).cmp(t)}static cmpabs(e,t){return C(e).cmpabs(t)}static compare(e,t){return C(e).cmp(t)}static isNaN(e){return e=C(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag)}static isFinite(e){return e=C(e),isFinite(e.sign)&&isFinite(e.layer)&&isFinite(e.mag)}static eq(e,t){return C(e).eq(t)}static equals(e,t){return C(e).eq(t)}static neq(e,t){return C(e).neq(t)}static notEquals(e,t){return C(e).notEquals(t)}static lt(e,t){return C(e).lt(t)}static lte(e,t){return C(e).lte(t)}static gt(e,t){return C(e).gt(t)}static gte(e,t){return C(e).gte(t)}static max(e,t){return C(e).max(t)}static min(e,t){return C(e).min(t)}static minabs(e,t){return C(e).minabs(t)}static maxabs(e,t){return C(e).maxabs(t)}static clamp(e,t,l){return C(e).clamp(t,l)}static clampMin(e,t){return C(e).clampMin(t)}static clampMax(e,t){return C(e).clampMax(t)}static cmp_tolerance(e,t,l){return C(e).cmp_tolerance(t,l)}static compare_tolerance(e,t,l){return C(e).cmp_tolerance(t,l)}static eq_tolerance(e,t,l){return C(e).eq_tolerance(t,l)}static equals_tolerance(e,t,l){return C(e).eq_tolerance(t,l)}static neq_tolerance(e,t,l){return C(e).neq_tolerance(t,l)}static notEquals_tolerance(e,t,l){return C(e).notEquals_tolerance(t,l)}static lt_tolerance(e,t,l){return C(e).lt_tolerance(t,l)}static lte_tolerance(e,t,l){return C(e).lte_tolerance(t,l)}static gt_tolerance(e,t,l){return C(e).gt_tolerance(t,l)}static gte_tolerance(e,t,l){return C(e).gte_tolerance(t,l)}static pLog10(e){return C(e).pLog10()}static absLog10(e){return C(e).absLog10()}static log10(e){return C(e).log10()}static log(e,t){return C(e).log(t)}static log2(e){return C(e).log2()}static ln(e){return C(e).ln()}static logarithm(e,t){return C(e).logarithm(t)}static pow(e,t){return C(e).pow(t)}static pow10(e){return C(e).pow10()}static root(e,t){return C(e).root(t)}static factorial(e,t){return C(e).factorial()}static gamma(e,t){return C(e).gamma()}static lngamma(e,t){return C(e).lngamma()}static exp(e){return C(e).exp()}static sqr(e){return C(e).sqr()}static sqrt(e){return C(e).sqrt()}static cube(e){return C(e).cube()}static cbrt(e){return C(e).cbrt()}static tetrate(e,t=2,l=De(1,0,1)){return C(e).tetrate(t,l)}static iteratedexp(e,t=2,l=De(1,0,1)){return C(e).iteratedexp(t,l)}static iteratedlog(e,t=10,l=1){return C(e).iteratedlog(t,l)}static layeradd10(e,t){return C(e).layeradd10(t)}static layeradd(e,t,l=10){return C(e).layeradd(t,l)}static slog(e,t=10){return C(e).slog(t)}static lambertw(e){return C(e).lambertw()}static ssqrt(e){return C(e).ssqrt()}static pentate(e,t=2,l=De(1,0,1)){return C(e).pentate(t,l)}static affordGeometricSeries(e,t,l,i){return this.affordGeometricSeries_core(C(e),C(t),C(l),i)}static sumGeometricSeries(e,t,l,i){return this.sumGeometricSeries_core(e,C(t),C(l),i)}static affordArithmeticSeries(e,t,l,i){return this.affordArithmeticSeries_core(C(e),C(t),C(l),C(i))}static sumArithmeticSeries(e,t,l,i){return this.sumArithmeticSeries_core(C(e),C(t),C(l),C(i))}static efficiencyOfPurchase(e,t,l){return this.efficiencyOfPurchase_core(C(e),C(t),C(l))}static randomDecimalForTesting(e){if(Math.random()*20<1)return De(0,0,0);const t=Math.random()>.5?1:-1;if(Math.random()*20<1)return De(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)),ye(t,l,o)}static affordGeometricSeries_core(e,t,l,i){const o=t.mul(l.pow(i));return x.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(x.sub(1,l.pow(e))).div(x.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<Ln)return this.layer+=1,this.mag=Math.log10(this.mag),this;let e=Math.abs(this.mag),t=Math.sign(this.mag);if(e>=qn)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e<Gn&&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 A=parseFloat(t[0]),v=parseFloat(t[1]),_=t[1].split(";");let N=1;if(_.length===2&&(N=parseFloat(_[1]),isFinite(N)||(N=1)),isFinite(A)&&isFinite(v)){const D=x.pentate(A,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 A=parseFloat(l[0]),v=parseFloat(l[1]),_=l[1].split(";");let N=1;if(_.length===2&&(N=parseFloat(_[1]),isFinite(N)||(N=1)),isFinite(A)&&isFinite(v)){const D=x.tetrate(A,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 A=parseFloat(i[0]),v=parseFloat(i[1]);if(isFinite(A)&&isFinite(v)){const _=x.pow(A,v);return this.sign=_.sign,this.layer=_.layer,this.mag=_.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 A=parseFloat(d[1]);if(isFinite(A)||(A=1),isFinite(o)&&isFinite(r)){const v=x.tetrate(o,r,A);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 A=parseFloat(d[1]);if(isFinite(A)||(A=1),isFinite(o)&&isFinite(r)){const v=x.tetrate(o,r,A);return this.sign=v.sign,this.layer=v.layer,this.mag=v.mag,this}}const c=e.split("e"),p=c.length-1;if(p===0){const A=parseFloat(e);if(isFinite(A))return this.fromNumber(A)}else if(p===1){const A=parseFloat(e);if(isFinite(A)&&A!==0)return this.fromNumber(A)}const m=e.split("e^");if(m.length===2){this.sign=1,m[0].charAt(0)=="-"&&(this.sign=-1);let A="";for(let v=0;v<m[1].length;++v){const _=m[1].charCodeAt(v);if(_>=43&&_<=57||_===101)A+=m[1].charAt(v);else return this.layer=parseFloat(A),this.mag=parseFloat(m[1].substr(v+1)),this.normalize(),this}}if(p<1)return this.sign=0,this.layer=0,this.mag=0,this;const b=parseFloat(c[0]);if(b===0)return this.sign=0,this.layer=0,this.mag=0,this;let h=parseFloat(c[c.length-1]);if(p>=2){const A=parseFloat(c[c.length-2]);isFinite(A)&&(h*=Math.sign(A),h+=wa(A))}if(!isFinite(b))this.sign=c[0]==="-"?-1:1,this.layer=p,this.mag=h;else if(p===1)this.sign=Math.sign(b),this.layer=1,this.mag=h+Math.log10(Math.abs(b));else if(this.sign=Math.sign(b),this.layer=p,p===2){const A=x.mul(ye(1,2,h),C(b));return this.sign=A.sign,this.layer=A.layer,this.mag=A.mag,this}else this.mag=h;return this.normalize(),this}fromValue(e){return e instanceof x||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<=ja?(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<=ja?(this.sign===-1?"-":"")+"e".repeat(this.layer)+cl(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+cl(this.mag,e)}abs(){return De(this.sign===0?0:1,this.layer,this.mag)}neg(){return De(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?x.dZero:this.layer===0?ye(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?x.dZero:this.layer===0?ye(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?x.dZero:this.layer===0?ye(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?x.dZero:this.layer===0?ye(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=C(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 De(0,0,0);let l,i;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(x.cmpabs(this,t)>0?(l=this,i=t):(l=t,i=this),l.layer===0&&i.layer===0)return C(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))>ba)return l;{const d=Math.pow(10,Math.log10(l.mag)-i.mag),c=i.sign+l.sign*d;return ye(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))>ba)return l;{const d=Math.pow(10,l.mag-Math.log10(i.mag)),c=i.sign+l.sign*d;return ye(Math.sign(c),1,Math.log10(i.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(l.mag-i.mag)>ba)return l;{const d=Math.pow(10,l.mag-i.mag),c=i.sign+l.sign*d;return ye(Math.sign(c),1,i.mag+Math.log10(Math.abs(c)))}}plus(e){return this.add(e)}sub(e){return this.add(C(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=C(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return De(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return De(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 C(l.sign*i.sign*l.mag*i.mag);if(l.layer>=3||l.layer-i.layer>=2)return ye(l.sign*i.sign,l.layer,l.mag);if(l.layer===1&&i.layer===0)return ye(l.sign*i.sign,1,l.mag+Math.log10(i.mag));if(l.layer===1&&i.layer===1)return ye(l.sign*i.sign,1,l.mag+i.mag);if(l.layer===2&&i.layer===1){const o=ye(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ye(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)));return ye(l.sign*i.sign,o.layer+1,o.sign*o.mag)}if(l.layer===2&&i.layer===2){const o=ye(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ye(Math.sign(i.mag),i.layer-1,Math.abs(i.mag)));return ye(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=C(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?x.dNaN:this.layer===0?ye(this.sign,0,1/this.mag):ye(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=C(e);return this.sign>t.sign?1:this.sign<t.sign?-1:this.sign*this.cmpabs(e)}cmpabs(e){const t=C(e),l=this.mag>0?this.layer:-this.layer,i=t.mag>0?t.layer:-t.layer;return l>i?1:l<i?-1:this.mag>t.mag?1:this.mag<t.mag?-1:0}compare(e){return this.cmp(e)}isNan(){return isNaN(this.sign)||isNaN(this.layer)||isNaN(this.mag)}isFinite(){return isFinite(this.sign)&&isFinite(this.layer)&&isFinite(this.mag)}eq(e){const t=C(e);return this.sign===t.sign&&this.layer===t.layer&&this.mag===t.mag}equals(e){return this.eq(e)}neq(e){return!this.eq(e)}notEquals(e){return this.neq(e)}lt(e){return this.cmp(e)===-1}lte(e){return!this.gt(e)}gt(e){return this.cmp(e)===1}gte(e){return!this.lt(e)}max(e){const t=C(e);return this.lt(t)?t:this}min(e){const t=C(e);return this.gt(t)?t:this}maxabs(e){const t=C(e);return this.cmpabs(t)<0?t:this}minabs(e){const t=C(e);return this.cmpabs(t)>0?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=C(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=C(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=wa(o)),this.layer<l.layer&&(i=wa(i)),Math.abs(i-o)<=t*Math.max(Math.abs(i),Math.abs(o))}equals_tolerance(e,t){return this.eq_tolerance(e,t)}neq_tolerance(e,t){return!this.eq_tolerance(e,t)}notEquals_tolerance(e,t){return this.neq_tolerance(e,t)}lt_tolerance(e,t){const l=C(e);return!this.eq_tolerance(l,t)&&this.lt(l)}lte_tolerance(e,t){const l=C(e);return this.eq_tolerance(l,t)||this.lt(l)}gt_tolerance(e,t){const l=C(e);return!this.eq_tolerance(l,t)&&this.gt(l)}gte_tolerance(e,t){const l=C(e);return this.eq_tolerance(l,t)||this.gt(l)}pLog10(){return this.lt(x.dZero)?x.dZero:this.log10()}absLog10(){return this.sign===0?x.dNaN:this.layer>0?ye(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ye(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?x.dNaN:this.layer>0?ye(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ye(this.sign,0,Math.log10(this.mag))}log(e){return e=C(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?x.dNaN:this.layer===0&&e.layer===0?ye(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):x.div(this.log10(),e.log10())}log2(){return this.sign<=0?x.dNaN:this.layer===0?ye(this.sign,0,Math.log2(this.mag)):this.layer===1?ye(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?ye(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):ye(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?x.dNaN:this.layer===0?ye(this.sign,0,Math.log(this.mag)):this.layer===1?ye(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?ye(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):ye(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=C(e),l=this,i=t;if(l.sign===0)return i.eq(0)?De(1,0,1):l;if(l.sign===1&&l.layer===0&&l.mag===1)return l;if(i.sign===0)return De(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:x.dNaN:o}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return x.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 ye(1,0,t);if(e.sign===0)return x.dOne;e=De(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?ye(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?ye(-e.sign,e.layer+1,-e.mag):x.dOne}pow_base(e){return C(e).pow(this)}root(e){const t=C(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?x.exp(x.mul(this,x.ln(this).sub(1))):x.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(De(1,0,24)))return C(Wn(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 x.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,x.exp(t)}else return this.layer===1?x.exp(x.mul(this,x.ln(this).sub(1))):x.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?x.dOne:this.layer===0&&this.mag<=709.7?C(Math.exp(this.sign*this.mag)):this.layer===0?ye(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?ye(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):ye(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return C(Math.sqrt(this.sign*this.mag));if(this.layer===1)return ye(1,2,Math.log10(this.mag)-.3010299956639812);{const e=x.div(De(this.sign,this.layer-1,this.mag),De(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=De(1,0,1)){if(e===1)return x.pow(this,t);if(e===0)return new x(t);if(this.eq(x.dOne))return x.dOne;if(this.eq(-1))return x.pow(this,t);if(e===Number.POSITIVE_INFINITY){const o=this.toNumber();if(o<=1.444667861009766&&o>=.06598803584531254){if(o>1.444667861009099)return new x(Math.E);const r=x.ln(this).neg();return r.lambertw().div(r)}else return o>1.444667861009766?new x(Number.POSITIVE_INFINITY):x.dNaN}if(this.eq(x.dZero)){let o=Math.abs((e+1)%2);return o>1&&(o=2-o),new x(o)}if(e<0)return x.iteratedlog(t,this,-e);t=C(t);const l=e;e=Math.trunc(e);const i=l-e;if(this.gt(x.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let o=0;o<e;++o){const r=t;if(t=this.pow(t),r.eq(t))return t}if(i!=0){const o=this.pow(t);return t.mul(1-i).add(o.mul(i))}return t}i!==0&&(t.eq(x.dOne)?this.gt(10)?t=this.pow(i):(t=C(x.tetrate_critical(this.toNumber(),i)),this.lt(2)&&(t=t.sub(1).mul(this.minus(1)).plus(1))):this.eq(10)?t=t.layeradd10(i):t=t.layeradd(i,this));for(let o=0;o<e;++o){if(t=this.pow(t),!isFinite(t.layer)||!isFinite(t.mag))return t.normalize();if(t.layer-this.layer>3)return De(t.sign,t.layer+(e-o-1),t.mag);if(o>1e4)return t}return t}iteratedexp(e=2,t=De(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return x.tetrate(e,-t,this);e=C(e);let l=C(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;r<t;++r){if(l=l.log(e),!isFinite(l.layer)||!isFinite(l.mag))return l.normalize();if(r>1e4)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=C(e),e.lte(x.dZero)||e.eq(x.dOne))return x.dNaN;if(e.lt(x.dOne))return this.eq(x.dOne)?x.dZero:this.eq(x.dZero)?x.dNegOne:x.dNaN;if(this.mag<0||this.eq(x.dZero))return x.dNegOne;let t=0,l=C(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(x.dZero))l=x.pow(e,l),t-=1;else{if(l.lte(x.dOne))return C(t+x.slog_critical(e.toNumber(),l.toNumber()));t+=1,l=x.log(l,e)}return C(t)}static slog_critical(e,t){return e>10?t-1:x.critical_section(e,t,jn)}static tetrate_critical(e,t){return x.critical_section(e,t,Hn)}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;c<Cl.length;++c)if(Cl[c]==e){i=l[c][Math.floor(t)],o=l[c][Math.ceil(t)];break}else if(Cl[c]<e&&Cl[c+1]>e){const p=(e-Cl[c])/(Cl[c+1]-Cl[c]);i=l[c][Math.floor(t)]*(1-p)+l[c+1][Math.floor(t)]*p,o=l[c][Math.ceil(t)]*(1-p)+l[c+1][Math.ceil(t)]*p;break}const r=t-Math.floor(t);return i*(1-r)+o*r}layeradd10(e){e=x.fromValue_noAlloc(e).toNumber();const t=C(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?x.tetrate(t,i):Number.isFinite(i)?i>=-1?x.log(x.tetrate(t,i+1),t):x.log(x.log(x.tetrate(t,i+2),t),t):x.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return C(Wa(this.toNumber()));if(this.layer===0)return C(Wa(this.sign*this.mag));if(this.layer===1)return Ja(this);if(this.layer===2)return Ja(this);if(this.layer>=3)return De(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return De(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=De(1,0,1)){t=C(t);const l=e;e=Math.trunc(e);const i=l-e;i!==0&&(t.eq(x.dOne)?(++e,t=new x(i)):this.eq(10)?t=t.layeradd10(i):t=t.layeradd(i,this));for(let o=0;o<e;++o){if(t=this.tetrate(t.toNumber()),!isFinite(t.layer)||!isFinite(t.mag))return t.normalize();if(o>10)return t}return t}sin(){return this.mag<0?this:this.layer===0?C(Math.sin(this.sign*this.mag)):De(0,0,0)}cos(){return this.mag<0?x.dOne:this.layer===0?C(Math.cos(this.sign*this.mag)):De(0,0,0)}tan(){return this.mag<0?this:this.layer===0?C(Math.tan(this.sign*this.mag)):De(0,0,0)}asin(){return this.mag<0?this:this.layer===0?C(Math.asin(this.sign*this.mag)):De(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?C(Math.acos(this.toNumber())):this.layer===0?C(Math.acos(this.sign*this.mag)):De(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?C(Math.atan(this.sign*this.mag)):C(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 x.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return x.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?De(Number.NaN,Number.NaN,Number.NaN):x.ln(this.add(1).div(C(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(x.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=x;a.dZero=De(0,0,0);a.dOne=De(1,0,1);a.dNegOne=De(-1,0,1);a.dTwo=De(1,0,2);a.dTen=De(1,0,10);a.dNaN=De(Number.NaN,Number.NaN,Number.NaN);a.dInf=De(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);a.dNegInf=De(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);a.dNumberMax=ye(1,0,Number.MAX_VALUE);a.dNumberMin=ye(1,0,Number.MIN_VALUE);const Jn=new a(1);function ql(e,t,l=!0){let i=a.log10(e).floor(),o=a.div(e,a.pow(10,i));o.toStringWithDecimalPlaces(t)==="10"&&(o=Jn,i=i.add(1));const r=i.gte(1e9)?ke(i,Math.max(Math.max(t,3),Ve.defaultDecimalsShown)):i.gte(1e4)?ia(i,0):i.toStringWithDecimalPlaces(0);return l?o.toStringWithDecimalPlaces(t)+"e"+r:"e"+r}function ia(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 pi(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()),Ve.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const Kn=new a("eeee1000"),zn=new a("e100000"),Ka=new a("e1000"),mi=new a(1e9),Xn=new a(1e6),Yn=new a(1e3),Zn=new a(.98),eo=new a(.001),vi=new a(0);function ke(e,t,l){if(t==null&&(t=Ve.defaultDecimalsShown),l=l!=null?l:Ve.defaultShowSmall,e=new a(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+ke(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(Kn)){const i=e.slog();return i.gte(Xn)?"F"+ke(i.floor()):a.pow(10,i.sub(i.floor())).toStringWithDecimalPlaces(3)+"F"+ia(i.floor(),0)}else{if(e.gte(zn))return ql(e,0,!1);if(e.gte(Ka))return ql(e,0);if(e.gte(mi))return ql(e,t);if(e.gte(Yn))return ia(e,0);if(e.gte(eo)||!l)return pi(e,t);if(e.eq(vi))return 0 .toFixed(t)}return e=fi(e),e.lt(Ka)?ql(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):ke(e,t)+"\u207B\xB9"}function be(e){return e=new a(e),e.sign<0?"-"+be(e.neg()):e.gte(mi)||e.lte(Zn)&&!e.eq(vi)?ke(e):ke(e,0)}function Sa(e,t){return t==null&&(t=Ve.defaultDecimalsShown),a.lt(e,0)?"-"+Sa(a.neg(e),t):a.gt(e,2**51)?ke(a.div(e,31536e3))+"y":(e=new a(e).toNumber(),e<60?ke(e)+"s":e<3600?be(Math.floor(e/60))+"m "+ke(e%60,t)+"s":e<86400?be(Math.floor(e/3600))+"h "+be(Math.floor(e/60)%60)+"m "+be(e%60)+"s":e<31536e3?be(Math.floor(e/84600)%365)+"d "+be(Math.floor(e/3600)%24)+"h "+be(Math.floor(e/60)%60)+"m":be(Math.floor(e/31536e3))+"y "+be(Math.floor(e/84600)%365)+"d "+be(Math.floor(e/3600)%24)+"h")}function to(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 lo(e,t){return ke(e,t,!0)}function fi(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 gi(e,t,l=a.dOne){let i=e[0][0],o=e[0][1];for(let r=1;r<e.length;r++)a.lt(e[r][0],i)&&(i=e[r][0],o=e[r][1]);return ke(a.times(i,l))+t+", limited by "+o}function hi(e){return{[-1]:`${ke(e)}/s`,0:"",1:`+${ke(e)}/s`}[a.compare(e,0)]}var ao=Object.freeze(Object.defineProperty({__proto__:null,default:a,exponentialFormat:ql,commaFormat:ia,regularFormat:pi,format:ke,formatWhole:be,formatTime:Sa,toPlaces:to,formatSmall:lo,invertOOM:fi,formatLimit:gi,formatGain:hi},Symbol.toStringTag,{value:"Module"}));const{exponentialFormat:io,commaFormat:no,regularFormat:oo,format:L,formatWhole:X,formatTime:Wl,toPlaces:so,formatSmall:ro,formatLimit:yi,invertOOM:uo,formatGain:na}=ao;window.Decimal=a;window.exponentialFormat=io;window.commaFormat=no;window.regularFormat=oo;window.format=L;window.formatWhole=X;window.formatTime=Wl;window.toPlaces=so;window.formatSmall=ro;window.formatLimit=yi;window.invertOOM=uo;window.formatGain=na;function bi(e){let t=e.replace(/([A-Z])/g," $1");return t=t.charAt(0).toUpperCase()+t.slice(1),t}function _a(e){return typeof e=="function"}var Pe=(e=>(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(Pe||{});const Ql=Symbol("DoNotCache");function z(e,t){const l=e[t];_a(l)&&l.length===0&&!l[Ql]?e[t]=f(l.bind(e)):_a(l)&&(e[t]=l.bind(e),e[t][Ql]=!0)}function Et(e){return _a(e)&&!e[Ql]&&(e=f(e)),e}const yl=Symbol("Component"),bl=Symbol("GatherProps");let co=0;function Tl(e="feature-"){return e+co++}var bt=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(bt||{});function B(e){return e[Ql]=!0,e}function y(e,t=2){return e?0:t}function St(e,t,l){e[t]===void 0&&l!=null&&(e[t]=l)}function wi(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)&&!ht(d)&&i(d))})};return i(e),l}const kl={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 Ba=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(Ba||{}),Fl={classic:kl,paper:{...kl,variables:{...kl.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:{...kl,variables:{...kl.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:{...kl,variables:{...kl.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const Ke=ui();document.fonts.onloadingdone=()=>Ke.emit("fontsLoaded");var po=Object.freeze(Object.defineProperty({__proto__:null,globalBus:Ke},Symbol.toStringTag,{value:"Module"}));var qe=(e,t)=>{const l=e.__vccOpts||e;for(const[i,o]of t)l[i]=o;return l};const mo=we({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var b;const l=V({}),i=new ResizeObserver(c),o=V(null);ra(()=>{const h=o.value;h!=null&&i.observe(h)});let r=!0,d=V((b=o.value)==null?void 0:b.getBoundingClientRect());function c(){r&&(r=!1,_l(()=>{var h;d.value=(h=o.value)==null?void 0:h.getBoundingClientRect(),Object.values(l.value).filter(A=>A).forEach(A=>A.rect=A.element.getBoundingClientRect()),t("updateNodes",l.value),r=!0}))}Ke.on("fontsLoaded",c);const p={attributes:!1,childList:!0,subtree:!1};Zl(Ma,(h,A)=>{const v=new MutationObserver(()=>m(h));v.observe(A,p),l.value[h]={element:A,observer:v,rect:A.getBoundingClientRect()},c()}),Zl(Na,h=>{var A;(A=l.value[h])==null||A.observer.disconnect(),l.value[h]=void 0,c()}),Zl(xa,l),Zl(Ia,d);function m(h){const A=l.value[h];A!=null&&(A.rect=A.element.getBoundingClientRect(),t("updateNodes",l.value))}return(h,A)=>(k(),I(S,null,[Qt(h.$slots,"default",{},void 0,!0),g("div",{ref_key:"resizeListener",ref:o,class:"resize-listener"},null,512)],64))}});var Ai=qe(mo,[["__scopeId","data-v-2b1dc1bc"]]);const vo=["onPointerdown"],fo={class:"modal-wrapper"},go={class:"modal-container"},ho={class:"modal-header"},yo=s(" default header "),bo={class:"modal-body"},wo=s(" default body "),Ao={class:"modal-footer"},Co=g("div",{class:"modal-default-flex-grow"},null,-1),wt=we({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:l}){const o=Bt(e),r=f(()=>o.modelValue||c.value);function d(){l("update:modelValue",!1)}const c=V(!1),p=V(null),m=f(()=>{var b,h;return(h=(b=p.value)==null?void 0:b.nodes)!=null?h:null});return t({isOpen:r,nodes:m}),(b,h)=>(k(),he(tn,{to:"#modal-root"},[n(da,{name:"modal",onBeforeEnter:h[0]||(h[0]=A=>c.value=!0),onAfterLeave:h[1]||(h[1]=A=>c.value=!1)},{default:ce(()=>[ua(g("div",Sl({class:"modal-mask",onPointerdown:Ll(d,["self"])},b.$attrs),[g("div",fo,[g("div",go,[g("div",ho,[Qt(b.$slots,"header",{shown:u(r)},()=>[yo])]),g("div",bo,[n(Ai,{ref_key:"contextRef",ref:p},{default:ce(()=>[Qt(b.$slots,"body",{shown:u(r)},()=>[wo])]),_:3},512)]),g("div",Ao,[Qt(b.$slots,"footer",{shown:u(r)},()=>[g("div",{class:"modal-default-footer"},[Co,g("button",{class:"button modal-default-button",onClick:d}," Close ")])])])])])],16,vo),[[oi,e.modelValue]])]),_:3})]))}}),Ma=Symbol("RegisterNode"),Na=Symbol("UnregisterNode"),xa=Symbol("Nodes"),Ia=Symbol("Bounds"),_t=ca({});window.layers=_t;const xl={},Wt=[];function Rt(e,t){return Ot(()=>{const l={},i=l.emitter=ui();if(l.on=i.on.bind(i),l.emit=i.emit.bind(i),l.nodes=V({}),l.id=e,Wt.push(e),xl[e]=new Set,l.minimized=_e(!1),Object.assign(l,t.call(l)),Wt[Wt.length-1]==null||Wt[Wt.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
|
|
Stack: ${Wt}
|
|
Trying to pop ${l.id}`;return Wt.pop(),z(l,"color"),z(l,"display"),z(l,"name"),St(l,"name",l.id),z(l,"minWidth"),St(l,"minWidth",600),z(l,"minimizable"),St(l,"minimizable",!0),l})}function Ci(e,t){if(console.info("Adding layer",e.id),_t[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,_t[e.id]);return}St(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),_t[e.id]=e,Ke.emit("addLayer",e,t.layers[e.id])}function ko(e){return _t[e]}function ki(e){console.info("Removing layer",e.id),Ke.emit("removeLayer",e),_t[e.id]=void 0}function Eo(e){ki(e),Ci(e,ue)}function _o(e){const t=V(!1);return{openModal:()=>t.value=!0,modal:B(()=>n(wt,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>n("h2",null,[u(e.name)]),body:u(e.display)}))}}Ke.on("update",function(t){Object.values(_t).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(_t).forEach(l=>{l==null||l.emit("update",t)}),Object.values(_t).forEach(l=>{l==null||l.emit("postUpdate",t)})});var So=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ma,UnregisterNodeInjectionKey:Na,NodesInjectionKey:xa,BoundsInjectionKey:Ia,layers:_t,persistentRefs:xl,addingLayers:Wt,createLayer:Rt,addLayer:Ci,getLayer:ko,removeLayer:ki,reloadLayer:Eo,setupLayerModal:_o},Symbol.toStringTag,{value:"Module"}));const Da=Symbol("PersistentState"),fl=Symbol("DefaultValue"),oa=Symbol("StackTrace"),Ei=Symbol("Deleted"),$l=Symbol("NonPersistent"),Gl=Symbol("SaveDataPath");function Bo(){var e;return((e=new Error().stack)==null?void 0:e.split(`
|
|
`).slice(3,5).map(t=>t.trim()).join(`
|
|
`))||""}function _e(e){const t=ht(e)?e:V(e);t[Da]=t,t[fl]=ht(e)?e.value:e,t[oa]=Bo(),t[Ei]=!1;const l=f({get(){return t.value},set(i){t.value=i}});return l[fl]=t[fl],t[$l]=l,t[Gl]=void 0,Wt.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
|
|
Created at:
|
|
`+t[oa]):xl[Wt[Wt.length-1]].add(t),t}function Mo(e){return e&&typeof e=="object"&&Da in e}function F(e){return e[$l]}Ke.on("addLayer",(e,t)=>{const l=[],i=(o,r=[])=>{let d=!1;return Object.keys(o).forEach(c=>{let p=o[c];if(p&&typeof p=="object")if(ot in p&&(p=p[ot]),Mo(p)){if(d=!0,p[Ei]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,`
|
|
Created at:
|
|
`+p[oa]);return}xl[e.id].delete(p);const m=[e.id,...r,c];p[Gl]!=null&&JSON.stringify(m)!==JSON.stringify(p[Gl])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[Gl].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Gl]=m;const b=r.reduce((A,v)=>(v in A||(A[v]={}),A[v]),t),h=b[c];b[c]=p[Da],ln(b)?h!=null?b[c]=h:b[c]=p[fl]:h!=null?b[c].value=h:b[c].value=p[fl]}else!(p instanceof a)&&!ht(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),i(p,[...r,c])&&(Ea(p)&&!Ea(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.",ot in o?o[ot]:o,c):d=!0))}),d};i(e[ot]),xl[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[oa])}),xl[e.id].clear()});const ot=Symbol("ProxyState"),Nl=Symbol("ProxyPath");function Ot(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===ot)return o();const c=o()[d];return c&&typeof c=="object"&&$l in c?c[$l]:c},set(r,d,c){return o()[d]=c,!0},has(r,d){return d===ot?!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 rt=window.state=ca({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const _i=jl({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Si(e){return JSON.stringify(e,(t,l)=>u(l))}const Bi={get(e,t){var i;if(t===ot||t===Nl)return e[t];const l=e[ot][t];if(t!=="value"&&(un(l)||Array.isArray(l))){if(l!==((i=e[t])==null?void 0:i[ot])){const o=[...e[Nl],t];e[t]=new Proxy({[ot]:l,[Nl]:o},Bi)}return e[t]}return l},set(e,t,l,i){if(!rt.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof a&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const o=e[ot][t];if(!(typeof o=="number"&&isNaN(o)||o instanceof a&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.mag))))throw _i.autosave=!1,rt.hasNaN=!0,rt.NaNPath=[...e[Nl],t],rt.NaNReceiver=i,console.error("Attempted to set NaN value",[...e[Nl],t],e[ot]),"Attempted to set NaN value. See above for details"}return e[ot][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[ot])},has(e,t){return Reflect.has(e[ot],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[ot],t)}};var ue=window.player=new Proxy({[ot]:_i,[Nl]:["player"]},Bi);function Mi(e={}){return Object.assign({id:`${Ve.id}-0`,name:"Default Save",tabs:Ve.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Ve.id,modVersion:Ve.versionNumber,layers:{}},e)}function Jt(e){const t=ml.compressToUTF16(Si(e!=null?e:ue[ot]));return localStorage.setItem((e!=null?e:ue[ot]).id,t),t}async function No(){Io();try{let e=localStorage.getItem(at.active);if(e==null){await El(Il());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=ml.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==Ve.id){await El(Il());return}t.id=at.active,await El(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
|
|
`,e),await El(Il())}}function Il(){const e=ta(),t=Mi({id:e});return Jt(t),at.saves.push(e),t}function ta(){let e,t=0;do e=`${Ve.id}-${t++}`;while(localStorage.getItem(e));return e}const Pa=V(!1);async function El(e){console.info("Loading save",e),Pa.value=!0;const{layers:t,removeLayer:l,addLayer:i}=await aa(()=>Promise.resolve().then(function(){return So}),void 0),{fixOldSave:o,getInitialLayers:r}=await aa(()=>Promise.resolve().then(function(){return Nr}),void 0);for(const d in t){const c=t[d];c&&l(c)}r(e).forEach(d=>i(d,e)),e=Mi(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,Ve.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Ve.versionNumber&&(o(e.modVersion,e),e.modVersion=Ve.versionNumber),Object.assign(ue,e),at.active=ue.id,Ke.emit("onLoad")}setInterval(()=>{ue.autosave&&Jt()},1e3);window.onbeforeunload=()=>{ue.autosave&&Jt()};window.save=Jt;const xo=window.hardReset=async()=>{await El(Il())},Vl=jl({active:"",saves:[],showTPS:!0,theme:Ba.Nordic,unthrottled:!1});Xt(Vl,e=>{const t=ml.compressToUTF16(JSON.stringify(e));localStorage.setItem(Ve.id,t)},{deep:!0});var at=window.settings=Vl;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Ba.Nordic};Ke.emit("loadSettings",e),Object.assign(Vl,e),xo()};function Io(){try{let e=localStorage.getItem(Ve.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=ml.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Vl,t)}Ke.emit("loadSettings",Vl)}catch{}}const Ni=jl([]);function Do(e){Ni.push(e)}const xi=jl([]);function Po(e){xi.push(e)}const To=jl([]),Fo={class:"table"},Ut=we({__name:"Column",setup(e){const t=f(()=>Fl[at.theme].mergeAdjacent);return(l,i)=>(k(),I("div",Fo,[g("div",{class:ct(["col",{mergeAdjacent:u(t)}])},[Qt(l.$slots,"default")],2)]))}}),Uo={class:"table"},Pl=we({__name:"Row",setup(e){const t=f(()=>Fl[at.theme].mergeAdjacent);return(l,i)=>(k(),I("div",Uo,[g("div",{class:ct(["row",{mergeAdjacent:u(t)}])},[Qt(l.$slots,"default")],2)]))}});function Ta(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!an(e)}function Oe(e,t="span"){return typeof e=="function"?we({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),we({template:e})):we({render:()=>({})}):e}function oe(e){if(nl(e))return typeof e=="function"?e():Oe(e);const t=e[yl];return n(t,e[bl](),null)}function Xe(...e){let t;return n(Pl,null,Ta(t=e.map(oe))?t:{default:()=>[t]})}function Vt(...e){let t;return n(Ut,null,Ta(t=e.map(oe))?t:{default:()=>[t]})}function Bl(...e){return n("div",{class:"table-grid"},[e.map(t=>n("div",{class:{["row-grid"]:!0,mergeAdjacent:Fl[at.theme].mergeAdjacent}},[t.map(oe)]))])}function zt(e){if(nl(e))return typeof e=="function"?e():typeof e=="string"?n(S,null,[e]):n(e,null,null);const t=e[yl];return n(t,e[bl](),null)}function Ro(...e){let t;return n(Ut,null,Ta(t=e.map(zt))?t:{default:()=>[t]})}function nl(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Ql]===!0}function Ii(e,t,l){const i=V(null),o=V(void 0);function r(p){i.value||(i.value=setInterval(c,250)),o.value=p,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 si(d),{start:r,stop:d,handleHolding:c}}function Oo(e,t){const l=f(()=>e.filter(i=>u(i.visibility)===bt.Visible&&t(i)));return{firstFeature:f(()=>l.value[0]),collapsedContent:B(()=>Vt(...l.value.slice(1))),hasCollapsedContent:f(()=>l.value.length>1)}}function sa(e,t="div"){const l=$t();return qt(()=>{l.value=Oe(kt(e),t)}),l}function hl(e,t="div"){const l=$t(null);return qt(()=>{const i=kt(e);l.value=i==null?null:Oe(i,t)}),l}function qo(e){return f(()=>kt(e))}function kt(e){return u(u(e))}function Y(...e){return e.includes(Object)||e.push(Object),e}const Ee=we({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(k(),I("div",{style:yt({width:e.width,height:e.height})},null,4))}});const Go={},Lo={class:"notif"};function Qo(e,t){return k(),I("div",Lo,"!")}var za=qe(Go,[["render",Qo],["__scopeId","data-v-66323fd4"]]),$o=we({props:{element:Object,display:{type:Y(Object,String,Function),required:!0},style:Y(Object,String,Array),classes:Y(Object),direction:Y(String),xoffset:Y(String),yoffset:Y(String),pinned:Object},setup(e){const{element:t,display:l,pinned:i}=Bt(e),o=V(!1),r=f(()=>(kt(i)||o.value)&&d.value),d=hl(l),c=$t(Oe(B(()=>{const b=kt(t);return b==null?"":zt(b)})));function p(b){const h=i;b.shiftKey&&h&&(h.value=!h.value,b.stopPropagation(),b.preventDefault())}const m=f(()=>kt(i)&&Fl[at.theme].showPin);return{Direction:Pe,isHovered:o,isShown:r,comp:d,elementComp:c,unref:u,togglePinned:p,showPin:m}}});const Vo={key:0,class:"material-icons pinned"};function Ho(e,t,l,i,o,r){return k(),I("div",{class:ct(["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))},[Qt(e.$slots,"default",{},void 0,!0),e.elementComp?(k(),he(it(e.elementComp),{key:0})):G("",!0),n(da,{name:"fade"},{default:ce(()=>{var d;return[e.isShown?(k(),I("div",{key:0,class:ct(["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:yt([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(d=e.unref(e.style))!=null?d:{}])},[e.showPin?(k(),I("span",Vo,"push_pin")):G("",!0),e.comp?(k(),he(it(e.comp),{key:1})):G("",!0)],6)):G("",!0)]}),_:1})],34)}var ut=qe($o,[["render",Ho],["__scopeId","data-v-6102fa3a"]]);const pa=e=>(ol("data-v-14ecc7bd"),e=e(),sl(),e),jo={key:0,class:"day feature dontMerge opened"},Wo={class:"date"},Jo=s("Dec"),Ko=pa(()=>g("br",null,null,-1)),zo={class:"date"},Xo=s("Dec"),Yo=pa(()=>g("br",null,null,-1)),Zo=pa(()=>g("div",{class:"doors"},null,-1)),es={class:"date"},ts=s("Dec"),ls=pa(()=>g("br",null,null,-1)),as={key:0,class:"material-icons lock"},is={key:1,class:"timer"},ns=we({__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(R.day.value,l.day)&&new Date().getMonth()===11&&new Date().getDate()>=l.day);function o(){i.value&&t("unlockLayer")}return(r,d)=>{var c,p,m;return e.opened.value?(k(),I("div",jo,[n(ut,{display:(m=(p=u(_t)[(c=e.layer)!=null?c:""])==null?void 0:p.name)!=null?m:"",direction:u(Pe).Up,yoffset:"5px"},{default:ce(()=>[n(da,{appear:"",name:"door"},{default:ce(()=>[g("div",{class:"doors",onClick:d[0]||(d[0]=b=>t("openLayer"))},[g("div",Wo,[Jo,Ko,s(Ne(e.day),1)]),g("div",zo,[Xo,Yo,s(Ne(e.day),1)])])]),_:1}),g("div",{class:"icon",onClick:d[1]||(d[1]=b=>t("openLayer")),style:yt({backgroundImage:`url(${e.symbol})`})},null,4),g("div",{class:"lore",onClick:d[2]||(d[2]=b=>t("openLore"))},"?"),u(e.shouldNotify)?(k(),he(za,{key:0})):G("",!0)]),_:1},8,["display","direction"])])):(k(),I("div",{key:1,class:ct(["day feature dontMerge",{can:u(i),locked:!u(i),canOpen:u(i)}]),onClick:o},[Zo,g("div",es,[ts,ls,s(Ne(e.day),1)]),u(i)?G("",!0):(k(),I("div",as,"lock")),u(R).day.value===e.day&&!u(i)?(k(),I("div",is,Ne(u(R).timeUntilNewDay.value<0?"NYI, sorry":u(Sa)(u(R).timeUntilNewDay.value,0)),1)):G("",!0),u(i)?(k(),he(za,{key:2})):G("",!0)],2))}}});var os=qe(ns,[["__scopeId","data-v-14ecc7bd"]]);const ss=we({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,l=sa(Yt(t,"display")),i=sa(Yt(t,"content"));return(o,r)=>(k(),he(Ut,{class:"collapsible-container"},{default:ce(()=>[g("button",{onClick:r[0]||(r[0]=d=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(k(),he(it(u(l))))]),e.collapsed.value?G("",!0):(k(),he(it(u(i)),{key:0}))]),_:1}))}});var rs=qe(ss,[["__scopeId","data-v-a72c16aa"]]);const us={key:0},ds={key:0,class:"mark star"},cs=["src"],ps=we({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,l)=>e.mark?(k(),I("div",us,[e.mark===!0?(k(),I("div",ds)):(k(),I("img",{key:1,class:"mark",src:e.mark},null,8,cs))])):G("",!0)}});var ma=qe(ps,[["__scopeId","data-v-2207999f"]]);const ms=we({__name:"Node",props:{id:null},setup(e){const l=Bt(e),i=la(Ma,()=>{}),o=la(Na,()=>{}),r=$t(null),d=f(()=>r.value&&r.value.parentElement);return Xt([d,l.id],([c,p],[m,b])=>{m&&o(u(b)),c&&i(p,c)}),si(()=>o(u(l.id))),(c,p)=>(k(),I("div",{class:"node",ref_key:"node",ref:r},null,512))}});var Jl=qe(ms,[["__scopeId","data-v-a48cb382"]]);const vs=we({props:{progress:{type:Y(String,Object,Number),required:!0},width:{type:Y(Number),required:!0},height:{type:Y(Number),required:!0},direction:{type:Y(String),required:!0},display:Y(Object,String,Function),visibility:{type:Y(Number),required:!0},style:Y(Object,String,Array),classes:Y(Object),borderStyle:Y(Object,String,Array),textStyle:Y(Object,String,Array),baseStyle:Y(Object,String,Array),fillStyle:Y(Object,String,Array),mark:Y(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:ma,Node:Jl},setup(e){const{progress:t,width:l,height:i,direction:o,display:r}=Bt(e),d=f(()=>{let m=t.value instanceof a?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(m,0),1))*100}),c=f(()=>{const m={width:kt(l)+.5+"px",height:kt(i)+.5+"px"};switch(u(o)){case Pe.Up:m.clipPath=`inset(${d.value}% -2px -2px -2px)`,m.width=kt(l)+2+"px";break;case Pe.Down:m.clipPath=`inset(-2px -2px ${d.value}% -2px)`,m.width=kt(l)+2+"px";break;case Pe.Right:m.clipPath=`inset(-2px ${d.value}% -2px -2px)`;break;case Pe.Left:m.clipPath=`inset(-2px -2px -2px ${d.value} + '%)`;break;case Pe.Default:m.clipPath="inset(-2px 50% -2px -2px)";break}return m}),p=hl(r);return{normalizedProgress:d,barStyle:c,component:p,unref:u,Visibility:bt}}});function fs(e,t,l,i,o,r){var p,m,b,h,A,v,_;const d=gl("MarkNode"),c=gl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),I("div",{key:0,style:yt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:{}]),class:ct({bar:!0,...e.unref(e.classes)})},[g("div",{class:"overlayTextContainer border",style:yt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(m=e.unref(e.borderStyle))!=null?m:{}])},[e.component?(k(),I("span",{key:0,class:"overlayText",style:yt(e.unref(e.textStyle))},[(k(),he(it(e.component)))],4)):G("",!0)],4),g("div",{class:"border",style:yt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(b=e.unref(e.style))!=null?b:{},(h=e.unref(e.baseStyle))!=null?h:{},(A=e.unref(e.borderStyle))!=null?A:{}])},[g("div",{class:"fill",style:yt([e.barStyle,(v=e.unref(e.style))!=null?v:{},(_=e.unref(e.fillStyle))!=null?_:{}])},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 gs=qe(vs,[["render",fs],["__scopeId","data-v-730cc7a0"]]);const hs=Symbol("Bar");function Ht(e){return Ot(()=>{const t=e();return t.id=Tl("bar-"),t.type=hs,t[yl]=gs,z(t,"visibility"),St(t,"visibility",bt.Visible),z(t,"width"),z(t,"height"),z(t,"direction"),z(t,"style"),z(t,"classes"),z(t,"borderStyle"),z(t,"baseStyle"),z(t,"textStyle"),z(t,"fillStyle"),z(t,"progress"),z(t,"display"),z(t,"mark"),t[bl]=function(){const{progress:l,width:i,height:o,direction:r,display:d,visibility:c,style:p,classes:m,borderStyle:b,textStyle:h,baseStyle:A,fillStyle:v,mark:_,id:N}=this;return{progress:l,width:i,height:o,direction:r,display:d,visibility:c,style:u(p),classes:m,borderStyle:b,textStyle:h,baseStyle:A,fillStyle:v,mark:_,id:N}},t})}var ys=we({props:{display:{type:Y(Object,String,Function),required:!0},visibility:{type:Y(Number),required:!0},style:Y(Object,String,Array),classes:Y(Object),onClick:Function,onHold:Function,canClick:{type:Y(Boolean),required:!0},small:Boolean,mark:Y(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:Jl,MarkNode:ma},setup(e){const{display:t,onClick:l,onHold:i}=Bt(e),o=$t("");qt(()=>{const c=kt(t);if(c==null){o.value="";return}if(nl(c)){o.value=Oe(c);return}const p=Oe(c.title||"","h3"),m=Oe(c.description,"div");o.value=Oe(B(()=>n("span",null,[c.title?n("div",null,[n(p,null,null)]):null,n(m,null,null)])))});const{start:r,stop:d}=Ii(l,i,e.isHolding);return{start:r,stop:d,comp:o,Visibility:bt,unref:u}}});function bs(e,t,l,i,o,r){var p;const d=gl("MarkNode"),c=gl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),I("button",{key:0,style:yt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:[]]),onClick:t[0]||(t[0]=(...m)=>e.onClick&&e.onClick(...m)),onMousedown:t[1]||(t[1]=(...m)=>e.start&&e.start(...m)),onMouseleave:t[2]||(t[2]=(...m)=>e.stop&&e.stop(...m)),onMouseup:t[3]||(t[3]=(...m)=>e.stop&&e.stop(...m)),onTouchstartPassive:t[4]||(t[4]=(...m)=>e.start&&e.start(...m)),onTouchendPassive:t[5]||(t[5]=(...m)=>e.stop&&e.stop(...m)),onTouchcancelPassive:t[6]||(t[6]=(...m)=>e.stop&&e.stop(...m)),class:ct({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(),he(it(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 Di=qe(ys,[["render",bs],["__scopeId","data-v-8cedd7da"]]);const ws=Symbol("Clickable");function Pt(e){return Ot(()=>{var l;const t=(l=e==null?void 0:e())!=null?l:{};if(t.id=Tl("clickable-"),t.type=ws,t[yl]=Di,t.isHolding=V(!1),z(t,"visibility"),St(t,"visibility",bt.Visible),z(t,"canClick"),St(t,"canClick",!0),z(t,"classes"),z(t,"style"),z(t,"mark"),z(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[bl]=function(){const{display:i,visibility:o,style:r,classes:d,onClick:c,onHold:p,isHolding:m,canClick:b,small:h,mark:A,id:v}=this;return{display:i,visibility:o,style:u(r),classes:d,onClick:c,onHold:p,isHolding:m,canClick:b,small:h,mark:A,id:v}},t})}function dt(e,t="points",l=0,i=void 0){const o=ht(e)?e:_e(e);if(o.displayName=t,o.precision=l,o.small=i,!ht(e)){const r=o[$l];r.displayName=t,r.precision=l,r.small=i}return o}function Xa(e){const t=_e(e.value);return Xt(e,l=>{Pa.value||a.gt(l,t.value)&&(t.value=l)}),t}function As(e){const t=_e(e.value);return Xt(e,(l,i)=>{Pa.value||a.gt(l,i)&&(t.value=a.add(t.value,a.sub(l,i)))}),t}new a("10^^8");new a("1e100");function Kl(e,t){const l=t!=null?t:e.value;return a.eq(e.precision,0)?X(e.small?l:a.floor(l)):L(l,e.precision,e.small)}const Cs=["x1","y1","x2","y2"],ks=we({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const l=Bt(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(),I("line",Sl({"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,Cs))}});const Es=we({__name:"Links",props:{links:null},setup(e){var p;const l=Yt(e,"links"),i=V(null),o=la(xa,V({})),r=la(Ia,V(void 0)),d=V((p=i.value)==null?void 0:p.getBoundingClientRect());Xt(r,()=>{var m;return d.value=(m=i.value)==null?void 0:m.getBoundingClientRect()}),ra(()=>{var m;return d.value=(m=i.value)==null?void 0:m.getBoundingClientRect()});const c=f(()=>{var b,h;const m=o.value;return(h=(b=l.value)==null?void 0:b.filter(A=>{var v,_;return((v=m[A.startNode.id])==null?void 0:v.rect)&&((_=m[A.startNode.id])==null?void 0:_.rect)}))!=null?h:[]});return(m,b)=>(k(),I(S,null,[u(c)?(k(),I("svg",nn(Sl({key:0},m.$attrs)),[(k(!0),I(S,null,ri(u(c),(h,A)=>(k(),he(ks,{key:A,link:h,boundingRect:d.value,startNode:u(o)[h.startNode.id],endNode:u(o)[h.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):G("",!0),g("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var _s=qe(Es,[["__scopeId","data-v-063f6d6b"]]);we({props:{nodes:{type:Y(Array),required:!0},leftSideNodes:Y(Array),rightSideNodes:Y(Array),branches:Y(Array)},components:{Links:_s},setup(e){const{nodes:t,leftSideNodes:l,rightSideNodes:i}=Bt(e),o=$t();qt(()=>{const c=kt(t);o.value=Oe(B(()=>n(S,null,[c.map(p=>n("span",{class:"row tree-row",style:"margin: 50px auto;"},[p.map(zt)]))])))});const r=$t();qt(()=>{const c=kt(l);r.value=c?Oe(B(()=>n("span",{class:"left-side-nodes small"},[c.map(zt)]))):""});const d=$t();return qt(()=>{const c=kt(i);d.value=c?Oe(B(()=>n("span",{class:"side-nodes small"},[c.map(zt)]))):""}),{unref:u,nodesComp:o,leftNodesComp:r,rightNodesComp:d}}});we({props:{display:Y(Object,String,Function),visibility:{type:Y(Number),required:!0},style:Y(String,Object,Array),classes:Y(Object),onClick:Function,onHold:Function,color:Y(String),glowColor:Y(String),canClick:{type:Y(Boolean),required:!0},mark:Y(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:ma,Node:Jl},setup(e){const{onClick:t,onHold:l,display:i}=Bt(e),o=hl(i),{start:r,stop:d}=Ii(t,l);return{start:r,stop:d,comp:o,unref:u,Visibility:bt,isCoercableComponent:nl}}});function Zt(e){const t=[],l={};let i=!1;function o(){return i||(t.push(...e()),l.base=t.map(c=>Et(c.base)),l.baseText=t.map(c=>Et(c.baseText)),l.visible=t.map(c=>Et(c.visible)),i=!0),t}const r=_e({});return[B(()=>{const c=o();let p=!0;const m=c.map((b,h)=>{var N,D,H;if(u(l.visible[h])===!1)return null;const A=n("h3",{onClick:()=>r.value[h]=!r.value[h],style:"cursor: pointer"},[n("span",{class:"modifier-toggle"+(u(r.value[h])?" collapsed":"")},[s("\u25BC")]),b.title,b.subtitle?n("span",{class:"subtitle"},[s(" ("),b.subtitle,s(")")]):null]),v=u(r.value[h])?null:n(S,null,[n("div",{class:"modifier-container"},[n("span",{class:"modifier-description"},[zt((N=u(l.baseText[h]))!=null?N:"Base")]),n("span",{class:"modifier-amount"},[L((D=u(l.base[h]))!=null?D:1),b.unit])]),zt(u(b.modifier.description))]),_=!p;return p=!1,n(S,null,[_?n("br",null,null):null,n("div",null,[A,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"},[L(b.modifier.apply((H=u(l.base[h]))!=null?H:1)),b.unit])])])])});return n(S,null,[m])}),r]}function Hl(e){const t=Object.values(e).reverse(),l=_e(!0),i=f(()=>t.filter(p=>p.earned.value===!1)),{firstFeature:o,collapsedContent:r,hasCollapsedContent:d}=Oo(t,p=>p.earned.value),c=B(()=>{const p=[...i.value];return o.value&&p.push(o.value),Ro(...p,B(()=>ua(n(rs,{collapsed:l,content:r,display:l.value?"Show other completed milestones":"Hide other completed milestones"},null),[[oi,u(d)]])))});return{collapseMilestones:l,display:c}}function rl(e){const t=e.ignoreTotal?e.resource:As(e.resource),l=()=>{var c,p;if(R.day.value!==e.day)return 1;let r=a.add(t.value,1),d=e.goal;return((p=(c=e.usingLog)==null?void 0:c.value)!=null?p:ue.usingLog)&&(r=r.log10(),d=a.log10(d)),a.div(r,d)},i=Ht(()=>({direction:Pe.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:l,display:B(()=>R.day.value===e.day?n(S,null,[be(t.value),s("/"),be(e.goal)]):"")})),o=B(()=>n(S,null,[n("div",null,[R.day.value===e.day?n(S,null,[s("Reach "),be(e.goal),s(" "),e.ignoreTotal?"":"total ",e.resource.displayName,s(" to complete the day")]):n(S,null,[e.name,s(" Complete!")]),e.modal?n(S,null,[" ",s("-")," ",n("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[s("Check Modifiers")])]):void 0]),oe(i),e.modal?oe(e.modal.display):void 0]));return qt(()=>{R.day.value===e.day&&a.gte(t.value,e.goal)&&R.completeDay()}),{total:t,trackerDisplay:o}}function Kt(e){var d;const t=(d=e.style)!=null?d:{minHeight:"20px",width:"40px",color:"var(--foreground)"},l=Pt(()=>({display:"0",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=0}})),i=Pt(()=>({display:"-",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=a.sub(e.active.value,1)}})),o=Pt(()=>({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=Pt(()=>({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 Ss=Symbol("Buyable");function Re(e){const t=_e(0);return Ot(()=>{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=Tl("buyable-"),l.type=Ss,l[yl]=Di,l.amount=t,l.amount[fl]=(r=l.initialValue)!=null?r:0,l.canAfford=f(()=>{const p=l,m=u(p.cost);return p.resource!=null&&m!=null&&a.gte(p.resource.value,m)}),l.canPurchase==null&&(l.canPurchase=f(()=>u(l.visibility)===bt.Visible&&u(l.canAfford)&&a.lt(l.amount.value,u(l.purchaseLimit)))),l.maxed=f(()=>a.gte(l.amount.value,u(l.purchaseLimit))),z(l,"classes");const i=l.classes;l.classes=f(()=>{const p=u(i)||{};return l.maxed.value&&(p.bought=!0),p}),z(l,"canPurchase"),l.canClick=l.canPurchase,l.onClick=l.purchase=(c=(d=l.onClick)!=null?d:l.purchase)!=null?c:function(){var b;const p=l;if(!u(p.canPurchase))return;const m=u(p.cost);p.cost!=null&&p.resource!=null&&(p.resource.value=a.sub(p.resource.value,m),p.amount.value=a.add(p.amount.value,1)),(b=p.onPurchase)==null||b.call(p,m)},z(l,"display");const o=l.display;return l.display=B(()=>{const p=u(o);if(nl(p)){const m=Oe(p);return n(m,null,null)}if(p!=null&&l.cost!=null&&l.resource!=null){const m=l,b=Oe(p.title||"","h3"),h=Oe(p.description||""),A=Oe(p.effectDisplay||"");return n("span",null,[p.title?n("div",null,[n(b,null,null)]):null,p.description?n(h,null,null):null,p.showAmount===!1?null:n("div",null,[n("br",null,null),u(m.purchaseLimit)===a.dInf?n(S,null,[s("Amount: "),X(m.amount.value)]):n(S,null,[s("Amount: "),X(m.amount.value),s(" /")," ",X(u(m.purchaseLimit))])]),p.effectDisplay?n("div",null,[n("br",null,null),s("Currently: "),n(A,null,null)]):null,m.cost&&!m.maxed.value?n("div",null,[s("Cost: "),L(u(m.cost)||0)," ",l.resource.displayName]):null])}return""}),z(l,"visibility"),St(l,"visibility",bt.Visible),z(l,"cost"),z(l,"resource"),z(l,"purchaseLimit"),St(l,"purchaseLimit",a.dInf),z(l,"style"),z(l,"mark"),z(l,"small"),l[bl]=function(){const{display:p,visibility:m,style:b,classes:h,onClick:A,canClick:v,small:_,mark:N,id:D}=this;return{display:p,visibility:m,style:u(b),classes:h,onClick:A,canClick:v,small:_,mark:N,id:D}},l})}const va=ca({}),Fa=Symbol("Hotkey");function Dl(e){return Ot(()=>{const t=e();return t.type=Fa,z(t,"enabled"),St(t,"enabled",!0),z(t,"description"),t})}Ke.on("addLayer",e=>{wi(e,Fa).forEach(t=>{va[t.key]=t})});Ke.on("removeLayer",e=>{wi(e,Fa).forEach(t=>{va[t.key]=void 0})});document.onkeydown=function(e){var i;if(((i=e.target)==null?void 0:i.tagName)==="INPUT"||qa.value&&!ue.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const l=va[t];l&&u(l.enabled)&&(e.preventDefault(),l.onPress())};Po(B(()=>{const e=Object.values(va).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 Bs=we({__name:"Sticky",setup(e){const t=V("0"),l=new ResizeObserver(o),i=$t(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 _l(o),document.fonts.ready.then(o),ra(()=>{var d;const r=(d=i.value)==null?void 0:d.parentElement;r&&l.observe(r)}),(r,d)=>(k(),I("div",{class:"sticky",style:yt({top:t.value}),ref_key:"element",ref:i,"data-v-sticky":""},[Qt(r.$slots,"default",{},void 0,!0)],4))}});var Ms=qe(Bs,[["__scopeId","data-v-cccac690"]]);const Ya=we({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,l=f(()=>Kl(t.resource));return(i,o)=>(k(),I("h2",{style:yt({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},Ne(u(l)),5))}});const Ns={class:"main-display"},xs={key:0},Is={key:1},Ds=s(", "),Ps={key:2},Ts=g("br",null,null,-1),Fs={class:"main-display"},Us={key:0},Rs={key:1},Os=s(", "),qs={key:2},Gs=g("br",null,null,-1),Tt=we({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null,sticky:{type:Boolean,default:!0}},setup(e){const l=Bt(e),i=V(null),o=hl(l.effectDisplay),r=V(null),d=hl(l.productionDisplay),c=f(()=>a.lt(l.resource.value,"1e1000"));return(p,m)=>{var b,h;return e.sticky?(k(),he(Ms,{key:0},{default:ce(()=>{var A,v,_,N;return[g("div",{class:ct(["main-display-container",(A=e.classes)!=null?A:{}]),style:yt([{"min-height":`${((_=(v=i.value)==null?void 0:v.$el.clientHeight)!=null?_:0)+50}px`},(N=e.style)!=null?N:{}])},[g("div",Ns,[u(c)?(k(),I("span",xs,"You have ")):G("",!0),n(Ya,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),s(" "+Ne(e.resource.displayName),1),u(o)?(k(),I("span",Is,[Ds,(k(),he(it(u(o)),{ref_key:"effectRef",ref:i},null,512))])):G("",!0),u(d)?(k(),I("span",Ps,[Ts,(k(),he(it(u(d)),{ref_key:"productionRef",ref:r},null,512))])):G("",!0)])],6)]}),_:1})):(k(),I("div",{key:1,class:ct(["main-display-container",(b=e.classes)!=null?b:{}]),style:yt([{"min-height":"50px"},(h=e.style)!=null?h:{}])},[g("div",Fs,[u(c)?(k(),I("span",Us,"You have ")):G("",!0),n(Ya,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),s(" "+Ne(e.resource.displayName),1),u(o)?(k(),I("span",Rs,[Os,(k(),he(it(u(o)),{ref_key:"effectRef",ref:i},null,512))])):G("",!0),u(d)?(k(),I("span",qs,[Gs,(k(),he(it(u(d)),{ref_key:"productionRef",ref:r},null,512))])):G("",!0)])],6))}}});var Ls=we({props:{display:{type:Y(String,Object,Function),required:!0},visibility:{type:Y(Number),required:!0},style:Y(String,Object,Array),classes:Y(Object),resource:Object,cost:Y(String,Object,Number),canPurchase:{type:Y(Boolean),required:!0},bought:{type:Y(Boolean),required:!0},mark:Y(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:Jl,MarkNode:ma},setup(e){const{display:t,cost:l}=Bt(e),i=$t("");return qt(()=>{const o=kt(t);if(o==null){i.value="";return}if(nl(o)){i.value=Oe(o);return}const r=kt(l),d=Oe(o.title||"","h3"),c=Oe(o.description,"div"),p=Oe(o.effectDisplay||"");i.value=Oe(B(()=>{var m;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(p,null,null)]):null,e.resource!=null&&o.showCost!==!1?n(S,null,[n("br",null,null),s("Cost: "),e.resource&&Kl(e.resource,r)," ",(m=e.resource)==null?void 0:m.displayName]):null])}))}),{component:i,unref:u,Visibility:bt}}});const Qs=["disabled"];function $s(e,t,l,i,o,r){var p;const d=gl("MarkNode"),c=gl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),I("button",{key:0,style:yt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(p=e.unref(e.style))!=null?p:{}]),onClick:t[0]||(t[0]=(...m)=>e.purchase&&e.purchase(...m)),class:ct({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(),he(it(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,Qs)):G("",!0)}var Vs=qe(Ls,[["render",$s],["__scopeId","data-v-7f411ac8"]]);const Hs=Symbol("Upgrade");function O(e){const t=_e(!1);return Ot(()=>{const l=e();return l.id=Tl("upgrade-"),l.type=Hs,l[yl]=Vs,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))}):z(l,"canAfford"),l.canPurchase=f(()=>u(l.visibility)===bt.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))},z(l,"visibility"),St(l,"visibility",bt.Visible),z(l,"classes"),z(l,"style"),z(l,"display"),z(l,"mark"),z(l,"cost"),z(l,"resource"),l[bl]=function(){const{display:i,visibility:o,style:r,classes:d,resource:c,cost:p,canPurchase:m,bought:b,mark:h,id:A,purchase:v}=this;return{display:i,visibility:o,style:u(r),classes:d,resource:c,cost:p,canPurchase:m,bought:b,mark:h,id:A,purchase:v}},l})}function de(e){return Ot(()=>{const{addend:t,description:l,enabled:i}=e(),o=Et(t),r=Et(l),d=i==null?void 0:Et(i);return{apply:c=>a.add(c,u(o)),revert:c=>a.sub(c,u(o)),enabled:d,description:l==null?void 0:B(()=>n("div",{class:"modifier-container"},[u(r)?n("span",{class:"modifier-description"},[zt(u(r))]):null,n("span",{class:"modifier-amount"},[a.gte(u(o),0)?"+":"",L(u(o))])]))}})}function w(e){return Ot(()=>{const{multiplier:t,description:l,enabled:i}=e(),o=Et(t),r=Et(l),d=i==null?void 0:Et(i);return{apply:c=>a.times(c,u(o)),revert:c=>a.div(c,u(o)),enabled:d,description:l==null?void 0:B(()=>n("div",{class:"modifier-container"},[u(r)?n("span",{class:"modifier-description"},[zt(u(r))]):null,n("span",{class:"modifier-amount"},[s("\xD7"),L(u(o))])]))}})}function Ua(e){return Ot(()=>{const{exponent:t,description:l,enabled:i,supportLowNumbers:o}=e(),r=Et(t),d=Et(l),c=i==null?void 0:Et(i);return{apply:p=>{let m=p;return o&&(m=a.add(m,1)),m=a.pow(m,u(r)),o&&(m=a.sub(m,1)),m},revert:p=>{let m=p;return o&&(m=a.add(m,1)),m=a.root(m,u(r)),o&&(m=a.sub(m,1)),m},enabled:c,description:l==null?void 0:B(()=>n("div",{class:"modifier-container"},[u(d)?n("span",{class:"modifier-description"},[zt(u(d)),o?" (+1 effective)":null]):null,n("span",{class:"modifier-amount"},[s("^"),L(u(r))])]))}})}function le(e){return Ot(()=>{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:B(()=>n(S,null,[t.filter(l=>u(l.enabled)!==!1).map(l=>u(l.description)).filter(l=>l).map(zt)]))}})}function Pi(e){return Ot(()=>{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}),z(t,"currentGain"),z(t,"actualGain"),z(t,"currentAt"),z(t,"nextAt"),z(t,"buyMax"),St(t,"buyMax",!0),z(t,"roundUpCost"),St(t,"roundUpCost",!0),t})}function Ra(e,t){const l=Et(e),i=Et(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 Ti(e){return Pi(e)}function js(e){return Pi(()=>{const t=e();return St(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})),St(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})}const Ws={},Js={style:{"white-space":"nowrap"}},Ks=g("span",{style:{"font-size":"larger","font-family":"initial"}},"\u221A",-1),zs={style:{display:"inline-block","border-top":"1px solid","padding-left":".2em"}};function Xs(e,t){return k(),I("span",Js,[Ks,g("div",zs,[Qt(e.$slots,"default")])])}var pl=qe(Ws,[["render",Xs]]);const Ys={},Zs={class:"fraction"};function er(e,t){return k(),I("div",Zs,[Qt(e.$slots,"default")])}var tr=qe(Ys,[["render",er]]);const lr={class:"field"},ar={key:0,class:"field-title"},Oa=we({__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=hl(Yt(l,"title"),"span"),o=V((d=l.options.find(c=>c.value===l.modelValue))!=null?d:null);Xt(Yt(l,"modelValue"),c=>{var p;kt(o)!==c&&(o.value=(p=l.options.find(m=>m.value===c))!=null?p:null)});function r(c){t("update:modelValue",c.value)}return(c,p)=>(k(),I("div",lr,[u(i)?(k(),I("span",ar,[(k(),he(it(u(i))))])):G("",!0),n(u(dn),{options:e.options,modelValue:o.value,"onUpdate:modelValue":[p[0]||(p[0]=m=>o.value=m),r],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});var ir=we({props:{visibility:{type:Y(Number),required:!0},display:{type:Y(String,Object,Function),required:!0},style:Y(String,Object,Array),classes:Y(Object),earned:{type:Y(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:Jl},setup(e){const{display:t}=Bt(e),l=$t("");return qt(()=>{const i=kt(t);if(i==null){l.value="";return}if(nl(i)){l.value=Oe(i);return}const o=Oe(i.requirement,"h3"),r=Oe(i.effectDisplay||"","b"),d=Oe(i.optionsDisplay||"","span");l.value=Oe(B(()=>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:bt}}});function nr(e,t,l,i,o,r){var c;const d=gl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),I("div",{key:0,style:yt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(c=e.unref(e.style))!=null?c:{}]),class:ct({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(k(),he(it(e.unref(e.comp)))),n(d,{id:e.id},null,8,["id"])],6)):G("",!0)}var or=qe(ir,[["render",nr],["__scopeId","data-v-f4e8794e"]]);Ke.on("setupVue",e=>e.use(cn));const Za=di(),sr=Symbol("Milestone");let vl;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(vl||(vl={}));function P(e){const t=_e(!1);return Ot(()=>{var o;const l=(o=e==null?void 0:e())!=null?o:{};l.id=Tl("milestone-"),l.type=sr,l[yl]=or,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),p=Oe(nl(c)?c:c.requirement);Za(n(S,null,[n("h3",null,[s("Milestone earned!")]),n("div",null,[n(p,null,null)])]))}},z(l,"visibility"),St(l,"visibility",bt.Visible);const i=l.visibility;if(l.visibility=f(()=>{const r=u(l.display);switch(at.msDisplay){default:case vl.All:return u(i);case vl.Configurable:return u(l.earned)&&!(r!=null&&typeof r=="object"&&"optionsDisplay"in r)?bt.None:u(i);case vl.Incomplete:return u(l.earned)?bt.None:u(i);case vl.None:return bt.None}}),z(l,"style"),z(l,"classes"),z(l,"display"),z(l,"showPopups"),l[bl]=function(){const{visibility:r,display:d,style:c,classes:p,earned:m,id:b}=this;return{visibility:r,display:d,style:u(c),classes:p,earned:m,id:b}},l.shouldEarn){const r=l;qt(()=>{var d,c;if(at.active===ue.id&&!r.earned.value&&u(r.visibility)===bt.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 p=u(r.display),m=Oe(nl(p)?p:p.requirement);Za(n(S,null,[n("h3",null,[s("Milestone earned!")]),n("div",null,[n(m,null,null)])]))}})}return l})}Ke.on("loadSettings",e=>{St(e,"msDisplay",vl.All)});const rr=Object.values(vl).map(e=>({label:bi(e),value:e}));Do(B(()=>n(Oa,{title:"Show Milestones",options:rr,"onUpdate:modelValue":e=>at.msDisplay=e,modelValue:at.msDisplay},null)));const ur={class:"field"},dr=we({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,i=f(()=>Oe(u(l.title)||"<span></span>","span")),o=f({get(){return!!l.modelValue},set(r){t("update:modelValue",r)}});return(r,d)=>(k(),I("label",ur,[ua(g("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":d[0]||(d[0]=c=>ht(o)?o.value=c:null)},null,512),[[on,u(o)]]),(k(),he(it(u(i))))]))}});var il=qe(dr,[["__scopeId","data-v-33d57459"]]);const cr=Symbol("Reset");function pr(e){return Ot(()=>{const t=e();return t.id=Tl("reset-"),t.type=cr,t.reset=function(){var i;const l=o=>{if(o&&typeof o=="object")if(fl in o){const r=o;r.value=r[fl]}else!(o instanceof a)&&!ht(o)&&Object.values(o).forEach(r=>l(r))};u(t.thingsToReset).forEach(l),Ke.emit("reset",t),(i=t.onReset)==null||i.call(t)},z(t,"thingsToReset"),t})}const ea={};Ke.on("removeLayer",e=>{var t;(t=ea[e.id])==null||t.call(ea),ea[e.id]=void 0});const mr="plastic",ei=10,Qe=Rt(mr,function(){const e="Plastic",t="#DCD9CD",l=dt(0,"plastic"),[i,o]=Zt(()=>[{title:"Plastic Gain",modifier:Se,base:0}]),r=V(!1),d=B(()=>n(wt,{modelValue:r.value,"onUpdate:modelValue":j=>r.value=j},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:i})),c=_e(0),p=f(()=>a.times(c.value,100)),m=Re(()=>({resource:lt.metal,cost(){const j=new a(this.amount.value);return a.pow(1.2,j).times(1e7)},display:B(()=>n(S,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("-"),L(p.value),s(" oil/sec"),n("br",null,null),s("+"),L(c.value),s(" plastic/sec"),n("br",null,null),n("br",null,null),s("Cost: "),X(u(m.cost))," ",m.resource.displayName])),onPurchase(){c.value=a.add(c.value,1)},style:{width:"300px"}})),{min:b,max:h,add:A,remove:v}=Kt({buyable:m,active:c,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),_=f(()=>a.pow(5,a.add([...Object.values(M),...Object.values(ve)].filter(j=>j.bought.value).length,2))),N=O(()=>({resource:F(l),cost:_,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!N.bought.value})})),D=O(()=>({resource:F(l),cost:_,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!D.bought.value})})),H=O(()=>({resource:F(l),cost:_,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!H.bought.value})})),M={paperTools:N,boxTools:D,clothTools:H},E=O(()=>({resource:F(l),cost:_,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})})),T=O(()=>({resource:F(l),cost:_,visibility:()=>y(D.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!T.bought.value})})),W=O(()=>({resource:F(l),cost:_,visibility:()=>y(H.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!W.bought.value})})),ve={paperElf:E,boxElf:T,clothElf:W},Q=Re(()=>({resource:F(l),cost(){const j=this.amount.value;return a.pow(1.3,j).times(100)},visibility:()=>y(E.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:B(()=>n(S,null,[X(Q.amount.value),s("%")])),showAmount:!1}})),pe=Re(()=>({resource:F(l),cost(){const j=this.amount.value;return a.pow(1.3,j).times(100)},visibility:()=>y(T.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:B(()=>n(S,null,[X(pe.amount.value),s("%")])),showAmount:!1}})),ie=Re(()=>({resource:F(l),cost(){const j=this.amount.value;return a.pow(1.3,j).times(100)},visibility:()=>y(W.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions are +10% more efficient",effectDisplay:B(()=>n(S,null,[X(a.times(ie.amount.value,10)),s("%")])),showAmount:!1}})),Ge={passivePaper:Q,passiveBoxes:pe,clothGains:ie},Se=le(()=>[de(()=>({addend:c,description:"Oil Refinery",enabled:()=>a.gt(c.value,0)})),w(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:E.bought})),w(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:T.bought})),w(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:W.bought})),w(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:et.row2Upgrades.plasticUpgrade.bought})),w(()=>({multiplier:()=>Ze.oilEffectiveness.value,description:"Effectiveness",enabled:()=>a.lt(Ze.oilEffectiveness.value,1)})),w(()=>({multiplier:$e.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte($e.dyes.yellow.amount.value,1)}))]),J=f(()=>Se.apply(0));Ke.on("update",j=>{a.lt(R.day.value,ei)||(l.value=a.times(j,J.value).add(l.value))});const{total:Ae,trackerDisplay:He}=rl({resource:l,goal:25e4,name:e,day:ei,color:t,textColor:"var(--feature-foreground)",modal:{show:r,display:d}});return{name:e,color:t,plastic:l,totalPlastic:Ae,buildRefinery:m,activeRefinery:c,oilCost:p,upgrades:M,elfUpgrades:ve,buyables:Ge,generalTabCollapsed:o,minWidth:700,display:B(()=>n(S,null,[oe(He),n(Ee,null,null),n(Tt,{resource:l,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(J.value,0)?`+${L(J.value)}/s`:void 0},null),n(Ee,null,null),n(Ut,null,{default:()=>[oe(m),n("div",null,[X(a.floor(c.value)),s("/"),X(a.floor(m.amount.value))]),Xe(b,v,A,h)]}),n(Pl,null,{default:()=>[Vt(N,E,Q),Vt(D,T,pe),Vt(H,W,ie)]})]))}}),vr="paper",Aa=5,te=Rt(vr,function(){const e="Paper",t="#E8DCB8",l=dt(0,"paper"),i=dt(f(()=>a.min(a.div(me.logs.value,1e9),a.div(q.ash.value,1e6))),"pulp"),o=Ti(()=>({scaling:Ra(1,1.2),baseResource:i,gainResource:F(l),roundUpCost:!0,spend(j,Ce){me.logs.value=a.sub(me.logs.value,a.times(Ce,1e9)),q.ash.value=a.sub(q.ash.value,a.times(Ce,1e6))},gainModifier:pe})),r=Pt(()=>({display:B(()=>{const j=a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value;return n(S,null,[n("span",{style:"font-size: large"},[s("Create "),X(o.currentGain.value),s(" "),l.displayName]),n("br",null,null),n("span",{style:"font-size: large"},[s("Cost: "),Kl(me.logs,j),s(" "),i.displayName,s(" ("),X(a.times(j,1e9)),s(" "),me.logs.displayName,s(";")," ",X(a.times(j,1e6)),s(" "),q.ash.displayName,s(")")])])}),canClick:()=>a.gte(o.actualGain.value,1),onClick(){!u(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"}));function d(j){const Ce=Re(()=>({...j,display:{title:j.name,description:`Print a copy of "${j.name}", which ${j.elfName} will use to improve their skills! Each copy printed will reduce the "${j.buyableName}" price scaling by 0.95x and make ${j.elfName} purchase +10% faster!`,effectDisplay:B(()=>n(S,null,[L(a.pow(.95,Ce.amount.value)),s("x price scaling,")," ",L(a.div(Ce.amount.value,10).add(1)),s("x auto-purchase speed")])),showAmount:!1},resource:F(l),cost(){let fe=this.amount.value;return(j.elfName==="Star"||j.elfName==="Bell")&&(fe=a.pow(fe,2)),a.gte(fe,100)&&(fe=a.pow(fe,2).div(100)),a.gte(fe,1e4)&&(fe=a.pow(fe,2).div(1e4)),fe=a.pow(.95,D.amount.value).times(fe),a.pow(5,fe).times(10)},style:"width: 600px"}));return Ce}const c=d({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),p=d({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),m=d({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),b=d({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),h=d({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),A=d({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),v=d({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>y(Me.elves.smallFireElf.bought.value)}),_=d({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>y(Me.elves.bonfireElf.bought.value)}),N=d({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>y(Me.elves.kilnElf.bought.value)}),D=d({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>y(Me.elves.paperElf.bought.value)}),H=d({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>y(Me.elves.boxElf.bought.value)}),M=d({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>y(Me.elves.clothElf.bought.value)}),E={cuttersBook:c,plantersBook:p,expandersBook:m,heatedCuttersBook:b,heatedPlantersBook:h,fertilizerBook:A,smallFireBook:v,bonfireBook:_,kilnBook:N,paperBook:D,boxBook:H,clothBook:M},T=O(()=>({resource:F(l),cost:1e8,visibility:()=>y(Qe.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),W=O(()=>({resource:F(l),cost:1e9,visibility:()=>y(Qe.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),ve=O(()=>({resource:F(l),cost:1e10,visibility:()=>y(Qe.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),Q={clothUpgrade:T,drillingUpgrade:W,oilUpgrade:ve},pe=le(()=>[w(()=>({multiplier:2,description:"Scholar's shoes",enabled:tt.paperUpgrades.paperUpgrade1.bought})),w(()=>({multiplier:2,description:"Scholar's slacks",enabled:tt.paperUpgrades.paperUpgrade2.bought})),w(()=>({multiplier:2,description:"Scholar's jacket",enabled:tt.paperUpgrades.paperUpgrade3.bought})),w(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:tt.paperUpgrades.paperUpgrade4.bought})),w(()=>({multiplier:$e.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte($e.dyes.yellow.amount.value,1)}))]),[ie,Ge]=Zt(()=>[{title:"Paper Gain",modifier:pe,base:1}]),Se=V(!1),J=B(()=>n(wt,{modelValue:Se.value,"onUpdate:modelValue":j=>Se.value=j},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:ie}));Ke.on("update",j=>{a.lt(R.day.value,Aa)||(l.value=a.times(j,Qe.buyables.passivePaper.amount.value).times(o.currentGain.value).div(100).add(l.value))});const{total:Ae,trackerDisplay:He}=rl({resource:l,goal:5e3,name:e,day:Aa,color:t,textColor:"var(--feature-foreground)",modal:{show:Se,display:J}});return{name:e,day:Aa,color:t,paper:l,totalPaper:Ae,paperConversion:o,books:E,upgrades:Q,generalTabCollapsed:Ge,minWidth:700,display:B(()=>n(S,null,[oe(He),n(Ee,null,null),n(Tt,{resource:l,color:t,style:"margin-bottom: 0"},null),n(Ee,null,null),oe(r),n(Ee,null,null),Xe(...Object.values(Q)),n(Ee,null,null),Vt(...Object.values(E))]))}}),fr="oil",Ca=9,Ze=Rt(fr,function(){const e="Oil",t="#000000",l="var(--foreground)",i=dt(0,"oil"),o=dt(0,"depth"),r=_e(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 je=a.min(a.affordArithmeticSeries(r.value,10,1,o.value),a.sub(990,o.value)),It=a.sumArithmeticSeries(je,10,1,o.value);r.value=a.sub(r.value,It),o.value=a.add(o.value,je)}if(a.gte(o.value,990)){const je=a.affordGeometricSeries(r.value,1e3,1.001,a.sub(o.value,990)),It=a.sumGeometricSeries(je,1e3,1.001,a.sub(o.value,990));r.value=a.sub(r.value,It),o.value=a.add(o.value,je)}}const p=_e(0),m=f(()=>a.times(a.pow(p.value,H.value).pow(2),1e14)),b=f(()=>a.times(a.pow(p.value,H.value),1)),h=Re(()=>({resource:lt.metal,cost(){const je=new a(this.amount.value);return a.pow(1.3,je).times(25e3)},display:B(()=>n(S,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("-"),ke(m.value),s(" coal/sec"),n("br",null,null),s("+"),ke(b.value),s(" drill power"),n("br",null,null),n("br",null,null),s("Cost: "),be(u(h.cost)),s(" "),h.resource.displayName])),onPurchase(){p.value=a.add(p.value,1)},style:{color:l,width:"160px"}})),{min:A,max:v,add:_,remove:N}=Kt({buyable:h,active:p}),D=_e(0),H=f(()=>a.add(D.value,Math.E).ln()),M=Re(()=>({resource:lt.metal,cost(){const je=new a(this.amount.value);return a.pow(2,je).times(1e5)},display:B(()=>n(S,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("^"),ke(H.value),s(" Heavy Drill amount"),n("br",null,null),n("br",null,null),s("Cost: "),be(u(M.cost)),s(" "),M.resource.displayName])),onPurchase(){D.value=a.add(D.value,1)},style:{color:l,width:"160px"}})),{min:E,max:T,add:W,remove:ve}=Kt({buyable:M,active:D}),Q=_e(0),pe=f(()=>a.pow(1/3,Q.value)),ie=f(()=>a.pow(2,Q.value)),Ge=f(()=>a.pow(1.2,Q.value)),Se=Re(()=>({resource:lt.metal,cost(){const je=new a(this.amount.value);return a.pow(8,je).times(2e5)},display:B(()=>n(S,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"),ke(pe.value),s(" drill power"),n("br",null,null),s("\xD7"),ke(ie.value),s(" coal/sec"),n("br",null,null),s("\xD7"),ke(Ge.value),s(" ore/sec"),n("br",null,null),n("br",null,null),s("Cost: "),be(u(Se.cost))," ",Se.resource.displayName])),onPurchase(){Q.value=a.add(Q.value,1)},style:{color:l,width:"160px"}})),{min:J,max:Ae,add:He,remove:j}=Kt({buyable:Se,active:Q}),Ce=_e(0),fe=f(()=>a.pow(gt[3].bought.value?4:5,Ce.value)),Be=f(()=>a.add(Ce.value,Va.value).pow(2).mul(p.value).mul(a.add(D.value,1)).mul(Q.value).mul(o.value).div(1e5)),Fe=Re(()=>({resource:lt.metal,cost(){const je=new a(this.amount.value);let It=a.pow(16,je).times(2e6);return gt[4].bought.value&&(It=It.div(a.add(Al.value,1).root(6))),It},display:B(()=>n(S,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 "),gt[3].bought.value?4:5,s("\xD7."),n("br",null,null),n("br",null,null),s("Currently:"),n("br",null,null),s("\xD7"),ke(fe.value),s(" coal usage"),n("br",null,null),s("+"),ke(Be.value),s(" oil/sec"),n("br",null,null),n("br",null,null),s("Cost: "),be(u(Fe.cost)),s(" "),Fe.resource.displayName])),onPurchase(){Ce.value=a.add(Ce.value,1)},style:{color:l,width:"160px"}})),{max:xe,min:We,add:Ye,remove:At}=Kt({buyable:Fe,active:Ce}),ae=_e(0),ne=f(()=>a.pow(ae.value,2)),Ue=f(()=>a.pow(ae.value,3).mul(1e19)),Je=f(()=>a.add(ae.value,1)),ge=Re(()=>({resource:F(i),cost(){const je=new a(this.amount.value);return a.pow(2,je).times(50)},display:B(()=>n(S,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("-"),ke(ne.value),s(" oil/sec"),n("br",null,null),s("-"),ke(Ue.value),s(" coal consumption"),gt[2].bought.value?n(S,null,[n("br",null,null),s("\xD7"),ke(Je.value),s(" to auto smelting multi")]):"",n("br",null,null),n("br",null,null),s("Cost: "),be(u(ge.cost)),s(" "),ge.resource.displayName])),onPurchase(){ae.value=a.add(ae.value,1)},style:{color:l,width:"160px"}})),{max:pt,min:st,add:Z,remove:Te}=Kt({buyable:ge,active:ae}),se=_e(0),Mt=f(()=>a.pow(se.value,2).mul(100)),Le=f(()=>a.add(se.value,1)),mt=Re(()=>({resource:lt.metal,cost(){const je=new a(this.amount.value);let It=a.pow(10,je).times(1e7);return gt[4].bought.value&&(It=It.div(a.add(Al.value,1).root(6))),It},display:B(()=>n(S,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("-"),ke(Mt.value),s(" oil/sec"),n("br",null,null),s("\xD7"),ke(Le.value),s(" smelting speed"),n("br",null,null),n("br",null,null),s("Cost: "),be(u(mt.cost)),s(" "),mt.resource.displayName])),onPurchase(){se.value=a.add(se.value,1)},style:{color:l,width:"160px"}})),{max:Nt,min:$,add:re,remove:K}=Kt({buyable:mt,active:se}),Ie=[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(Ie[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(Ie[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(Ie[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(Ie[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(Ie[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:ee,display:nt}=Hl(Ie),vt=[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(Al.value,100)})),P(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>a.gte(Al.value,500),visibility:()=>y(vt[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(Al.value,1e4),visibility:()=>y(vt[1].earned.value)}))],{collapseMilestones:Ct,display:el}=Hl(vt),Ft=[O(()=>({resource:q.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per coal Mining Drill owned.",effectDisplay:B(()=>n(S,null,[s("x"),ke(ft[0].value)]))},style:{color:l}})),O(()=>({resource:lt.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per ore Mining Drill owned.",effectDisplay:B(()=>n(S,null,[s("x"),ke(ft[1].value)]))},style:{color:l}})),O(()=>({resource:q.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:B(()=>n(S,null,[s("x"),ke(ft[2].value)]))},style:{color:l}})),O(()=>({resource:lt.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:B(()=>n(S,null,[s("x"),ke(ft[3].value)]))},style:{color:l}})),O(()=>({resource:F(i),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:B(()=>n(S,null,[s("+"),ke(a.mul(ft[4].value,100)),s("%")]))},style:{color:l}}))],ft=[f(()=>a.mul(q.buildDrill.amount.value,a.add(.04,al.value)).add(1)),f(()=>a.mul(lt.oreDrill.amount.value,a.add(.04,al.value)).add(1)),f(()=>a.mul(a.max(q.coal.value,1).log10().floor(),a.add(.06,al.value)).add(1)),f(()=>a.mul(a.max(lt.metal.value,1).log10().floor(),a.add(.1,al.value)).add(1)),f(()=>a.mul(h.amount.value,.001))],gt=[O(()=>({resource:F(i),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:l}})),O(()=>({resource:F(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}})),O(()=>({resource:F(i),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your metal gain."},style:{color:l}})),O(()=>({resource:F(i),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:l}})),O(()=>({resource:F(i),cost:5e4,display:{title:"Be One with the Oil",description:B(()=>n(S,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}}))],Lt=le(()=>[de(()=>({addend:()=>a.negate(m.value),description:"Heavy Drill",enabled:()=>a.gt(p.value,0)})),w(()=>({multiplier:fe,description:"Oil Pump",enabled:()=>a.gt(Ce.value,0)})),de(()=>({addend:ga,description:"Oil to Coal Substitution",enabled:()=>a.gt(ga.value,0)}))]),xt=f(()=>Lt.apply(0)),jt=le(()=>[de(()=>({addend:b,description:"Heavy Drill",enabled:()=>a.gt(p.value,0)})),w(()=>({multiplier:pe,description:"Heavy Extractor",enabled:()=>a.gt(Q.value,0)})),w(()=>({multiplier:ft[0],description:"Coal Drill Synergy",enabled:Ft[0].bought})),w(()=>({multiplier:ft[1],description:"Metal Drill Synergy",enabled:Ft[1].bought})),w(()=>({multiplier:ft[2],description:"Coal Drill Upgrade",enabled:Ft[2].bought})),w(()=>({multiplier:ft[3],description:"Metal Drill Upgrade",enabled:Ft[3].bought})),w(()=>({multiplier:2,description:"Guide to drilling",enabled:te.upgrades.drillingUpgrade.bought})),w(()=>({multiplier:()=>ll.value,description:"Effectiveness",enabled:()=>a.lt(ll.value,1)}))]),tl=f(()=>jt.apply(0)),wl=le(()=>[de(()=>({addend:ft[4],description:"Drill Oil",enabled:Ft[4].bought}))]),al=f(()=>wl.apply(0)),Xl=le(()=>[de(()=>({addend:Be,description:"Oil Pump",enabled:()=>a.gt(Ce.value,0)})),w(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:gt[0].bought})),w(()=>({multiplier:2,description:"3000m Well Depth",enabled:Ie[7].earned})),w(()=>({multiplier:2,description:"Oil and where to find it",enabled:te.upgrades.oilUpgrade.bought})),w(()=>({multiplier:()=>ll.value,description:"Effectiveness",enabled:()=>a.lt(ll.value,1)}))]),Ml=f(()=>Xl.apply(0)),Yl=le(()=>[de(()=>({addend:()=>a.negate(ne.value),description:"Oil Burner",enabled:()=>a.gt(ae.value,0)})),de(()=>({addend:()=>a.negate(Mt.value),description:"Oil Smelter",enabled:()=>a.gt(se.value,0)})),de(()=>({addend:()=>a.negate(Qe.oilCost.value),description:"Oil Refinery",enabled:()=>a.gt(Qe.activeRefinery.value,0)}))]),U=f(()=>Yl.apply(0)),Qa=le(()=>[de(()=>({addend:Ue,description:"Oil Burner",enabled:()=>a.gt(ae.value,0)})),w(()=>({multiplier:()=>dl.value,description:"Effectiveness",enabled:()=>a.lt(dl.value,1)}))]),ga=f(()=>Qa.apply(0)),$a=le(()=>[de(()=>({addend:$e.boosts.red1,description:"Red Dye Boost 1",enabled:()=>a.gte($e.dyes.red.amount.value,1)}))]),Va=f(()=>$a.apply(0)),[Xi,Yi]=Zt(()=>[{title:"Coal Consumption",modifier:Lt,unit:"/s",base:0},{title:"Drill Power",modifier:jt,base:0},{title:"Upgrade Bonus",modifier:wl,base:0,visible(){return a.gt(al.value,0)}},{title:"Oil Speed",modifier:Xl,unit:"/s",base:0,visible(){return a.gt(Ml.value,0)}},{title:"Oil Consumption",modifier:Yl,unit:"/s",base:0,visible(){return a.lt(U.value,0)}},{title:"Oil to Coal Substitution",modifier:Qa,unit:"/s",base:0,visible(){return a.gt(ga.value,0)}},{title:"Extra Oil Pumps",modifier:$a,base:0,visible(){return a.gt(Va.value,0)}}]),ha=V(!1),Zi=B(()=>n(wt,{modelValue:ha.value,"onUpdate:modelValue":je=>ha.value=je},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:Xi})),ll=V(a.dOne),dl=V(a.dOne);Ke.on("update",je=>{if(a.lt(R.day.value,Ca))return;const It=a.negate(xt.value);a.gt(It,0)?(ll.value=a.min(a.div(q.coal.value,It),1),q.coal.value=a.sub(q.coal.value,a.mul(It,ll.value).mul(je))):ll.value=a.dOne,r.value=a.add(r.value,a.mul(tl.value,je)),i.value=a.add(i.value,a.mul(Ml.value,je)),c();const ya=a.negate(U.value);a.gt(ya,0)?(dl.value=a.min(a.div(i.value,ya),1),i.value=a.sub(i.value,a.mul(ya,dl.value).mul(je)).max(0)):dl.value=a.dOne});const{total:Al,trackerDisplay:en}=rl({resource:i,goal:25e4,name:e,day:Ca,color:t,modal:{show:ha,display:Zi}});return{name:e,day:Ca,color:t,oil:i,totalOil:Al,depth:o,drillProgress:r,activeHeavy:p,buildHeavy:h,activeHeavy2:D,buildHeavy2:M,activeExtractor:Q,buildExtractor:Se,activePump:Ce,buildPump:Fe,activeBurner:ae,buildBurner:ge,activeSmelter:se,buildSmelter:mt,extractorCoal:ie,extractorOre:Ge,coalEffectiveness:ll,oilEffectiveness:dl,depthMilestones:Ie,collapsedDepthMilestones:ee,row1Upgrades:Ft,row2Upgrades:gt,minWidth:700,oilMilestones:vt,collapsedOilMilestones:Ct,generalTabCollapsed:Yi,display:B(()=>{const je=[];return Ie[1].earned.value&&je.push(Ft),vt[1].earned.value&&je.push(gt),n(S,null,[oe(en),n(Ee,null,null),a.lt(ll.value,1)?n("div",null,[s("Coal efficiency: "),ke(a.mul(ll.value,100)),s("%")]):null,a.lt(dl.value,1)?n("div",null,[s("Oil efficiency: "),ke(a.mul(dl.value,100)),s("%")]):null,n(Tt,{resource:i,color:t,sticky:!0,productionDisplay:B(()=>n(S,null,[a.lt(o.value,1e3)?"Reach 1000m to start gaining oil":n(S,null,[na(a.add(Ml.value,U.value))])]))},null),a.eq(Ml.value,0)?n(S,null,[s("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),n("br",null,null)]):"",n(Pl,null,{default:()=>[Ie[6].earned.value?n(Ut,null,{default:()=>[oe(Fe),n("div",null,[be(a.floor(Ce.value)),s("/"),be(a.floor(Fe.amount.value))]),Xe(We,At,Ye,xe)]}):null,vt[0].earned.value?n(Ut,null,{default:()=>[oe(ge),n("div",null,[be(a.floor(ae.value)),s("/"),be(a.floor(ge.amount.value))]),Xe(st,Te,Z,pt)]}):null,vt[2].earned.value?n(Ut,null,{default:()=>[oe(mt),n("div",null,[be(a.floor(se.value)),s("/"),be(a.floor(mt.amount.value))]),Xe($,K,re,Nt)]}):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"},[be(o.value)]),s("m deep"),n("br",null,null),s("Next at "),ke(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"},[ke(tl.value)])]),n(Ee,null,null),n(Pl,null,{default:()=>[n(Ut,null,{default:()=>[oe(h),n("div",null,[be(a.floor(p.value)),s("/"),be(a.floor(h.amount.value))]),Xe(A,N,_,v)]}),Ie[3].earned.value?n(Ut,null,{default:()=>[oe(M),n("div",null,[be(a.floor(D.value)),s("/"),be(a.floor(M.amount.value))]),Xe(E,ve,W,T)]}):null,Ie[5].earned.value?n(Ut,null,{default:()=>[oe(Se),n("div",null,[be(a.floor(Q.value)),s("/"),be(a.floor(Se.amount.value))]),Xe(J,j,He,Ae)]}):null]}),n(Ee,null,null),Bl(...je),n(Ee,null,null),nt(),a.gte(Al.value,50)?el():""])})}}),gr="metal",ti=7,lt=Rt(gr,function(){const e="Metal",t="#888B8D",l=dt(0,"metal ingots",void 0,!0),i=Xa(l),o=dt(0,"ore"),r=Xa(o),d=le(()=>[w(()=>({multiplier:5,description:"Crucible",enabled:Ae.bought})),w(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>a.gte(Be.amount.value,1)})),w(()=>({multiplier:2,description:"Industrial Furnace",enabled:j.bought})),w(()=>({multiplier:()=>a.add(We.value,1),description:"Hotter Forges",enabled:()=>a.gte(xe.amount.value,1)})),w(()=>({multiplier:2,description:"Carry metal in boxes",enabled:et.row2Upgrades.metalUpgrade.bought})),w(()=>({multiplier:$e.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte($e.dyes.purple.amount.value,1)})),w(()=>({multiplier:()=>a.add(tt.cloth.value,1).log10().plus(1),description:"Glistening Paint",enabled:$e.upgrades.redDyeUpg.bought}))]),c=f(()=>d.apply(.1)),p=le(()=>[de(()=>({addend:()=>a.times(Be.amount.value,10),description:"Industrial Crucibles",enabled:()=>a.gte(Be.amount.value,1)})),w(()=>({multiplier:2,description:"Efficient Crucibles",enabled:q.efficientSmelther.bought})),w(()=>({multiplier:()=>a.mul(Ze.activeSmelter.value,Ze.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>a.gt(Ze.activeSmelter.value,0)})),w(()=>({multiplier:$e.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte($e.dyes.purple.amount.value,1)})),w(()=>({multiplier:()=>a.add(Qe.activeRefinery.value,1).sqrt(),description:"De Louvre",enabled:$e.upgrades.redDyeUpg2.bought}))]),m=f(()=>p.apply(0)),b=le(()=>[w(()=>({multiplier:3,description:"Efficient Crucibles",enabled:q.efficientSmelther.bought})),w(()=>({multiplier:()=>a.add(Ze.activeBurner.value,1).mul(Ze.oilEffectiveness.value),description:"Blaster Burner",enabled:Ze.row2Upgrades[2].bought}))]),h=f(()=>b.apply(1)),A=1e10,v=f(()=>a.min(o.value,a.div(q.coal.value,A)).floor().max(0)),_=Pt(()=>({display:B(()=>{const ge=a.gte(v.value,1)?v.value:a.add(v.value,1);return n(S,null,[n("span",{style:"font-size: large"},[s("Smelt "),ke(a.times(v.value,c.value))," ",l.displayName]),n("br",null,null),n("span",{style:"font-size: large"},[s("Cost: "),be(ge),s(" "),o.displayName,s(";")," ",be(a.times(ge,A)),s(" "),q.coal.displayName])])}),canClick:()=>a.gte(v.value,1),onClick(){!u(this.canClick)||N(v.value)},style:{width:"600px",minHeight:"unset"}}));function N(ge,pt=1){const[st,Z,Te]=[a.times(ge,c.value).times(pt),ge,a.times(ge,A)];l.value=a.add(l.value,st),o.value=a.sub(o.value,Z),q.coal.value=a.sub(q.coal.value,Te)}const D=le(()=>[de(()=>({addend:()=>fe.amount.value,description:"Mining Drills",enabled:()=>a.gte(fe.amount.value,1)})),w(()=>({multiplier:()=>a.mul(Ze.depth.value,.05).add(1),description:"25m Well Depth",enabled:Ze.depthMilestones[2].earned})),w(()=>({multiplier:Ze.extractorOre,description:"Heavy Extractor",enabled:()=>a.gt(Ze.activeExtractor.value,0)})),w(()=>({multiplier:2,description:"Carry ore in boxes",enabled:et.row2Upgrades.oreUpgrade.bought}))]),H=f(()=>D.apply(1)),M=le(()=>[w(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:Se.bought})),w(()=>({multiplier:2,description:"Double Pickaxe",enabled:J.bought})),w(()=>({multiplier:2.5,description:"Mining Drills",enabled:()=>a.gte(fe.amount.value,1)})),w(()=>({multiplier:2,description:"Efficient Drills",enabled:Ce.bought})),w(()=>({multiplier:2,description:"Oil the Mining Drills",enabled:Ze.row2Upgrades[1].bought}))]),E=f(()=>M.apply(a.recip(W))),T=_e(0),W=10,ve=Ht(()=>({width:400,height:25,direction:Pe.Right,fillStyle:{backgroundColor:t},progress:()=>T.value})),Q=le(()=>[de(()=>({addend:H})),w(()=>({multiplier:E}))]),pe=f(()=>Q.apply(0)),ie=le(()=>[de(()=>({addend:pe})),de(()=>({addend:()=>a.negate(m.value),enabled:Fe}))]),Ge=f(()=>ie.apply(0)),Se=O(()=>({resource:F(l),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.<br/><br/>Halve the time to mine more ore"}})),J=O(()=>({resource:F(l),cost:.1,display:{title:"Double Pickaxe",description:"This is too slow. What if you swung two pickaxes at once?<br/><br/>Halve the time to mine ore, again"},visibility:()=>y(J.bought.value)})),Ae=O(()=>({resource:F(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!<br/><br/>Increase the metal extracted per ore by 5x"},visibility:()=>y(Ae.bought.value||a.div(r.value,c.value).plus(i.value).gte(1))})),He=O(()=>({resource:F(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(fe.amount.value,1)&&(He.bought.value||R.days[7].opened.value||a.lt(q.computedCoalGain.value,a.times(H.value,E.value).times(A)))),onPurchase(){R.days[2].recentlyUpdated.value=!0}})),j=O(()=>({canAfford(){return a.gte(l.value,50)&&a.gte(q.coal.value,1e11)},onPurchase(){l.value=a.sub(l.value,50),q.coal.value=a.sub(q.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
|
|
<br/>
|
|
<br/>
|
|
Cost: 50 ${l.displayName}<br/>${ke(1e11)} ${q.coal.displayName}`}})),Ce=O(()=>({resource:F(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(Ze.depthMilestones[4].earned.value)})),fe=Re(()=>({resource:F(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:B(()=>n(S,null,[s("Mine 2.5x faster. Increase ore mining amount by")," ",be(fe.amount.value),s(" ore per operation")]))},visibility:()=>y(a.gte(fe.amount.value,1)||a.div(r.value,c.value).plus(i.value).gte(10)),style:{width:"200px"}})),Be=Re(()=>({resource:F(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:B(()=>n(S,null,[s("Automatically smelts")," ",be(a.times(Be.amount.value,10)),s(" ore per second")]))},visibility:()=>y(a.gte(Be.amount.value,1)||a.gte(fe.amount.value,4)||a.gte(r.value,50)),style:{width:"200px"}})),Fe=_e(!0),xe=Re(()=>({resource:q.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:B(()=>n(S,null,[s("Gain "),be(a.times(We.value,100)),s("% more metal per ore")]))},visibility:()=>y(a.gte(xe.amount.value,1)||j.bought.value),style:{width:"200px"}})),We=f(()=>a.times(xe.amount.value,.25));Ke.on("update",ge=>{T.value=a.times(ge,E.value).plus(T.value);const pt=T.value.trunc();T.value=T.value.minus(pt),o.value=a.add(o.value,a.times(pt,H.value)),Fe.value&&N(a.min(v.value,a.times(m.value,ge)),h.value)});const[Ye,At]=Zt(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(Be.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:b,base:1,visible(){return a.gt(h.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:D,base:1},{title:"Mining Speed",modifier:M,base:.1,unit:"/s"}]),ae=V(!1),ne=B(()=>n(wt,{modelValue:ae.value,"onUpdate:modelValue":ge=>ae.value=ge},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:Ye})),{total:Ue,trackerDisplay:Je}=rl({resource:l,goal:25e3,name:e,day:ti,color:t,modal:{show:ae,display:ne}});return{name:e,day:ti,color:t,ore:o,bestOre:r,oreProgress:T,metal:l,bestMetal:i,totalMetal:Ue,simplePickaxe:Se,doublePickaxe:J,crucible:Ae,coalDrill:He,industrialFurnace:j,efficientDrill:Ce,oreDrill:fe,industrialCrucible:Be,autoSmeltEnabled:Fe,hotterForge:xe,generalTabCollapsed:At,minWidth:700,display:B(()=>n(S,null,[oe(Je),n(Ee,null,null),n(Tt,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>n(S,null,[Fe.value&&a.gte(Be.amount.value,1)?`+${gi([[m.value,"smelting speed"],[pe.value,"ore gain"],[a.div(q.computedCoalGain.value,A),"coal gain"]],"/s",a.mul(c.value,h.value))}`:void 0]))},null),n(Ee,null,null),oe(_),a.gte(Be.amount.value,1)?n("div",{style:{width:"150px"}},[n(il,{title:"Auto Smelt",modelValue:Fe.value,"onUpdate:modelValue":ge=>Fe.value=ge},null)]):void 0,n(Ee,null,null),n(Tt,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>n(S,null,[hi(Ge.value)]))},null),n(Ee,null,null),n("div",null,[s("Currently mining "),ke(H.value),s(" ore every")," ",ke(a.recip(E.value)),s(" seconds")]),oe(ve),n(Ee,null,null),Xe(Se,J,Ae,He,j,Ce),Xe(fe,Be,xe)]))}}),hr="coal",li=3,q=Rt(hr,function(){const e="Coal",t="#151716",l="#B2BeB5",i="var(--foreground)",o=dt(0,"coal"),r=dt(0,"ash"),d=_e(0),c=f(()=>a.times(d.value,1e3)),p=f(()=>a.times(d.value,.1)),m=f(()=>a.times(d.value,50)),b=Re(()=>({resource:me.logs,cost(){let U=a.times(T.amount.value,u(T.cost)).plus(this.amount.value);return a.gte(U,100)&&(U=a.pow(U,2).div(100)),a.gte(U,1e4)&&(U=a.pow(U,2).div(1e4)),U=a.pow(.95,te.books.smallFireBook.amount.value).times(U),U.pow(1.5).times(1e4)},display:B(()=>n(S,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("-"),L(c.value),s(" logs/sec"),n("br",null,null),s("+"),L(p.value),s(" coal/sec"),n("br",null,null),s("+"),L(m.value),s(" ash/sec"),n("br",null,null),n("br",null,null),s("Cost: "),X(u(b.cost)),s(" "),b.resource.displayName])),onPurchase(){d.value=a.add(d.value,1)},style:{color:i,width:"160px"}})),{min:h,max:A,add:v,remove:_}=Kt({active:d,buyable:b}),N=dt(b.amount,"small fires"),D=_e(0),H=f(()=>a.times(D.value,1e4)),M=f(()=>a.times(D.value,10)),E=f(()=>a.times(D.value,1e3)),T=Re(()=>({resource:N,cost(){return a.pow(.95,te.books.bonfireBook.amount.value).times(10)},display:B(()=>n(S,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("-"),L(H.value),s(" logs/sec"),n("br",null,null),s("+"),L(M.value),s(" coal/sec"),n("br",null,null),s("+"),L(E.value),s(" ash/sec"),n("br",null,null),n("br",null,null),s("Cost: "),X(u(T.cost)),s(" "),T.resource.displayName])),onPurchase(U){d.value=a.sub(d.value,U).max(0),D.value=a.add(D.value,1)},style:{color:i,width:"160px"},visibility:()=>y(ge.bought.value)})),{min:W,max:ve,add:Q,remove:pe}=Kt({buyable:T,active:D}),ie=_e(0),Ge=f(()=>a.times(ie.value,1e6)),Se=f(()=>a.times(ie.value,1e4)),J=f(()=>a.times(ie.value,1e4)),Ae=Re(()=>({resource:me.logs,cost(){let U=this.amount.value;return a.gte(U,100)&&(U=a.pow(U,2).div(100)),a.gte(U,1e4)&&(U=a.pow(U,2).div(1e4)),U=a.pow(.95,te.books.kilnBook.amount.value).times(U),a.pow(1.1,U).times(1e7)},display:B(()=>n(S,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("-"),L(Ge.value),s(" logs/sec"),n("br",null,null),s("+"),L(Se.value),s(" coal/sec"),n("br",null,null),s("+"),L(J.value),s(" ash/sec"),n("br",null,null),n("br",null,null),s("Cost: "),X(u(Ae.cost)),s(" "),Ae.resource.displayName])),onPurchase(){ie.value=a.add(ie.value,1)},style:{color:i,width:"160px"},visibility:()=>y(se.bought.value)})),{min:He,max:j,add:Ce,remove:fe}=Kt({buyable:Ae,active:ie}),Be=_e(0),Fe=f(()=>a.times(a.pow(Be.value,Ze.row2Upgrades[1].bought.value?2:1),5e7).times(lt.efficientDrill.bought.value?2:1)),xe=Re(()=>({resource:lt.metal,cost(){let U=this.amount.value;return a.gte(U,100)&&(U=a.pow(U,2).div(100)),a.gte(U,1e4)&&(U=a.pow(U,2).div(1e4)),a.pow(1.15,U).times(10)},display:B(()=>n(S,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("+"),L(Fe.value),s(" coal/sec"),n("br",null,null),n("br",null,null),s("Cost: "),X(u(xe.cost)),s(" "),xe.resource.displayName])),onPurchase(){Be.value=a.add(Be.value,1)},style:{color:i,width:"160px"},visibility:()=>y(lt.coalDrill.bought.value)})),{max:We,min:Ye,add:At,remove:ae}=Kt({buyable:xe,active:Be}),ne=O(()=>({resource:F(o),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:i}})),Ue=O(()=>({resource:F(o),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:i}})),Je=O(()=>({resource:F(r),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:i}})),ge=O(()=>({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}})),pt=[ne,Ue,Je,ge],st=O(()=>({resource:F(o),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:i},visibility:()=>y(ge.bought.value)})),Z=O(()=>({resource:F(o),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:i},visibility:()=>y(ge.bought.value)})),Te=O(()=>({canAfford(){return a.gte(me.logs.value,1e5)&&a.gte(r.value,1e5)},onPurchase(){me.logs.value=a.sub(me.logs.value,1e5),r.value=a.sub(r.value,1e5)},display:B(()=>n(S,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: "),X(1e5),s(" "),me.logs.displayName,n("br",null,null),X(1e5),s(" "),r.displayName])),style:{color:i},visibility:()=>y(ge.bought.value)})),se=O(()=>({resource:me.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(ge.bought.value)})),Mt=[st,Z,Te,se],Le=O(()=>({resource:F(o),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:i},visibility:()=>y(Ze.depthMilestones[4].earned.value)})),mt=[Le],Nt=Re(()=>({resource:F(o),cost(){let U=this.amount.value;return a.gte(U,50)&&(U=a.pow(U,2).div(50)),a.gte(U,200)&&(U=a.pow(U,2).div(200)),a.gte(U,2e6)&&(U=a.pow(U,2).div(2e6)),U=a.pow(.95,te.books.heatedCuttersBook.amount.value).times(U),a.add(U,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:B(()=>n(S,null,[s("Cutters cut down trees "),L(ee.value),s("x faster")]))},style:{color:i},visibility:()=>y(ne.bought.value)})),$=Re(()=>({resource:F(o),cost(){let U=this.amount.value;return a.gte(U,50)&&(U=a.pow(U,2).div(50)),a.gte(U,200)&&(U=a.pow(U,2).div(200)),a.gte(U,2e6)&&(U=a.pow(U,2).div(2e6)),U=a.pow(.95,te.books.heatedPlantersBook.amount.value).times(U),a.add(U,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:B(()=>n(S,null,[s("Planters plant trees "),L(vt.value),s("x faster")]))},style:{color:i},visibility:()=>y(Ue.bought.value)})),re=Re(()=>({resource:F(r),cost(){let U=this.amount.value;return a.gte(U,50)&&(U=a.pow(U,2).div(50)),a.gte(U,200)&&(U=a.pow(U,2).div(200)),a.gte(U,2e6)&&(U=a.pow(U,2).div(2e6)),U=a.pow(.95,te.books.fertilizerBook.amount.value).times(U),a.add(U,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:B(()=>n(S,null,[s("Trees give "),L(el.value),s("x more logs")]))},style:{color:i},visibility:()=>y(Je.bought.value)})),K=[Nt,$,re],Ie=le(()=>[de(()=>({addend(){return a.times(Nt.amount.value,.25)},description:"Heated Cutters",enabled(){return a.gt(Nt.amount.value,0)}})),w(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:st.bought}))]),ee=f(()=>Ie.apply(1)),nt=le(()=>[de(()=>({addend(){return a.times($.amount.value,.25)},description:"Heated Planters",enabled(){return a.gt($.amount.value,0)}})),w(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:Z.bought}))]),vt=f(()=>nt.apply(1)),Ct=le(()=>[de(()=>({addend(){return a.times(re.amount.value,.25)},description:"Fertilized Soil",enabled(){return a.gt(re.amount.value,0)}})),w(()=>({multiplier:2,description:"Mulched Soil",enabled:Te.bought}))]),el=f(()=>Ct.apply(1)),Ft=le(()=>[de(()=>({addend(){return p.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),de(()=>({addend(){return M.value},description:"Bonfires",enabled(){return a.gt(D.value,0)}})),de(()=>({addend(){return Se.value},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}})),de(()=>({addend(){return Fe.value},description:"Mining Drills",enabled(){return a.gt(Be.value,0)}})),w(()=>({multiplier:2,description:"Carry coal in boxes",enabled:et.upgrades.coalUpgrade.bought})),w(()=>({multiplier:()=>a.div(et.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:et.upgrades.coalUpgrade.bought})),w(()=>({multiplier:()=>a.div(b.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:Me.elves.smallFireElf.bought})),w(()=>({multiplier:()=>a.div(T.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Me.elves.bonfireElf.bought})),w(()=>({multiplier:()=>a.div(Ae.amount.value,100).times($e.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Me.elves.kilnElf.bought})),w(()=>({multiplier:2,description:"Mining overalls",enabled:tt.metalUpgrades.metalUpgrade2.bought})),w(()=>({multiplier:3,description:"Mining helmet",enabled:tt.metalUpgrades.metalUpgrade3.bought})),w(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:tt.metalUpgrades.metalUpgrade4.bought})),w(()=>({multiplier:2,description:"12 Elves Trained",enabled:Me.milestones[11].earned})),Ua(()=>({exponent:1.25,description:"3 Elves Trained",enabled:Me.milestones[2].earned,supportLowNumbers:!0})),w(()=>({multiplier:()=>a.mul(Ze.depth.value,.25).add(1),description:"5m Well Depth",enabled:Ze.depthMilestones[0].earned})),w(()=>({multiplier:Ze.extractorCoal,description:"Heavy Extractor",enabled:()=>a.gt(Ze.activeExtractor.value,0)}))]),ft=f(()=>Ft.apply(0)),gt=le(()=>[de(()=>({addend(){return m.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),de(()=>({addend(){return E.value},description:"Bonfires",enabled(){return a.gt(D.value,0)}})),de(()=>({addend(){return J.value},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}})),w(()=>({multiplier:2,description:"Carry ash in boxes",enabled:et.upgrades.ashUpgrade.bought})),w(()=>({multiplier:()=>a.div(et.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:et.upgrades.ashUpgrade.bought})),w(()=>({multiplier:()=>a.div(b.amount.value,1e3).add(1),description:"Small Fires Synergy",enabled:Me.elves.smallFireElf.bought})),w(()=>({multiplier:()=>a.div(T.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Me.elves.bonfireElf.bought})),w(()=>({multiplier:()=>a.div(Ae.amount.value,100).times($e.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Me.elves.kilnElf.bought})),w(()=>({multiplier:4,description:"Mining boots",enabled:tt.metalUpgrades.metalUpgrade1.bought}))]),Lt=f(()=>gt.apply(0)),xt=le(()=>[de(()=>({addend(){return a.negate(c.value)},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),de(()=>({addend(){return a.negate(H.value)},description:"Bonfires",enabled(){return a.gt(D.value,0)}})),de(()=>({addend(){return a.negate(Ge.value)},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}}))]),jt=f(()=>xt.apply(0)),[tl,wl]=Zt(()=>[{title:"Log Consumption",modifier:xt,base:0,visible(){return a.gt(d.value,0)||a.gt(D.value,0)||a.gt(ie.value,0)}},{title:"Coal Gain",modifier:Ft,base:0,visible(){return a.gt(d.value,0)||a.gt(D.value,0)||a.gt(ie.value,0)}},{title:"Ash Gain",modifier:gt,base:0,visible(){return a.gt(d.value,0)||a.gt(D.value,0)||a.gt(ie.value,0)}}]),al=V(!1),Xl=B(()=>n(wt,{modelValue:al.value,"onUpdate:modelValue":U=>al.value=U},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:tl}));Ke.on("update",U=>{a.lt(R.day.value,li)||a.times(U,jt.value).negate().gt(me.logs.value)||(me.logs.value=a.times(U,jt.value).plus(me.logs.value),o.value=a.times(U,ft.value).plus(o.value),r.value=a.times(U,Lt.value).plus(r.value),d.value=a.max(d.value,0))});const{total:Ml,trackerDisplay:Yl}=rl({resource:o,goal:1e7,name:e,day:li,color:t,modal:{show:al,display:Xl}});return{name:e,color:t,coal:o,totalCoal:Ml,computedCoalGain:ft,ash:r,activeFires:d,buildFire:b,activeBonfires:D,buildBonfire:T,activeKilns:ie,buildKiln:Ae,activeDrills:Be,buildDrill:xe,warmerCutters:ne,warmerPlanters:Ue,basicFertilizer:Je,unlockBonfire:ge,dedicatedCutters:st,dedicatedPlanters:Z,betterFertilizer:Te,unlockKiln:se,efficientSmelther:Le,heatedCutters:Nt,heatedPlanters:$,moreFertilizer:re,computedHeatedCutterEffect:ee,computedHeatedPlanterEffect:vt,computedFertilizerEffect:el,generalTabCollapsed:wl,minWidth:700,display:B(()=>n(S,null,[oe(Yl),n(Ee,null,null),n(Tt,{resource:o,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(ft.value,0)?`+${L(ft.value)}/s`:void 0},null),n(Ee,null,null),n(Tt,{resource:r,color:l,style:"margin-bottom: 0",effectDisplay:a.gt(Lt.value,0)?`+${L(Lt.value)}/s`:void 0},null),n(Ee,null,null),n(Pl,null,{default:()=>[n(Ut,null,{default:()=>[oe(b),n("div",null,[X(a.floor(d.value)),s("/"),X(a.floor(b.amount.value))]),Xe(h,_,v,A)]}),ge.bought.value?n(S,null,[n(Ee,null,null),n(Ut,null,{default:()=>[oe(T),n("div",null,[X(D.value),s("/"),X(T.amount.value)]),Xe(W,pe,Q,ve)]})]):void 0,se.bought.value?n(S,null,[n(Ee,null,null),n(Ut,null,{default:()=>[oe(Ae),n("div",null,[X(ie.value),s("/"),X(Ae.amount.value)]),Xe(He,fe,Ce,j)]})]):void 0,lt.coalDrill.bought.value?n(S,null,[n(Ee,null,null),n(Ut,null,{default:()=>[oe(xe),n("div",null,[X(Be.value),s("/"),X(xe.amount.value)]),Xe(Ye,ae,At,We)]})]):void 0]}),n(Ee,null,null),Bl(pt,Mt,mt),Xe(...K)]))}}),yr="workshop",Ul=2,Dt=Rt(yr,function(){const e="Workshop",t="#D66B02",l="#D66B02",i=dt(0,"foundation progress"),o=js(()=>({scaling:Ra(250,1.5),baseResource:me.logs,gainResource:F(i),roundUpCost:!0,buyMax:!1,spend(ie,Ge){me.logs.value=a.sub(me.logs.value,Ge)}})),r=Pt(()=>({display:B(()=>n(S,null,[n("b",{style:"font-size: x-large"},[s("Build part of the foundation")]),n("br",null,null),n("br",null,null),n("span",{style:"font-size: large"},[s("Cost:")," ",Kl(me.logs,a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value)," ",me.logs.displayName])])),visibility:()=>y(a.lt(i.value,100)),canClick:()=>a.gte(o.actualGain.value,1)&&a.lt(i.value,100),onClick(){!u(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"})),d=Dl(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{r.canClick.value&&r.onClick()}})),c=f(()=>!Me.milestones[6].earned.value),p=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})),m=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(p.earned.value),showPopups:c})),b=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(m.earned.value),showPopups:c})),h=P(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>a.gte(i.value,30),visibility:()=>y(b.earned.value),showPopups:c})),A=P(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>a.gte(i.value,40),visibility:()=>y(h.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(A.earned.value),showPopups:c})),_=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(_.earned.value),showPopups:c})),D=P(()=>({display:{requirement:"120% Foundation Completed",effectDisplay:"The 1% milestone is now +2% and multiplicative"},shouldEarn:()=>a.gte(i.value,120),visibility:()=>y(ze.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),H=P(()=>({display:{requirement:"140% Foundation Completed",effectDisplay:"Gain +10% metal for every 10% foundation completed"},shouldEarn:()=>a.gte(i.value,140),visibility:()=>y(ze.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),M=P(()=>({display:{requirement:"160% Foundation Completed",effectDisplay:"Gain +10% oil for every 10% foundation completed"},shouldEarn:()=>a.gte(i.value,160),visibility:()=>y(ze.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),E=P(()=>({display:{requirement:"180% Foundation Completed",effectDisplay:"Gain +10% plastic for every 10% foundation completed"},shouldEarn:()=>a.gte(i.value,180),visibility:()=>y(ze.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),T=P(()=>({display:{requirement:"200% Foundation Completed",effectDisplay:"Double paper, boxes, and all cloth actions"},shouldEarn:()=>a.gte(i.value,200),visibility:()=>y(ze.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),W={logGainMilestone1:p,autoCutMilestone1:m,autoPlantMilestone1:b,autoCutMilestone2:h,autoPlantMilestone2:A,logGainMilestone2:v,morePlantsMilestone1:_,logGainMilestone3:N,extraExpansionMilestone1:D,extraExpansionMilestone2:H,extraExpansionMilestone3:M,extraExpansionMilestone4:E,extraExpansionMilestone5:T},{collapseMilestones:ve,display:Q}=Hl(W),pe=Ht(()=>({direction:Pe.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>R.day.value===Ul?a.div(i.value,100):1,display:B(()=>R.day.value===Ul?n(S,null,[X(i.value),s("%")]):"")}));return qt(()=>{R.day.value===Ul&&a.gte(i.value,100)&&R.completeDay()}),{name:e,day:Ul,color:t,foundationProgress:i,foundationConversion:o,milestones:W,collapseMilestones:ve,minWidth:700,buildFoundationHK:d,display:B(()=>n(S,null,[n("div",null,[R.day.value===Ul?"Complete the foundation to complete the day":`${e} Complete!`]),oe(pe),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}`},[X(i.value)]),s("% completed")]),a.lt(i.value,100)?n(Ee,null,null):null,oe(r),n(Ee,null,null),Q()]))}}),br="elves",Rl=4,Me=Rt(br,function(){const e="Elves",t="red",l="#911D21",o=Ht(()=>({direction:Pe.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>R.day.value===Rl?a.div(ne.value,6).times(.8333333333333334).add(a.div(a.add(q.coal.value,1).log10(),a.log10(1e9)).clamp(0,1).div(6)):1,display:B(()=>R.day.value===Rl?a.lt(ne.value,6)?n(S,null,[X(ne.value),s("/6 elves")]):n(S,null,[X(q.coal.value),s("/"),X(1e9),s(" coal")]):"")})),r=pr(()=>({thingsToReset:[me,Dt,q],onReset(){setTimeout(()=>{Mt.earned.value?(me.row1Upgrades.forEach(ee=>ee.bought.value=!0),me.row2Upgrades.forEach(ee=>ee.bought.value=!0)):Je.earned.value&&(me.row1Upgrades[4].bought.value=!0,me.row2Upgrades[4].bought.value=!0),Te.earned.value&&(Dt.foundationProgress.value=100),mt.earned.value&&(q.warmerCutters.bought.value=!0,q.warmerPlanters.bought.value=!0,q.basicFertilizer.bought.value=!0,q.unlockBonfire.bought.value=!0,q.dedicatedCutters.bought.value=!0,q.dedicatedPlanters.bought.value=!0,q.betterFertilizer.bought.value=!0,q.unlockKiln.bought.value=!0,q.efficientSmelther.bought.value=!0)})}})),d=le(()=>[w(()=>({multiplier:2,description:"6 Elves Trained",enabled:Z.earned})),w(()=>({multiplier:()=>a.times(te.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>a.gt(te.books.cuttersBook.amount.value,0)})),w(()=>({multiplier:2,description:"10 Elves Trained",enabled:Le.earned}))]),c=le(()=>[w(()=>({multiplier:2,description:"6 Elves Trained",enabled:Z.earned})),w(()=>({multiplier:()=>a.times(te.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>a.gt(te.books.plantersBook.amount.value,0)})),w(()=>({multiplier:2,description:"10 Elves Trained",enabled:Le.earned}))]),p=le(()=>[w(()=>({multiplier:2,description:"6 Elves Trained",enabled:Z.earned})),w(()=>({multiplier:()=>a.times(te.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>a.gt(te.books.expandersBook.amount.value,0)})),w(()=>({multiplier:2,description:"10 Elves Trained",enabled:Le.earned}))]),m=le(()=>[w(()=>({multiplier:2,description:"6 Elves Trained",enabled:Z.earned})),w(()=>({multiplier:()=>a.times(te.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>a.gt(te.books.heatedCuttersBook.amount.value,0)})),w(()=>({multiplier:2,description:"10 Elves Trained",enabled:Le.earned}))]),b=le(()=>[w(()=>({multiplier:2,description:"6 Elves Trained",enabled:Z.earned})),w(()=>({multiplier:()=>a.times(te.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>a.gt(te.books.heatedPlantersBook.amount.value,0)})),w(()=>({multiplier:2,description:"10 Elves Trained",enabled:Le.earned}))]),h=le(()=>[w(()=>({multiplier:2,description:"6 Elves Trained",enabled:Z.earned})),w(()=>({multiplier:()=>a.times(te.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>a.gt(te.books.fertilizerBook.amount.value,0)})),w(()=>({multiplier:2,description:"10 Elves Trained",enabled:Le.earned}))]),A=le(()=>[w(()=>({multiplier:2,description:"6 Elves Trained",enabled:Z.earned})),w(()=>({multiplier:()=>a.times(te.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>a.gt(te.books.smallFireBook.amount.value,0)})),w(()=>({multiplier:2,description:"10 Elves Trained",enabled:Le.earned}))]),v=le(()=>[w(()=>({multiplier:2,description:"6 Elves Trained",enabled:Z.earned})),w(()=>({multiplier:()=>a.times(te.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>a.gt(te.books.bonfireBook.amount.value,0)})),w(()=>({multiplier:2,description:"10 Elves Trained",enabled:Le.earned}))]),_=le(()=>[w(()=>({multiplier:2,description:"6 Elves Trained",enabled:Z.earned})),w(()=>({multiplier:()=>a.times(te.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>a.gt(te.books.kilnBook.amount.value,0)})),w(()=>({multiplier:2,description:"10 Elves Trained",enabled:Le.earned}))]),N=le(()=>[w(()=>({multiplier:2,description:"6 Elves Trained",enabled:Z.earned})),w(()=>({multiplier:()=>a.times(te.books.paperBook.amount.value,.1).add(1),description:"The Book Thief",enabled:()=>a.gt(te.books.paperBook.amount.value,0)})),w(()=>({multiplier:2,description:"10 Elves Trained",enabled:Le.earned}))]),D=le(()=>[w(()=>({multiplier:2,description:"6 Elves Trained",enabled:Z.earned})),w(()=>({multiplier:()=>a.times(te.books.boxBook.amount.value,.1).add(1),description:"Not a box",enabled:()=>a.gt(te.books.boxBook.amount.value,0)})),w(()=>({multiplier:2,description:"10 Elves Trained",enabled:Le.earned}))]),H=le(()=>[w(()=>({multiplier:2,description:"6 Elves Trained",enabled:Z.earned})),w(()=>({multiplier:()=>a.times(te.books.clothBook.amount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>a.gt(te.books.clothBook.amount.value,0)})),w(()=>({multiplier:2,description:"10 Elves Trained",enabled:Le.earned}))]),[M,E]=Zt(()=>[{title:"Holly Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:ae.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:ae.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:p,base:10,unit:"/s",visible:ae.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:ae.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:b,base:10,unit:"/s",visible:ae.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:h,base:10,unit:"/s",visible:ae.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:A,base:10,unit:"/s",visible:ae.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:v,base:10,unit:"/s",visible:ae.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:_,base:10,unit:"/s",visible:ae.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:N,base:10,unit:"/s",visible:ae.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:D,base:10,unit:"/s",visible:ae.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:H,base:10,unit:"/s",visible:ae.clothElf.bought}]),T=V(!1),W=B(()=>n(wt,{modelValue:T.value,"onUpdate:modelValue":ee=>T.value=ee},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:M})),ve=f(()=>{let ee=a.pow(4,ne.value).times(1e6);return a.gte(ne.value,9)&&(ee=a.times(ee,1e15)),ee});function Q(ee){var Lt;const nt=_e(0),vt=_e(0),Ct=ee.hasToggle?_e(!1):V(!0),el=f(()=>ee.cooldownModifier.apply(10)),Ft=Et((Lt=ee.canBuy)!=null?Lt:!0);function ft(xt){if(gt.bought.value&&u(Ft)){nt.value=a.add(nt.value,xt);const jt=a.recip(el.value);vt.value+=xt/jt.toNumber(),(Ea(ee.buyable)?ee.buyable:[ee.buyable]).forEach(tl=>{var wl;for(;a.gte(nt.value,jt);)if(ee.customCost==null?u(tl.canPurchase):a.gte(tl.resource.value,ee.customCost(tl.amount.value)))tl.amount.value=a.add(tl.amount.value,1),nt.value=a.sub(nt.value,jt),(wl=ee.onAutoPurchase)==null||wl.call(ee);else{nt.value=jt;break}})}}const gt=O(()=>({...ee,buyable:void 0,toggle:Ct,buyProgress:nt,update:ft,resource:q.coal,cost:ve,computedAutoBuyCooldown:el,amountOfTimesDone:vt,name:ee.name,display:()=>({title:ee.name,description:B(()=>n(S,null,[ee.description,gt.bought.value?null:n(S,null,[" ",s("Training this elf will require resetting all your progress from days 1-3.")]),gt.bought.value&&ee.hasToggle===!0?n(S,null,[n(il,{title:ee.toggleDesc,"onUpdate:modelValue":xt=>Ct.value=xt,modelValue:Ct.value},null)]):null])),showCost:!gt.bought.value}),style:"width: 190px",onPurchase(){var xt;(xt=ee.onPurchase)==null||xt.call(ee),r.reset()}}));return gt}const pe=Q({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:me.row1Buyables[0],cooldownModifier:d}),ie=Q({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:me.row1Buyables[1],cooldownModifier:c}),Ge=Q({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:me.row1Buyables[2],cooldownModifier:p}),Se=[pe,ie,Ge],J=Q({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:q.heatedCutters,cooldownModifier:m}),Ae=Q({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:q.heatedPlanters,cooldownModifier:b}),He=Q({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:q.moreFertilizer,cooldownModifier:h}),j=[J,Ae,He],Ce=Q({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:q.buildFire,cooldownModifier:A,visibility:()=>y(et.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){Ce.toggle.value&&(q.activeFires.value=a.add(q.activeFires.value,1))},onPurchase(){R.days[4].recentlyUpdated.value=!0}}),fe=Q({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:q.buildBonfire,cooldownModifier:v,visibility:()=>y(et.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const ee=u(this.buyable.cost);q.activeFires.value=a.sub(q.activeFires.value,ee).max(0),q.buildFire.amount.value=a.sub(q.buildFire.amount.value,ee).max(0),fe.toggle.value&&(q.activeBonfires.value=a.add(q.activeBonfires.value,1))},onPurchase(){R.days[4].recentlyUpdated.value=!0},canBuy:q.unlockBonfire.bought}),Be=Q({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:q.buildKiln,cooldownModifier:_,visibility:()=>y(et.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){Be.toggle.value&&(q.activeKilns.value=a.add(q.activeKilns.value,1))},onPurchase(){R.days[4].recentlyUpdated.value=!0},canBuy:q.unlockKiln.bought}),Fe=[Ce,fe,Be],xe=Q({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(te.books),cooldownModifier:N,visibility:()=>y(Qe.elfUpgrades.paperElf.bought.value)}),We=Q({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:Object.values(et.buyables),cooldownModifier:D,visibility:()=>y(Qe.elfUpgrades.boxElf.bought.value)}),Ye=Q({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[tt.buildPens,tt.betterShears,tt.fasterSpinning],cooldownModifier:H,visibility:()=>y(Qe.elfUpgrades.clothElf.bought.value)}),At=[xe,We,Ye],ae={cuttersElf:pe,plantersElf:ie,expandersElf:Ge,heatedCuttersElf:J,heatedPlantersElf:Ae,fertilizerElf:He,smallFireElf:Ce,bonfireElf:fe,kilnElf:Be,paperElf:xe,boxElf:We,clothElf:Ye},ne=f(()=>Object.values(ae).filter(ee=>ee.bought.value).length),Ue=P(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>a.gte(ne.value,1)})),Je=P(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>a.gte(ne.value,2),visibility:()=>y(Ue.earned.value)})),ge=P(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>a.gte(ne.value,3),visibility:()=>y(Je.earned.value)})),pt=P(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(ne.value,4),visibility:()=>y(ge.earned.value)})),st=P(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>a.gte(ne.value,5),visibility:()=>y(pt.earned.value)})),Z=P(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>a.gte(ne.value,6),visibility:()=>y(st.earned.value)})),Te=P(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>a.gte(ne.value,7),visibility:()=>y(Z.earned.value&&R.day.value>5)})),se=P(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>a.gte(ne.value,8),visibility:()=>y(Te.earned.value)})),Mt=P(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>a.gte(ne.value,9),visibility:()=>y(se.earned.value)})),Le=P(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>a.gte(ne.value,10),visibility:()=>y(R.day.value>=10)})),mt=P(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>a.gte(ne.value,11),visibility:()=>y(Le.earned.value)})),Nt=P(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>a.gte(ne.value,12),visibility:()=>y(mt.earned.value)})),$=[Ue,Je,ge,pt,st,Z,Te,se,Mt,Le,mt,Nt],re={manualMilestone:Ue,researchMilestone:Je,coalGainMilestone:ge,logGainMilestone:pt,forestMilestone:st,elvesMilestone:Z,foundationMilestone:Te,forestMilestone2:se,treeUpgradesMilestone:Mt,elvesMilestone2:Le,coalUpgradesMilestone:mt,coalGainMilestone2:Nt},{collapseMilestones:K,display:Ie}=Hl(re);return Ke.on("update",ee=>{a.lt(R.day.value,Rl)||Object.values(ae).forEach(nt=>nt.update(ee))}),qt(()=>{R.day.value===Rl&&a.gte(ne.value,6)&&a.gte(q.coal.value,1e9)&&R.completeDay()}),{name:e,color:t,elves:ae,totalElves:ne,milestones:$,collapseMilestones:K,generalTabCollapsed:E,minWidth:700,display:B(()=>n(S,null,[n("div",null,[R.day.value===Rl?`Reach ${X(6)} trained elves and ${X(1e9)} ${q.coal.displayName} to complete the day`:`${e} Complete!`," ",s("-")," ",n("button",{class:"button",style:"display: inline-block;",onClick:()=>T.value=!0},[s("Check Modifiers")])]),oe(o),oe(W),n(Ee,null,null),n("div",{style:"width: 600px"},[Bl(Se,j,Fe,At)]),Ie()]))}}),wr="management",Ol=12,ze=Rt(wr,()=>{const e="Management",t="green",l=Ht(()=>({direction:Pe.Right,width:600,height:25,fillStyle:`backgroundColor: ${t}`,progress:()=>R.day.value===Ol?i.value/(Me.totalElves.value*5):1,display:B(()=>R.day.value===Ol?n(S,null,[X(i.value),s("/"),X(Me.totalElves.value*5)," ",s("elf levels")]):"")})),i=f(()=>{let K=0;for(const Ie of Object.values(At))K+=Ie.level.value;return K}),o=O(()=>({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:me.logs,cost:1e21})),r=O(()=>({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(o.bought.value),resource:et.boxes,style:"width: 150px",cost:1e13})),d=le(()=>[w(()=>({multiplier:()=>Mt.value,description:"Classroom Effect",enabled:()=>r.bought.value}))]),c=d.apply(1);function p(K,Ie,...ee){const nt=_e(0),vt=f(()=>a.pow(10,Ct.value).mul(1e4)),Ct=f(()=>a.min(a.mul(9,nt.value).div(1e4).add(1).log10().floor(),Te.amount.value).toNumber()),el=f(()=>a.sub(nt.value,a.pow(10,Ct.value).sub(1).div(9).mul(1e4))),Ft=Ht(()=>({direction:Pe.Right,width:160,height:12,style:()=>({"margin-top":"8px","box-shadow":ne.value[K.name]?"0 0 12px "+(W.value==K.name?"black":"white"):""}),baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",borderStyle:()=>a.gte(Ct.value,Te.amount.value)?"border-color: red":"",progress:()=>a.div(el.value,vt.value),display:B(()=>a.gte(Ct.value,Te.amount.value)?n(S,null,[s("Limit reached")]):n(S,null,[L(el.value),s("/"),L(vt.value),s(" XP")]))})),{collapseMilestones:ft,display:gt}=Hl(Ie),Lt=le(()=>[w(()=>({multiplier:c,description:"Global XP Multiplier"})),w(()=>({multiplier:ae,description:"Focus Multiplier",enabled:()=>Ue.value<=0&&ne.value[K.name]==!0})),...ee]),xt=f(()=>Lt.apply(.1));return Pt(()=>({display:{title:K.name,description:B(()=>n(S,null,[K.name,s(" is currently at level "),X(Ct.value),s(", and achieved a total of "),L(nt.value),s(" XP. They buy buyables "),X(K.computedAutoBuyCooldown.value),s(" times per second, gaining")," ",a.gte(Ct.value,Te.amount.value)?0:L(a.mul(xt.value,K.computedAutoBuyCooldown.value))," ",s("XP/sec."),oe(Ft)]))},style:()=>({width:"190px",background:W.value==K.name?"var(--foreground)":""}),onClick(){W.value=K.name},canClick(){return W.value!==K.name},name:K.name,state:ft,displayMilestone:gt,level:Ct,exp:nt,milestones:Ie,timeForExp:K.computedAutoBuyCooldown,amountOfTimesDone:K.amountOfTimesDone,elfXPGainComputed:xt,elfXPGain:Lt}))}const m=[P(()=>({display:{requirement:"Holly Level 1",effectDisplay:B(()=>n(S,null,[s("Multiply log gain by "),n("sup",null,[s("3")]),n(pl,null,{default:()=>[s("Cutter amount")]}),s(".")]))},shouldEarn:()=>Q.level.value>=1})),P(()=>({display:{requirement:"Holly Level 2",effectDisplay:"Holly now buys max."},visibility:()=>y(m[0].earned.value),shouldEarn:()=>Q.level.value>=2})),P(()=>({display:{requirement:"Holly Level 3",effectDisplay:B(()=>n(S,null,[s("Multiply all cloth actions' effectiveness by "),n("sup",null,[s("3")]),n(pl,null,{default:()=>[s("Cutter amount")]}),s(".")]))},visibility:()=>y(m[1].earned.value),shouldEarn:()=>Q.level.value>=3})),P(()=>({display:{requirement:"Holly Level 4",effectDisplay:"Multiply cutting speed by 1.1 per day completed"},visibility:()=>y(m[2].earned.value&&R.day.value>=13),shouldEarn:()=>Q.level.value>=4})),P(()=>({display:{requirement:"Holly Level 5",effectDisplay:"Reduce workshop expansion cost by ^0.95"},visibility:()=>y(m[3].earned.value&&R.day.value>=13),shouldEarn:()=>Q.level.value>=5}))],b=[P(()=>({display:{requirement:"Ivy Level 1",effectDisplay:"Planters are now twice as efficent."},shouldEarn:()=>pe.level.value>=1})),P(()=>({display:{requirement:"Ivy Level 2",effectDisplay:"Ivy now buys max."},visibility:()=>y(b[0].earned.value),shouldEarn:()=>pe.level.value>=2})),P(()=>({display:{requirement:"Ivy Level 3",effectDisplay:B(()=>n(S,null,[s("Planting speed is multiplied by x2"),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:()=>pe.level.value>=3})),P(()=>({display:{requirement:"Ivy Level 4",effectDisplay:"Divide planter cost by 10"},visibility:()=>y(b[2].earned.value&&R.day.value>=13),shouldEarn:()=>pe.level.value>=4})),P(()=>({display:{requirement:"Ivy Level 5",effectDisplay:"Boost planting/cutting speed based on which is falling behind"},visibility:()=>y(b[3].earned.value&&R.day.value>=13),shouldEarn:()=>pe.level.value>=5}))],h=[P(()=>({display:{requirement:"Hope Level 1",effectDisplay:"Planting speed boosts forest size"},shouldEarn:()=>ie.level.value>=1})),P(()=>({display:{requirement:"Hope Level 2",effectDisplay:"Hope now buys max."},visibility:()=>y(h[0].earned.value),shouldEarn:()=>ie.level.value>=2})),P(()=>({display:{requirement:"Hope Level 3",effectDisplay:"The workshop can be expanded past 100%, but costs scale faster."},visibility:()=>y(h[1].earned.value),shouldEarn:()=>ie.level.value>=3})),P(()=>({display:{requirement:"Hope Level 4",effectDisplay:"Unlock an elf that autobuys mining drills."},visibility:()=>y(h[2].earned.value&&R.day.value>=13),shouldEarn:()=>ie.level.value>=4})),P(()=>({display:{requirement:"Hope Level 5",effectDisplay:"Unlock an elf that autobuys metal buyables."},visibility:()=>y(h[3].earned.value&&R.day.value>=13),shouldEarn:()=>ie.level.value>=5}))],A=[P(()=>({display:{requirement:"Jack Level 1",effectDisplay:"Heated cutters are less expensive."},shouldEarn:()=>Se.level.value>=1})),P(()=>({display:{requirement:"Jack Level 2",effectDisplay:"Coal gain is raised to the ^1.05"},visibility:()=>y(A[0].earned.value),shouldEarn:()=>Se.level.value>=2})),P(()=>({display:{requirement:"Jack Level 3",effectDisplay:"Jack now buys max."},visibility:()=>y(A[1].earned.value),shouldEarn:()=>Se.level.value>=3})),P(()=>({display:{requirement:"Jack Level 4",effectDisplay:"Oil gain is multiplied based on total elf levels."},visibility:()=>y(A[2].earned.value&&R.day.value>=13),shouldEarn:()=>Se.level.value>=4})),P(()=>({display:{requirement:"Jack Level 5",effectDisplay:"Unlock an elf that autobuys oil buyables."},visibility:()=>y(A[3].earned.value&&R.day.value>=13),shouldEarn:()=>Se.level.value>=5}))],v=[P(()=>({display:{requirement:"Mary Level 1",effectDisplay:"Heated planters are less expensive."},shouldEarn:()=>J.level.value>=1})),P(()=>({display:{requirement:"Mary Level 2",effectDisplay:"Double tree planting speed"},visibility:()=>y(v[0].earned.value),shouldEarn:()=>J.level.value>=2})),P(()=>({display:{requirement:"Mary Level 3",effectDisplay:"Mary now buys max."},visibility:()=>y(v[1].earned.value),shouldEarn:()=>J.level.value>=3})),P(()=>({display:{requirement:"Mary Level 4",effectDisplay:"Metal gain is raised to the 1.1."},visibility:()=>y(v[2].earned.value&&R.day.value>=13),shouldEarn:()=>J.level.value>=4})),P(()=>({display:{requirement:"Mary Level 5",effectDisplay:B(()=>n(S,null,[s("Auto smelting speed is multiplied by "),n(pl,null,{default:()=>[s("total XP/1000")]}),s(".")]))},visibility:()=>y(v[3].earned.value&&R.day.value>=13),shouldEarn:()=>J.level.value>=5}))],_=[P(()=>({display:{requirement:"Noel Level 1",effectDisplay:"Log gain is increased based on total elf level."},shouldEarn:()=>J.level.value>=1})),P(()=>({display:{requirement:"Noel Level 2",effectDisplay:"Fertilized soil is less expensive"},visibility:()=>y(_[0].earned.value),shouldEarn:()=>J.level.value>=2})),P(()=>({display:{requirement:"Noel Level 3",effectDisplay:"Divide the mining drill cost by ln(Total logs + e)"},visibility:()=>y(_[1].earned.value),shouldEarn:()=>J.level.value>=3})),P(()=>({display:{requirement:"Noel Level 4",effectDisplay:B(()=>n(S,null,[s("Reduce oil refinery cost by (Plastic amount)"),n("sup",null,[s("2")])]))},visibility:()=>y(_[2].earned.value&&R.day.value>=13),shouldEarn:()=>J.level.value>=4})),P(()=>({display:{requirement:"Noel Level 5",effectDisplay:"Unlock an elf that autobuys drills and extractors"},visibility:()=>y(_[3].earned.value&&R.day.value>=13),shouldEarn:()=>J.level.value>=5}))],N=[P(()=>({display:{requirement:"Joy Level 1",effectDisplay:"Multiply small fire efficiency by 5."},shouldEarn:()=>j.level.value>=1})),P(()=>({display:{requirement:"Joy Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>y(N[0].earned.value),shouldEarn:()=>j.level.value>=2})),P(()=>({display:{requirement:"Joy Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>y(N[1].earned.value),shouldEarn:()=>j.level.value>=3})),P(()=>({display:{requirement:"Joy Level 4",effectDisplay:"Metal gain is boosted by heavy drills"},visibility:()=>y(N[2].earned.value&&R.day.value>=13),shouldEarn:()=>j.level.value>=4})),P(()=>({display:{requirement:"Joy Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>y(N[3].earned.value&&R.day.value>=13),shouldEarn:()=>j.level.value>=5}))],D=[P(()=>({display:{requirement:"Faith Level 1",effectDisplay:"Multiply bonfire efficiency by 5."},shouldEarn:()=>Ce.level.value>=1})),P(()=>({display:{requirement:"Faith Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>y(D[0].earned.value),shouldEarn:()=>Ce.level.value>=2})),P(()=>({display:{requirement:"Faith Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>y(D[1].earned.value),shouldEarn:()=>Ce.level.value>=3})),P(()=>({display:{requirement:"Faith Level 4",effectDisplay:"Oil gain is boosted by heavy drill drills"},visibility:()=>y(D[2].earned.value&&R.day.value>=13),shouldEarn:()=>Ce.level.value>=4})),P(()=>({display:{requirement:"Faith Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>y(D[3].earned.value&&R.day.value>=13),shouldEarn:()=>Ce.level.value>=5}))],H=[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(H[0].earned.value),shouldEarn:()=>fe.level.value>=2})),P(()=>({display:{requirement:"Snowball Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>y(H[1].earned.value),shouldEarn:()=>fe.level.value>=3})),P(()=>({display:{requirement:"Snowball Level 4",effectDisplay:"Plastic gain is boosted by heavy extractors"},visibility:()=>y(H[2].earned.value&&R.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(H[3].earned.value&&R.day.value>=13),shouldEarn:()=>fe.level.value>=5}))],M=[P(()=>({display:{requirement:"Star Level 1",effectDisplay:"Book cost is divided by total books bought."},shouldEarn:()=>Fe.level.value>=1})),P(()=>({display:{requirement:"Star Level 2",effectDisplay:"Paper requires 10x less ash"},visibility:()=>y(M[0].earned.value),shouldEarn:()=>Fe.level.value>=2})),P(()=>({display:{requirement:"Star Level 3",effectDisplay:"Book cost scaling 5x -> 4x"},visibility:()=>y(M[1].earned.value),shouldEarn:()=>Fe.level.value>=3})),P(()=>({display:{requirement:"Star Level 4",effectDisplay:B(()=>n(S,null,[s("Multiply XP requirements by 0.95"),n("sup",null,[s("(total books)")])]))},visibility:()=>y(M[2].earned.value&&R.day.value>=13),shouldEarn:()=>Fe.level.value>=4})),P(()=>({display:{requirement:"Star Level 5",effectDisplay:"Gain 5 free books for all level 5 elves"},visibility:()=>y(M[3].earned.value&&R.day.value>=13),shouldEarn:()=>Fe.level.value>=5}))],E=[P(()=>({display:{requirement:"Bell Level 1",effectDisplay:B(()=>n(S,null,[s("Every box buyable adds "),n(pl,null,{default:()=>[s("level")]}),s(" levels to same-row box buyables.")]))},shouldEarn:()=>xe.level.value>=1})),P(()=>({display:{requirement:"Bell Level 2",effectDisplay:"Box gain ^1.1"},visibility:()=>y(E[0].earned.value),shouldEarn:()=>xe.level.value>=2})),P(()=>({display:{requirement:"Bell Level 3",effectDisplay:"All box buyables scaling bases -1"},visibility:()=>y(E[1].earned.value),shouldEarn:()=>xe.level.value>=3})),P(()=>({display:{requirement:"Bell Level 4",effectDisplay:"Unlock a second row of box buyables"},visibility:()=>y(E[2].earned.value&&R.day.value>=13),shouldEarn:()=>xe.level.value>=4})),P(()=>({display:{requirement:"Bell Level 5",effectDisplay:"Unlock another row of box upgrades"},visibility:()=>y(E[3].earned.value&&R.day.value>=13),shouldEarn:()=>xe.level.value>=5}))],T=[P(()=>({display:{requirement:"Gingersnap Level 1",effectDisplay:"Multiply all primary dye colors by ln(cloth + e)."},shouldEarn:()=>We.level.value>=1})),P(()=>({display:{requirement:"Gingersnap Level 2",effectDisplay:B(()=>n(S,null,[s("Multiply all cloth actions' effectiveness by log"),n("sub",null,[s("10")]),s("(dye sum + 10)")]))},visibility:()=>y(T[0].earned.value),shouldEarn:()=>We.level.value>=2})),P(()=>({display:{requirement:"Gingersnap Level 3",effectDisplay:"Double all dye colors and cloth actions, but reset all dyes."},visibility:()=>y(T[1].earned.value),shouldEarn:()=>We.level.value>=3,onComplete(){["red","yellow","blue","orange","green","purple"].forEach(K=>{$e.dyes[K].amount.value=0,$e.dyes[K].buyable.amount.value=0})}})),P(()=>({display:{requirement:"Gingersnap Level 4",effectDisplay:B(()=>n(S,null,[s("Multiply ALL dye gain by")," ",n(tr,null,{default:()=>[n("div",null,[n(pl,null,{default:()=>[s("classrooms")]})]),n("div",null,[s("2")])]}),s("+1, but reset all dyes.")]))},visibility:()=>y(T[2].earned.value&&R.day.value>=13),shouldEarn:()=>We.level.value>=4})),P(()=>({display:{requirement:"Gingersnap Level 5",effectDisplay:"Well depth divides metal machine costs"},visibility:()=>y(T[3].earned.value&&R.day.value>=13),shouldEarn:()=>We.level.value>=5}))],W=_e("Holly"),ve=B(()=>{const K=Object.values(At).find(Ie=>Ie.name===W.value);return K==null?(console.warn("This should not happen.",W.value),""):n(S,null,[W.value,s("'s milestones: "),K.displayMilestone()])}),Q=p(Me.elves.cuttersElf,m),pe=p(Me.elves.plantersElf,b),ie=p(Me.elves.expandersElf,h),Ge=[Q,pe,ie],Se=p(Me.elves.heatedCuttersElf,A),J=p(Me.elves.heatedPlantersElf,v),Ae=p(Me.elves.fertilizerElf,_),He=[Se,J,Ae],j=p(Me.elves.smallFireElf,N),Ce=p(Me.elves.bonfireElf,D),fe=p(Me.elves.kilnElf,H),Be=[j,Ce,fe],Fe=p(Me.elves.paperElf,M),xe=p(Me.elves.boxElf,E),We=p(Me.elves.clothElf,T),Ye=[Fe,xe,We],At={cutterElfTraining:Q,planterElfTraining:pe,expandersElfTraining:ie,heatedCutterElfTraining:Se,heatedPlanterElfTraining:J,fertilizerElfTraining:Ae,smallfireElfTraining:j,bonfireElfTraining:Ce,kilnElfTraining:fe,paperElfTraining:Fe,boxElfTraining:xe,clothElfTraining:We};Ke.on("update",K=>{if(!(R.day.value<Ol)){for(const Ie of Object.values(At)){const ee=Math.floor(Ie.amountOfTimesDone.value);ee>=1&&(Ie.amountOfTimesDone.value-=ee,a.lt(Ie.level.value,Te.amount.value)&&(Ie.exp.value=a.mul(Ie.elfXPGainComputed.value,ee).add(Ie.exp.value)))}Ue.value>0?(Ue.value+=K,ae.value=a.pow(Je.value,1-Math.abs(Math.sin((Ue.value-1)*3))),st(12,3)):Ue.value=Math.min(Ue.value+K,0)}});const ae=_e(1),ne=_e({}),Ue=_e(0),Je=f(()=>10),ge=Ht(()=>({direction:Pe.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(ae.value,1).div(a.sub(Je.value,1)).toNumber(),display:B(()=>n(S,null,[L(ae.value),s("x")]))})),pt=Pt(()=>({display:{title:"Focus",description:B(()=>n(S,null,[Ue.value<=0?n(S,null,[s("Motivate elves to focus, multiplying 3 random elves' XP gain by up to "),L(Je.value),s("x")]):"Click to stop the focus bar",Ue.value<0?n(S,null,[n("br",null,null),s("Reroll cooldown: "),Wl(-Ue.value)]):""]))},style:{width:"300px"},canClick:()=>Ue.value>=0,onClick(){Ue.value==0?Ue.value=1:Ue.value>0&&(Ue.value=-30)}}));function st(K,Ie){var nt,vt;let ee=0;for(ne.value={},Ie=Math.min(Ie,K);ee<Ie;){const Ct=(vt=(nt=Object.values(At)[Math.floor(Math.random()*K)])==null?void 0:nt.name)!=null?vt:"";ne.value[Ct]||(ne.value[Ct]=!0,ee++)}}const Z=f(()=>{const K=a.pow(10,Te.amount.value);return{wood:K.mul(1e21),coal:K.mul(1e32),paper:K.mul(1e19),boxes:K.mul(1e13),metalIngots:K.mul(1e12),cloth:K.mul(1e4),plastic:K.mul(1e6),dye:a.add(Te.amount.value,1).mul(1e4)}}),Te=Re(()=>({display:B(()=>n(S,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 "),X(Te.amount.value),s(" schools, which are currently letting elves learn up to level")," ",X(Te.amount.value),s(".")]),n("div",null,[s("Costs "),L(Z.value.wood),s(" logs, "),L(Z.value.coal)," ",s("coal, "),L(Z.value.paper),s(" paper, "),L(Z.value.boxes)," ",s("boxes, "),L(Z.value.metalIngots),s(" metal ingots,")," ",L(Z.value.cloth),s(" cloth, "),L(Z.value.plastic)," ",s("plastic, and requires "),L(Z.value.dye),s(" of red, yellow, and blue dye")])])),canPurchase(){return Z.value.wood.lte(me.logs.value)&&Z.value.coal.lte(q.coal.value)&&Z.value.paper.lte(te.paper.value)&&Z.value.boxes.lte(et.boxes.value)&&Z.value.metalIngots.lte(lt.metal.value)&&Z.value.cloth.lte(tt.cloth.value)&&Z.value.plastic.lte(Qe.plastic.value)&&Z.value.dye.lte($e.dyes.blue.amount.value)&&Z.value.dye.lte($e.dyes.red.amount.value)&&Z.value.dye.lte($e.dyes.yellow.amount.value)},onPurchase(){me.logs.value=a.sub(me.logs.value,Z.value.wood),q.coal.value=a.sub(q.coal.value,Z.value.coal),te.paper.value=a.sub(te.paper.value,Z.value.paper),et.boxes.value=a.sub(et.boxes.value,Z.value.boxes),lt.metal.value=a.sub(lt.metal.value,Z.value.metalIngots),tt.cloth.value=a.sub(tt.cloth.value,Z.value.cloth),Qe.plastic.value=a.sub(Qe.plastic.value,Z.value.plastic),this.amount.value=a.add(this.amount.value,1)},purchaseLimit:5,visibility:f(()=>y(o.bought.value)),style:"width: 600px"})),se=f(()=>{const K=a.add(Te.amount.value,1).pow(1.5);return{wood:K.mul(1e21),coal:K.mul(1e32),paper:K.mul(1e19),boxes:K.mul(1e13),metalIngots:K.mul(1e12),cloth:K.mul(1e4),plastic:K.mul(1e6),dye:K.mul(1e4)}}),Mt=f(()=>a.add(Le.amount.value,1).sqrt()),Le=Re(()=>({display:B(()=>n(S,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 "),X(Te.amount.value),s(" classrooms, which are currently multiplying elves' XP gain by "),L(Mt.value)]),n("div",null,[s("Costs "),L(se.value.wood),s(" logs,")," ",L(se.value.coal),s(" coal, "),L(se.value.paper)," ",s("paper, "),L(se.value.boxes),s(" boxes,")," ",L(se.value.metalIngots),s(" metal ingots,")," ",L(se.value.cloth),s(" cloth, "),L(se.value.plastic)," ",s("plastic, and requires "),L(se.value.dye),s(" of red, yellow, and blue dye")])])),canPurchase(){return se.value.wood.lte(me.logs.value)&&se.value.coal.lte(q.coal.value)&&se.value.paper.lte(te.paper.value)&&se.value.boxes.lte(et.boxes.value)&&se.value.metalIngots.lte(lt.metal.value)&&se.value.cloth.lte(tt.cloth.value)&&se.value.plastic.lte(Qe.plastic.value)&&se.value.dye.lte($e.dyes.blue.amount.value)&&se.value.dye.lte($e.dyes.red.amount.value)&&se.value.dye.lte($e.dyes.yellow.amount.value)},onPurchase(){me.logs.value=a.sub(me.logs.value,se.value.wood),q.coal.value=a.sub(q.coal.value,se.value.coal),te.paper.value=a.sub(te.paper.value,se.value.paper),et.boxes.value=a.sub(et.boxes.value,se.value.boxes),lt.metal.value=a.sub(lt.metal.value,se.value.metalIngots),tt.cloth.value=a.sub(tt.cloth.value,se.value.cloth),Qe.plastic.value=a.sub(Qe.plastic.value,se.value.plastic),this.amount.value=a.add(this.amount.value,1)},visibility:f(()=>y(r.bought.value)),style:"width: 600px"})),[mt,Nt]=Zt(()=>[{title:"Global XP Gain",modifier:d,unit:" XP"},{title:"Holly XP Gain per Action",modifier:Q.elfXPGain,base:.1,unit:" XP"},{title:"Ivy XP Gain per Action",modifier:pe.elfXPGain,base:.1,unit:" XP"},{title:"Hope XP Gain per Action",modifier:ie.elfXPGain,base:.1,unit:" XP"},{title:"Jack XP Gain per Action",modifier:Se.elfXPGain,base:.1,unit:" XP"},{title:"Mary XP Gain per Action",modifier:J.elfXPGain,base:.1,unit:" XP"},{title:"Noel XP Gain per Action",modifier:Ae.elfXPGain,base:.1,unit:" XP"},{title:"Joy XP Gain per Action",modifier:j.elfXPGain,base:.1,unit:" XP"},{title:"Faith XP Gain per Action",modifier:Ce.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:Fe.elfXPGain,base:.1,unit:" XP"},{title:"Bell XP Gain per Action",modifier:xe.elfXPGain,base:.1,unit:" XP"},{title:"Gingersnap XP Gain per Action",modifier:We.elfXPGain,base:.1,unit:" XP"}]),$=V(!1),re=B(()=>n(wt,{modelValue:$.value,"onUpdate:modelValue":K=>$.value=K},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:mt}));return{name:e,day:Ol,color:t,minWidth:700,elfTraining:At,currentShown:W,generalTabCollapsed:Nt,teaching:o,schools:Te,classrooms:Le,classroomUpgrade:r,focusMultiplier:ae,focusTargets:ne,focusRolling:Ue,display:B(()=>n(S,null,[R.day.value===Ol?"Get all elves to level 5.":`${e} Complete!`,s(" -"),n("button",{class:"button",style:"display: inline-block;",onClick:()=>$.value=!0},[s("Check Modifiers")]),oe(re),oe(l),n("br",null,null),Vt(Te,Le)," ",Bl([o,r]),a.gt(Te.amount.value,0)?n(S,null,[n("br",null,null),s("Click on an elf to see their milestones."),n("br",null,null),n("br",null,null),oe(pt),n("br",null,null),Bl([ge],Ge,He,Be,Ye),n(Ee,null,null),ve()]):""]))}}),Ar="cloth",ai=8,tt=Rt(Ar,function(){const e="Cloth",t="white",l=dt(0,"cloth"),i=dt(0,"wool"),o=dt(10,"sheep"),r=_e(0),d=Ht(()=>({direction:Pe.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,ae.value)})),c=Pt(()=>({display:{title:"Breed sheep",description:B(()=>n(S,null,[s("Breed "),be(a.floor(Ye.value)),s(" sheep"),n("br",null,null),oe(d)]))},style:{minHeight:"80px"},canClick:()=>a.gte(r.value,ae.value),onClick(){if(a.lt(r.value,ae.value))return;const re=a.floor(Ye.value);o.value=a.add(o.value,re),r.value=0}})),p=_e(0),m=Ht(()=>({direction:Pe.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(p.value,ge.value)})),b=Pt(()=>({display:{title:"Shear sheep",description:B(()=>n(S,null,[s("Shear up to "),be(a.floor(Ue.value)),s(" sheep"),n("br",null,null),oe(m)]))},style:{minHeight:"80px"},canClick:()=>a.gte(p.value,ge.value),onClick(){if(a.lt(p.value,ge.value))return;const re=a.min(o.value,Ue.value).floor();i.value=a.add(i.value,re),p.value=0}})),h=_e(0),A=Ht(()=>({direction:Pe.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(h.value,Te.value)})),v=Pt(()=>({display:{title:"Spinning wool",description:B(()=>n(S,null,[s("Spin "),be(a.floor(st.value)),s(" wool"),n("br",null,null),oe(A)]))},style:{minHeight:"80px"},canClick:()=>a.gte(h.value,Te.value),onClick(){if(a.lt(h.value,Te.value))return;const re=a.min(i.value,st.value).floor();l.value=a.add(l.value,re),i.value=a.sub(i.value,re),h.value=0}})),_=Dl(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{c.canClick.value&&c.onClick()}})),N=Dl(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{b.canClick.value&&b.onClick()}})),D=Dl(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{v.canClick.value&&v.onClick()}})),H=Re(()=>({resource:me.logs,cost(){let re=this.amount.value;return a.gte(re,100)&&(re=a.pow(re,2).div(100)),re=a.pow(.95,te.books.clothBook.amount.value).times(re),a.pow(1.5,re).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),M=Re(()=>({resource:lt.metal,cost(){let re=this.amount.value;return a.gte(re,100)&&(re=a.pow(re,2).div(100)),re=a.pow(.95,te.books.clothBook.amount.value).times(re),a.pow(1.4,re).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),E=Re(()=>({resource:te.paper,cost(){let re=this.amount.value;return a.gte(re,100)&&(re=a.pow(re,2).div(100)),re=a.pow(.95,te.books.clothBook.amount.value).times(re),a.pow(1.3,re).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),T=O(()=>({resource:F(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),W=O(()=>({resource:F(i),cost:150,visibility:()=>y(T.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),ve=O(()=>({resource:F(o),cost:200,visibility:()=>y(W.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),pe={treesUpgrade4:O(()=>({resource:F(l),cost:1e3,visibility:()=>y(Qe.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x log gain"}})),treesUpgrade3:ve,treesUpgrade2:W,treesUpgrade1:T},ie=O(()=>({resource:F(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),Ge=O(()=>({resource:F(i),cost:225,visibility:()=>y(ie.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),Se=O(()=>({resource:F(o),cost:300,visibility:()=>y(Ge.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),Ae={metalUpgrade4:O(()=>({resource:F(l),cost:2e3,visibility:()=>y(Qe.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:Se,metalUpgrade2:Ge,metalUpgrade1:ie},He=O(()=>({resource:F(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),j=O(()=>({resource:F(i),cost:200,visibility:()=>y(He.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),Ce=O(()=>({resource:F(o),cost:400,visibility:()=>y(j.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),Be={paperUpgrade4:O(()=>({resource:F(l),cost:4e3,visibility:()=>y(Qe.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:Ce,paperUpgrade2:j,paperUpgrade1:He},Fe=f(()=>a.add(me.computedAutoCuttingAmount.value,1).log10().add(1)),xe=f(()=>a.add($e.dyeSum.value,10).log10()),We=le(()=>[de(()=>({addend:H.amount,description:"Build more pens"})),w(()=>({multiplier:()=>a.div(Qe.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Qe.buyables.clothGains.amount.value,1)})),w(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:te.upgrades.clothUpgrade.bought})),w(()=>({multiplier:xe,description:"Gingersnap Level 2",enabled:ze.elfTraining.clothElfTraining.milestones[1].earned})),w(()=>({multiplier:Fe,description:"Holly Level 3",enabled:ze.elfTraining.cutterElfTraining.milestones[2].earned}))]),Ye=f(()=>We.apply(1)),At=le(()=>[]),ae=f(()=>At.apply(1)),ne=le(()=>[de(()=>({addend:M.amount,description:"Make stronger shears"})),w(()=>({multiplier:()=>a.div(Qe.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Qe.buyables.clothGains.amount.value,1)})),w(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:te.upgrades.clothUpgrade.bought})),w(()=>({multiplier:xe,description:"Gingersnap Level 2",enabled:ze.elfTraining.clothElfTraining.milestones[1].earned})),w(()=>({multiplier:Fe,description:"Holly Level 3",enabled:ze.elfTraining.cutterElfTraining.milestones[2].earned}))]),Ue=f(()=>ne.apply(1)),Je=le(()=>[]),ge=f(()=>Je.apply(1)),pt=le(()=>[de(()=>({addend:E.amount,description:"Learn how to spin"})),w(()=>({multiplier:()=>a.div(Qe.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Qe.buyables.clothGains.amount.value,1)})),w(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:te.upgrades.clothUpgrade.bought})),w(()=>({multiplier:xe,description:"Gingersnap Level 2",enabled:ze.elfTraining.clothElfTraining.milestones[1].earned})),w(()=>({multiplier:Fe,description:"Holly Level 3",enabled:ze.elfTraining.cutterElfTraining.milestones[2].earned}))]),st=f(()=>pt.apply(1)),Z=le(()=>[]),Te=f(()=>Z.apply(1)),[se,Mt]=Zt(()=>[{title:"Sheep Gain",modifier:We,base:1},{title:"Sheep Breeding Cooldown",modifier:At,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:ne,base:1},{title:"Shearing Cooldown",modifier:Je,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:pt,base:1},{title:"Spinning Cooldown",modifier:Z,base:1,visible:!1,unit:"s"}]),Le=V(!1),mt=B(()=>n(wt,{modelValue:Le.value,"onUpdate:modelValue":re=>Le.value=re},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:se}));Ke.on("update",re=>{a.lt(R.day.value,ai)||(a.gte(r.value,ae.value)?r.value=ae.value:(r.value=a.add(r.value,re),c.isHolding.value&&c.onClick()),a.gte(p.value,ge.value)?p.value=ge.value:(p.value=a.add(p.value,re),b.isHolding.value&&b.onClick()),a.gte(h.value,Te.value)?h.value=Te.value:(h.value=a.add(h.value,re),v.isHolding.value&&v.onClick()))});const{total:Nt,trackerDisplay:$}=rl({resource:l,goal:1e3,name:e,day:ai,color:t,textColor:"var(--feature-foreground)",modal:{show:Le,display:mt}});return{name:e,color:t,cloth:l,totalCloth:Nt,wool:i,sheep:o,buildPens:H,betterShears:M,fasterSpinning:E,treesUpgrades:pe,metalUpgrades:Ae,paperUpgrades:Be,generalTabCollapsed:Mt,breedingProgress:r,shearingProgress:p,spinningProgress:h,breedSheepHK:_,shearSheepHK:N,spinWoolHK:D,minWidth:700,display:B(()=>n(S,null,[oe($),n(Ee,null,null),n(Tt,{resource:l,style:"margin-bottom: 0"},null),n(Tt,{resource:i,style:"margin-bottom: 0"},null),n(Tt,{resource:o,style:"margin-bottom: 0"},null),Xe(c,b,v),Xe(H,M,E),n(Ee,null,null),n(Pl,null,{default:()=>[Vt(...Object.values(pe)),Vt(...Object.values(Ae)),Vt(...Object.values(Be))]})]))}}),Cr="dyes",kr=11,$e=Rt(Cr,function(){const e="Dyes",t="#D4D4F4";function l(v){const _=dt(0,v.name),N=le(()=>{const M=[de(()=>({addend:()=>a.add(H.amount.value,1),description:`${v.name} Chambers`}))];return(v.color==="red"||v.color==="yellow")&&M.push(w(()=>({multiplier:o.orange1,description:"Orange Dye Boost 1"}))),(v.color=="yellow"||v.color=="blue")&&M.push(w(()=>({multiplier:o.green1,description:"Green Dye Boost 1"}))),(v.color=="red"||v.color=="blue")&&M.push(w(()=>({multiplier:o.purple1,description:"Purple Dye Boost 1"}))),(v.color=="red"||v.color=="yellow"||v.color=="blue")&&(M.push(w(()=>({multiplier:2,description:"Wetter Dyes",enabled:c.yellowDyeUpg.bought}))),M.push(w(()=>({multiplier:()=>a.add(tt.cloth.value,Math.E).ln(),description:"Gingersnap Level 1",enabled:ze.elfTraining.clothElfTraining.milestones[0].earned})))),M.push(w(()=>({multiplier:2,description:"Gingersnap Level 3",enabled:ze.elfTraining.clothElfTraining.milestones[2].earned}))),M}),D=f(()=>N.apply(0)),H=Re(()=>{const M=Et(v.costs);return{...v,style:()=>({backgroundColor:u(H.canPurchase)?t:"#545454",minWidth:"200px"}),display:B(()=>n("span",null,[n("h3",null,[v.name,s(" Chambers")]),n("br",null,null),s("Create "),L(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=>oe(B(()=>n("div",null,[u(E.desc)]))))]),n("br",null,null),n("div",null,[s("Cost:")," ",u(M).map(E=>oe(B(()=>{var T,W;return n("div",null,[L(u(a.pow((T=u(H.cost))!=null?T:a.dInf,u((W=E.root)!=null?W:1)).times(u(E.base))))," ",E.res.displayName,n("br",null,null)])})))])])),cost(){let E=H.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 W;if(u(H.visibility)!=bt.Visible)return!1;const T=(W=E!=null?E:u(H.cost))!=null?W:a.dInf;return u(M).every(ve=>{var Q;return a.div(ve.res.value,u(ve.base)).root(u((Q=ve.root)!=null?Q:1)).gte(T)})}),onPurchase(E){var W;const T=(W=E!=null?E:u(H.cost))!=null?W:a.dInf;u(M).forEach(ve=>{var Q;ve.res.value=a.sub(ve.res.value,a.pow(T,u((Q=ve.root)!=null?Q:1)).times(u(ve.base)))}),_.value=a.add(_.value,D.value),H.amount.value=a.add(H.amount.value,1),v.dyesToReset.forEach(ve=>ve.reset())}}});return{name:v.name,amount:_,buyable:H,toGenerate:N,computedToGenerate:D,display:B(()=>n(Tt,{resource:_,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:me.logs},{base:f(()=>c.yellowDyeUpg2.bought.value?"2.5e5":"5e5"),root:2,res:Ze.oil}],listedBoosts:[{visible:!0,desc:f(()=>`+${L(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:me.logs},{base:f(()=>c.yellowDyeUpg2.bought.value?"5e5":"1e6"),root:2,res:Ze.oil}],listedBoosts:[{visible:!0,desc:f(()=>`x${L(o.yellow1.value)} Paper & Plastic gain`)}],dyesToReset:[]}),blue:l({name:"Blue Dye",color:"blue",costs:()=>[{base:"5e17",root:5,res:me.logs},{base:f(()=>c.yellowDyeUpg2.bought.value?"1e6":"2e6"),root:2,res:Ze.oil}],listedBoosts:[{visible:!0,desc:f(()=>`+${X(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${L(o.orange1.value)} Red and Yellow Dye gain`)},{visible:!0,desc:f(()=>`/${L(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${L(o.green1.value)} Yellow and Blue Dye gain`)},{visible:!0,desc:f(()=>`+${X(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${L(o.purple1.value)} Red and Blue Dye gain`)},{visible:!0,desc:f(()=>`x${L(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]=Zt(()=>[{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:O(()=>({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:B(()=>n(S,null,[s("Multiply Log gain by log"),n("sub",null,[s("10")]),s("(Auto Cutting Amount)+1.")]))},cost:1e3,resource:F(i.blue.amount),onPurchase(){i.blue.amount.value=0,i.blue.buyable.amount.value=0}})),redDyeUpg:O(()=>({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:B(()=>n(S,null,[s("Multiply Ore Purity by log"),n("sub",null,[s("10")]),s("(Cloth)+1.")]))},cost:1500,resource:F(i.red.amount),onPurchase(){i.red.amount.value=0,i.red.buyable.amount.value=0}})),yellowDyeUpg:O(()=>({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:F(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:O(()=>({visibility:()=>y(c.yellowDyeUpg.bought.value),display:{title:"Golden Wash",description:"Halve the Oil cost of Red, Yellow, and Blue Dyes."},cost:5e3,resource:F(i.yellow.amount),onPurchase(){i.yellow.amount.value=0,i.yellow.buyable.amount.value=0}})),redDyeUpg2:O(()=>({visibility:()=>y(c.redDyeUpg.bought.value),display:{title:"De Louvre",description:B(()=>n(S,null,[s("Multiply Smelting Speed by "),n(pl,null,{default:()=>[s("Refineries+1")]}),s(".")]))},cost:6e3,resource:F(i.red.amount),onPurchase(){i.red.amount.value=0,i.red.buyable.amount.value=0}})),blueDyeUpg2:O(()=>({visibility:()=>y(c.blueDyeUpg.bought.value),display:{title:"Hydrophobia",description:"Raise Red Dye's effect ^1.5."},cost:7500,resource:F(i.blue.amount),onPurchase(){i.blue.amount.value=0,i.blue.buyable.amount.value=0}})),coalUpg:O(()=>({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:q.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}}))},p=V(!1),m=B(()=>n(wt,{modelValue:p.value,"onUpdate:modelValue":v=>p.value=v},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:r})),b=dt(f(()=>Object.values(i).reduce((v,_)=>a.add(v,_.amount.value),0)),"Sum of Dyes"),{total:h,trackerDisplay:A}=rl({resource:b,goal:6e4,name:e,day:kr,color:t,textColor:"var(--feature-foreground)",modal:{show:p,display:m},ignoreTotal:!0});return{name:e,color:t,dyes:i,dyeSum:b,boosts:o,totalDyeSum:h,minWidth:700,generalTabCollapsed:d,upgrades:c,display:B(()=>n(S,null,[oe(A),n(Ee,null,null),n("div",{style:"width: 620px"},[Xe(i.red.display,i.yellow.display,i.blue.display),Xe(i.red.buyable,i.yellow.buyable,i.blue.buyable),n(Ee,null,null),Xe(i.orange.display,i.green.display,i.purple.display),Xe(i.orange.buyable,i.green.buyable,i.purple.buyable)]),n(Ee,null,null),n("div",{class:"row",style:"vertical-align: top"},[Vt(c.redDyeUpg,c.redDyeUpg2),Vt(c.yellowDyeUpg,c.yellowDyeUpg2),Vt(c.blueDyeUpg,c.blueDyeUpg2)]),oe(c.coalUpg)]))}}),Er="boxes",ka=6,et=Rt(Er,function(){const e="Boxes",t="#964B00",l=dt(0,"boxes"),i=le(()=>[Ua(()=>({exponent:1.1,description:"Bell Level 2",enabled:ze.elfTraining.boxElfTraining.milestones[1].earned}))]),o=Ti(()=>({scaling:Ra(1e10,1),baseResource:me.logs,gainResource:F(l),roundUpCost:!0,gainModifier:i})),r=Pt(()=>({display:B(()=>n(S,null,[n("span",{style:"font-size: large"},[s("Create "),X(o.currentGain.value),s(" "),l.displayName]),n("br",null,null),n("span",{style:"font-size: large"},[s("Cost:")," ",Kl(me.logs,a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value)," ",me.logs.displayName])])),canClick:()=>a.gte(o.actualGain.value,1),onClick(){!u(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"})),d=O(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){R.days[3].recentlyUpdated.value=!0},resource:F(l),cost:100})),c=O(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){R.days[3].recentlyUpdated.value=!0},resource:F(l),cost:1e3})),p=O(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){R.days[3].recentlyUpdated.value=!0},resource:F(l),cost:4e3})),m={logsUpgrade:d,ashUpgrade:c,coalUpgrade:p},b=O(()=>({resource:F(l),cost:1e8,visibility:()=>y(Qe.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),h=O(()=>({resource:F(l),cost:1e9,visibility:()=>y(Qe.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),A=O(()=>({resource:F(l),cost:1e10,visibility:()=>y(Qe.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),v={oreUpgrade:b,metalUpgrade:h,plasticUpgrade:A},_=O(()=>({resource:F(l),cost:1e16,visibility:()=>y(ze.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry cloth in boxes",description:"Double all cloth actions"}})),N=O(()=>({resource:F(l),cost:1e17,visibility:()=>y(ze.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry dye in boxes",description:"Double all dye gain"}})),D=O(()=>({resource:F(l),cost:1e18,visibility:()=>y(ze.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry experience in boxes???",description:"Double xp gain"}})),H={clothUpgrade:_,dyeUpgrade:N,xpUpgrade:D},M=Re(()=>({display:{title:"Carry more logs",description:B(()=>n(S,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: "),X(M.amount.value),a.gt(M.freeLevels.value,0)?n(S,null,[s(" (+"),X(M.freeLevels.value),s(")")]):null])])),effectDisplay:B(()=>n(S,null,[L(a.div(M.totalAmount.value,2).add(1)),s("x")])),showAmount:!1},resource:F(l),cost(){let J=this.amount.value;J=a.pow(.95,te.books.boxBook.amount.value).times(J);let Ae=3;return ze.elfTraining.boxElfTraining.milestones[2].earned.value&&Ae--,a.pow(Ae,J).times(100).div($e.boosts.orange2.value)},visibility:()=>y(d.bought.value),freeLevels:f(()=>ze.elfTraining.boxElfTraining.milestones[0].earned.value?a.max(E.amount.value,1).sqrt().floor().add(a.max(T.amount.value,1).sqrt().floor()):0),totalAmount:f(()=>a.add(M.amount.value,M.freeLevels.value))})),E=Re(()=>({display:{title:"Carry more ash",description:B(()=>n(S,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: "),X(E.amount.value),a.gt(E.freeLevels.value,0)?n(S,null,[s(" (+"),X(E.freeLevels.value),s(")")]):null])])),effectDisplay:B(()=>n(S,null,[L(a.div(E.totalAmount.value,2).add(1)),s("x")])),showAmount:!1},resource:F(l),cost(){let J=this.amount.value;J=a.pow(.95,te.books.boxBook.amount.value).times(J);let Ae=5;return ze.elfTraining.boxElfTraining.milestones[2].earned.value&&Ae--,a.pow(Ae,J).times(1e3).div($e.boosts.orange2.value)},visibility:()=>y(c.bought.value),freeLevels:f(()=>ze.elfTraining.boxElfTraining.milestones[0].earned.value?a.max(M.amount.value,1).sqrt().floor().add(a.max(T.amount.value,1).sqrt().floor()):0),totalAmount:f(()=>a.add(E.amount.value,E.freeLevels.value))})),T=Re(()=>({display:{title:"Carry more coal",description:B(()=>n(S,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: "),X(T.amount.value),a.gt(T.freeLevels.value,0)?n(S,null,[s(" (+"),X(T.freeLevels.value),s(")")]):null])])),effectDisplay:B(()=>n(S,null,[L(a.div(T.totalAmount.value,2).add(1)),s("x")])),showAmount:!1},resource:F(l),cost(){let J=this.amount.value;J=a.pow(.95,te.books.boxBook.amount.value).times(J);let Ae=7;return ze.elfTraining.boxElfTraining.milestones[2].earned.value&&Ae--,a.pow(Ae,J).times(1e3).div($e.boosts.orange2.value)},visibility:()=>y(p.bought.value),freeLevels:f(()=>ze.elfTraining.boxElfTraining.milestones[0].earned.value?a.max(M.amount.value,1).sqrt().floor().add(a.max(E.amount.value,1).sqrt().floor()):0),totalAmount:f(()=>a.add(T.amount.value,T.freeLevels.value))})),W={logBoxesBuyable:M,ashBoxesBuyable:E,coalBoxesBuyable:T};Ke.on("update",J=>{a.lt(R.day.value,ka)||(l.value=a.times(J,Qe.buyables.passiveBoxes.amount.value).times(o.currentGain.value).div(100).add(l.value))});const[ve,Q]=Zt(()=>[{title:"Boxes Gain",modifier:i,base:1}]),pe=V(!1),ie=B(()=>n(wt,{modelValue:pe.value,"onUpdate:modelValue":J=>pe.value=J},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:ve})),{total:Ge,trackerDisplay:Se}=rl({resource:l,goal:5e4,name:e,day:ka,color:t,modal:{display:ie,show:pe}});return{name:e,day:ka,color:t,boxes:l,totalBoxes:Ge,boxesConversion:o,upgrades:m,row2Upgrades:v,row3Upgrades:H,buyables:W,minWidth:700,display:B(()=>n(S,null,[oe(Se),n(Ee,null,null),n(Tt,{resource:l,color:t,style:"margin-bottom: 0"},null),n(Ee,null,null),oe(r),n(Ee,null,null),Bl(Object.values(m),Object.values(v),Object.values(H)),n(Ee,null,null),Xe(...Object.values(W))]))}}),_r="trees",ii=1,ni=.1,me=Rt(_r,function(){const e="Trees",t="#4BDC13",l="green",i=dt(0,"logs"),o=dt(0,"saplings"),r=V(0),d=le(()=>[de(()=>({addend:()=>a.times(Q.amount.value,10),description:"Expand Forest",enabled:E.bought})),de(()=>({addend:()=>a.div(Dt.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Dt.milestones.morePlantsMilestone1.earned})),w(()=>({multiplier:2,description:"5 Elves Trained",enabled:Me.milestones[4].earned})),w(()=>({multiplier:2,description:"8 Elves Trained",enabled:Me.milestones[7].earned})),w(()=>({multiplier:4,description:"Lumberjack Boots",enabled:tt.treesUpgrades.treesUpgrade1.bought})),de(()=>({addend:$e.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>a.gte($e.dyes.blue.amount.value,1)}))]),c=dt(f(()=>a.sub(d.apply(10),o.value)),"trees"),p=f(()=>d.apply(10)),m=O(()=>({resource:F(i),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),b=O(()=>({resource:F(i),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),h=O(()=>({resource:F(i),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),A=O(()=>({resource:F(i),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),v=O(()=>({resource:F(i),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),_=[m,b,h,A,v],N=O(()=>({resource:F(i),cost:50,visibility:()=>y(v.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),D=O(()=>({resource:F(i),cost:50,visibility:()=>y(v.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),H=O(()=>({resource:F(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"}})),M=O(()=>({resource:F(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=O(()=>({resource:F(i),cost:300,visibility:()=>y(v.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),T=[N,D,H,M,E],W=Re(()=>({resource:F(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,te.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)})),ve=Re(()=>({resource:F(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,te.books.plantersBook.amount.value).times($),a.times(100,$).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>y(E.bought.value)})),Q=Re(()=>({resource:F(i),cost(){let $=this.amount.value;return a.gte($,100)&&($=a.pow($,2).div(100)),a.gte($,1e5)&&($=a.pow($,2).div(1e5)),$=a.pow(.95,te.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)})),pe=[W,ve,Q],ie=le(()=>[de(()=>({addend:1,description:"Wooden Fingers",enabled:m.bought})),de(()=>({addend:He,description:"Smart Knives",enabled:H.bought}))]),Ge=f(()=>ie.apply(1)),Se=le(()=>[w(()=>({multiplier:.5,description:"Sharper Fingers",enabled:N.bought})),w(()=>({multiplier:()=>a.pow(.5,Me.totalElves.value),description:"1 Elf Trained",enabled:Me.milestones[0].earned}))]),J=f(()=>Se.apply(1)),Ae=le(()=>[de(()=>({addend:1,description:"Automated Knives",enabled:h.bought})),de(()=>({addend:W.amount,description:"Generic Cutters",enabled:E.bought})),de(()=>({addend:()=>a.div(Dt.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Dt.milestones.autoCutMilestone1.earned})),w(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Dt.milestones.autoCutMilestone2.earned})),w(()=>({multiplier:2,description:"Warmer Cutters",enabled:q.warmerCutters.bought})),w(()=>({multiplier:q.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>a.gt(q.heatedCutters.amount.value,0)})),w(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:tt.treesUpgrades.treesUpgrade2.bought}))]),He=f(()=>Ae.apply(0)),j=le(()=>[de(()=>({addend:1,description:"Leafy Fingers",enabled:b.bought})),de(()=>({addend:xe,description:"Smart Spades",enabled:M.bought}))]),Ce=f(()=>j.apply(1)),fe=le(()=>[w(()=>({multiplier:.5,description:"Greener Fingers",enabled:D.bought})),w(()=>({multiplier:()=>a.pow(.5,Me.totalElves.value),description:"1 Elf Trained",enabled:Me.milestones[0].earned}))]),Be=f(()=>fe.apply(1)),Fe=le(()=>[de(()=>({addend:1,description:"Automated Spade",enabled:A.bought})),de(()=>({addend:()=>a.div(ve.amount.value,2),description:"Generic Planters",enabled:E.bought})),de(()=>({addend:()=>a.div(Dt.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Dt.milestones.autoPlantMilestone1.earned})),w(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Dt.milestones.autoPlantMilestone2.earned})),w(()=>({multiplier:2,description:"Warmer Planters",enabled:q.warmerPlanters.bought})),w(()=>({multiplier:q.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>a.gt(q.heatedPlanters.amount.value,0)})),w(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:tt.treesUpgrades.treesUpgrade3.bought})),w(()=>({multiplier:2,description:"Ivy Level 1",enabled:ze.elfTraining.planterElfTraining.milestones[0].earned}))]),xe=f(()=>Fe.apply(0)),We=le(()=>[w(()=>({multiplier:1.25,description:"Research I",enabled:v.bought})),w(()=>({multiplier:1.25,description:"Research II",enabled:E.bought})),w(()=>({multiplier:()=>a.div(Dt.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Dt.milestones.logGainMilestone1.earned})),w(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Dt.milestones.logGainMilestone2.earned})),w(()=>({multiplier:1.25,description:"Ashy Soil",enabled:q.basicFertilizer.bought})),w(()=>({multiplier:q.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>a.gt(q.moreFertilizer.amount.value,0)})),w(()=>({multiplier:2,description:"4 Elves Trained",enabled:Me.milestones[3].earned})),w(()=>({multiplier:2,description:"Carry logs in boxes",enabled:et.upgrades.logsUpgrade.bought})),w(()=>({multiplier:()=>a.div(et.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:et.upgrades.logsUpgrade.bought})),w(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:tt.treesUpgrades.treesUpgrade4.bought})),w(()=>({multiplier:f(()=>a.add(He.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:$e.upgrades.blueDyeUpg.bought})),w(()=>({multiplier:f(()=>a.add(He.value,1).log10().plus(1)),description:"Holly Level 1",enabled:ze.elfTraining.cutterElfTraining.milestones[0].earned})),Ua(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Dt.milestones.logGainMilestone3.earned}))]),Ye=_e(0),At=Ht(()=>({direction:Pe.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(Ye.value,J.value)})),ae=Pt(()=>({display:{title:"Cut trees",description:B(()=>n(S,null,[s("Cut down up to "),X(a.floor(Ge.value))," ",s("tree"),a.eq(Ge.value,1)?"":"s",s(" at once!"),n("br",null,null),oe(At)]))},style:{minHeight:"80px"},canClick:()=>a.gte(c.value,1)&&a.gte(Ye.value,J.value),onClick(){if(a.lt(Ye.value,J.value))return;const $=a.floor(a.min(c.value,a.times(Ge.value,a.div(Ye.value,J.value).floor())));i.value=a.add(i.value,a.times(We.apply(1),$)),o.value=a.add(o.value,$),Ye.value=0}})),ne=_e(0),Ue=Ht(()=>({direction:Pe.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(ne.value,Be.value)})),Je=Pt(()=>({display:{title:"Plant trees",description:B(()=>n(S,null,[s("Plant up to "),X(a.floor(Ce.value))," ",s("tree"),a.eq(Ce.value,1)?"":"s",s(" at once!"),n("br",null,null),oe(Ue)]))},style:{minHeight:"80px"},canClick:()=>a.gte(o.value,1)&&a.gte(ne.value,Be.value),onClick(){if(a.lt(ne.value,Be.value))return;const $=a.floor(a.min(o.value,a.times(Ce.value,a.div(ne.value,Be.value).floor())));o.value=a.sub(o.value,$),ne.value=0}})),[ge,pt]=Zt(()=>[{title:"Logs per Tree",modifier:We,base:1,visible:v.bought},{title:"Manual Cutting Amount",modifier:ie,base:1,visible:m.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:Se,base:1,visible:m.bought,unit:"s"},{title:"Manual Planting Amount",modifier:j,base:1,visible:b.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:fe,base:1,visible:b.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:Ae,base:0,visible:h.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:Fe,base:0,visible:A.bought,unit:"/s"},{title:"Forest Size",modifier:d,base:10,visible:E.bought}]),st=V(!1),Z=B(()=>n(wt,{modelValue:st.value,"onUpdate:modelValue":$=>st.value=$},{header:()=>n("h2",null,[e,s(" Modifiers")]),body:ge}));Ke.on("update",$=>{if(a.lt(R.day.value,ii))return;a.gte(Ye.value,J.value)?Ye.value=J.value:(Ye.value=a.add(Ye.value,$),ae.isHolding.value&&ae.onClick()),a.gte(ne.value,Be.value)?ne.value=Be.value:(ne.value=a.add(ne.value,$),Je.isHolding.value&&Je.onClick());const re=a.min(c.value,a.times(He.value,$)),K=a.mul(We.apply(1),re),Ie=a.div(K,$);r.value=a.mul(Ie,ni).add(a.mul(r.value,a.dOne.sub(ni))),i.value=a.add(i.value,K),o.value=a.add(o.value,re);const ee=a.min(o.value,a.times(xe.value,$));o.value=a.sub(o.value,ee)});const Te=f(()=>a.sub(He.value,xe.value)),se=f(()=>a.sub(xe.value,He.value)),Mt=Dl(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{ae.canClick.value&&ae.onClick()}})),Le=Dl(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{Je.canClick.value&&Je.onClick()}})),{total:mt,trackerDisplay:Nt}=rl({resource:i,goal:1e4,name:e,day:ii,color:l,modal:{show:st,display:Z}});return{name:e,color:t,logs:i,totalLogs:mt,trees:c,saplings:o,cutTree:ae,plantTree:Je,cutTreeHK:Mt,plantTreeHK:Le,row1Upgrades:_,row2Upgrades:T,row1Buyables:pe,manualCutProgress:Ye,manualPlantProgress:ne,generalTabCollapsed:pt,computedAutoCuttingAmount:He,minWidth:700,display:B(()=>n(S,null,[oe(Nt),n(Ee,null,null),n(Tt,{resource:i,color:t,style:"margin-bottom: 0",productionDisplay:a.gt(He.value,0)?`+${L(r.value)}/s average<br/>equilibrium: +${yi([[He.value,"cutting speed"],[xe.value,"planting speed"],[a.mul(p.value,20),"forest cap"]],"/s",We.apply(1))}`:void 0},null),n(Tt,{resource:o,color:l,style:"margin-bottom: 0",productionDisplay:na(Te.value)},null),n(Tt,{resource:c,color:l,style:"margin-bottom: 0",productionDisplay:na(se.value)},null),n(Ee,null,null),Xe(ae,Je),n("div",null,[s("Tip: You can hold down on actions to perform them automatically")]),n(Ee,null,null),Bl(_,T),n(Ee,null,null),Xe(...pe)]))}});var Fi="./assets/tree.35808197.png",Ui="./assets/sws.714ad454.png",Ri="data:image/png;base64,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",Oi="./assets/elf.9fbfa563.png",qi="./assets/paperStacks.4c96ec8c.png",Gi="data:image/png;base64,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",Li="./assets/metal.7407f5d1.png",Qi="./assets/cloth.7bcd7f37.png",$i="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==",Vi="./assets/plastic.b8ac74ff.png",Hi="data:image/png;base64,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",Sr="./assets/elfManagement.436c8744.png";const R=Rt("main",function(){const e=_e(1),t=f(()=>(+new Date(new Date().getFullYear(),11,e.value)-ue.time)/1e3),l=V(!1),i=V(-1),o=V(""),r=V();function d(m){const b=_e(!1),h=_e(!1);return Ot(()=>{const A=m(),v=Et(A.shouldNotify),_=Et(()=>u(v)||u(h));return{...A,opened:b,shouldNotify:_,recentlyUpdated:h,[yl]:os,[bl]:function(){const{day:N,layer:D,symbol:H,opened:M,shouldNotify:E,story:T,completedStory:W,recentlyUpdated:ve}=this;return{day:N,symbol:H,layer:D,opened:M,recentlyUpdated:ve,shouldNotify:E,onOpenLore(){var ie,Ge;const Q=R.day.value>N;i.value=Q?N-1:-1;const pe=u((Ge=(ie=_t[D!=null?D:"trees"])==null?void 0:ie.name)!=null?Ge:"");o.value=Q?`${pe} - Completed!`:pe,r.value=Q?`${T}<hr style="
|
|
margin: 10px 0;"/>${W}`:T,l.value=!0},onOpenLayer(){if(ve.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(ue.tabs.includes(D!=null?D:"trees")){const Q=ue.tabs.lastIndexOf(D!=null?D:"trees");ue.tabs.splice(Q,1)}else ue.tabs.push(D!=null?D:"trees"),R.minimized.value=!0;else ue.tabs.splice(1,1/0,D!=null?D:"trees")},onUnlockLayer(){D&&(M.value=!0,setTimeout(()=>{var Q,pe;i.value=-1,o.value=u((pe=(Q=_t[D!=null?D:"trees"])==null?void 0:Q.name)!=null?pe:""),r.value=T,ue.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[d(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Fi,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:Ui,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:Ri,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:Oi,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:qi,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:Gi,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:Li,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:Qi,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:$i,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:Vi,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:Hi,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:null,symbol:Sr,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:""})),d(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),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 p(){i.value=e.value-1,o.value="Day Complete!",r.value=c[e.value-1].completedStory,l.value=!0,e.value++,R.minimized.value=!1,ue.devSpeed=0}return{name:"Calendar",days:c,day:e,timeUntilNewDay:t,loreScene:i,loreTitle:o,loreBody:r,showLoreModal:l,completeDay:p,minWidth:700,display:B(()=>n(S,null,[ue.devSpeed===0?n("div",null,[s("Game Paused")]):null,ue.devSpeed&&ue.devSpeed!==1?n("div",null,[s("Dev Speed: "),L(ue.devSpeed),s("x")]):null,ue.offlineTime?n("div",null,[s("Offline Time: "),Wl(ue.offlineTime)]):null,n(Ee,null,null),n("div",{class:"advent"},[c.reduce((m,b)=>(m[m.length-1].length===4&&m.push([]),m[m.length-1].push(b),m),[[]]).map(m=>Xe(...m))])]))}}),Br=e=>[R,me,Dt,q,Me,te,et,lt,tt,Ze,Qe,$e],qa=f(()=>!1);function Mr(e,t){var l,i,o,r,d,c;!["0.0","0.1","0.2","0.3","0.4"].includes(e!=null?e:"")||(t.offlineProd=!1,(l=t.layers)==null||delete l.management,(r=(o=(i=t.layers)==null?void 0:i.main)==null?void 0:o.days)!=null&&r[11]&&(t.layers.main.days[11].opened=!1),((c=(d=t.layers)==null?void 0:d.main)==null?void 0:c.day)===12&&(t.layers.main.day,t.devSpeed=0),t.tabs&&(t.tabs=t.tabs.filter(p=>p!=="management")))}var Nr=Object.freeze(Object.defineProperty({__proto__:null,main:R,getInitialLayers:Br,hasWon:qa,fixOldSave:Mr},Symbol.toStringTag,{value:"Module"}));const xr={class:"scene"},Ir=["src"],Dr=["src"],Pr=["src"],Tr=["src"],Fr=["src"],Ur=["src"],Rr=["src"],Or={key:7,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},qr=["src"],Gr=["src"],Lr=["src"],Qr=["src"],$r=we({__name:"Scene",props:{day:null},setup(e){return(t,l)=>(k(),I("div",xr,[e.day>=7?(k(),I("img",{key:0,src:u(Qi),class:"scene-item",style:{left:"4%",bottom:"3%",width:"40px",height:"40px"}},null,8,Ir)):G("",!0),e.day>=0?(k(),I("img",{key:1,src:u(Fi),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,Dr)):G("",!0),e.day>=1?(k(),I("img",{key:2,src:u(Ui),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,Pr)):G("",!0),e.day>=2?(k(),I("img",{key:3,src:u(Ri),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,Tr)):G("",!0),e.day>=6?(k(),I("img",{key:4,src:u(Li),class:"scene-item",style:{left:"72%",bottom:"8%",width:"40px",height:"40px"}},null,8,Fr)):G("",!0),e.day>=8?(k(),I("img",{key:5,src:u($i),class:"scene-item",style:{left:"80%",bottom:"6%"}},null,8,Ur)):G("",!0),e.day>=3?(k(),I("img",{key:6,src:u(Oi),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,Rr)):G("",!0),e.day>=4?(k(),I("div",Or,[e.day>=4?(k(),I("img",{key:0,src:u(qi),class:"scene-item"},null,8,qr)):G("",!0),e.day>=5?(k(),I("img",{key:1,src:u(Gi),class:"scene-item"},null,8,Gr)):G("",!0),e.day>=9?(k(),I("img",{key:2,src:u(Vi),class:"scene-item"},null,8,Lr)):G("",!0),e.day>=10?(k(),I("img",{key:3,src:u(Hi),class:"scene-item"},null,8,Qr)):G("",!0)])):G("",!0)]))}});var Vr=qe($r,[["__scopeId","data-v-47b4d886"]]);const Hr=we({components:{Context:Ai},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:Y(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:Y(Number,String),required:!0},name:{type:Y(String),required:!0},color:Y(String),minimizable:Y(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:l,minimized:i,minWidth:o,tab:r}=Bt(e),d=sa(t),c=f(()=>Ve.allowGoBack&&l.value>0&&!i.value);function p(){ue.tabs.splice(u(e.index),1)}_l(()=>b(i.value,u(o.value))),Xt([i,qo(o)],([h,A])=>b(h,A));function m(h){e.nodes.value=h}function b(h,A){const v=typeof A=="number"||Number.isNaN(parseInt(A))?A+"px":A,_=r.value();_!=null&&(h?(_.style.flexGrow="0",_.style.flexShrink="0",_.style.width="60px",_.style.minWidth=_.style.flexBasis="",_.style.margin="0"):(_.style.flexGrow="",_.style.flexShrink="",_.style.width="",_.style.minWidth=_.style.flexBasis=v,_.style.margin=""))}return{component:d,showGoBack:c,updateNodes:m,unref:u,goBack:p}}});function jr(e,t,l,i,o,r){const d=gl("Context");return k(),I("div",{class:"layer-container",style:yt({"--layer-color":e.unref(e.color)})},[e.showGoBack?(k(),I("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):G("",!0),e.minimized.value?(k(),I("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.minimized.value=!1)},[g("div",null,Ne(e.unref(e.name)),1)])):(k(),I("div",{key:2,class:ct(["layer-tab",{showGoBack:e.showGoBack}])},[n(d,{onUpdateNodes:e.updateNodes},{default:ce(()=>[(k(),he(it(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(k(),I("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.minimized.value=!0)}," \u25BC ")):G("",!0)],4)}var Wr=qe(Hr,[["render",jr],["__scopeId","data-v-0158bec3"]]);const ji=e=>(ol("data-v-4b4bda40"),e=e(),sl(),e),Jr=ji(()=>g("h2",null,"Changelog",-1)),Kr=ji(()=>g("details",{open:""},[g("summary",null,[s("v0.0 Initial Commit - "),g("time",null,"2021-09-04")]),s(" This is the first release :D "),g("ul",null,[g("li",{class:"feature"},"Did everything"),g("li",{class:"fix"},"Had some fun"),g("li",{class:"breaking"},"Removed everything"),g("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),zr=we({__name:"Changelog",setup(e,{expose:t}){const l=V(!1);return t({open(){l.value=!0}}),(i,o)=>(k(),he(wt,{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=r=>l.value=r)},{header:ce(()=>[Jr]),body:ce(()=>[Kr]),_:1},8,["modelValue"]))}});var Xr=qe(zr,[["__scopeId","data-v-4b4bda40"]]);const Yr={class:"info-modal-header"},Zr=["src","alt"],eu={class:"info-modal-title"},tu={key:0},lu=s(" - "),au={key:0},iu={key:0},nu=g("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),ou=g("br",null,null,-1),su=g("br",null,null,-1),ru=["href"],uu=g("span",{class:"material-icons info-modal-discord"},"discord",-1),du=g("div",null,[g("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[g("span",{class:"material-icons info-modal-discord"},"discord"),s(" The Paper Pilot Community ")])],-1),cu=g("div",null,[g("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link",target:"_blank"},[g("span",{class:"material-icons info-modal-discord"},"discord"),s(" The Modding Tree ")])],-1),pu=g("br",null,null,-1);var mu=we({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const l=e,{title:i,logo:o,author:r,discordName:d,discordLink:c,versionNumber:p,versionTitle:m}=Ve,b=Bt(l),h=V(!1),A=f(()=>Wl(ue.timePlayed)),v=f(()=>Oe(B(()=>n(S,null,[xi.map(oe)]))));t({open(){h.value=!0}});function _(){var N;(N=u(b.changelog))==null||N.open()}return(N,D)=>(k(),he(wt,{class:"info-modal",modelValue:h.value,"onUpdate:modelValue":D[0]||(D[0]=H=>h.value=H)},{header:ce(()=>[g("div",Yr,[u(o)?(k(),I("img",{key:0,class:"info-modal-logo",src:u(o),alt:u(i)},null,8,Zr)):G("",!0),g("div",eu,[g("h2",null,"- "+Ne(u(i))+" -",1),g("h4",null,[s(" - v"+Ne(u(p)),1),u(m)?(k(),I("span",tu,": "+Ne(u(m)),1)):G("",!0),lu])])])]),body:ce(({shown:H})=>[H?(k(),I("div",au,[u(r)?(k(),I("div",iu,"By "+Ne(u(r)),1)):G("",!0),nu,ou,g("div",{class:"link",onClick:_},"Changelog"),su,g("div",null,[u(c)?(k(),I("a",{key:0,href:u(c),class:"info-modal-discord-link",target:"_blank"},[uu,s(" "+Ne(u(d)),1)],8,ru)):G("",!0)]),du,cu,pu,g("div",null,"Time Played: "+Ne(u(A)),1),(k(),he(it(u(v))))])):G("",!0)]),_:1},8,["modelValue"]))}});const Wi=e=>(ol("data-v-0d685451"),e=e(),sl(),e),vu=Wi(()=>g("h2",null,"Options",-1)),fu=Wi(()=>g("hr",null,null,-1));var gu=we({__name:"Options",setup(e,{expose:t}){const l=V(!1);t({open(){l.value=!0}});const i=Object.keys(Fl).map(v=>({label:bi(v),value:v})),o=f(()=>Oe(B(()=>n(S,null,[Ni.map(oe)])))),{showTPS:r,theme:d}=Bt(at),{autosave:c,usingLog:p}=Bt(ue),m=f({get(){return ue.devSpeed===0},set(v){ue.devSpeed=v?0:null}}),b=B(()=>n("span",null,[s("Autosave"),n(ut,{display:"Save-specific"},{default:()=>[s("*")]})])),h=B(()=>n("span",null,[s("Pause game"),n(ut,{display:"Save-specific"},{default:()=>[s("*")]})])),A=B(()=>n("span",null,[s("Use log for progress bar"),n(ut,{display:"Save-specific"},{default:()=>[s("*")]})]));return(v,_)=>(k(),he(wt,{modelValue:l.value,"onUpdate:modelValue":_[5]||(_[5]=N=>l.value=N)},{header:ce(()=>[vu]),body:ce(()=>[n(Oa,{title:"Theme",options:u(i),modelValue:u(d),"onUpdate:modelValue":_[0]||(_[0]=N=>ht(d)?d.value=N:null)},null,8,["options","modelValue"]),(k(),he(it(u(o)))),n(il,{title:"Show TPS",modelValue:u(r),"onUpdate:modelValue":_[1]||(_[1]=N=>ht(r)?r.value=N:null)},null,8,["modelValue"]),fu,n(il,{title:u(b),modelValue:u(c),"onUpdate:modelValue":_[2]||(_[2]=N=>ht(c)?c.value=N:null)},null,8,["title","modelValue"]),u(Ve).enablePausing?(k(),he(il,{key:0,title:u(h),modelValue:u(m),"onUpdate:modelValue":_[3]||(_[3]=N=>ht(m)?m.value=N:null)},null,8,["title","modelValue"])):G("",!0),n(il,{title:u(A),modelValue:u(p),"onUpdate:modelValue":_[4]||(_[4]=N=>ht(p)?p.value=N:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var hu=qe(gu,[["__scopeId","data-v-0d685451"]]);const yu=["onSubmit"],bu={class:"field"},wu={key:0,class:"field-title"},Au=["placeholder"],Cu=we({__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=hl(Yt(l,"title"),"span"),o=$t(null);ra(()=>{var p;(p=o.value)==null||p.focus()});const r=f({get(){return u(l.modelValue)||""},set(p){t("update:modelValue",p)}});function d(){t("submit")}function c(){l.submitOnBlur!==!1?t("submit"):t("cancel")}return(p,m)=>(k(),I("form",{onSubmit:Ll(d,["prevent"])},[g("div",bu,[u(i)?(k(),I("span",wu,[(k(),he(it(u(i))))])):G("",!0),e.textArea?(k(),he(u(mn),{key:1,modelValue:u(r),"onUpdate:modelValue":m[0]||(m[0]=b=>ht(r)?r.value=b:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:o},null,8,["modelValue","placeholder","maxHeight"])):ua((k(),I("input",{key:2,type:"text","onUpdate:modelValue":m[1]||(m[1]=b=>ht(r)?r.value=b:null),placeholder:e.placeholder,class:ct({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:o},null,42,Au)),[[sn,u(r)]])])],40,yu))}});var Ji=qe(Cu,[["__scopeId","data-v-67b44a54"]]);const ku={key:0},Eu=["onClick","disabled"],_u={key:0},Su=["onClick"],Bu=we({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const i=Bt(e),o=V(!1);Xt(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,p)=>(k(),I("span",{class:ct(["container",{confirming:o.value}])},[o.value?(k(),I("span",ku,"Are you sure?")):G("",!0),g("button",{onClick:Ll(r,["stop"]),class:"button danger",disabled:e.disabled},[o.value?(k(),I("span",_u,"Yes")):Qt(c.$slots,"default",{key:1},void 0,!0)],8,Eu),o.value?(k(),I("button",{key:1,class:"button",onClick:Ll(d,["stop"])},"No",8,Su)):G("",!0)],2))}});var Mu=qe(Bu,[["__scopeId","data-v-2f8ef34c"]]);const Nu=["onClick"],xu=we({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=V(!1),i=V(null);function o(){t("click"),i.value&&clearTimeout(i.value),l.value=!1,_l(()=>{l.value=!0,i.value=setTimeout(()=>l.value=!1,500)})}return(r,d)=>(k(),I("button",{onClick:Ll(o,["stop"]),class:ct(["feedback",{activated:l.value,left:e.left}])},[Qt(r.$slots,"default",{},void 0,!0)],10,Nu))}});var Iu=qe(xu,[["__scopeId","data-v-01a1b95c"]]);const ul=e=>(ol("data-v-5285ac49"),e=e(),sl(),e),Du=ul(()=>g("div",{class:"handle material-icons"},"drag_handle",-1)),Pu={key:0,class:"actions"},Tu=ul(()=>g("span",{class:"material-icons"},"content_paste",-1)),Fu=ul(()=>g("span",{class:"material-icons"},"content_copy",-1)),Uu=ul(()=>g("span",{class:"material-icons"},"edit",-1)),Ru=ul(()=>g("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Ou={key:1,class:"actions"},qu=ul(()=>g("span",{class:"material-icons"},"check",-1)),Gu=ul(()=>g("span",{class:"material-icons"},"close",-1)),Lu={key:2,class:"details"},Qu={class:"save-version"},$u=ul(()=>g("br",null,null,-1)),Vu={key:0},Hu={key:1},ju={key:3,class:"details"},Wu={key:4,class:"details error"},Ju=ul(()=>g("br",null,null,-1)),Ku=we({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const l=e,{save:i}=Bt(l),o=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),r=V(!1),d=V(!1),c=V("");Xt(r,()=>c.value=i.value.name||"");const p=f(()=>i.value&&i.value.id===ue.id),m=f(()=>p.value?ue.time:i.value&&i.value.time||0),b=sa(f(()=>{var A,v,_,N;return`Day ${(N=(_=(v=(A=i.value)==null?void 0:A.layers)==null?void 0:v.main)==null?void 0:_.day)!=null?N:1}`}));function h(){t("editName",c.value),r.value=!1}return(A,v)=>(k(),I("div",{class:ct(["save",{active:u(p)}])},[Du,r.value?(k(),I("div",Ou,[g("button",{onClick:h,class:"button"},[n(ut,{display:"Save",direction:u(Pe).Left,class:"info"},{default:ce(()=>[qu]),_:1},8,["direction"])]),g("button",{onClick:v[5]||(v[5]=_=>r.value=!r.value),class:"button"},[n(ut,{display:"Cancel",direction:u(Pe).Left,class:"info"},{default:ce(()=>[Gu]),_:1},8,["direction"])])])):(k(),I("div",Pu,[u(i).error==null&&!d.value?(k(),he(Iu,{key:0,onClick:v[0]||(v[0]=_=>t("export")),class:"button",left:""},{default:ce(()=>[n(ut,{display:"Export",direction:u(Pe).Left,class:"info"},{default:ce(()=>[Tu]),_:1},8,["direction"])]),_:1})):G("",!0),u(i).error==null&&!d.value?(k(),I("button",{key:1,onClick:v[1]||(v[1]=_=>t("duplicate")),class:"button"},[n(ut,{display:"Duplicate",direction:u(Pe).Left,class:"info"},{default:ce(()=>[Fu]),_:1},8,["direction"])])):G("",!0),u(i).error==null&&!d.value?(k(),I("button",{key:2,onClick:v[2]||(v[2]=_=>r.value=!r.value),class:"button"},[n(ut,{display:"Edit Name",direction:u(Pe).Left,class:"info"},{default:ce(()=>[Uu]),_:1},8,["direction"])])):G("",!0),n(Mu,{disabled:u(p),onClick:v[3]||(v[3]=_=>t("delete")),onConfirmingChanged:v[4]||(v[4]=_=>d.value=_)},{default:ce(()=>[n(ut,{display:"Delete",direction:u(Pe).Left,class:"info"},{default:ce(()=>[Ru]),_:1},8,["direction"])]),_:1},8,["disabled"])])),u(i).error==null&&!r.value?(k(),I("div",Lu,[g("button",{class:"button open",onClick:v[6]||(v[6]=_=>t("open"))},[g("h3",null,Ne(u(i).name),1)]),g("span",Qu,"v"+Ne(u(i).modVersion),1),$u,u(m)?(k(),I("div",Vu,"Last played "+Ne(u(o).format(u(m))),1)):G("",!0),u(b)?(k(),I("div",Hu,[(k(),he(it(u(b))))])):G("",!0)])):u(i).error==null&&r.value?(k(),I("div",ju,[n(Ji,{modelValue:c.value,"onUpdate:modelValue":v[7]||(v[7]=_=>c.value=_),class:"editname",onSubmit:h},null,8,["modelValue"])])):(k(),I("div",Wu,[s(" Error: Failed to load save with id "+Ne(u(i).id),1),Ju,s(Ne(u(i).error),1)]))],2))}});var zu=qe(Ku,[["__scopeId","data-v-5285ac49"]]);const Ga=e=>(ol("data-v-3b9991aa"),e=e(),sl(),e),Xu=Ga(()=>g("h2",null,"Saves Manager",-1)),Yu={class:"modal-footer"},Zu={class:"field"},ed=Ga(()=>g("span",{class:"field-title"},"Create Save",-1)),td={class:"field-buttons"},ld={class:"footer"},ad=Ga(()=>g("div",{style:{"flex-grow":"1"}},null,-1)),id=we({__name:"SavesManager",setup(e,{expose:t}){const l=V(!1),i=V(null);t({open(){l.value=!0}});const o=V(!1),r=V(""),d=V(null);Xt(r,M=>{M?_l(()=>{try{if(M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=ml.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M),o.value=!0;return}const E=JSON.parse(M);if(typeof E!="object"){o.value=!0;return}const T=ta();E.id=T,Jt(E),r.value="",o.value=!1,at.saves.push(T)}catch{o.value=!0}}):o.value=!1});let c={},p=V(Object.keys(c).reduce((M,E)=>(M.push({label:E.split("/").slice(-1)[0].slice(0,-4),value:c[E]}),M),[]));const m=ca({});function b(M){if(m[M]==null){let E=localStorage.getItem(M);if(E==null)m[M]={error:"Save doesn't exist in localStorage",id:M};else if(E==="dW5kZWZpbmVk")m[M]={error:"Save is undefined",id:M};else try{if(E[0]!=="{")if(E[0]==="e")E=decodeURIComponent(escape(atob(E)));else if(E[0]==="\u1BE1")E=ml.decompressFromUTF16(E);else return console.warn("Unable to determine preset encoding",E),o.value=!0,m[M]={error:"Unable to determine preset encoding",id:M},m[M];m[M]={...JSON.parse(E),id:M}}catch(T){m[M]={error:T,id:M},console.warn(`SavesManager: Failed to load info about save with id ${M}:
|
|
${T}
|
|
${E}`)}}return m[M]}Xt(l,M=>{M&&Object.keys(m).forEach(E=>delete m[E])});const h=f(()=>at.saves.reduce((M,E)=>(M[E]=b(E),M),{}));function A(M){let E;switch(ue.id===M?E=Si(ue[ot]):E=JSON.stringify(h.value[M]),Ve.exportEncoding){default:console.warn(`Unknown save encoding: ${Ve.exportEncoding}. Defaulting to lz`);case"lz":E=ml.compressToUTF16(E);break;case"base64":E=btoa(unescape(encodeURIComponent(E)));break;case"plain":break}const T=document.createElement("textarea");T.value=E,document.body.appendChild(T),T.select(),T.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(T)}function v(M){ue.id===M&&Jt();const E={...h.value[M],id:ta()};Jt(E),at.saves.push(E.id)}function _(M){at.saves=at.saves.filter(E=>E!==M),localStorage.removeItem(M),m[M]=void 0}function N(M){h.value[ue.id].time=ue.time,Jt(),m[ue.id]=void 0,El(h.value[M]),m[M]=void 0}function D(M){if(d.value=M,_l(()=>{d.value=null}),M[0]!=="{")if(M[0]==="e")M=decodeURIComponent(escape(atob(M)));else if(M[0]==="\u1BE1")M=ml.decompressFromUTF16(M);else{console.warn("Unable to determine preset encoding",M);return}const E=JSON.parse(M);E.id=ta(),Jt(E),at.saves.push(E.id),N(E.id)}function H(M,E){const T=h.value[M];T&&(T.name=E,ue.id===M?(ue.name=E,Jt()):(Jt(T),m[M]=void 0))}return(M,E)=>(k(),he(wt,{modelValue:l.value,"onUpdate:modelValue":E[4]||(E[4]=T=>l.value=T),ref_key:"modal",ref:i},{header:ce(()=>[Xu]),body:ce(({shown:T})=>[T?(k(),he(u(pn),{key:0,list:u(at).saves,handle:".handle",itemKey:W=>W},{item:ce(({element:W})=>[n(zu,{save:u(h)[W],onOpen:ve=>N(W),onExport:ve=>A(W),onEditName:ve=>H(W,ve),onDuplicate:ve=>v(W),onDelete:ve=>_(W)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):G("",!0)]),footer:ce(()=>[g("div",Yu,[n(Ji,{modelValue:r.value,"onUpdate:modelValue":E[0]||(E[0]=T=>r.value=T),title:"Import Save",placeholder:"Paste your save here!",class:ct({importingFailed:o.value})},null,8,["modelValue","class"]),g("div",Zu,[ed,g("div",td,[g("button",{class:"button",onClick:E[1]||(E[1]=T=>N(u(Il)().id))},"New Game"),Object.keys(u(p)).length>0?(k(),he(Oa,{key:0,options:u(p),modelValue:d.value,"onUpdate:modelValue":E[2]||(E[2]=T=>D(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):G("",!0)])]),g("div",ld,[ad,g("button",{class:"button modal-default-button",onClick:E[3]||(E[3]=T=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Ki=qe(id,[["__scopeId","data-v-3b9991aa"]]);const Gt=e=>(ol("data-v-8495e562"),e=e(),sl(),e),nd=["src","alt"],od={key:1,class:"title"},sd=Gt(()=>g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),rd={class:"discord"},ud={class:"discord-links"},dd={key:0},cd=["href"],pd=Gt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),md=Gt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),vd={href:"https://forums.moddingtree.com/",target:"_blank"},fd=Gt(()=>g("span",{class:"material-icons"},"forum",-1)),gd=Gt(()=>g("span",{class:"material-icons"},"info",-1)),hd=Gt(()=>g("span",{class:"material-icons"},"library_books",-1)),yd=Gt(()=>g("span",{class:"material-icons"},"settings",-1)),bd=Gt(()=>g("span",{class:"material-icons"},"library_books",-1)),wd=Gt(()=>g("span",{class:"material-icons"},"settings",-1)),Ad=Gt(()=>g("span",{class:"material-icons"},"info",-1)),Cd={href:"https://forums.moddingtree.com/",target:"_blank"},kd=Gt(()=>g("span",{class:"material-icons"},"forum",-1)),Ed={class:"discord"},_d={class:"discord-links"},Sd={key:0},Bd=["href"],Md=Gt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Nd=Gt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),xd=we({__name:"Nav",setup(e){const t=V(null),l=V(null),i=V(null),o=V(null),{useHeader:r,banner:d,title:c,discordName:p,discordLink:m,versionNumber:b}=Ve;function h(){window.open(m,"mywindow")}return(A,v)=>(k(),I(S,null,[u(r)?(k(),I("div",Sl({key:0,class:"nav"},A.$attrs),[u(d)?(k(),I("img",{key:0,src:u(d),class:"banner",alt:u(c)},null,8,nd)):(k(),I("div",od,Ne(u(c)),1)),g("div",{onClick:v[0]||(v[0]=_=>{var N;return(N=o.value)==null?void 0:N.open()}),class:"version-container"},[n(ut,{display:"Changelog",direction:u(Pe).Down,class:"version"},{default:ce(()=>[g("span",null,"v"+Ne(u(b)),1)]),_:1},8,["direction"])]),sd,g("div",rd,[g("span",{onClick:h,class:"material-icons"},"discord"),g("ul",ud,[u(m)?(k(),I("li",dd,[g("a",{href:u(m),target:"_blank"},Ne(u(p)),9,cd)])):G("",!0),pd,md])]),g("div",null,[g("a",vd,[n(ut,{display:"Forums",direction:u(Pe).Down,yoffset:"5px"},{default:ce(()=>[fd]),_:1},8,["direction"])])]),g("div",{onClick:v[1]||(v[1]=_=>{var N;return(N=t.value)==null?void 0:N.open()})},[n(ut,{display:"Info",direction:u(Pe).Down,class:"info"},{default:ce(()=>[gd]),_:1},8,["direction"])]),g("div",{onClick:v[2]||(v[2]=_=>{var N;return(N=l.value)==null?void 0:N.open()})},[n(ut,{display:"Saves",direction:u(Pe).Down,xoffset:"-20px"},{default:ce(()=>[hd]),_:1},8,["direction"])]),g("div",{onClick:v[3]||(v[3]=_=>{var N;return(N=i.value)==null?void 0:N.open()})},[n(ut,{display:"Options",direction:u(Pe).Down,xoffset:"-66px"},{default:ce(()=>[yd]),_:1},8,["direction"])])],16)):(k(),I("div",Sl({key:1,class:"overlay-nav"},A.$attrs),[g("div",{onClick:v[4]||(v[4]=_=>{var N;return(N=o.value)==null?void 0:N.open()}),class:"version-container"},[n(ut,{display:"Changelog",direction:u(Pe).Right,xoffset:"25%",class:"version"},{default:ce(()=>[g("span",null,"v"+Ne(u(b)),1)]),_:1},8,["direction"])]),g("div",{onClick:v[5]||(v[5]=_=>{var N;return(N=l.value)==null?void 0:N.open()})},[n(ut,{display:"Saves",direction:u(Pe).Right},{default:ce(()=>[bd]),_:1},8,["direction"])]),g("div",{onClick:v[6]||(v[6]=_=>{var N;return(N=i.value)==null?void 0:N.open()})},[n(ut,{display:"Options",direction:u(Pe).Right},{default:ce(()=>[wd]),_:1},8,["direction"])]),g("div",{onClick:v[7]||(v[7]=_=>{var N;return(N=t.value)==null?void 0:N.open()})},[n(ut,{display:"Info",direction:u(Pe).Right},{default:ce(()=>[Ad]),_:1},8,["direction"])]),g("div",null,[g("a",Cd,[n(ut,{display:"Forums",direction:u(Pe).Right,xoffset:"7px"},{default:ce(()=>[kd]),_:1},8,["direction"])])]),g("div",Ed,[g("span",{onClick:h,class:"material-icons"},"discord"),g("ul",_d,[u(m)?(k(),I("li",Sd,[g("a",{href:u(m),target:"_blank"},Ne(u(p)),9,Bd)])):G("",!0),Md,Nd])])],16)),n(mu,{ref_key:"info",ref:t,changelog:o.value},null,8,["changelog"]),n(Ki,{ref_key:"savesManager",ref:l},null,512),n(hu,{ref_key:"options",ref:i},null,512),n(Xr,{ref_key:"changelog",ref:o},null,512)],64))}});var zi=qe(xd,[["__scopeId","data-v-8495e562"]]);const La=e=>(ol("data-v-248e2ebb"),e=e(),sl(),e),Id={class:"inner-tab"},Dd={key:1},Pd=La(()=>g("br",null,null,-1)),Td=s(" You can help continue the "),Fd=La(()=>g("i",null,"advent",-1)),Ud=s("ure at: "),Rd=La(()=>g("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[g("span",{class:"material-icons info-modal-discord"},"discord"),s(" The Paper Pilot Community ")],-1)),Od=we({__name:"Game",setup(e){const t=Yt(ue,"tabs"),l=f(()=>Object.keys(_t)),i=Ve.useHeader,o=hl(R.loreBody);function r(d){const{display:c,minimized:p,minWidth:m,name:b,color:h,minimizable:A,nodes:v}=d;return{display:c,minimized:p,minWidth:m,name:b,color:h,minimizable:A,nodes:v}}return(d,c)=>(k(),I("div",{class:ct(["tabs-container",{useHeader:u(i)}])},[(k(!0),I(S,null,ri(u(t),(p,m)=>{var b,h;return k(),I("div",{key:m,class:ct(["tab",u((b=u(_t)[p])==null?void 0:b.classes)]),ref_for:!0,ref:`tab-${m}`,style:yt(u((h=u(_t)[p])==null?void 0:h.style))},[m===0&&!u(i)?(k(),he(zi,{key:0})):G("",!0),g("div",Id,[u(l).includes(p)?(k(),he(Wr,Sl({key:0},r(u(_t)[p]),{index:m,tab:()=>{var A;return(A=d.$refs[`tab-${m}`])==null?void 0:A[0]}}),null,16,["index","tab"])):(k(),he(it(p),{key:1,index:m},null,8,["index"]))])],6)}),128)),n(wt,{modelValue:u(R).showLoreModal.value,"onUpdate:modelValue":c[0]||(c[0]=p=>u(R).showLoreModal.value=p)},{header:ce(()=>[g("h2",null,Ne(u(R).loreTitle.value),1)]),body:ce(()=>[u(o)?(k(),he(it(u(o)),{key:0})):G("",!0),u(R).loreScene.value!==-1?(k(),I("div",Dd,[n(Vr,{day:u(R).loreScene.value},null,8,["day"]),Pd,Td,Fd,Ud,Rd])):G("",!0)]),_:1},8,["modelValue"])],2))}});var qd=qe(Od,[["__scopeId","data-v-248e2ebb"]]);const zl=e=>(ol("data-v-4a50ce42"),e=e(),sl(),e),Gd={class:"game-over-modal-header"},Ld=["src","alt"],Qd={class:"game-over-modal-title"},$d=zl(()=>g("h2",null,"Congratulations!",-1)),Vd={key:0},Hd=zl(()=>g("br",null,null,-1)),jd=zl(()=>g("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Wd=zl(()=>g("br",null,null,-1)),Jd=["href"],Kd=zl(()=>g("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),zd=we({__name:"GameOverScreen",setup(e){const{title:t,logo:l,discordName:i,discordLink:o,versionNumber:r,versionTitle:d}=Ve,c=f(()=>Wl(ue.timePlayed)),p=f(()=>qa.value&&!ue.keepGoing),m=Yt(ue,"autosave");function b(){ue.keepGoing=!0}function h(){El(Il())}return(A,v)=>(k(),he(wt,{"model-value":u(p)},{header:ce(()=>[g("div",Gd,[u(l)?(k(),I("img",{key:0,class:"game-over-modal-logo",src:u(l),alt:u(t)},null,8,Ld)):G("",!0),g("div",Qd,[$d,g("h4",null,"You've beaten "+Ne(u(t))+" v"+Ne(u(r))+": "+Ne(u(d)),1)])])]),body:ce(({shown:_})=>[_?(k(),I("div",Vd,[g("div",null,"It took you "+Ne(u(c))+" to beat the game.",1),Hd,jd,Wd,g("div",null,[g("a",{href:u(o),class:"game-over-modal-discord-link"},[Kd,s(" "+Ne(u(i)),1)],8,Jd)]),n(il,{title:"Autosave",modelValue:u(m),"onUpdate:modelValue":v[0]||(v[0]=N=>ht(m)?m.value=N:null)},null,8,["modelValue"])])):G("",!0)]),footer:ce(()=>[g("div",{class:"game-over-footer"},[g("button",{onClick:b,class:"button"},"Keep Going"),g("button",{onClick:h,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var Xd=qe(zd,[["__scopeId","data-v-4a50ce42"]]);const fa=e=>(ol("data-v-3de07c06"),e=e(),sl(),e),Yd=fa(()=>g("div",{class:"nan-modal-header"},[g("h2",null,"NaN value detected!")],-1)),Zd={key:0},ec=fa(()=>g("br",null,null,-1)),tc=["href"],lc=fa(()=>g("span",{class:"material-icons nan-modal-discord"},"discord",-1)),ac=fa(()=>g("br",null,null,-1)),ic={class:"nan-footer"},nc=we({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:l}=Ve,i=Yt(ue,"autosave"),o=Yt(rt,"hasNaN"),r=V(null),d=f(()=>{var v;return(v=rt.NaNPath)==null?void 0:v.join(".")}),c=f(()=>{var v;return(v=rt.NaNPath)==null?void 0:v.slice(-1)[0]}),p=f(()=>rt.NaNReceiver&&c.value?rt.NaNReceiver[c.value]:null),m=f({get(){return ue.devSpeed===0},set(v){ue.devSpeed=v?null:0}});function b(){rt.NaNReceiver&&c.value&&(rt.NaNReceiver[c.value]=new a(0),rt.hasNaN=!1)}function h(){rt.NaNReceiver&&c.value&&(rt.NaNReceiver[c.value]=new a(1),rt.hasNaN=!1)}function A(){rt.NaNReceiver&&c.value&&(rt.NaNReceiver[c.value]=new a(NaN),rt.hasNaN=!1)}return(v,_)=>(k(),I(S,null,[n(wt,Sl({modelValue:u(o),"onUpdate:modelValue":_[4]||(_[4]=N=>ht(o)?o.value=N:null)},v.$attrs),{header:ce(()=>[Yd]),body:ce(()=>[g("div",null,[s(' Attempted to assign "'+Ne(u(d))+'" to NaN',1),u(p)?(k(),I("span",Zd,Ne(" ")+"(previously "+Ne(u(L)(u(p)))+")",1)):G("",!0),s(". Auto-saving has been "+Ne(u(i)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),ec,g("div",null,[g("a",{href:u(l),class:"nan-modal-discord-link"},[lc,s(" "+Ne(u(t)),1)],8,tc)]),ac,n(il,{title:"Autosave",modelValue:u(i),"onUpdate:modelValue":_[0]||(_[0]=N=>ht(i)?i.value=N:null)},null,8,["modelValue"]),u(Ve).enablePausing?(k(),he(il,{key:0,title:"Pause game",modelValue:u(m),"onUpdate:modelValue":_[1]||(_[1]=N=>ht(m)?m.value=N:null)},null,8,["modelValue"])):G("",!0)]),footer:ce(()=>[g("div",ic,[g("button",{onClick:_[2]||(_[2]=N=>{var D;return(D=r.value)==null?void 0:D.open()}),class:"button"},"Open Saves Manager"),g("button",{onClick:b,class:"button"},"Set to 0"),g("button",{onClick:h,class:"button"},"Set to 1"),u(p)&&u(a).neq(u(p),0)&&u(a).neq(u(p),1)?(k(),I("button",{key:0,onClick:_[3]||(_[3]=N=>o.value=!1),class:"button"}," Set to previous ")):G("",!0),g("button",{onClick:A,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),n(Ki,{ref_key:"savesManager",ref:r},null,512)],64))}});var oc=qe(nc,[["__scopeId","data-v-3de07c06"]]);const sc={key:0,class:"tpsDisplay"},rc={key:0,class:"low"},uc=we({__name:"TPS",setup(e){const t=f(()=>a.div(rt.lastTenTicks.length,rt.lastTenTicks.reduce((r,d)=>r+d,0))),l=V([]);qt(()=>{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(),I("div",sc,[s(" TPS: "+Ne(u(X)(u(t)))+" ",1),n(da,{name:"fade"},{default:ce(()=>[u(o)?(k(),I("span",rc,Ne(u(X)(u(i))),1)):G("",!0)]),_:1})]))}});var dc=qe(uc,[["__scopeId","data-v-46a3ed5b"]]);var cc=we({__name:"App",setup(e){const t=Ve.useHeader,l=f(()=>Fl[at.theme].variables),i=Yt(at,"showTPS"),o=f(()=>Oe(B(()=>n(S,null,[To.map(oe)]))));return(r,d)=>(k(),I(S,null,[g("div",{id:"modal-root",style:yt(u(l))},null,4),g("div",{class:ct(["app",{useHeader:u(t)}]),style:yt(u(l))},[u(t)?(k(),he(zi,{key:0})):G("",!0),n(qd),u(u(i))?(k(),he(dc,{key:1})):G("",!0),n(Xd),n(oc),(k(),he(it(u(o))))],6)],64))}});var pc=qe(cc,[["__scopeId","data-v-580927bb"]]);function mc(e={}){const{immediate:t=!1,onNeedRefresh:l,onOfflineReady:i,onRegistered:o,onRegisterError:r}=e;let d,c;const p=async(m=!0)=>{m&&(d==null||d.addEventListener("controlling",b=>{b.isUpdate&&window.location.reload()})),c&&c.waiting&&await fn(c.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){d=new vn("./sw.js",{scope:"./",type:"classic"}),d.addEventListener("activated",m=>{m.isUpdate||i==null||i()});{const m=()=>{l==null||l()};d.addEventListener("waiting",m),d.addEventListener("externalwaiting",m)}d.register({immediate:t}).then(m=>{c=m,o==null||o(m)}).catch(m=>{r==null||r(m)})}return p}function vc(e={}){const{immediate:t=!0,onNeedRefresh:l,onOfflineReady:i,onRegistered:o,onRegisterError:r}=e,d=V(!1),c=V(!1);return{updateServiceWorker:mc({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=Ve.title;window.projInfo=Ve;if(Ve.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 No();const{globalBus:e}=await aa(()=>Promise.resolve().then(function(){return po}),void 0),{startGameLoop:t}=await aa(()=>import("./gameLoop.2b99722e.js"),["assets/gameLoop.2b99722e.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=rn(pc);e.emit("setupVue",l),l.mount("#app"),_l(()=>{const i=di(),{updateServiceWorker:o}=vc({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,aa as _,rt as a,Ve as b,Nr as c,Ke as g,Pa as l,ue as p,at as s};
|