mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-27 10:31:42 +00:00
19 lines
264 KiB
JavaScript
19 lines
264 KiB
JavaScript
/* empty css */import"./vue.92681fcb.js";import{Z as f,l as gt,aa as Ce,t as V,ay as da,ar as Ml,aE as k,a0 as D,aK as $t,a1 as g,O as S,aG as ta,A as St,_ as be,a8 as i,b6 as ve,b8 as ca,bs as un,C as u,aq as Bl,bu as Vl,bb as pa,T as ni,a7 as s,u as ma,j as ii,bv as Ma,q as zl,b1 as Xt,G as ct,aC as dn,w as Vt,b2 as Lt,ao as oi,I as ht,aN as nt,$ as L,J as xe,aH as rl,aF as ul,z as Yt,al as na,aL as hl,H as si,aJ as cn,bn as ri,br as ui,be as di}from"./@vue.4ce677c2.js";import{c as pn}from"./nanoevents.1080beb7.js";import{L as vl}from"./lz-string.731cedc5.js";import{i as ci}from"./is-plain-object.906d88e8.js";import{Y as pi}from"./vue-next-select.a2bfab1d.js";import{s as mi,u as mn}from"./vue-toastification.6f567382.js";import{D as vi}from"./vuedraggable.7949458c.js";import{p as fi}from"./vue-textarea-autosize.35804eaf.js";import{v as gi,n as hi}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const yi=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(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"&&n(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 n(o){if(o.ep)return;o.ep=!0;const r=l(o);fetch(o.href,r)}};yi();const bi="modulepreload",ja={},wi="./",ia=function(t,l){return!l||l.length===0?t():Promise.all(l.map(n=>{if(n=`${wi}${n}`,n in ja)return;ja[n]=!0;const o=n.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${r}`))return;const d=document.createElement("link");if(d.rel=o?"stylesheet":bi,o||(d.as="script",d.crossOrigin=""),d.href=n,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 ${n}`)))})})).then(()=>t())},Ai="./projInfo-schema.json",Ci="Advent Incremental",ki="An incremental game you play a day at a time, leading up to Christmas!",Ei="advent-incremental",_i="thepaperpilot and friends",Si="",Mi="",Bi="0.5",Ni="Initial Commit",xi=!0,Ii=!1,Di=2,Pi=!0,Ti=null,Fi="",Ui=["main"],Ri=3600,Oi=0,qi=!0,Li="base64";var je={$schema:Ai,title:Ci,description:ki,id:Ei,author:_i,discordName:Si,discordLink:Mi,versionNumber:Bi,versionTitle:Ni,allowGoBack:xi,defaultShowSmall:Ii,defaultDecimalsShown:Di,useHeader:Pi,banner:Ti,logo:Fi,initialTabs:Ui,maxTickLength:Ri,offlineLimit:Oi,enablePausing:qi,exportEncoding:Li};const Aa=17,Gi=9e15,Qi=Math.log10(9e15),$i=1/9e15,Vi=308,Hi=-324,Wa=5,ji=function(){const e=[];for(let l=Hi+1;l<=Vi;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),kl=[2,Math.E,3,4,5,6,7,8,9,10],Wi=[[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]],Ji=[[-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)},we=function(e,t,l){return a.fromComponents(e,t,l)},Pe=function(t,l,n){return a.fromComponents_noNormalize(t,l,n)},ml=function(t,l){const n=l+1,o=Math.ceil(Math.log10(Math.abs(t))),r=Math.round(t*Math.pow(10,n-o))*Math.pow(10,o-n);return parseFloat(r.toFixed(Math.max(n-o,0)))},Ca=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},zi=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 n=e*e;let o=e;return l=l+1/(12*o),o=o*n,l=l+1/(360*o),o=o*n,l=l+1/(1260*o),o=o*n,l=l+1/(1680*o),o=o*n,l=l+1/(1188*o),o=o*n,l=l+691/(360360*o),o=o*n,l=l+7/(1092*o),o=o*n,l=l+3617/(122400*o),Math.exp(l)/t},vn=.5671432904097838,Ja=function(e,t=1e-10){let l,n;if(!Number.isFinite(e)||e===0)return e;if(e===1)return vn;e<10?l=0:l=Math.log(e)-Math.log(Math.log(e));for(let o=0;o<100;++o){if(n=(e*Math.exp(-l)+l*l)/(l+1),Math.abs(n-l)<t*Math.abs(n))return n;l=n}throw Error(`Iteration failed to converge: ${e.toString()}`)};function za(e,t=1e-10){let l,n,o,r;if(!Number.isFinite(e.mag)||e===a.dZero)return e;if(e===a.dOne)return C(vn);a.abs(e),l=a.ln(e);for(let d=0;d<100;++d){if(n=a.exp(-l),o=l.sub(e.mul(n)),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 I=class{constructor(e){this.sign=Number.NaN,this.mag=Number.NaN,this.layer=Number.NaN,e instanceof I||e!=null&&typeof e=="object"&&"sign"in e&&"mag"in e&&"layer"in e?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0)}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/ji(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 I().fromComponents(e,t,l)}static fromComponents_noNormalize(e,t,l){return new I().fromComponents_noNormalize(e,t,l)}static fromMantissaExponent(e,t){return new I().fromMantissaExponent(e,t)}static fromMantissaExponent_noNormalize(e,t){return new I().fromMantissaExponent_noNormalize(e,t)}static fromDecimal(e){return new I().fromDecimal(e)}static fromNumber(e){return new I().fromNumber(e)}static fromString(e){return new I().fromString(e)}static fromValue(e){return new I().fromValue(e)}static fromValue_noAlloc(e){return e instanceof I?e:new I(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=Pe(1,0,1)){return C(e).tetrate(t,l)}static iteratedexp(e,t=2,l=Pe(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=Pe(1,0,1)){return C(e).pentate(t,l)}static affordGeometricSeries(e,t,l,n){return this.affordGeometricSeries_core(C(e),C(t),C(l),n)}static sumGeometricSeries(e,t,l,n){return this.sumGeometricSeries_core(e,C(t),C(l),n)}static affordArithmeticSeries(e,t,l,n){return this.affordArithmeticSeries_core(C(e),C(t),C(l),C(n))}static sumArithmeticSeries(e,t,l,n){return this.sumArithmeticSeries_core(C(e),C(t),C(l),C(n))}static efficiencyOfPurchase(e,t,l){return this.efficiencyOfPurchase_core(C(e),C(t),C(l))}static randomDecimalForTesting(e){if(Math.random()*20<1)return Pe(0,0,0);const t=Math.random()>.5?1:-1;if(Math.random()*20<1)return Pe(t,0,1);const l=Math.floor(Math.random()*(e+1));let n=l===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(n=Math.trunc(n));let o=Math.pow(10,n);return Math.random()>.9&&(o=Math.trunc(o)),we(t,l,o)}static affordGeometricSeries_core(e,t,l,n){const o=t.mul(l.pow(n));return I.floor(e.div(o).mul(l.sub(1)).add(1).log10().div(l.log10()))}static sumGeometricSeries_core(e,t,l,n){return t.mul(l.pow(n)).mul(I.sub(1,l.pow(e))).div(I.sub(1,l))}static affordArithmeticSeries_core(e,t,l,n){const r=t.add(n.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,n){const o=t.add(n.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<$i)return this.layer+=1,this.mag=Math.log10(this.mag),this;let e=Math.abs(this.mag),t=Math.sign(this.mag);if(e>=Gi)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e<Qi&&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 P=I.pentate(A,v,N);return this.sign=P.sign,this.layer=P.layer,this.mag=P.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 P=I.tetrate(A,v,N);return this.sign=P.sign,this.layer=P.layer,this.mag=P.mag,this}}const n=e.split("^");if(n.length===2){const A=parseFloat(n[0]),v=parseFloat(n[1]);if(isFinite(A)&&isFinite(v)){const _=I.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=I.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=I.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 w=parseFloat(c[0]);if(w===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+=Ca(A))}if(!isFinite(w))this.sign=c[0]==="-"?-1:1,this.layer=p,this.mag=h;else if(p===1)this.sign=Math.sign(w),this.layer=1,this.mag=h+Math.log10(Math.abs(w));else if(this.sign=Math.sign(w),this.layer=p,p===2){const A=I.mul(we(1,2,h),C(w));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 I||e!=null&&typeof e=="object"&&"sign"in e&&"mag"in e&&"layer"in e?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:ml(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:ml(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<=Wa?(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):ml(this.m,e)+"e"+ml(this.e,e):this.layer===1?ml(this.m,e)+"e"+ml(this.e,e):this.layer<=Wa?(this.sign===-1?"-":"")+"e".repeat(this.layer)+ml(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+ml(this.mag,e)}abs(){return Pe(this.sign===0?0:1,this.layer,this.mag)}neg(){return Pe(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?I.dZero:this.layer===0?we(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?I.dZero:this.layer===0?we(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?I.dZero:this.layer===0?we(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?I.dZero:this.layer===0?we(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 Pe(0,0,0);let l,n;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(I.cmpabs(this,t)>0?(l=this,n=t):(l=t,n=this),l.layer===0&&n.layer===0)return C(l.sign*l.mag+n.sign*n.mag);const o=l.layer*Math.sign(l.mag),r=n.layer*Math.sign(n.mag);if(o-r>=2)return l;if(o===0&&r===-1){if(Math.abs(n.mag-Math.log10(l.mag))>Aa)return l;{const d=Math.pow(10,Math.log10(l.mag)-n.mag),c=n.sign+l.sign*d;return we(Math.sign(c),1,n.mag+Math.log10(Math.abs(c)))}}if(o===1&&r===0){if(Math.abs(l.mag-Math.log10(n.mag))>Aa)return l;{const d=Math.pow(10,l.mag-Math.log10(n.mag)),c=n.sign+l.sign*d;return we(Math.sign(c),1,Math.log10(n.mag)+Math.log10(Math.abs(c)))}}if(Math.abs(l.mag-n.mag)>Aa)return l;{const d=Math.pow(10,l.mag-n.mag),c=n.sign+l.sign*d;return we(Math.sign(c),1,n.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 Pe(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return Pe(this.sign*t.sign,0,1);let l,n;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(l=this,n=t):(l=t,n=this),l.layer===0&&n.layer===0)return C(l.sign*n.sign*l.mag*n.mag);if(l.layer>=3||l.layer-n.layer>=2)return we(l.sign*n.sign,l.layer,l.mag);if(l.layer===1&&n.layer===0)return we(l.sign*n.sign,1,l.mag+Math.log10(n.mag));if(l.layer===1&&n.layer===1)return we(l.sign*n.sign,1,l.mag+n.mag);if(l.layer===2&&n.layer===1){const o=we(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(we(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return we(l.sign*n.sign,o.layer+1,o.sign*o.mag)}if(l.layer===2&&n.layer===2){const o=we(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(we(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return we(l.sign*n.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?I.dNaN:this.layer===0?we(this.sign,0,1/this.mag):we(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,n=t.mag>0?t.layer:-t.layer;return l>n?1:l<n?-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 n=this.mag,o=l.mag;return this.layer>l.layer&&(o=Ca(o)),this.layer<l.layer&&(n=Ca(n)),Math.abs(n-o)<=t*Math.max(Math.abs(n),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(I.dZero)?I.dZero:this.log10()}absLog10(){return this.sign===0?I.dNaN:this.layer>0?we(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):we(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?I.dNaN:this.layer>0?we(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):we(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?I.dNaN:this.layer===0&&e.layer===0?we(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):I.div(this.log10(),e.log10())}log2(){return this.sign<=0?I.dNaN:this.layer===0?we(this.sign,0,Math.log2(this.mag)):this.layer===1?we(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?we(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):we(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?I.dNaN:this.layer===0?we(this.sign,0,Math.log(this.mag)):this.layer===1?we(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?we(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):we(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,n=t;if(l.sign===0)return n.eq(0)?Pe(1,0,1):l;if(l.sign===1&&l.layer===0&&l.mag===1)return l;if(n.sign===0)return Pe(1,0,1);if(n.sign===1&&n.layer===0&&n.mag===1)return l;const o=l.absLog10().mul(n).pow10();return this.sign===-1?Math.abs(n.toNumber()%2)%2===1?o.neg():Math.abs(n.toNumber()%2)%2===0?o:I.dNaN:o}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return I.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return we(1,0,t);if(e.sign===0)return I.dOne;e=Pe(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?we(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?we(-e.sign,e.layer+1,-e.mag):I.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?I.exp(I.mul(this,I.ln(this).sub(1))):I.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(Pe(1,0,24)))return C(zi(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 n=e,o=12*n,r=1/o,d=t+r;if(d===t||(t=d,n=n*l,o=360*n,r=1/o,d=t-r,d===t))return I.exp(t);t=d,n=n*l,o=1260*n;let c=1/o;return t=t+c,n=n*l,o=1680*n,c=1/o,t=t-c,I.exp(t)}else return this.layer===1?I.exp(I.mul(this,I.ln(this).sub(1))):I.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?I.dOne:this.layer===0&&this.mag<=709.7?C(Math.exp(this.sign*this.mag)):this.layer===0?we(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?we(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):we(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 we(1,2,Math.log10(this.mag)-.3010299956639812);{const e=I.div(Pe(this.sign,this.layer-1,this.mag),Pe(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=Pe(1,0,1)){if(e===1)return I.pow(this,t);if(e===0)return new I(t);if(this.eq(I.dOne))return I.dOne;if(this.eq(-1))return I.pow(this,t);if(e===Number.POSITIVE_INFINITY){const o=this.toNumber();if(o<=1.444667861009766&&o>=.06598803584531254){if(o>1.444667861009099)return new I(Math.E);const r=I.ln(this).neg();return r.lambertw().div(r)}else return o>1.444667861009766?new I(Number.POSITIVE_INFINITY):I.dNaN}if(this.eq(I.dZero)){let o=Math.abs((e+1)%2);return o>1&&(o=2-o),new I(o)}if(e<0)return I.iteratedlog(t,this,-e);t=C(t);const l=e;e=Math.trunc(e);const n=l-e;if(this.gt(I.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(n!=0){const o=this.pow(t);return t.mul(1-n).add(o.mul(n))}return t}n!==0&&(t.eq(I.dOne)?this.gt(10)?t=this.pow(n):(t=C(I.tetrate_critical(this.toNumber(),n)),this.lt(2)&&(t=t.sub(1).mul(this.minus(1)).plus(1))):this.eq(10)?t=t.layeradd10(n):t=t.layeradd(n,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 Pe(t.sign,t.layer+(e-o-1),t.mag);if(o>1e4)return t}return t}iteratedexp(e=2,t=Pe(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return I.tetrate(e,-t,this);e=C(e);let l=C(this);const n=t;t=Math.trunc(t);const o=n-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(I.dZero)||e.eq(I.dOne))return I.dNaN;if(e.lt(I.dOne))return this.eq(I.dOne)?I.dZero:this.eq(I.dZero)?I.dNegOne:I.dNaN;if(this.mag<0||this.eq(I.dZero))return I.dNegOne;let t=0,l=C(this);if(l.layer-e.layer>3){const n=l.layer-e.layer-3;t+=n,l.layer-=n}for(let n=0;n<100;++n)if(l.lt(I.dZero))l=I.pow(e,l),t-=1;else{if(l.lte(I.dOne))return C(t+I.slog_critical(e.toNumber(),l.toNumber()));t+=1,l=I.log(l,e)}return C(t)}static slog_critical(e,t){return e>10?t-1:I.critical_section(e,t,Ji)}static tetrate_critical(e,t){return I.critical_section(e,t,Wi)}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 n=0,o=0;for(let c=0;c<kl.length;++c)if(kl[c]==e){n=l[c][Math.floor(t)],o=l[c][Math.ceil(t)];break}else if(kl[c]<e&&kl[c+1]>e){const p=(e-kl[c])/(kl[c+1]-kl[c]);n=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 n*(1-r)+o*r}layeradd10(e){e=I.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 n=0;n<100;++n){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 n=this.slog(t).toNumber()+e;return n>=0?I.tetrate(t,n):Number.isFinite(n)?n>=-1?I.log(I.tetrate(t,n+1),t):I.log(I.log(I.tetrate(t,n+2),t),t):I.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return C(Ja(this.toNumber()));if(this.layer===0)return C(Ja(this.sign*this.mag));if(this.layer===1)return za(this);if(this.layer===2)return za(this);if(this.layer>=3)return Pe(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return Pe(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=Pe(1,0,1)){t=C(t);const l=e;e=Math.trunc(e);const n=l-e;n!==0&&(t.eq(I.dOne)?(++e,t=new I(n)):this.eq(10)?t=t.layeradd10(n):t=t.layeradd(n,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)):Pe(0,0,0)}cos(){return this.mag<0?I.dOne:this.layer===0?C(Math.cos(this.sign*this.mag)):Pe(0,0,0)}tan(){return this.mag<0?this:this.layer===0?C(Math.tan(this.sign*this.mag)):Pe(0,0,0)}asin(){return this.mag<0?this:this.layer===0?C(Math.asin(this.sign*this.mag)):Pe(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)):Pe(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 I.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return I.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?Pe(Number.NaN,Number.NaN,Number.NaN):I.ln(this.add(1).div(C(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(I.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};let a=I;a.dZero=Pe(0,0,0);a.dOne=Pe(1,0,1);a.dNegOne=Pe(-1,0,1);a.dTwo=Pe(1,0,2);a.dTen=Pe(1,0,10);a.dNaN=Pe(Number.NaN,Number.NaN,Number.NaN);a.dInf=Pe(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);a.dNegInf=Pe(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);a.dNumberMax=we(1,0,Number.MAX_VALUE);a.dNumberMin=we(1,0,Number.MIN_VALUE);const Ki=new a(1);function Ql(e,t,l=!0){let n=a.log10(e).floor(),o=a.div(e,a.pow(10,n));o.toStringWithDecimalPlaces(t)==="10"&&(o=Ki,n=n.add(1));const r=n.gte(1e9)?_e(n,Math.max(Math.max(t,3),je.defaultDecimalsShown)):n.gte(1e4)?oa(n,0):n.toStringWithDecimalPlaces(0);return l?o.toStringWithDecimalPlaces(t)+"e"+r:"e"+r}function oa(e,t){if(e==null)return"NaN";if(e=new a(e),e.mag<.001)return 0 .toFixed(t);const n=e.toStringWithDecimalPlaces(t).split(".");return n[0]=n[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),n.length==1?n[0]:n[0]+"."+n[1]}function fn(e,t){return e==null?"NaN":(e=new a(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),je.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const Xi=new a("eeee1000"),Yi=new a("e100000"),Ka=new a("e1000"),gn=new a(1e9),Zi=new a(1e6),eo=new a(1e3),to=new a(.98),lo=new a(.001),hn=new a(0);function _e(e,t,l){if(t==null&&(t=je.defaultDecimalsShown),l=l!=null?l:je.defaultShowSmall,e=new a(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+_e(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(Xi)){const n=e.slog();return n.gte(Zi)?"F"+_e(n.floor()):a.pow(10,n.sub(n.floor())).toStringWithDecimalPlaces(3)+"F"+oa(n.floor(),0)}else{if(e.gte(Yi))return Ql(e,0,!1);if(e.gte(Ka))return Ql(e,0);if(e.gte(gn))return Ql(e,t);if(e.gte(eo))return oa(e,0);if(e.gte(lo)||!l)return fn(e,t);if(e.eq(hn))return 0 .toFixed(t)}return e=yn(e),e.lt(Ka)?Ql(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):_e(e,t)+"\u207B\xB9"}function Ae(e){return e=new a(e),e.sign<0?"-"+Ae(e.neg()):e.gte(gn)||e.lte(to)&&!e.eq(hn)?_e(e):_e(e,0)}function Na(e,t){return t==null&&(t=je.defaultDecimalsShown),a.lt(e,0)?"-"+Na(a.neg(e),t):a.gt(e,2**51)?_e(a.div(e,31536e3))+"y":(e=new a(e).toNumber(),e<60?_e(e)+"s":e<3600?Ae(Math.floor(e/60))+"m "+_e(e%60,t)+"s":e<86400?Ae(Math.floor(e/3600))+"h "+Ae(Math.floor(e/60)%60)+"m "+Ae(e%60)+"s":e<31536e3?Ae(Math.floor(e/84600)%365)+"d "+Ae(Math.floor(e/3600)%24)+"h "+Ae(Math.floor(e/60)%60)+"m":Ae(Math.floor(e/31536e3))+"y "+Ae(Math.floor(e/84600)%365)+"d "+Ae(Math.floor(e/3600)%24)+"h")}function ao(e,t,l){e=new a(e);let n=e.toStringWithDecimalPlaces(t);return new a(n).gte(l)&&(n=a.sub(l,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),n}function no(e,t){return _e(e,t,!0)}function yn(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 bn(e,t,l=a.dOne){let n=e[0][0],o=e[0][1];for(let r=1;r<e.length;r++)a.lt(e[r][0],n)&&(n=e[r][0],o=e[r][1]);return _e(a.times(n,l))+t+", limited by "+o}function wn(e){return{[-1]:`${_e(e)}/s`,0:"",1:`+${_e(e)}/s`}[a.compare(e,0)]}var io=Object.freeze(Object.defineProperty({__proto__:null,default:a,exponentialFormat:Ql,commaFormat:oa,regularFormat:fn,format:_e,formatWhole:Ae,formatTime:Na,toPlaces:ao,formatSmall:no,invertOOM:yn,formatLimit:bn,formatGain:wn},Symbol.toStringTag,{value:"Module"}));const{exponentialFormat:oo,commaFormat:so,regularFormat:ro,format:G,formatWhole:Z,formatTime:Kl,toPlaces:uo,formatSmall:co,formatLimit:An,invertOOM:po,formatGain:sa}=io;window.Decimal=a;window.exponentialFormat=oo;window.commaFormat=so;window.regularFormat=ro;window.format=G;window.formatWhole=Z;window.formatTime=Kl;window.toPlaces=uo;window.formatSmall=co;window.formatLimit=An;window.invertOOM=po;window.formatGain=sa;function Cn(e){let t=e.replace(/([A-Z])/g," $1");return t=t.charAt(0).toUpperCase()+t.slice(1),t}function Ba(e){return typeof e=="function"}var Te=(e=>(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(Te||{});const Hl=Symbol("DoNotCache");function Y(e,t){const l=e[t];Ba(l)&&l.length===0&&!l[Hl]?e[t]=f(l.bind(e)):Ba(l)&&(e[t]=l.bind(e),e[t][Hl]=!0)}function bt(e){return Ba(e)&&!e[Hl]&&(e=f(e)),e}const bl=Symbol("Component"),wl=Symbol("GatherProps");let mo=0;function Rl(e="feature-"){return e+mo++}var yt=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(yt||{});function M(e){return e[Hl]=!0,e}function y(e,t=2){return e?0:t}function _t(e,t,l){e[t]===void 0&&l!=null&&(e[t]=l)}function kn(e,...t){const l=[],n=o=>{Object.keys(o).forEach(r=>{const d=o[r];d&&typeof d=="object"&&(t.includes(d.type)?l.push(d):!(d instanceof a)&&!gt(d)&&n(d))})};return n(e),l}const El={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 xa=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(xa||{}),Ol={classic:El,paper:{...El,variables:{...El.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:{...El,variables:{...El.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:{...El,variables:{...El.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const Xe=pn();document.fonts.onloadingdone=()=>Xe.emit("fontsLoaded");var vo=Object.freeze(Object.defineProperty({__proto__:null,globalBus:Xe},Symbol.toStringTag,{value:"Module"}));var $e=(e,t)=>{const l=e.__vccOpts||e;for(const[n,o]of t)l[n]=o;return l};const fo=Ce({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var w;const l=V({}),n=new ResizeObserver(c),o=V(null);da(()=>{const h=o.value;h!=null&&n.observe(h)});let r=!0,d=V((w=o.value)==null?void 0:w.getBoundingClientRect());function c(){r&&(r=!1,Ml(()=>{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}))}Xe.on("fontsLoaded",c);const p={attributes:!1,childList:!0,subtree:!1};ta(Ia,(h,A)=>{const v=new MutationObserver(()=>m(h));v.observe(A,p),l.value[h]={element:A,observer:v,rect:A.getBoundingClientRect()},c()}),ta(Da,h=>{var A;(A=l.value[h])==null||A.observer.disconnect(),l.value[h]=void 0,c()}),ta(Pa,l),ta(Ta,d);function m(h){const A=l.value[h];A!=null&&(A.rect=A.element.getBoundingClientRect(),t("updateNodes",l.value))}return(h,A)=>(k(),D(S,null,[$t(h.$slots,"default",{},void 0,!0),g("div",{ref_key:"resizeListener",ref:o,class:"resize-listener"},null,512)],64))}});var En=$e(fo,[["__scopeId","data-v-2b1dc1bc"]]);const go=["onPointerdown"],ho={class:"modal-wrapper"},yo={class:"modal-container"},bo={class:"modal-header"},wo=s(" default header "),Ao={class:"modal-body"},Co=s(" default body "),ko={class:"modal-footer"},Eo=g("div",{class:"modal-default-flex-grow"},null,-1),wt=Ce({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:l}){const o=St(e),r=f(()=>o.modelValue||c.value);function d(){l("update:modelValue",!1)}const c=V(!1),p=V(null),m=f(()=>{var w,h;return(h=(w=p.value)==null?void 0:w.nodes)!=null?h:null});return t({isOpen:r,nodes:m}),(w,h)=>(k(),be(ni,{to:"#modal-root"},[i(pa,{name:"modal",onBeforeEnter:h[0]||(h[0]=A=>c.value=!0),onAfterLeave:h[1]||(h[1]=A=>c.value=!1)},{default:ve(()=>[ca(g("div",Bl({class:"modal-mask",onPointerdown:Vl(d,["self"])},w.$attrs),[g("div",ho,[g("div",yo,[g("div",bo,[$t(w.$slots,"header",{shown:u(r)},()=>[wo])]),g("div",Ao,[i(En,{ref_key:"contextRef",ref:p},{default:ve(()=>[$t(w.$slots,"body",{shown:u(r)},()=>[Co])]),_:3},512)]),g("div",ko,[$t(w.$slots,"footer",{shown:u(r)},()=>[g("div",{class:"modal-default-footer"},[Eo,g("button",{class:"button modal-default-button",onClick:d}," Close ")])])])])])],16,go),[[un,e.modelValue]])]),_:3})]))}}),Ia=Symbol("RegisterNode"),Da=Symbol("UnregisterNode"),Pa=Symbol("Nodes"),Ta=Symbol("Bounds"),Et=ma({});window.layers=Et;const Pl={},Wt=[];function Ot(e,t){return qt(()=>{const l={},n=l.emitter=pn();if(l.on=n.on.bind(n),l.emit=n.emit.bind(n),l.nodes=V({}),l.id=e,Wt.push(e),Pl[e]=new Set,l.minimized=Me(!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(),Y(l,"color"),Y(l,"display"),Y(l,"name"),_t(l,"name",l.id),Y(l,"minWidth"),_t(l,"minWidth",600),Y(l,"minimizable"),_t(l,"minimizable",!0),l})}function _n(e,t){if(console.info("Adding layer",e.id),Et[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Et[e.id]);return}_t(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Et[e.id]=e,Xe.emit("addLayer",e,t.layers[e.id])}function _o(e){return Et[e]}function Sn(e){console.info("Removing layer",e.id),Xe.emit("removeLayer",e),Et[e.id]=void 0}function So(e){Sn(e),_n(e,ce)}function Mo(e){const t=V(!1);return{openModal:()=>t.value=!0,modal:M(()=>i(wt,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>i("h2",null,[u(e.name)]),body:u(e.display)}))}}Xe.on("update",function(t){Object.values(Et).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(Et).forEach(l=>{l==null||l.emit("update",t)}),Object.values(Et).forEach(l=>{l==null||l.emit("postUpdate",t)})});var Bo=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Ia,UnregisterNodeInjectionKey:Da,NodesInjectionKey:Pa,BoundsInjectionKey:Ta,layers:Et,persistentRefs:Pl,addingLayers:Wt,createLayer:Ot,addLayer:_n,getLayer:_o,removeLayer:Sn,reloadLayer:So,setupLayerModal:Mo},Symbol.toStringTag,{value:"Module"}));const Fa=Symbol("PersistentState"),gl=Symbol("DefaultValue"),ra=Symbol("StackTrace"),Mn=Symbol("Deleted"),jl=Symbol("NonPersistent"),$l=Symbol("SaveDataPath");function No(){var e;return((e=new Error().stack)==null?void 0:e.split(`
|
|
`).slice(3,5).map(t=>t.trim()).join(`
|
|
`))||""}function Me(e){const t=gt(e)?e:V(e);t[Fa]=t,t[gl]=gt(e)?e.value:e,t[ra]=No(),t[Mn]=!1;const l=f({get(){return t.value},set(n){t.value=n}});return l[gl]=t[gl],t[jl]=l,t[$l]=void 0,Wt.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
|
|
Created at:
|
|
`+t[ra]):Pl[Wt[Wt.length-1]].add(t),t}function xo(e){return e&&typeof e=="object"&&Fa in e}function U(e){return e[jl]}Xe.on("addLayer",(e,t)=>{const l=[],n=(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]),xo(p)){if(d=!0,p[Mn]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,`
|
|
Created at:
|
|
`+p[ra]);return}Pl[e.id].delete(p);const m=[e.id,...r,c];p[$l]!=null&&JSON.stringify(m)!==JSON.stringify(p[$l])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[$l].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[$l]=m;const w=r.reduce((A,v)=>(v in A||(A[v]={}),A[v]),t),h=w[c];w[c]=p[Fa],ii(w)?h!=null?w[c]=h:w[c]=p[gl]:h!=null?w[c].value=h:w[c].value=p[gl]}else!(p instanceof a)&&!gt(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),n(p,[...r,c])&&(Ma(p)&&!Ma(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};n(e[ot]),Pl[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[ra])}),Pl[e.id].clear()});const ot=Symbol("ProxyState"),Dl=Symbol("ProxyPath");function qt(e,t={}){const l=t;let n=!1;function o(){return n||(Object.assign(l,e(l)),n=!0),l}return new Proxy(l,{get(r,d){if(d===ot)return o();const c=o()[d];return c&&typeof c=="object"&&jl in c?c[jl]: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 n||(Object.assign(l,e(l)),n=!0),Object.getOwnPropertyDescriptor(r,d)}})}var rt=window.state=ma({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Bn=zl({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Nn(e){return JSON.stringify(e,(t,l)=>u(l))}const xn={get(e,t){var n;if(t===ot||t===Dl)return e[t];const l=e[ot][t];if(t!=="value"&&(ci(l)||Array.isArray(l))){if(l!==((n=e[t])==null?void 0:n[ot])){const o=[...e[Dl],t];e[t]=new Proxy({[ot]:l,[Dl]:o},xn)}return e[t]}return l},set(e,t,l,n){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 Bn.autosave=!1,rt.hasNaN=!0,rt.NaNPath=[...e[Dl],t],rt.NaNReceiver=n,console.error("Attempted to set NaN value",[...e[Dl],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 ce=window.player=new Proxy({[ot]:Bn,[Dl]:["player"]},xn);function In(e={}){return Object.assign({id:`${je.id}-0`,name:"Default Save",tabs:je.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:je.id,modVersion:je.versionNumber,layers:{}},e)}function Jt(e){const t=vl.compressToUTF16(Nn(e!=null?e:ce[ot]));return localStorage.setItem((e!=null?e:ce[ot]).id,t),t}async function Io(){Po();try{let e=localStorage.getItem(at.active);if(e==null){await Sl(Tl());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=vl.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==je.id){await Sl(Tl());return}t.id=at.active,await Sl(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
|
|
`,e),await Sl(Tl())}}function Tl(){const e=aa(),t=In({id:e});return Jt(t),at.saves.push(e),t}function aa(){let e,t=0;do e=`${je.id}-${t++}`;while(localStorage.getItem(e));return e}const Ua=V(!1);async function Sl(e){console.info("Loading save",e),Ua.value=!0;const{layers:t,removeLayer:l,addLayer:n}=await ia(()=>Promise.resolve().then(function(){return Bo}),void 0),{fixOldSave:o,getInitialLayers:r}=await ia(()=>Promise.resolve().then(function(){return Ir}),void 0);for(const d in t){const c=t[d];c&&l(c)}r(e).forEach(d=>n(d,e)),e=In(e),e.offlineProd&&e.time&&e.devSpeed!==0&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=Math.min(e.offlineTime+(Date.now()-e.time)/1e3,je.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==je.versionNumber&&(o(e.modVersion,e),e.modVersion=je.versionNumber),Object.assign(ce,e),at.active=ce.id,Xe.emit("onLoad")}setInterval(()=>{ce.autosave&&Jt()},1e3);window.onbeforeunload=()=>{ce.autosave&&Jt()};window.save=Jt;const Do=window.hardReset=async()=>{await Sl(Tl())},Wl=zl({active:"",saves:[],showTPS:!0,theme:xa.Nordic,unthrottled:!1});Xt(Wl,e=>{const t=vl.compressToUTF16(JSON.stringify(e));localStorage.setItem(je.id,t)},{deep:!0});var at=window.settings=Wl;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:xa.Nordic};Xe.emit("loadSettings",e),Object.assign(Wl,e),Do()};function Po(){try{let e=localStorage.getItem(je.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=vl.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Wl,t)}Xe.emit("loadSettings",Wl)}catch{}}const Dn=zl([]);function To(e){Dn.push(e)}const Pn=zl([]);function Fo(e){Pn.push(e)}const Uo=zl([]),Ro={class:"table"},Rt=Ce({__name:"Column",setup(e){const t=f(()=>Ol[at.theme].mergeAdjacent);return(l,n)=>(k(),D("div",Ro,[g("div",{class:ct(["col",{mergeAdjacent:u(t)}])},[$t(l.$slots,"default")],2)]))}}),Oo={class:"table"},Ul=Ce({__name:"Row",setup(e){const t=f(()=>Ol[at.theme].mergeAdjacent);return(l,n)=>(k(),D("div",Oo,[g("div",{class:ct(["row",{mergeAdjacent:u(t)}])},[$t(l.$slots,"default")],2)]))}});function Ra(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!oi(e)}function Qe(e,t="span"){return typeof e=="function"?Ce({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),Ce({template:e})):Ce({render:()=>({})}):e}function re(e){if(sl(e))return typeof e=="function"?e():Qe(e);const t=e[bl];return i(t,e[wl](),null)}function Ye(...e){let t;return i(Ul,null,Ra(t=e.map(re))?t:{default:()=>[t]})}function Ht(...e){let t;return i(Rt,null,Ra(t=e.map(re))?t:{default:()=>[t]})}function Nl(...e){return i("div",{class:"table-grid"},[e.map(t=>i("div",{class:{["row-grid"]:!0,mergeAdjacent:Ol[at.theme].mergeAdjacent}},[t.map(re)]))])}function Kt(e){if(sl(e))return typeof e=="function"?e():typeof e=="string"?i(S,null,[e]):i(e,null,null);const t=e[bl];return i(t,e[wl](),null)}function qo(...e){let t;return i(Rt,null,Ra(t=e.map(Kt))?t:{default:()=>[t]})}function sl(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Hl]===!0}function Tn(e,t,l){const n=V(null),o=V(void 0);function r(p){n.value||(n.value=setInterval(c,250)),o.value=p,l&&(l.value=!0)}function d(){n.value&&(clearInterval(n.value),n.value=null),l&&(l.value=!1)}function c(){t&&t.value?t.value():e&&e.value&&e.value(o.value)}return dn(d),{start:r,stop:d,handleHolding:c}}function Lo(e,t){const l=f(()=>e.filter(n=>u(n.visibility)===yt.Visible&&t(n)));return{firstFeature:f(()=>l.value[0]),collapsedContent:M(()=>Ht(...l.value.slice(1))),hasCollapsedContent:f(()=>l.value.length>1)}}function ua(e,t="div"){const l=Vt();return Lt(()=>{l.value=Qe(kt(e),t)}),l}function yl(e,t="div"){const l=Vt(null);return Lt(()=>{const n=kt(e);l.value=n==null?null:Qe(n,t)}),l}function Go(e){return f(()=>kt(e))}function kt(e){return u(u(e))}function ee(...e){return e.includes(Object)||e.push(Object),e}const Se=Ce({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(k(),D("div",{style:ht({width:e.width,height:e.height})},null,4))}});const Qo={},$o={class:"notif"};function Vo(e,t){return k(),D("div",$o,"!")}var Xa=$e(Qo,[["render",Vo],["__scopeId","data-v-66323fd4"]]),Ho=Ce({props:{element:Object,display:{type:ee(Object,String,Function),required:!0},style:ee(Object,String,Array),classes:ee(Object),direction:ee(String),xoffset:ee(String),yoffset:ee(String),pinned:Object},setup(e){const{element:t,display:l,pinned:n}=St(e),o=V(!1),r=f(()=>(kt(n)||o.value)&&d.value),d=yl(l),c=Vt(Qe(M(()=>{const w=kt(t);return w==null?"":Kt(w)})));function p(w){const h=n;w.shiftKey&&h&&(h.value=!h.value,w.stopPropagation(),w.preventDefault())}const m=f(()=>kt(n)&&Ol[at.theme].showPin);return{Direction:Te,isHovered:o,isShown:r,comp:d,elementComp:c,unref:u,togglePinned:p,showPin:m}}});const jo={key:0,class:"material-icons pinned"};function Wo(e,t,l,n,o,r){return k(),D("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))},[$t(e.$slots,"default",{},void 0,!0),e.elementComp?(k(),be(nt(e.elementComp),{key:0})):L("",!0),i(pa,{name:"fade"},{default:ve(()=>{var d;return[e.isShown?(k(),D("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:ht([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(d=e.unref(e.style))!=null?d:{}])},[e.showPin?(k(),D("span",jo,"push_pin")):L("",!0),e.comp?(k(),be(nt(e.comp),{key:1})):L("",!0)],6)):L("",!0)]}),_:1})],34)}var ut=$e(Ho,[["render",Wo],["__scopeId","data-v-6102fa3a"]]);const va=e=>(rl("data-v-14ecc7bd"),e=e(),ul(),e),Jo={key:0,class:"day feature dontMerge opened"},zo={class:"date"},Ko=s("Dec"),Xo=va(()=>g("br",null,null,-1)),Yo={class:"date"},Zo=s("Dec"),es=va(()=>g("br",null,null,-1)),ts=va(()=>g("div",{class:"doors"},null,-1)),ls={class:"date"},as=s("Dec"),ns=va(()=>g("br",null,null,-1)),is={key:0,class:"material-icons lock"},os={key:1,class:"timer"},ss=Ce({__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,n=f(()=>l.layer&&a.gte(R.day.value,l.day)&&new Date().getMonth()===11&&new Date().getDate()>=l.day);function o(){n.value&&t("unlockLayer")}return(r,d)=>{var c,p,m;return e.opened.value?(k(),D("div",Jo,[i(ut,{display:(m=(p=u(Et)[(c=e.layer)!=null?c:""])==null?void 0:p.name)!=null?m:"",direction:u(Te).Up,yoffset:"5px"},{default:ve(()=>[i(pa,{appear:"",name:"door"},{default:ve(()=>[g("div",{class:"doors",onClick:d[0]||(d[0]=w=>t("openLayer"))},[g("div",zo,[Ko,Xo,s(xe(e.day),1)]),g("div",Yo,[Zo,es,s(xe(e.day),1)])])]),_:1}),g("div",{class:"icon",onClick:d[1]||(d[1]=w=>t("openLayer")),style:ht({backgroundImage:`url(${e.symbol})`})},null,4),g("div",{class:"lore",onClick:d[2]||(d[2]=w=>t("openLore"))},"?"),u(e.shouldNotify)?(k(),be(Xa,{key:0})):L("",!0)]),_:1},8,["display","direction"])])):(k(),D("div",{key:1,class:ct(["day feature dontMerge",{can:u(n),locked:!u(n),canOpen:u(n)}]),onClick:o},[ts,g("div",ls,[as,ns,s(xe(e.day),1)]),u(n)?L("",!0):(k(),D("div",is,"lock")),u(R).day.value===e.day&&!u(n)?(k(),D("div",os,xe(u(R).timeUntilNewDay.value<0?"NYI, sorry":u(Na)(u(R).timeUntilNewDay.value,0)),1)):L("",!0),u(n)?(k(),be(Xa,{key:2})):L("",!0)],2))}}});var rs=$e(ss,[["__scopeId","data-v-14ecc7bd"]]);const us=Ce({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,l=ua(Yt(t,"display")),n=ua(Yt(t,"content"));return(o,r)=>(k(),be(Rt,{class:"collapsible-container"},{default:ve(()=>[g("button",{onClick:r[0]||(r[0]=d=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(k(),be(nt(u(l))))]),e.collapsed.value?L("",!0):(k(),be(nt(u(n)),{key:0}))]),_:1}))}});var ds=$e(us,[["__scopeId","data-v-a72c16aa"]]);const cs={key:0},ps={key:0,class:"mark star"},ms=["src"],vs=Ce({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,l)=>e.mark?(k(),D("div",cs,[e.mark===!0?(k(),D("div",ps)):(k(),D("img",{key:1,class:"mark",src:e.mark},null,8,ms))])):L("",!0)}});var fa=$e(vs,[["__scopeId","data-v-2207999f"]]);const fs=Ce({__name:"Node",props:{id:null},setup(e){const l=St(e),n=na(Ia,()=>{}),o=na(Da,()=>{}),r=Vt(null),d=f(()=>r.value&&r.value.parentElement);return Xt([d,l.id],([c,p],[m,w])=>{m&&o(u(w)),c&&n(p,c)}),dn(()=>o(u(l.id))),(c,p)=>(k(),D("div",{class:"node",ref_key:"node",ref:r},null,512))}});var Xl=$e(fs,[["__scopeId","data-v-a48cb382"]]);const gs=Ce({props:{progress:{type:ee(String,Object,Number),required:!0},width:{type:ee(Number),required:!0},height:{type:ee(Number),required:!0},direction:{type:ee(String),required:!0},display:ee(Object,String,Function),visibility:{type:ee(Number),required:!0},style:ee(Object,String,Array),classes:ee(Object),borderStyle:ee(Object,String,Array),textStyle:ee(Object,String,Array),baseStyle:ee(Object,String,Array),fillStyle:ee(Object,String,Array),mark:ee(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:fa,Node:Xl},setup(e){const{progress:t,width:l,height:n,direction:o,display:r}=St(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(n)+.5+"px"};switch(u(o)){case Te.Up:m.clipPath=`inset(${d.value}% -2px -2px -2px)`,m.width=kt(l)+2+"px";break;case Te.Down:m.clipPath=`inset(-2px -2px ${d.value}% -2px)`,m.width=kt(l)+2+"px";break;case Te.Right:m.clipPath=`inset(-2px ${d.value}% -2px -2px)`;break;case Te.Left:m.clipPath=`inset(-2px -2px -2px ${d.value} + '%)`;break;case Te.Default:m.clipPath="inset(-2px 50% -2px -2px)";break}return m}),p=yl(r);return{normalizedProgress:d,barStyle:c,component:p,unref:u,Visibility:yt}}});function hs(e,t,l,n,o,r){var p,m,w,h,A,v,_;const d=hl("MarkNode"),c=hl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),D("div",{key:0,style:ht([{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:ht([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(m=e.unref(e.borderStyle))!=null?m:{}])},[e.component?(k(),D("span",{key:0,class:"overlayText",style:ht(e.unref(e.textStyle))},[(k(),be(nt(e.component)))],4)):L("",!0)],4),g("div",{class:"border",style:ht([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(w=e.unref(e.style))!=null?w:{},(h=e.unref(e.baseStyle))!=null?h:{},(A=e.unref(e.borderStyle))!=null?A:{}])},[g("div",{class:"fill",style:ht([e.barStyle,(v=e.unref(e.style))!=null?v:{},(_=e.unref(e.fillStyle))!=null?_:{}])},null,4)],4),i(d,{mark:e.unref(e.mark)},null,8,["mark"]),i(c,{id:e.id},null,8,["id"])],6)):L("",!0)}var ys=$e(gs,[["render",hs],["__scopeId","data-v-730cc7a0"]]);const bs=Symbol("Bar");function jt(e){return qt(()=>{const t=e();return t.id=Rl("bar-"),t.type=bs,t[bl]=ys,Y(t,"visibility"),_t(t,"visibility",yt.Visible),Y(t,"width"),Y(t,"height"),Y(t,"direction"),Y(t,"style"),Y(t,"classes"),Y(t,"borderStyle"),Y(t,"baseStyle"),Y(t,"textStyle"),Y(t,"fillStyle"),Y(t,"progress"),Y(t,"display"),Y(t,"mark"),t[wl]=function(){const{progress:l,width:n,height:o,direction:r,display:d,visibility:c,style:p,classes:m,borderStyle:w,textStyle:h,baseStyle:A,fillStyle:v,mark:_,id:N}=this;return{progress:l,width:n,height:o,direction:r,display:d,visibility:c,style:u(p),classes:m,borderStyle:w,textStyle:h,baseStyle:A,fillStyle:v,mark:_,id:N}},t})}var ws=Ce({props:{display:{type:ee(Object,String,Function),required:!0},visibility:{type:ee(Number),required:!0},style:ee(Object,String,Array),classes:ee(Object),onClick:Function,onHold:Function,canClick:{type:ee(Boolean),required:!0},small:Boolean,mark:ee(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:Xl,MarkNode:fa},setup(e){const{display:t,onClick:l,onHold:n}=St(e),o=Vt("");Lt(()=>{const c=kt(t);if(c==null){o.value="";return}if(sl(c)){o.value=Qe(c);return}const p=Qe(c.title||"","h3"),m=Qe(c.description,"div");o.value=Qe(M(()=>i("span",null,[c.title?i("div",null,[i(p,null,null)]):null,i(m,null,null)])))});const{start:r,stop:d}=Tn(l,n,e.isHolding);return{start:r,stop:d,comp:o,Visibility:yt,unref:u}}});function As(e,t,l,n,o,r){var p;const d=hl("MarkNode"),c=hl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),D("button",{key:0,style:ht([{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(),be(nt(e.unref(e.comp)),{key:0})):L("",!0),i(d,{mark:e.unref(e.mark)},null,8,["mark"]),i(c,{id:e.id},null,8,["id"])],38)):L("",!0)}var Fn=$e(ws,[["render",As],["__scopeId","data-v-8cedd7da"]]);const Cs=Symbol("Clickable");function Tt(e){return qt(()=>{var l;const t=(l=e==null?void 0:e())!=null?l:{};if(t.id=Rl("clickable-"),t.type=Cs,t[bl]=Fn,t.isHolding=V(!1),Y(t,"visibility"),_t(t,"visibility",yt.Visible),Y(t,"canClick"),_t(t,"canClick",!0),Y(t,"classes"),Y(t,"style"),Y(t,"mark"),Y(t,"display"),t.onClick){const n=t.onClick.bind(t);t.onClick=function(o){u(t.canClick)&&n(o)}}if(t.onHold){const n=t.onHold.bind(t);t.onHold=function(){u(t.canClick)&&n()}}return t[wl]=function(){const{display:n,visibility:o,style:r,classes:d,onClick:c,onHold:p,isHolding:m,canClick:w,small:h,mark:A,id:v}=this;return{display:n,visibility:o,style:u(r),classes:d,onClick:c,onHold:p,isHolding:m,canClick:w,small:h,mark:A,id:v}},t})}function dt(e,t="points",l=0,n=void 0){const o=gt(e)?e:Me(e);if(o.displayName=t,o.precision=l,o.small=n,!gt(e)){const r=o[jl];r.displayName=t,r.precision=l,r.small=n}return o}function Ya(e){const t=Me(e.value);return Xt(e,l=>{Ua.value||a.gt(l,t.value)&&(t.value=l)}),t}function ks(e){const t=Me(e.value);return Xt(e,(l,n)=>{Ua.value||a.gt(l,n)&&(t.value=a.add(t.value,a.sub(l,n)))}),t}new a("10^^8");new a("1e100");function Yl(e,t){const l=t!=null?t:e.value;return a.eq(e.precision,0)?Z(e.small?l:a.floor(l)):G(l,e.precision,e.small)}const Es=["x1","y1","x2","y2"],_s=Ce({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const l=St(e),n=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(),D("line",Bl({"stroke-width":"15px",stroke:"white"},e.link,{x1:u(n).x,y1:u(n).y,x2:u(o).x,y2:u(o).y}),null,16,Es))}});const Ss=Ce({__name:"Links",props:{links:null},setup(e){var p;const l=Yt(e,"links"),n=V(null),o=na(Pa,V({})),r=na(Ta,V(void 0)),d=V((p=n.value)==null?void 0:p.getBoundingClientRect());Xt(r,()=>{var m;return d.value=(m=n.value)==null?void 0:m.getBoundingClientRect()}),da(()=>{var m;return d.value=(m=n.value)==null?void 0:m.getBoundingClientRect()});const c=f(()=>{var w,h;const m=o.value;return(h=(w=l.value)==null?void 0:w.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,w)=>(k(),D(S,null,[u(c)?(k(),D("svg",si(Bl({key:0},m.$attrs)),[(k(!0),D(S,null,cn(u(c),(h,A)=>(k(),be(_s,{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)):L("",!0),g("div",{ref_key:"resizeListener",ref:n,class:"resize-listener"},null,512)],64))}});var Ms=$e(Ss,[["__scopeId","data-v-063f6d6b"]]);Ce({props:{nodes:{type:ee(Array),required:!0},leftSideNodes:ee(Array),rightSideNodes:ee(Array),branches:ee(Array)},components:{Links:Ms},setup(e){const{nodes:t,leftSideNodes:l,rightSideNodes:n}=St(e),o=Vt();Lt(()=>{const c=kt(t);o.value=Qe(M(()=>i(S,null,[c.map(p=>i("span",{class:"row tree-row",style:"margin: 50px auto;"},[p.map(Kt)]))])))});const r=Vt();Lt(()=>{const c=kt(l);r.value=c?Qe(M(()=>i("span",{class:"left-side-nodes small"},[c.map(Kt)]))):""});const d=Vt();return Lt(()=>{const c=kt(n);d.value=c?Qe(M(()=>i("span",{class:"side-nodes small"},[c.map(Kt)]))):""}),{unref:u,nodesComp:o,leftNodesComp:r,rightNodesComp:d}}});Ce({props:{display:ee(Object,String,Function),visibility:{type:ee(Number),required:!0},style:ee(String,Object,Array),classes:ee(Object),onClick:Function,onHold:Function,color:ee(String),glowColor:ee(String),canClick:{type:ee(Boolean),required:!0},mark:ee(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:fa,Node:Xl},setup(e){const{onClick:t,onHold:l,display:n}=St(e),o=yl(n),{start:r,stop:d}=Tn(t,l);return{start:r,stop:d,comp:o,unref:u,Visibility:yt,isCoercableComponent:sl}}});function Zt(e){const t=[],l={};let n=!1;function o(){return n||(t.push(...e()),l.base=t.map(c=>bt(c.base)),l.baseText=t.map(c=>bt(c.baseText)),l.visible=t.map(c=>bt(c.visible)),n=!0),t}const r=Me({});return[M(()=>{const c=o();let p=!0;const m=c.map((w,h)=>{var N,P,H;if(u(l.visible[h])===!1)return null;const A=i("h3",{onClick:()=>r.value[h]=!r.value[h],style:"cursor: pointer"},[i("span",{class:"modifier-toggle"+(u(r.value[h])?" collapsed":"")},[s("\u25BC")]),w.title,w.subtitle?i("span",{class:"subtitle"},[s(" ("),w.subtitle,s(")")]):null]),v=u(r.value[h])?null:i(S,null,[i("div",{class:"modifier-container"},[i("span",{class:"modifier-description"},[Kt((N=u(l.baseText[h]))!=null?N:"Base")]),i("span",{class:"modifier-amount"},[G((P=u(l.base[h]))!=null?P:1),w.unit])]),Kt(u(w.modifier.description))]),_=!p;return p=!1,i(S,null,[_?i("br",null,null):null,i("div",null,[A,i("br",null,null),v,i("hr",null,null),i("div",{class:"modifier-container"},[i("span",{class:"modifier-description"},[s("Total")]),i("span",{class:"modifier-amount"},[G(w.modifier.apply((H=u(l.base[h]))!=null?H:1)),w.unit])])])])});return i(S,null,[m])}),r]}function Jl(e){const t=Object.values(e).reverse(),l=Me(!0),n=f(()=>t.filter(p=>p.earned.value===!1)),{firstFeature:o,collapsedContent:r,hasCollapsedContent:d}=Lo(t,p=>p.earned.value),c=M(()=>{const p=[...n.value];return o.value&&p.push(o.value),qo(...p,M(()=>ca(i(ds,{collapsed:l,content:r,display:l.value?"Show other completed milestones":"Hide other completed milestones"},null),[[un,u(d)]])))});return{collapseMilestones:l,display:c}}function dl(e){const t=e.ignoreTotal?e.resource:ks(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:ce.usingLog)&&(r=r.log10(),d=a.log10(d)),a.div(r,d)},n=jt(()=>({direction:Te.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:l,display:M(()=>R.day.value===e.day?i(S,null,[Ae(t.value),s("/"),Ae(e.goal)]):"")})),o=M(()=>i(S,null,[i("div",null,[R.day.value===e.day?i(S,null,[s("Reach "),Ae(e.goal),s(" "),e.ignoreTotal?"":"total ",e.resource.displayName,s(" to complete the day")]):i(S,null,[e.name,s(" Complete!")]),e.modal?i(S,null,[" ",s("-")," ",i("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[s("Check Modifiers")])]):void 0]),re(n),e.modal?re(e.modal.display):void 0]));return Lt(()=>{R.day.value===e.day&&a.gte(t.value,e.goal)&&R.completeDay()}),{total:t,trackerDisplay:o}}function zt(e){var d;const t=(d=e.style)!=null?d:{minHeight:"20px",width:"40px",color:"var(--foreground)"},l=Tt(()=>({display:"0",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=0}})),n=Tt(()=>({display:"-",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=a.sub(e.active.value,1)}})),o=Tt(()=>({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=Tt(()=>({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:n,add:o,max:r}}const Bs=Symbol("Buyable");function Oe(e){const t=Me(0);return qt(()=>{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=Rl("buyable-"),l.type=Bs,l[bl]=Fn,l.amount=t,l.amount[gl]=(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)===yt.Visible&&u(l.canAfford)&&a.lt(l.amount.value,u(l.purchaseLimit)))),l.maxed=f(()=>a.gte(l.amount.value,u(l.purchaseLimit))),Y(l,"classes");const n=l.classes;l.classes=f(()=>{const p=u(n)||{};return l.maxed.value&&(p.bought=!0),p}),Y(l,"canPurchase"),l.canClick=l.canPurchase,l.onClick=l.purchase=(c=(d=l.onClick)!=null?d:l.purchase)!=null?c:function(){var w;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)),(w=p.onPurchase)==null||w.call(p,m)},Y(l,"display");const o=l.display;return l.display=M(()=>{const p=u(o);if(sl(p)){const m=Qe(p);return i(m,null,null)}if(p!=null&&l.cost!=null&&l.resource!=null){const m=l,w=Qe(p.title||"","h3"),h=Qe(p.description||""),A=Qe(p.effectDisplay||"");return i("span",null,[p.title?i("div",null,[i(w,null,null)]):null,p.description?i(h,null,null):null,p.showAmount===!1?null:i("div",null,[i("br",null,null),u(m.purchaseLimit)===a.dInf?i(S,null,[s("Amount: "),Z(m.amount.value)]):i(S,null,[s("Amount: "),Z(m.amount.value),s(" /")," ",Z(u(m.purchaseLimit))])]),p.effectDisplay?i("div",null,[i("br",null,null),s("Currently: "),i(A,null,null)]):null,m.cost&&!m.maxed.value?i("div",null,[s("Cost: "),G(u(m.cost)||0)," ",l.resource.displayName]):null])}return""}),Y(l,"visibility"),_t(l,"visibility",yt.Visible),Y(l,"cost"),Y(l,"resource"),Y(l,"purchaseLimit"),_t(l,"purchaseLimit",a.dInf),Y(l,"style"),Y(l,"mark"),Y(l,"small"),l[wl]=function(){const{display:p,visibility:m,style:w,classes:h,onClick:A,canClick:v,small:_,mark:N,id:P}=this;return{display:p,visibility:m,style:u(w),classes:h,onClick:A,canClick:v,small:_,mark:N,id:P}},l})}const ga=ma({}),Oa=Symbol("Hotkey");function Fl(e){return qt(()=>{const t=e();return t.type=Oa,Y(t,"enabled"),_t(t,"enabled",!0),Y(t,"description"),t})}Xe.on("addLayer",e=>{kn(e,Oa).forEach(t=>{ga[t.key]=t})});Xe.on("removeLayer",e=>{kn(e,Oa).forEach(t=>{ga[t.key]=void 0})});document.onkeydown=function(e){var n;if(((n=e.target)==null?void 0:n.tagName)==="INPUT"||Ga.value&&!ce.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const l=ga[t];l&&u(l.enabled)&&(e.preventDefault(),l.onPress())};Fo(M(()=>{const e=Object.values(ga).filter(t=>u(t==null?void 0:t.enabled));return e.length===0?"":i("div",null,[i("br",null,null),i("h4",null,[s("Hotkeys")]),e.map(t=>i("div",null,[t==null?void 0:t.key,s(": "),t==null?void 0:t.description]))])}));const Ns=Ce({__name:"Sticky",setup(e){const t=V("0"),l=new ResizeObserver(o),n=Vt(null);function o(){let r=n.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 Ml(o),document.fonts.ready.then(o),da(()=>{var d;const r=(d=n.value)==null?void 0:d.parentElement;r&&l.observe(r)}),(r,d)=>(k(),D("div",{class:"sticky",style:ht({top:t.value}),ref_key:"element",ref:n,"data-v-sticky":""},[$t(r.$slots,"default",{},void 0,!0)],4))}});var xs=$e(Ns,[["__scopeId","data-v-cccac690"]]);const Za=Ce({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,l=f(()=>Yl(t.resource));return(n,o)=>(k(),D("h2",{style:ht({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},xe(u(l)),5))}});const Is={class:"main-display"},Ds={key:0},Ps={key:1},Ts=s(", "),Fs={key:2},Us=g("br",null,null,-1),Rs={class:"main-display"},Os={key:0},qs={key:1},Ls=s(", "),Gs={key:2},Qs=g("br",null,null,-1),Ft=Ce({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null,sticky:{type:Boolean,default:!0}},setup(e){const l=St(e),n=V(null),o=yl(l.effectDisplay),r=V(null),d=yl(l.productionDisplay),c=f(()=>a.lt(l.resource.value,"1e1000"));return(p,m)=>{var w,h;return e.sticky?(k(),be(xs,{key:0},{default:ve(()=>{var A,v,_,N;return[g("div",{class:ct(["main-display-container",(A=e.classes)!=null?A:{}]),style:ht([{"min-height":`${((_=(v=n.value)==null?void 0:v.$el.clientHeight)!=null?_:0)+50}px`},(N=e.style)!=null?N:{}])},[g("div",Is,[u(c)?(k(),D("span",Ds,"You have ")):L("",!0),i(Za,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),s(" "+xe(e.resource.displayName),1),u(o)?(k(),D("span",Ps,[Ts,(k(),be(nt(u(o)),{ref_key:"effectRef",ref:n},null,512))])):L("",!0),u(d)?(k(),D("span",Fs,[Us,(k(),be(nt(u(d)),{ref_key:"productionRef",ref:r},null,512))])):L("",!0)])],6)]}),_:1})):(k(),D("div",{key:1,class:ct(["main-display-container",(w=e.classes)!=null?w:{}]),style:ht([{"min-height":"50px"},(h=e.style)!=null?h:{}])},[g("div",Rs,[u(c)?(k(),D("span",Os,"You have ")):L("",!0),i(Za,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),s(" "+xe(e.resource.displayName),1),u(o)?(k(),D("span",qs,[Ls,(k(),be(nt(u(o)),{ref_key:"effectRef",ref:n},null,512))])):L("",!0),u(d)?(k(),D("span",Gs,[Qs,(k(),be(nt(u(d)),{ref_key:"productionRef",ref:r},null,512))])):L("",!0)])],6))}}});var $s=Ce({props:{display:{type:ee(String,Object,Function),required:!0},visibility:{type:ee(Number),required:!0},style:ee(String,Object,Array),classes:ee(Object),resource:Object,cost:ee(String,Object,Number),canPurchase:{type:ee(Boolean),required:!0},bought:{type:ee(Boolean),required:!0},mark:ee(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:Xl,MarkNode:fa},setup(e){const{display:t,cost:l}=St(e),n=Vt("");return Lt(()=>{const o=kt(t);if(o==null){n.value="";return}if(sl(o)){n.value=Qe(o);return}const r=kt(l),d=Qe(o.title||"","h3"),c=Qe(o.description,"div"),p=Qe(o.effectDisplay||"");n.value=Qe(M(()=>{var m;return i("span",null,[o.title?i("div",null,[i(d,null,null)]):null,i(c,null,null),o.effectDisplay?i("div",null,[s("Currently: "),i(p,null,null)]):null,e.resource!=null&&o.showCost!==!1?i(S,null,[i("br",null,null),s("Cost: "),e.resource&&Yl(e.resource,r)," ",(m=e.resource)==null?void 0:m.displayName]):null])}))}),{component:n,unref:u,Visibility:yt}}});const Vs=["disabled"];function Hs(e,t,l,n,o,r){var p;const d=hl("MarkNode"),c=hl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),D("button",{key:0,style:ht([{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(),be(nt(e.unref(e.component)),{key:0})):L("",!0),i(d,{mark:e.unref(e.mark)},null,8,["mark"]),i(c,{id:e.id},null,8,["id"])],14,Vs)):L("",!0)}var js=$e($s,[["render",Hs],["__scopeId","data-v-7f411ac8"]]);const Ws=Symbol("Upgrade");function O(e){const t=Me(!1);return qt(()=>{const l=e();return l.id=Rl("upgrade-"),l.type=Ws,l[bl]=js,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 n=l;return n.resource!=null&&n.cost!=null&&a.gte(n.resource.value,u(n.cost))}):Y(l,"canAfford"),l.canPurchase=f(()=>u(l.visibility)===yt.Visible&&u(l.canAfford)&&!u(l.bought)),l.purchase=function(){var o;const n=l;!u(n.canPurchase)||(n.resource!=null&&n.cost!=null&&(n.resource.value=a.sub(n.resource.value,u(n.cost))),t.value=!0,(o=n.onPurchase)==null||o.call(n))},Y(l,"visibility"),_t(l,"visibility",yt.Visible),Y(l,"classes"),Y(l,"style"),Y(l,"display"),Y(l,"mark"),Y(l,"cost"),Y(l,"resource"),l[wl]=function(){const{display:n,visibility:o,style:r,classes:d,resource:c,cost:p,canPurchase:m,bought:w,mark:h,id:A,purchase:v}=this;return{display:n,visibility:o,style:u(r),classes:d,resource:c,cost:p,canPurchase:m,bought:w,mark:h,id:A,purchase:v}},l})}function pe(e){return qt(()=>{const{addend:t,description:l,enabled:n}=e(),o=bt(t),r=bt(l),d=n==null?void 0:bt(n);return{apply:c=>a.add(c,u(o)),revert:c=>a.sub(c,u(o)),enabled:d,description:l==null?void 0:M(()=>i("div",{class:"modifier-container"},[u(r)?i("span",{class:"modifier-description"},[Kt(u(r))]):null,i("span",{class:"modifier-amount"},[a.gte(u(o),0)?"+":"",G(u(o))])]))}})}function b(e){return qt(()=>{const{multiplier:t,description:l,enabled:n}=e(),o=bt(t),r=bt(l),d=n==null?void 0:bt(n);return{apply:c=>a.times(c,u(o)),revert:c=>a.div(c,u(o)),enabled:d,description:l==null?void 0:M(()=>i("div",{class:"modifier-container"},[u(r)?i("span",{class:"modifier-description"},[Kt(u(r))]):null,i("span",{class:"modifier-amount"},[s("\xD7"),G(u(o))])]))}})}function _l(e){return qt(()=>{const{exponent:t,description:l,enabled:n,supportLowNumbers:o}=e(),r=bt(t),d=bt(l),c=n==null?void 0:bt(n);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:M(()=>i("div",{class:"modifier-container"},[u(d)?i("span",{class:"modifier-description"},[Kt(u(d)),o?" (+1 effective)":null]):null,i("span",{class:"modifier-amount"},[s("^"),G(u(r))])]))}})}function ae(e){return qt(()=>{const t=e();return{apply:l=>t.filter(n=>u(n.enabled)!==!1).reduce((n,o)=>o.apply(n),l),revert:t.every(l=>l.revert!=null)?l=>t.filter(n=>u(n.enabled)!==!1).reduceRight((n,o)=>o.revert(n),l):void 0,enabled:f(()=>t.filter(l=>u(l.enabled)!==!1).length>0),description:M(()=>i(S,null,[t.filter(l=>u(l.enabled)!==!1).map(l=>u(l.description)).filter(l=>l).map(Kt)]))}})}function Un(e){return qt(()=>{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),n=u(t.currentAt);t.gainResource.value=a.add(t.gainResource.value,l),t.spend(l,n),(o=t.onConvert)==null||o.call(t,l)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),Y(t,"currentGain"),Y(t,"actualGain"),Y(t,"currentAt"),Y(t,"nextAt"),Y(t,"buyMax"),_t(t,"buyMax",!0),Y(t,"roundUpCost"),_t(t,"roundUpCost",!0),t})}function qa(e,t){const l=bt(e),n=bt(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(n));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(n)).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(n)).times(u(l)).max(u(l)),o.costModifier&&(r=o.costModifier.revert(r)),r}}}function Rn(e){return Un(e)}function Js(e){return Un(()=>{const t=e();return _t(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})),_t(t,"convert",function(){var o;const l=u(t.actualGain),n=u(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(u(t.currentGain)):u(t.currentGain),t.spend(l,n),(o=t.onConvert)==null||o.call(t,l)}),t})}function ka(e,t,l=.5){return a.lte(e,t)?e:a.pow(e,l).times(a.pow(t,a.sub(1,l)))}function en(e,t,l=.5){return{...e,currentAt:n=>ka(e.currentAt(n),u(t),a.recip(u(l))),nextAt:n=>ka(e.nextAt(n),u(t),a.recip(u(l))),currentGain:n=>ka(e.currentGain(n),u(t),u(l))}}const zs={},Ks={style:{"white-space":"nowrap"}},Xs=g("span",{style:{"font-size":"larger","font-family":"initial"}},"\u221A",-1),Ys={style:{display:"inline-block","border-top":"1px solid","padding-left":".2em"}};function Zs(e,t){return k(),D("span",Ks,[Xs,g("div",Ys,[$t(e.$slots,"default")])])}var il=$e(zs,[["render",Zs]]);const er={},tr={class:"fraction"};function lr(e,t){return k(),D("div",tr,[$t(e.$slots,"default")])}var ar=$e(er,[["render",lr]]);const nr={class:"field"},ir={key:0,class:"field-title"},La=Ce({__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,n=yl(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(),D("div",nr,[u(n)?(k(),D("span",ir,[(k(),be(nt(u(n))))])):L("",!0),i(u(pi),{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 or=Ce({props:{visibility:{type:ee(Number),required:!0},display:{type:ee(String,Object,Function),required:!0},style:ee(String,Object,Array),classes:ee(Object),earned:{type:ee(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:Xl},setup(e){const{display:t}=St(e),l=Vt("");return Lt(()=>{const n=kt(t);if(n==null){l.value="";return}if(sl(n)){l.value=Qe(n);return}const o=Qe(n.requirement,"h3"),r=Qe(n.effectDisplay||"","b"),d=Qe(n.optionsDisplay||"","span");l.value=Qe(M(()=>i("span",null,[i(o,null,null),n.effectDisplay?i("div",null,[i(r,null,null)]):null,n.optionsDisplay?i("div",{class:"equal-spaced"},[i(d,null,null)]):null])))}),{comp:l,unref:u,Visibility:yt}}});function sr(e,t,l,n,o,r){var c;const d=hl("Node");return e.unref(e.visibility)!==e.Visibility.None?(k(),D("div",{key:0,style:ht([{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(),be(nt(e.unref(e.comp)))),i(d,{id:e.id},null,8,["id"])],6)):L("",!0)}var rr=$e(or,[["render",sr],["__scopeId","data-v-f4e8794e"]]);Xe.on("setupVue",e=>e.use(mi));const tn=mn(),ur=Symbol("Milestone");let fl;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(fl||(fl={}));function T(e){const t=Me(!1);return qt(()=>{var o;const l=(o=e==null?void 0:e())!=null?o:{};l.id=Rl("milestone-"),l.type=ur,l[bl]=rr,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=Qe(sl(c)?c:c.requirement);tn(i(S,null,[i("h3",null,[s("Milestone earned!")]),i("div",null,[i(p,null,null)])]))}},Y(l,"visibility"),_t(l,"visibility",yt.Visible);const n=l.visibility;if(l.visibility=f(()=>{const r=u(l.display);switch(at.msDisplay){default:case fl.All:return u(n);case fl.Configurable:return u(l.earned)&&!(r!=null&&typeof r=="object"&&"optionsDisplay"in r)?yt.None:u(n);case fl.Incomplete:return u(l.earned)?yt.None:u(n);case fl.None:return yt.None}}),Y(l,"style"),Y(l,"classes"),Y(l,"display"),Y(l,"showPopups"),l[wl]=function(){const{visibility:r,display:d,style:c,classes:p,earned:m,id:w}=this;return{visibility:r,display:d,style:u(c),classes:p,earned:m,id:w}},l.shouldEarn){const r=l;Lt(()=>{var d,c;if(at.active===ce.id&&!r.earned.value&&u(r.visibility)===yt.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=Qe(sl(p)?p:p.requirement);tn(i(S,null,[i("h3",null,[s("Milestone earned!")]),i("div",null,[i(m,null,null)])]))}})}return l})}Xe.on("loadSettings",e=>{_t(e,"msDisplay",fl.All)});const dr=Object.values(fl).map(e=>({label:Cn(e),value:e}));To(M(()=>i(La,{title:"Show Milestones",options:dr,"onUpdate:modelValue":e=>at.msDisplay=e,modelValue:at.msDisplay},null)));const cr={class:"field"},pr=Ce({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,n=f(()=>Qe(u(l.title)||"<span></span>","span")),o=f({get(){return!!l.modelValue},set(r){t("update:modelValue",r)}});return(r,d)=>(k(),D("label",cr,[ca(g("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":d[0]||(d[0]=c=>gt(o)?o.value=c:null)},null,512),[[ri,u(o)]]),(k(),be(nt(u(n))))]))}});var ol=$e(pr,[["__scopeId","data-v-33d57459"]]);const mr=Symbol("Reset");function vr(e){return qt(()=>{const t=e();return t.id=Rl("reset-"),t.type=mr,t.reset=function(){var n;const l=o=>{if(o&&typeof o=="object")if(gl in o){const r=o;r.value=r[gl]}else!(o instanceof a)&&!gt(o)&&Object.values(o).forEach(r=>l(r))};u(t.thingsToReset).forEach(l),Xe.emit("reset",t),(n=t.onReset)==null||n.call(t)},Y(t,"thingsToReset"),t})}const la={};Xe.on("removeLayer",e=>{var t;(t=la[e.id])==null||t.call(la),la[e.id]=void 0});const fr="plastic",ln=10,He=Ot(fr,function(){const e="Plastic",t="#DCD9CD",l=dt(0,"plastic"),[n,o]=Zt(()=>[{title:"Plastic Gain",modifier:Be,base:0}]),r=V(!1),d=M(()=>i(wt,{modelValue:r.value,"onUpdate:modelValue":Ee=>r.value=Ee},{header:()=>i("h2",null,[e,s(" Modifiers")]),body:n})),c=Me(0),p=f(()=>a.times(c.value,100)),m=Oe(()=>({resource:lt.metal,cost(){const Ee=new a(this.amount.value);return a.pow(1.2,Ee).times(1e7)},display:M(()=>i(S,null,[i("h3",null,[s("Refinery")]),i("br",null,null),s("Refines oil into plastic pellets"),i("br",null,null),s("Consumes 100 oil/s to create 1 plastic/s"),i("br",null,null),i("br",null,null),s("Currently:"),i("br",null,null),s("-"),G(p.value),s(" oil/sec"),i("br",null,null),s("+"),G(c.value),s(" plastic/sec"),i("br",null,null),i("br",null,null),s("Cost: "),Z(u(m.cost))," ",m.resource.displayName])),onPurchase(){c.value=a.add(c.value,1)},style:{width:"300px"}})),{min:w,max:h,add:A,remove:v}=zt({buyable:m,active:c,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),_=f(()=>a.pow(5,a.add([...Object.values(B),...Object.values(ge)].filter(Ee=>Ee.bought.value).length,2))),N=O(()=>({resource:U(l),cost:_,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!N.bought.value})})),P=O(()=>({resource:U(l),cost:_,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!P.bought.value})})),H=O(()=>({resource:U(l),cost:_,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!H.bought.value})})),B={paperTools:N,boxTools:P,clothTools:H},E=O(()=>({resource:U(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})})),F=O(()=>({resource:U(l),cost:_,visibility:()=>y(P.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!F.bought.value})})),z=O(()=>({resource:U(l),cost:_,visibility:()=>y(H.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!z.bought.value})})),ge={paperElf:E,boxElf:F,clothElf:z},Q=Oe(()=>({resource:U(l),cost(){const Ee=this.amount.value;return a.pow(1.3,Ee).times(100)},visibility:()=>y(E.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:M(()=>i(S,null,[Z(Q.amount.value),s("%")])),showAmount:!1}})),fe=Oe(()=>({resource:U(l),cost(){const Ee=this.amount.value;return a.pow(1.3,Ee).times(100)},visibility:()=>y(F.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:M(()=>i(S,null,[Z(fe.amount.value),s("%")])),showAmount:!1}})),ie=Oe(()=>({resource:U(l),cost(){const Ee=this.amount.value;return a.pow(1.3,Ee).times(100)},visibility:()=>y(z.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions are +10% more efficient",effectDisplay:M(()=>i(S,null,[Z(a.times(ie.amount.value,10)),s("%")])),showAmount:!1}})),qe={passivePaper:Q,passiveBoxes:fe,clothGains:ie},Be=ae(()=>[pe(()=>({addend:c,description:"Oil Refinery",enabled:()=>a.gt(c.value,0)})),b(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:E.bought})),b(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:F.bought})),b(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:z.bought})),b(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:et.row2Upgrades.plasticUpgrade.bought})),b(()=>({multiplier:()=>Ze.oilEffectiveness.value,description:"Effectiveness",enabled:()=>a.lt(Ze.oilEffectiveness.value,1)})),b(()=>({multiplier:Le.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Le.dyes.yellow.amount.value,1)}))]),K=f(()=>Be.apply(0));Xe.on("update",Ee=>{a.lt(R.day.value,ln)||(l.value=a.times(Ee,K.value).add(l.value))});const{total:ke,trackerDisplay:Ge}=dl({resource:l,goal:25e4,name:e,day:ln,color:t,textColor:"var(--feature-foreground)",modal:{show:r,display:d}});return{name:e,color:t,plastic:l,totalPlastic:ke,buildRefinery:m,activeRefinery:c,oilCost:p,upgrades:B,elfUpgrades:ge,buyables:qe,generalTabCollapsed:o,minWidth:700,display:M(()=>i(S,null,[re(Ge),i(Se,null,null),i(Ft,{resource:l,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(K.value,0)?`+${G(K.value)}/s`:void 0},null),i(Se,null,null),i(Rt,null,{default:()=>[re(m),i("div",null,[Z(a.floor(c.value)),s("/"),Z(a.floor(m.amount.value))]),Ye(w,v,A,h)]}),i(Ul,null,{default:()=>[Ht(N,E,Q),Ht(P,F,fe),Ht(H,z,ie)]})]))}}),gr="paper",Ea=5,X=Ot(gr,function(){const e="Paper",t="#E8DCB8",l=dt(0,"paper"),n=dt(f(()=>a.min(a.div(me.logs.value,1e9),a.div(q.ash.value,Be.value))),"pulp"),o=Rn(()=>({scaling:qa(1,1.2),baseResource:n,gainResource:U(l),roundUpCost:!0,spend(J,he){me.logs.value=a.sub(me.logs.value,a.times(he,1e9)),q.ash.value=a.sub(q.ash.value,a.times(he,Be.value))},gainModifier:ie})),r=Tt(()=>({display:M(()=>{const J=a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value;return i(S,null,[i("span",{style:"font-size: large"},[s("Create "),Z(o.currentGain.value),s(" "),l.displayName]),i("br",null,null),i("span",{style:"font-size: large"},[s("Cost: "),Yl(me.logs,J),s(" "),n.displayName,s(" ("),Z(a.times(J,1e9)),s(" "),me.logs.displayName,s(";")," ",Z(a.times(J,Be.value)),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 he=Oe(()=>({...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:M(()=>i(S,null,[G(a.pow(.95,he.amount.value)),s("x price scaling,")," ",G(a.div(he.amount.value,10).add(1)),s("x auto-purchase speed")])),showAmount:!1},resource:U(l),cost(){let se=this.amount.value;(J.elfName==="Star"||J.elfName==="Bell")&&(se=a.pow(se,2)),a.gte(se,100)&&(se=a.pow(se,2).div(100)),a.gte(se,1e4)&&(se=a.pow(se,2).div(1e4)),se=a.pow(.95,P.amount.value).times(se);let We=5;W.elfTraining.paperElfTraining.milestones[0].earned.value&&We--;let Je=a.pow(We,se).times(10);return W.elfTraining.paperElfTraining.milestones[0].earned.value&&(Je=a.div(Je,F.value.max(1))),Je},style:"width: 600px"}));return he}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"}),w=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(Ne.elves.smallFireElf.bought.value)}),_=d({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>y(Ne.elves.bonfireElf.bought.value)}),N=d({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>y(Ne.elves.kilnElf.bought.value)}),P=d({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>y(Ne.elves.paperElf.bought.value)}),H=d({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>y(Ne.elves.boxElf.bought.value)}),B=d({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>y(Ne.elves.clothElf.bought.value)}),E={cuttersBook:c,plantersBook:p,expandersBook:m,heatedCuttersBook:w,heatedPlantersBook:h,fertilizerBook:A,smallFireBook:v,bonfireBook:_,kilnBook:N,paperBook:P,boxBook:H,clothBook:B},F=f(()=>Object.values(E).reduce((J,he)=>J.add(he.amount.value),new a(0))),z=O(()=>({resource:U(l),cost:1e8,visibility:()=>y(He.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),ge=O(()=>({resource:U(l),cost:1e9,visibility:()=>y(He.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),Q=O(()=>({resource:U(l),cost:1e10,visibility:()=>y(He.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),fe={clothUpgrade:z,drillingUpgrade:ge,oilUpgrade:Q},ie=ae(()=>[b(()=>({multiplier:2,description:"Scholar's shoes",enabled:tt.paperUpgrades.paperUpgrade1.bought})),b(()=>({multiplier:2,description:"Scholar's slacks",enabled:tt.paperUpgrades.paperUpgrade2.bought})),b(()=>({multiplier:2,description:"Scholar's jacket",enabled:tt.paperUpgrades.paperUpgrade3.bought})),b(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:tt.paperUpgrades.paperUpgrade4.bought})),b(()=>({multiplier:Le.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Le.dyes.yellow.amount.value,1)}))]),qe=ae(()=>[b(()=>({multiplier:.1,description:"Star Level 2",enabled:W.elfTraining.paperElfTraining.milestones[1].earned}))]),Be=f(()=>qe.apply(1e6)),[K,ke]=Zt(()=>[{title:"Paper Gain",modifier:ie,base:1},{title:"Ash Cost",modifier:qe,base:1e6,unit:" ash/pulp"}]),Ge=V(!1),Ee=M(()=>i(wt,{modelValue:Ge.value,"onUpdate:modelValue":J=>Ge.value=J},{header:()=>i("h2",null,[e,s(" Modifiers")]),body:K}));Xe.on("update",J=>{a.lt(R.day.value,Ea)||(l.value=a.times(J,He.buyables.passivePaper.amount.value).times(o.currentGain.value).div(100).add(l.value))});const{total:Ie,trackerDisplay:Ue}=dl({resource:l,goal:5e3,name:e,day:Ea,color:t,textColor:"var(--feature-foreground)",modal:{show:Ge,display:Ee}});return{name:e,day:Ea,color:t,paper:l,totalPaper:Ie,paperConversion:o,books:E,upgrades:fe,generalTabCollapsed:ke,minWidth:700,display:M(()=>i(S,null,[re(Ue),i(Se,null,null),i(Ft,{resource:l,color:t,style:"margin-bottom: 0"},null),i(Se,null,null),re(r),i(Se,null,null),Ye(...Object.values(fe)),i(Se,null,null),Ht(...Object.values(E))]))}}),hr="oil",_a=9,Ze=Ot(hr,function(){const e="Oil",t="#000000",l="var(--foreground)",n=dt(0,"oil"),o=dt(0,"depth"),r=Me(0),d=f(()=>a.lt(o.value,990)?a.add(10,o.value):a.pow(1.001,a.sub(o.value,990)).mul(1e3));function c(){if(a.lt(o.value,990)){const ze=a.min(a.affordArithmeticSeries(r.value,10,1,o.value),a.sub(990,o.value)),Dt=a.sumArithmeticSeries(ze,10,1,o.value);r.value=a.sub(r.value,Dt),o.value=a.add(o.value,ze)}if(a.gte(o.value,990)){const ze=a.affordGeometricSeries(r.value,1e3,1.001,a.sub(o.value,990)),Dt=a.sumGeometricSeries(ze,1e3,1.001,a.sub(o.value,990));r.value=a.sub(r.value,Dt),o.value=a.add(o.value,ze)}}const p=Me(0),m=f(()=>a.times(a.pow(p.value,H.value).pow(2),1e14)),w=f(()=>a.times(a.pow(p.value,H.value),1)),h=Oe(()=>({resource:lt.metal,cost(){const ze=new a(this.amount.value);return a.pow(1.3,ze).times(25e3)},display:M(()=>i(S,null,[i("h3",null,[s("Heavy Drill")]),i("br",null,null),s("A large drill specialized at deep mining."),i("br",null,null),s("Consumes 1e14*(Heavy Drills amount)"),i("sup",null,[s("2")]),s(" coal/sec for (Heavy Drills amount) drill power."),i("br",null,null),i("br",null,null),s("Currently:"),i("br",null,null),s("-"),_e(m.value),s(" coal/sec"),i("br",null,null),s("+"),_e(w.value),s(" drill power"),i("br",null,null),i("br",null,null),s("Cost: "),Ae(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}=zt({buyable:h,active:p}),P=Me(0),H=f(()=>a.add(P.value,Math.E).ln()),B=Oe(()=>({resource:lt.metal,cost(){const ze=new a(this.amount.value);return a.pow(2,ze).times(1e5)},display:M(()=>i(S,null,[i("h3",null,[s("Heavy Drill Drill")]),i("br",null,null),s("Attach extra drills to Heavy Drills to make them faster"),i("br",null,null),s("Raise amount of effective Heavy Drills by ^ln(Heavy Drill Drill amount + e)."),i("br",null,null),s("(also affects coal consumption)."),i("br",null,null),i("br",null,null),s("Currently:"),i("br",null,null),s("^"),_e(H.value),s(" Heavy Drill amount"),i("br",null,null),i("br",null,null),s("Cost: "),Ae(u(B.cost)),s(" "),B.resource.displayName])),onPurchase(){P.value=a.add(P.value,1)},style:{color:l,width:"160px"}})),{min:E,max:F,add:z,remove:ge}=zt({buyable:B,active:P}),Q=Me(0),fe=f(()=>a.pow(1/3,Q.value)),ie=f(()=>a.pow(2,Q.value)),qe=f(()=>a.pow(1.2,Q.value)),Be=Oe(()=>({resource:lt.metal,cost(){const ze=new a(this.amount.value);return a.pow(8,ze).times(2e5)},display:M(()=>i(S,null,[i("h3",null,[s("Heavy Extractor")]),i("br",null,null),s("Attach extractors to the drill to mine coal and ore, but with a price."),i("br",null,null),s("Divides drill power by 3 to multiply coal gain by 2 and ore gain by 1.2."),i("br",null,null),i("br",null,null),s("Currently:"),i("br",null,null),s("\xD7"),_e(fe.value),s(" drill power"),i("br",null,null),s("\xD7"),_e(ie.value),s(" coal/sec"),i("br",null,null),s("\xD7"),_e(qe.value),s(" ore/sec"),i("br",null,null),i("br",null,null),s("Cost: "),Ae(u(Be.cost))," ",Be.resource.displayName])),onPurchase(){Q.value=a.add(Q.value,1)},style:{color:l,width:"160px"}})),{min:K,max:ke,add:Ge,remove:Ee}=zt({buyable:Be,active:Q}),Ie=Me(0),Ue=f(()=>a.pow(Nt[3].bought.value?4:5,Ie.value)),J=f(()=>a.add(Ie.value,Ha.value).pow(2).mul(p.value).mul(a.add(P.value,1)).mul(Q.value).mul(o.value).div(1e5)),he=Oe(()=>({resource:lt.metal,cost(){const ze=new a(this.amount.value);let Dt=a.pow(16,ze).times(2e6);return Nt[4].bought.value&&(Dt=Dt.div(a.add(Cl.value,1).root(6))),Dt},display:M(()=>i(S,null,[i("h3",null,[s("Oil Pump")]),i("br",null,null),s("Pump that oil from the ground."),i("br",null,null),s("Gain oil based on the number of Heavy buildings active and well depth, but coal usage is multiplied by "),Nt[3].bought.value?4:5,s("\xD7."),i("br",null,null),i("br",null,null),s("Currently:"),i("br",null,null),s("\xD7"),_e(Ue.value),s(" coal usage"),i("br",null,null),s("+"),_e(J.value),s(" oil/sec"),i("br",null,null),i("br",null,null),s("Cost: "),Ae(u(he.cost)),s(" "),he.resource.displayName])),onPurchase(){Ie.value=a.add(Ie.value,1)},style:{color:l,width:"160px"}})),{max:se,min:We,add:Je,remove:At}=zt({buyable:he,active:Ie}),ne=Me(0),oe=f(()=>a.pow(ne.value,2)),Re=f(()=>a.pow(ne.value,3).mul(1e19)),Ke=f(()=>a.add(ne.value,1)),ye=Oe(()=>({resource:U(n),cost(){const ze=new a(this.amount.value);return a.pow(2,ze).times(50)},display:M(()=>i(S,null,[i("h3",null,[s("Oil Burner")]),i("br",null,null),s("Burn oil as fuel."),i("br",null,null),s("(Oil Burner Amount)"),i("sup",null,[s("2")]),s(" unit of oil can give 1e19*(Oil Burner Amount)"),i("sup",null,[s("3")]),s(" units of coal."),i("br",null,null),i("br",null,null),s("Currently:"),i("br",null,null),s("-"),_e(oe.value),s(" oil/sec"),i("br",null,null),s("-"),_e(Re.value),s(" coal consumption"),Nt[2].bought.value?i(S,null,[i("br",null,null),s("\xD7"),_e(Ke.value),s(" to auto smelting multi")]):"",i("br",null,null),i("br",null,null),s("Cost: "),Ae(u(ye.cost)),s(" "),ye.resource.displayName])),onPurchase(){ne.value=a.add(ne.value,1)},style:{color:l,width:"160px"}})),{max:pt,min:st,add:te,remove:Fe}=zt({buyable:ye,active:ne}),ue=Me(0),Mt=f(()=>a.pow(ue.value,2).mul(100)),Ve=f(()=>a.add(ue.value,1)),mt=Oe(()=>({resource:lt.metal,cost(){const ze=new a(this.amount.value);let Dt=a.pow(10,ze).times(1e7);return Nt[4].bought.value&&(Dt=Dt.div(a.add(Cl.value,1).root(6))),Dt},display:M(()=>i(S,null,[i("h3",null,[s("Oil Smelter")]),i("br",null,null),s("Use oil as a crucible fuel."),i("br",null,null),s("Burn 100*(Oil Smelter amount)"),i("sup",null,[s("2")]),s(" oil to smelt +100% faster."),i("br",null,null),i("br",null,null),s("Currently:"),i("br",null,null),s("-"),_e(Mt.value),s(" oil/sec"),i("br",null,null),s("\xD7"),_e(Ve.value),s(" smelting speed"),i("br",null,null),i("br",null,null),s("Cost: "),Ae(u(mt.cost)),s(" "),mt.resource.displayName])),onPurchase(){ue.value=a.add(ue.value,1)},style:{color:l,width:"160px"}})),{max:Bt,min:$,add:de,remove:j}=zt({buyable:mt,active:ue}),De=[T(()=>({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)})),T(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>a.gte(o.value,10),visibility:()=>y(De[0].earned.value)})),T(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>a.gte(o.value,25),visibility:()=>y(De[1].earned.value)})),T(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>a.gte(o.value,60),visibility:()=>y(De[2].earned.value)})),T(()=>({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(De[3].earned.value)})),T(()=>({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(De[4].earned.value)})),T(()=>({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))})),T(()=>({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:le,display:it}=Jl(De),vt=[T(()=>({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(Cl.value,100)})),T(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>a.gte(Cl.value,500),visibility:()=>y(vt[0].earned.value)})),T(()=>({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(Cl.value,1e4),visibility:()=>y(vt[1].earned.value)}))],{collapseMilestones:Ct,display:el}=Jl(vt),Ut=[O(()=>({resource:q.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per coal Mining Drill owned.",effectDisplay:M(()=>i(S,null,[s("x"),_e(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:M(()=>i(S,null,[s("x"),_e(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:M(()=>i(S,null,[s("x"),_e(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:M(()=>i(S,null,[s("x"),_e(ft[3].value)]))},style:{color:l}})),O(()=>({resource:U(n),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:M(()=>i(S,null,[s("+"),_e(a.mul(ft[4].value,100)),s("%")]))},style:{color:l}}))],ft=[f(()=>a.mul(q.buildDrill.amount.value,a.add(.04,It.value)).add(1)),f(()=>a.mul(lt.oreDrill.amount.value,a.add(.04,It.value)).add(1)),f(()=>a.mul(a.max(q.coal.value,1).log10().floor(),a.add(.06,It.value)).add(1)),f(()=>a.mul(a.max(lt.metal.value,1).log10().floor(),a.add(.1,It.value)).add(1)),f(()=>a.mul(h.amount.value,.001))],Nt=[O(()=>({resource:U(n),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:l}})),O(()=>({resource:U(n),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:U(n),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your metal gain."},style:{color:l}})),O(()=>({resource:U(n),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:l}})),O(()=>({resource:U(n),cost:5e4,display:{title:"Be One with the Oil",description:M(()=>i(S,null,[s("Divide metal ingot prices of oil buildings by "),i("sup",null,[s("6")]),i(il,null,{default:()=>[s("total oil + 1")]})]))},style:{color:l}}))],xt=ae(()=>[pe(()=>({addend:()=>a.negate(m.value),description:"Heavy Drill",enabled:()=>a.gt(p.value,0)})),b(()=>({multiplier:Ue,description:"Oil Pump",enabled:()=>a.gt(Ie.value,0)})),pe(()=>({addend:ya,description:"Oil to Coal Substitution",enabled:()=>a.gt(ya.value,0)}))]),tl=f(()=>xt.apply(0)),al=ae(()=>[pe(()=>({addend:w,description:"Heavy Drill",enabled:()=>a.gt(p.value,0)})),b(()=>({multiplier:fe,description:"Heavy Extractor",enabled:()=>a.gt(Q.value,0)})),b(()=>({multiplier:ft[0],description:"Coal Drill Synergy",enabled:Ut[0].bought})),b(()=>({multiplier:ft[1],description:"Metal Drill Synergy",enabled:Ut[1].bought})),b(()=>({multiplier:ft[2],description:"Coal Drill Upgrade",enabled:Ut[2].bought})),b(()=>({multiplier:ft[3],description:"Metal Drill Upgrade",enabled:Ut[3].bought})),b(()=>({multiplier:2,description:"Guide to drilling",enabled:X.upgrades.drillingUpgrade.bought})),b(()=>({multiplier:()=>ll.value,description:"Effectiveness",enabled:()=>a.lt(ll.value,1)}))]),Qt=f(()=>al.apply(0)),nl=ae(()=>[pe(()=>({addend:ft[4],description:"Drill Oil",enabled:Ut[4].bought}))]),It=f(()=>nl.apply(0)),Al=ae(()=>[pe(()=>({addend:J,description:"Oil Pump",enabled:()=>a.gt(Ie.value,0)})),b(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:Nt[0].bought})),b(()=>({multiplier:2,description:"3000m Well Depth",enabled:De[7].earned})),b(()=>({multiplier:2,description:"Oil and where to find it",enabled:X.upgrades.oilUpgrade.bought})),b(()=>({multiplier:()=>ll.value,description:"Effectiveness",enabled:()=>a.lt(ll.value,1)}))]),xl=f(()=>Al.apply(0)),ea=ae(()=>[pe(()=>({addend:()=>a.negate(oe.value),description:"Oil Burner",enabled:()=>a.gt(ne.value,0)})),pe(()=>({addend:()=>a.negate(Mt.value),description:"Oil Smelter",enabled:()=>a.gt(ue.value,0)})),pe(()=>({addend:()=>a.negate(He.oilCost.value),description:"Oil Refinery",enabled:()=>a.gt(He.activeRefinery.value,0)}))]),x=f(()=>ea.apply(0)),Il=ae(()=>[pe(()=>({addend:Re,description:"Oil Burner",enabled:()=>a.gt(ne.value,0)})),b(()=>({multiplier:()=>pl.value,description:"Effectiveness",enabled:()=>a.lt(pl.value,1)}))]),ya=f(()=>Il.apply(0)),Va=ae(()=>[pe(()=>({addend:Le.boosts.red1,description:"Red Dye Boost 1",enabled:()=>a.gte(Le.dyes.red.amount.value,1)}))]),Ha=f(()=>Va.apply(0)),[ei,ti]=Zt(()=>[{title:"Coal Consumption",modifier:xt,unit:"/s",base:0},{title:"Drill Power",modifier:al,base:0},{title:"Upgrade Bonus",modifier:nl,base:0,visible(){return a.gt(It.value,0)}},{title:"Oil Speed",modifier:Al,unit:"/s",base:0,visible(){return a.gt(xl.value,0)}},{title:"Oil Consumption",modifier:ea,unit:"/s",base:0,visible(){return a.lt(x.value,0)}},{title:"Oil to Coal Substitution",modifier:Il,unit:"/s",base:0,visible(){return a.gt(ya.value,0)}},{title:"Extra Oil Pumps",modifier:Va,base:0,visible(){return a.gt(Ha.value,0)}}]),ba=V(!1),li=M(()=>i(wt,{modelValue:ba.value,"onUpdate:modelValue":ze=>ba.value=ze},{header:()=>i("h2",null,[e,s(" Modifiers")]),body:ei})),ll=V(a.dOne),pl=V(a.dOne);Xe.on("update",ze=>{if(a.lt(R.day.value,_a))return;const Dt=a.negate(tl.value);a.gt(Dt,0)?(ll.value=a.min(a.div(q.coal.value,Dt),1),q.coal.value=a.sub(q.coal.value,a.mul(Dt,ll.value).mul(ze))):ll.value=a.dOne,r.value=a.add(r.value,a.mul(Qt.value,ze)),n.value=a.add(n.value,a.mul(xl.value,ze)),c();const wa=a.negate(x.value);a.gt(wa,0)?(pl.value=a.min(a.div(n.value,wa),1),n.value=a.sub(n.value,a.mul(wa,pl.value).mul(ze)).max(0)):pl.value=a.dOne});const{total:Cl,trackerDisplay:ai}=dl({resource:n,goal:25e4,name:e,day:_a,color:t,modal:{show:ba,display:li}});return{name:e,day:_a,color:t,oil:n,totalOil:Cl,depth:o,drillProgress:r,activeHeavy:p,buildHeavy:h,activeHeavy2:P,buildHeavy2:B,activeExtractor:Q,buildExtractor:Be,activePump:Ie,buildPump:he,activeBurner:ne,buildBurner:ye,activeSmelter:ue,buildSmelter:mt,extractorCoal:ie,extractorOre:qe,coalEffectiveness:ll,oilEffectiveness:pl,depthMilestones:De,collapsedDepthMilestones:le,row1Upgrades:Ut,row2Upgrades:Nt,minWidth:700,oilMilestones:vt,collapsedOilMilestones:Ct,generalTabCollapsed:ti,display:M(()=>{const ze=[];return De[1].earned.value&&ze.push(Ut),vt[1].earned.value&&ze.push(Nt),i(S,null,[re(ai),i(Se,null,null),a.lt(ll.value,1)?i("div",null,[s("Coal efficiency: "),_e(a.mul(ll.value,100)),s("%")]):null,a.lt(pl.value,1)?i("div",null,[s("Oil efficiency: "),_e(a.mul(pl.value,100)),s("%")]):null,i(Ft,{resource:n,color:t,sticky:!0,productionDisplay:M(()=>i(S,null,[a.lt(o.value,1e3)?"Reach 1000m to start gaining oil":i(S,null,[sa(a.add(xl.value,x.value))])]))},null),a.eq(xl.value,0)?i(S,null,[s("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),i("br",null,null)]):"",i(Ul,null,{default:()=>[De[6].earned.value?i(Rt,null,{default:()=>[re(he),i("div",null,[Ae(a.floor(Ie.value)),s("/"),Ae(a.floor(he.amount.value))]),Ye(We,At,Je,se)]}):null,vt[0].earned.value?i(Rt,null,{default:()=>[re(ye),i("div",null,[Ae(a.floor(ne.value)),s("/"),Ae(a.floor(ye.amount.value))]),Ye(st,Fe,te,pt)]}):null,vt[2].earned.value?i(Rt,null,{default:()=>[re(mt),i("div",null,[Ae(a.floor(ue.value)),s("/"),Ae(a.floor(mt.amount.value))]),Ye($,j,de,Bt)]}):null]}),i("br",null,null),i("div",null,[i("span",null,[s("The well is ")]),i("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[Ae(o.value)]),s("m deep"),i("br",null,null),s("Next at "),_e(a.sub(d.value,r.value))," ",s("drill power seconds")]),i("div",null,[i("span",null,[s("Your drill power is ")]),i("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[_e(Qt.value)])]),i(Se,null,null),i(Ul,null,{default:()=>[i(Rt,null,{default:()=>[re(h),i("div",null,[Ae(a.floor(p.value)),s("/"),Ae(a.floor(h.amount.value))]),Ye(A,N,_,v)]}),De[3].earned.value?i(Rt,null,{default:()=>[re(B),i("div",null,[Ae(a.floor(P.value)),s("/"),Ae(a.floor(B.amount.value))]),Ye(E,ge,z,F)]}):null,De[5].earned.value?i(Rt,null,{default:()=>[re(Be),i("div",null,[Ae(a.floor(Q.value)),s("/"),Ae(a.floor(Be.amount.value))]),Ye(K,Ee,Ge,ke)]}):null]}),i(Se,null,null),Nl(...ze),i(Se,null,null),it(),a.gte(Cl.value,50)?el():""])})}}),yr="metal",an=7,lt=Ot(yr,function(){const e="Metal",t="#888B8D",l=dt(0,"metal ingots",void 0,!0),n=Ya(l),o=dt(0,"ore"),r=Ya(o),d=ae(()=>[b(()=>({multiplier:5,description:"Crucible",enabled:ke.bought})),b(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>a.gte(J.amount.value,1)})),b(()=>({multiplier:2,description:"Industrial Furnace",enabled:Ee.bought})),b(()=>({multiplier:()=>a.add(We.value,1),description:"Hotter Forges",enabled:()=>a.gte(se.amount.value,1)})),b(()=>({multiplier:2,description:"Carry metal in boxes",enabled:et.row2Upgrades.metalUpgrade.bought})),b(()=>({multiplier:Le.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Le.dyes.purple.amount.value,1)})),b(()=>({multiplier:()=>a.add(tt.cloth.value,1).log10().plus(1),description:"Glistening Paint",enabled:Le.upgrades.redDyeUpg.bought}))]),c=f(()=>d.apply(.1)),p=ae(()=>[pe(()=>({addend:()=>a.times(J.amount.value,10),description:"Industrial Crucibles",enabled:()=>a.gte(J.amount.value,1)})),b(()=>({multiplier:2,description:"Efficient Crucibles",enabled:q.efficientSmelther.bought})),b(()=>({multiplier:()=>a.mul(Ze.activeSmelter.value,Ze.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>a.gt(Ze.activeSmelter.value,0)})),b(()=>({multiplier:Le.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Le.dyes.purple.amount.value,1)})),b(()=>({multiplier:()=>a.add(He.activeRefinery.value,1).sqrt(),description:"De Louvre",enabled:Le.upgrades.redDyeUpg2.bought}))]),m=f(()=>p.apply(0)),w=ae(()=>[b(()=>({multiplier:3,description:"Efficient Crucibles",enabled:q.efficientSmelther.bought})),b(()=>({multiplier:()=>a.add(Ze.activeBurner.value,1).mul(Ze.oilEffectiveness.value),description:"Blaster Burner",enabled:Ze.row2Upgrades[2].bought}))]),h=f(()=>w.apply(1)),A=1e10,v=f(()=>a.min(o.value,a.div(q.coal.value,A)).floor().max(0)),_=Tt(()=>({display:M(()=>{const ye=a.gte(v.value,1)?v.value:a.add(v.value,1);return i(S,null,[i("span",{style:"font-size: large"},[s("Smelt "),_e(a.times(v.value,c.value))," ",l.displayName]),i("br",null,null),i("span",{style:"font-size: large"},[s("Cost: "),Ae(ye),s(" "),o.displayName,s(";")," ",Ae(a.times(ye,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(ye,pt=1){const[st,te,Fe]=[a.times(ye,c.value).times(pt),ye,a.times(ye,A)];l.value=a.add(l.value,st),o.value=a.sub(o.value,te),q.coal.value=a.sub(q.coal.value,Fe)}const P=ae(()=>[pe(()=>({addend:()=>Ue.amount.value,description:"Mining Drills",enabled:()=>a.gte(Ue.amount.value,1)})),b(()=>({multiplier:()=>a.mul(Ze.depth.value,.05).add(1),description:"25m Well Depth",enabled:Ze.depthMilestones[2].earned})),b(()=>({multiplier:Ze.extractorOre,description:"Heavy Extractor",enabled:()=>a.gt(Ze.activeExtractor.value,0)})),b(()=>({multiplier:2,description:"Carry ore in boxes",enabled:et.row2Upgrades.oreUpgrade.bought}))]),H=f(()=>P.apply(1)),B=ae(()=>[b(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:Be.bought})),b(()=>({multiplier:2,description:"Double Pickaxe",enabled:K.bought})),b(()=>({multiplier:2.5,description:"Mining Drills",enabled:()=>a.gte(Ue.amount.value,1)})),b(()=>({multiplier:2,description:"Efficient Drills",enabled:Ie.bought})),b(()=>({multiplier:2,description:"Oil the Mining Drills",enabled:Ze.row2Upgrades[1].bought}))]),E=f(()=>B.apply(a.recip(z))),F=Me(0),z=10,ge=jt(()=>({width:400,height:25,direction:Te.Right,fillStyle:{backgroundColor:t},progress:()=>F.value})),Q=ae(()=>[pe(()=>({addend:H})),b(()=>({multiplier:E}))]),fe=f(()=>Q.apply(0)),ie=ae(()=>[pe(()=>({addend:fe})),pe(()=>({addend:()=>a.negate(m.value),enabled:he}))]),qe=f(()=>ie.apply(0)),Be=O(()=>({resource:U(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"}})),K=O(()=>({resource:U(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(K.bought.value)})),ke=O(()=>({resource:U(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(ke.bought.value||a.div(r.value,c.value).plus(n.value).gte(1))})),Ge=O(()=>({resource:U(l),cost:0,display:{title:"Coal Drilling",description:"These mining drills are pretty powerful, mining more ore than you can actually smelt. Could be worth making some to mine coal instead"},visibility:()=>y(a.gte(Ue.amount.value,1)&&(Ge.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}})),Ee=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/>${_e(1e11)} ${q.coal.displayName}`}})),Ie=O(()=>({resource:U(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)})),Ue=Oe(()=>({resource:U(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:M(()=>i(S,null,[s("Mine 2.5x faster. Increase ore mining amount by")," ",Ae(Ue.amount.value),s(" ore per operation")]))},visibility:()=>y(a.gte(Ue.amount.value,1)||a.div(r.value,c.value).plus(n.value).gte(10)),style:{width:"200px"}})),J=Oe(()=>({resource:U(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:M(()=>i(S,null,[s("Automatically smelts")," ",Ae(a.times(J.amount.value,10)),s(" ore per second")]))},visibility:()=>y(a.gte(J.amount.value,1)||a.gte(Ue.amount.value,4)||a.gte(r.value,50)),style:{width:"200px"}})),he=Me(!0),se=Oe(()=>({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:M(()=>i(S,null,[s("Gain "),Ae(a.times(We.value,100)),s("% more metal per ore")]))},visibility:()=>y(a.gte(se.amount.value,1)||Ee.bought.value),style:{width:"200px"}})),We=f(()=>a.times(se.amount.value,.25));Xe.on("update",ye=>{F.value=a.times(ye,E.value).plus(F.value);const pt=F.value.trunc();F.value=F.value.minus(pt),o.value=a.add(o.value,a.times(pt,H.value)),he.value&&N(a.min(v.value,a.times(m.value,ye)),h.value)});const[Je,At]=Zt(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(J.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:w,base:1,visible(){return a.gt(h.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:P,base:1},{title:"Mining Speed",modifier:B,base:.1,unit:"/s"}]),ne=V(!1),oe=M(()=>i(wt,{modelValue:ne.value,"onUpdate:modelValue":ye=>ne.value=ye},{header:()=>i("h2",null,[e,s(" Modifiers")]),body:Je})),{total:Re,trackerDisplay:Ke}=dl({resource:l,goal:25e3,name:e,day:an,color:t,modal:{show:ne,display:oe}});return{name:e,day:an,color:t,ore:o,bestOre:r,oreProgress:F,metal:l,bestMetal:n,totalMetal:Re,simplePickaxe:Be,doublePickaxe:K,crucible:ke,coalDrill:Ge,industrialFurnace:Ee,efficientDrill:Ie,oreDrill:Ue,industrialCrucible:J,autoSmeltEnabled:he,hotterForge:se,generalTabCollapsed:At,minWidth:700,display:M(()=>i(S,null,[re(Ke),i(Se,null,null),i(Ft,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:M(()=>i(S,null,[he.value&&a.gte(J.amount.value,1)?`+${bn([[m.value,"smelting speed"],[fe.value,"ore gain"],[a.div(q.computedCoalGain.value,A),"coal gain"]],"/s",a.mul(c.value,h.value))}`:void 0]))},null),i(Se,null,null),re(_),a.gte(J.amount.value,1)?i("div",{style:{width:"150px"}},[i(ol,{title:"Auto Smelt",modelValue:he.value,"onUpdate:modelValue":ye=>he.value=ye},null)]):void 0,i(Se,null,null),i(Ft,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:M(()=>i(S,null,[wn(qe.value)]))},null),i(Se,null,null),i("div",null,[s("Currently mining "),_e(H.value),s(" ore every")," ",_e(a.recip(E.value)),s(" seconds")]),re(ge),i(Se,null,null),Ye(Be,K,ke,Ge,Ee,Ie),Ye(Ue,J,se)]))}}),br="coal",nn=3,q=Ot(br,function(){const e="Coal",t="#151716",l="#B2BeB5",n="var(--foreground)",o=dt(0,"coal"),r=dt(0,"ash"),d=Me(0),c=f(()=>a.times(d.value,1e3)),p=f(()=>{let x=a.times(d.value,.1);return W.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(x=x.times(5)),x}),m=f(()=>{let x=a.times(d.value,50);return W.elfTraining.smallfireElfTraining.milestones[0].earned.value&&(x=x.times(5)),x}),w=Oe(()=>({resource:me.logs,cost(){let x=a.times(F.amount.value,u(F.cost)).plus(this.amount.value);return a.gte(x,100)&&(x=a.pow(x,2).div(100)),a.gte(x,1e4)&&(x=a.pow(x,2).div(1e4)),x=a.pow(.95,X.books.smallFireBook.amount.value).times(x),x.pow(1.5).times(1e4)},display:M(()=>i(S,null,[i("h3",null,[s("Small Fire")]),i("br",null,null),s("Burn 1000 logs for 0.1 coal and 50 ash"),i("br",null,null),i("br",null,null),s("Currently:"),i("br",null,null),s("-"),G(c.value),s(" logs/sec"),i("br",null,null),s("+"),G(p.value),s(" coal/sec"),i("br",null,null),s("+"),G(m.value),s(" ash/sec"),i("br",null,null),i("br",null,null),s("Cost: "),Z(u(w.cost)),s(" "),w.resource.displayName])),onPurchase(){d.value=a.add(d.value,1)},style:{color:n,width:"160px"}})),{min:h,max:A,add:v,remove:_}=zt({active:d,buyable:w}),N=dt(w.amount,"small fires"),P=Me(0),H=f(()=>a.times(P.value,1e4)),B=f(()=>{let x=a.times(P.value,10);return W.elfTraining.bonfireElfTraining.milestones[0].earned.value&&(x=x.times(5)),x}),E=f(()=>{let x=a.times(P.value,1e3);return W.elfTraining.bonfireElfTraining.milestones[0].earned.value&&(x=x.times(5)),x}),F=Oe(()=>({resource:N,cost(){return a.pow(.95,X.books.bonfireBook.amount.value).times(10)},display:M(()=>i(S,null,[i("h3",null,[s("Bonfire")]),i("br",null,null),s("Burn 10,000 logs for 10 coal and 1000 ash"),i("br",null,null),i("br",null,null),s("Currently:"),i("br",null,null),s("-"),G(H.value),s(" logs/sec"),i("br",null,null),s("+"),G(B.value),s(" coal/sec"),i("br",null,null),s("+"),G(E.value),s(" ash/sec"),i("br",null,null),i("br",null,null),s("Cost: "),Z(u(F.cost)),s(" "),F.resource.displayName])),onPurchase(x){d.value=a.sub(d.value,x).max(0),P.value=a.add(P.value,1)},style:{color:n,width:"160px"},visibility:()=>y(ye.bought.value)})),{min:z,max:ge,add:Q,remove:fe}=zt({buyable:F,active:P}),ie=Me(0),qe=f(()=>a.times(ie.value,1e6)),Be=f(()=>{let x=a.times(ie.value,1e4);return W.elfTraining.kilnElfTraining.milestones[0].earned.value&&(x=x.times(5)),x}),K=f(()=>{let x=a.times(ie.value,1e4);return W.elfTraining.kilnElfTraining.milestones[0].earned.value&&(x=x.times(5)),x}),ke=Oe(()=>({resource:me.logs,cost(){let x=this.amount.value;return a.gte(x,100)&&(x=a.pow(x,2).div(100)),a.gte(x,1e4)&&(x=a.pow(x,2).div(1e4)),x=a.pow(.95,X.books.kilnBook.amount.value).times(x),a.pow(1.1,x).times(1e7)},display:M(()=>i(S,null,[i("h3",null,[s("Charcoal Kiln")]),i("br",null,null),s("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),i("br",null,null),i("br",null,null),s("Currently:"),i("br",null,null),s("-"),G(qe.value),s(" logs/sec"),i("br",null,null),s("+"),G(Be.value),s(" coal/sec"),i("br",null,null),s("+"),G(K.value),s(" ash/sec"),i("br",null,null),i("br",null,null),s("Cost: "),Z(u(ke.cost)),s(" "),ke.resource.displayName])),onPurchase(){ie.value=a.add(ie.value,1)},style:{color:n,width:"160px"},visibility:()=>y(ue.bought.value)})),{min:Ge,max:Ee,add:Ie,remove:Ue}=zt({buyable:ke,active:ie}),J=Me(0),he=f(()=>a.times(a.pow(J.value,Ze.row2Upgrades[1].bought.value?2:1),5e7).times(lt.efficientDrill.bought.value?2:1).times(W.elfTraining.smallfireElfTraining.milestones[2].earned.value?2:1).times(W.elfTraining.bonfireElfTraining.milestones[2].earned.value?2:1).times(W.elfTraining.kilnElfTraining.milestones[2].earned.value?2:1)),se=Oe(()=>({resource:lt.metal,cost(){let x=this.amount.value;a.gte(x,100)&&(x=a.pow(x,2).div(100)),a.gte(x,1e4)&&(x=a.pow(x,2).div(1e4));let Il=a.pow(1.15,x).times(10);return W.elfTraining.fertilizerElfTraining.milestones[2].earned.value&&(Il=Il.div(a.add(me.totalLogs.value,Math.E).ln())),Il},display:M(()=>i(S,null,[i("h3",null,[s("Mining Drill")]),i("br",null,null),s("Dig through the ground to find 50,000,000 coal"),i("br",null,null),i("br",null,null),s("Currently:"),i("br",null,null),s("+"),G(he.value),s(" coal/sec"),i("br",null,null),i("br",null,null),s("Cost: "),Z(u(se.cost)),s(" "),se.resource.displayName])),onPurchase(){J.value=a.add(J.value,1)},style:{color:n,width:"160px"},visibility:()=>y(lt.coalDrill.bought.value)})),{max:We,min:Je,add:At,remove:ne}=zt({buyable:se,active:J}),oe=O(()=>({resource:U(o),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:n}})),Re=O(()=>({resource:U(o),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:n}})),Ke=O(()=>({resource:U(r),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:n}})),ye=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:n}})),pt=[oe,Re,Ke,ye],st=O(()=>({resource:U(o),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:n},visibility:()=>y(ye.bought.value)})),te=O(()=>({resource:U(o),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:n},visibility:()=>y(ye.bought.value)})),Fe=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:M(()=>i(S,null,[i("h3",null,[s("Mulched Soil")]),i("br",null,null),s("Double the bonus from Fertilized Soil"),i("br",null,null),i("br",null,null),s("Cost: "),Z(1e5),s(" "),me.logs.displayName,i("br",null,null),Z(1e5),s(" "),r.displayName])),style:{color:n},visibility:()=>y(ye.bought.value)})),ue=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:n},visibility:()=>y(ye.bought.value)})),Mt=[st,te,Fe,ue],Ve=O(()=>({resource:U(o),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:n},visibility:()=>y(Ze.depthMilestones[4].earned.value)})),mt=[Ve],Bt=Oe(()=>({resource:U(o),cost(){let x=this.amount.value;return a.gte(x,50)&&(x=a.pow(x,2).div(50)),a.gte(x,200)&&(x=a.pow(x,2).div(200)),a.gte(x,2e6)&&(x=a.pow(x,2).div(2e6)),x=a.pow(.95,X.books.heatedCuttersBook.amount.value).times(x),W.elfTraining.heatedCuttersElfTraining.milestones[0].earned.value&&(x=a.pow(.95,X.books.heatedCuttersBook.amount.value).times(x)),a.add(x,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:M(()=>i(S,null,[s("Cutters cut down trees "),G(le.value),s("x faster")]))},style:{color:n},visibility:()=>y(oe.bought.value)})),$=Oe(()=>({resource:U(o),cost(){let x=this.amount.value;return a.gte(x,50)&&(x=a.pow(x,2).div(50)),a.gte(x,200)&&(x=a.pow(x,2).div(200)),a.gte(x,2e6)&&(x=a.pow(x,2).div(2e6)),x=a.pow(.95,X.books.heatedPlantersBook.amount.value).times(x),W.elfTraining.heatedPlantersElfTraining.milestones[0].earned.value&&(x=a.pow(.95,X.books.heatedPlantersBook.amount.value).times(x)),a.add(x,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:M(()=>i(S,null,[s("Planters plant trees "),G(vt.value),s("x faster")]))},style:{color:n},visibility:()=>y(Re.bought.value)})),de=Oe(()=>({resource:U(r),cost(){let x=this.amount.value;return a.gte(x,50)&&(x=a.pow(x,2).div(50)),a.gte(x,200)&&(x=a.pow(x,2).div(200)),a.gte(x,2e6)&&(x=a.pow(x,2).div(2e6)),x=a.pow(.95,X.books.fertilizerBook.amount.value).times(x),W.elfTraining.fertilizerElfTraining.milestones[1].earned.value&&(x=a.pow(.95,X.books.fertilizerBook.amount.value).times(x)),a.add(x,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:M(()=>i(S,null,[s("Trees give "),G(el.value),s("x more logs")]))},style:{color:n},visibility:()=>y(Ke.bought.value)})),j=[Bt,$,de],De=ae(()=>[pe(()=>({addend(){return a.times(Bt.amount.value,.25)},description:"Heated Cutters",enabled(){return a.gt(Bt.amount.value,0)}})),b(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:st.bought}))]),le=f(()=>De.apply(1)),it=ae(()=>[pe(()=>({addend(){return a.times($.amount.value,.25)},description:"Heated Planters",enabled(){return a.gt($.amount.value,0)}})),b(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:te.bought}))]),vt=f(()=>it.apply(1)),Ct=ae(()=>[pe(()=>({addend(){return a.times(de.amount.value,.25)},description:"Fertilized Soil",enabled(){return a.gt(de.amount.value,0)}})),b(()=>({multiplier:2,description:"Mulched Soil",enabled:Fe.bought}))]),el=f(()=>Ct.apply(1)),Ut=ae(()=>[pe(()=>({addend(){return p.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),pe(()=>({addend(){return B.value},description:"Bonfires",enabled(){return a.gt(P.value,0)}})),pe(()=>({addend(){return Be.value},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}})),pe(()=>({addend(){return he.value},description:"Mining Drills",enabled(){return a.gt(J.value,0)}})),b(()=>({multiplier:2,description:"Carry coal in boxes",enabled:et.upgrades.coalUpgrade.bought})),b(()=>({multiplier:()=>a.div(et.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:et.upgrades.coalUpgrade.bought})),b(()=>({multiplier:()=>a.div(w.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:Ne.elves.smallFireElf.bought})),b(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Ne.elves.bonfireElf.bought})),b(()=>({multiplier:()=>a.div(ke.amount.value,100).times(Le.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Ne.elves.kilnElf.bought})),b(()=>({multiplier:2,description:"Mining overalls",enabled:tt.metalUpgrades.metalUpgrade2.bought})),b(()=>({multiplier:3,description:"Mining helmet",enabled:tt.metalUpgrades.metalUpgrade3.bought})),b(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:tt.metalUpgrades.metalUpgrade4.bought})),b(()=>({multiplier:2,description:"12 Elves Trained",enabled:Ne.milestones[11].earned})),_l(()=>({exponent:1.25,description:"3 Elves Trained",enabled:Ne.milestones[2].earned,supportLowNumbers:!0})),b(()=>({multiplier:()=>a.mul(Ze.depth.value,.25).add(1),description:"5m Well Depth",enabled:Ze.depthMilestones[0].earned})),b(()=>({multiplier:Ze.extractorCoal,description:"Heavy Extractor",enabled:()=>a.gt(Ze.activeExtractor.value,0)})),_l(()=>({exponent:1.05,description:"Jack Level 2",enabled:W.elfTraining.heatedCutterElfTraining.milestones[1].earned}))]),ft=f(()=>Ut.apply(0)),Nt=ae(()=>[pe(()=>({addend(){return m.value},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),pe(()=>({addend(){return E.value},description:"Bonfires",enabled(){return a.gt(P.value,0)}})),pe(()=>({addend(){return K.value},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}})),b(()=>({multiplier:2,description:"Carry ash in boxes",enabled:et.upgrades.ashUpgrade.bought})),b(()=>({multiplier:()=>a.div(et.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:et.upgrades.ashUpgrade.bought})),b(()=>({multiplier:()=>a.div(w.amount.value,1e3).add(1),description:"Small Fires Synergy",enabled:Ne.elves.smallFireElf.bought})),b(()=>({multiplier:()=>a.div(F.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Ne.elves.bonfireElf.bought})),b(()=>({multiplier:()=>a.div(ke.amount.value,100).times(Le.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Ne.elves.kilnElf.bought})),b(()=>({multiplier:4,description:"Mining boots",enabled:tt.metalUpgrades.metalUpgrade1.bought})),_l(()=>({exponent:1.1,description:"Joy Level 2",enabled:W.elfTraining.smallfireElfTraining.milestones[1].earned})),_l(()=>({exponent:1.1,description:"Faith Level 2",enabled:W.elfTraining.bonfireElfTraining.milestones[1].earned})),_l(()=>({exponent:1.1,description:"Snowball Level 2",enabled:W.elfTraining.kilnElfTraining.milestones[1].earned}))]),xt=f(()=>Nt.apply(0)),tl=ae(()=>[pe(()=>({addend(){return a.negate(c.value)},description:"Small Fires",enabled(){return a.gt(d.value,0)}})),pe(()=>({addend(){return a.negate(H.value)},description:"Bonfires",enabled(){return a.gt(P.value,0)}})),pe(()=>({addend(){return a.negate(qe.value)},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}}))]),al=f(()=>tl.apply(0)),[Qt,nl]=Zt(()=>[{title:"Log Consumption",modifier:tl,base:0,visible(){return a.gt(d.value,0)||a.gt(P.value,0)||a.gt(ie.value,0)}},{title:"Coal Gain",modifier:Ut,base:0,visible(){return a.gt(d.value,0)||a.gt(P.value,0)||a.gt(ie.value,0)}},{title:"Ash Gain",modifier:Nt,base:0,visible(){return a.gt(d.value,0)||a.gt(P.value,0)||a.gt(ie.value,0)}}]),It=V(!1),Al=M(()=>i(wt,{modelValue:It.value,"onUpdate:modelValue":x=>It.value=x},{header:()=>i("h2",null,[e,s(" Modifiers")]),body:Qt}));Xe.on("update",x=>{a.lt(R.day.value,nn)||a.times(x,al.value).negate().gt(me.logs.value)||(me.logs.value=a.times(x,al.value).plus(me.logs.value),o.value=a.times(x,ft.value).plus(o.value),r.value=a.times(x,xt.value).plus(r.value),d.value=a.max(d.value,0))});const{total:xl,trackerDisplay:ea}=dl({resource:o,goal:1e7,name:e,day:nn,color:t,modal:{show:It,display:Al}});return{name:e,color:t,coal:o,totalCoal:xl,computedCoalGain:ft,ash:r,activeFires:d,buildFire:w,activeBonfires:P,buildBonfire:F,activeKilns:ie,buildKiln:ke,activeDrills:J,buildDrill:se,warmerCutters:oe,warmerPlanters:Re,basicFertilizer:Ke,unlockBonfire:ye,dedicatedCutters:st,dedicatedPlanters:te,betterFertilizer:Fe,unlockKiln:ue,efficientSmelther:Ve,heatedCutters:Bt,heatedPlanters:$,moreFertilizer:de,computedHeatedCutterEffect:le,computedHeatedPlanterEffect:vt,computedFertilizerEffect:el,generalTabCollapsed:nl,minWidth:700,display:M(()=>i(S,null,[re(ea),i(Se,null,null),i(Ft,{resource:o,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(ft.value,0)?`+${G(ft.value)}/s`:void 0},null),i(Se,null,null),i(Ft,{resource:r,color:l,style:"margin-bottom: 0",effectDisplay:a.gt(xt.value,0)?`+${G(xt.value)}/s`:void 0},null),i(Se,null,null),i(Ul,null,{default:()=>[i(Rt,null,{default:()=>[re(w),i("div",null,[Z(a.floor(d.value)),s("/"),Z(a.floor(w.amount.value))]),Ye(h,_,v,A)]}),ye.bought.value?i(S,null,[i(Se,null,null),i(Rt,null,{default:()=>[re(F),i("div",null,[Z(P.value),s("/"),Z(F.amount.value)]),Ye(z,fe,Q,ge)]})]):void 0,ue.bought.value?i(S,null,[i(Se,null,null),i(Rt,null,{default:()=>[re(ke),i("div",null,[Z(ie.value),s("/"),Z(ke.amount.value)]),Ye(Ge,Ue,Ie,Ee)]})]):void 0,lt.coalDrill.bought.value?i(S,null,[i(Se,null,null),i(Rt,null,{default:()=>[re(se),i("div",null,[Z(J.value),s("/"),Z(se.amount.value)]),Ye(Je,ne,At,We)]})]):void 0]}),i(Se,null,null),Nl(pt,Mt,mt),Ye(...j)]))}}),wr="workshop",ql=2,Pt=Ot(wr,function(){const e="Workshop",t="#D66B02",l="#D66B02",n=dt(0,"foundation progress"),o=Js(()=>({scaling:en(en(qa(250,1.5),100,1/5),1e3,1/10),baseResource:me.logs,gainResource:U(n),roundUpCost:!0,buyMax:W.elfTraining.heatedCutterElfTraining.milestones[2].earned,spend(ie,qe){me.logs.value=a.sub(me.logs.value,qe)}})),r=Tt(()=>({display:M(()=>i(S,null,[i("b",{style:"font-size: x-large"},[s("Build part of the foundation")]),i("br",null,null),i("br",null,null),i("span",{style:"font-size: large"},[s("Cost:")," ",Yl(me.logs,a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value)," ",me.logs.displayName])])),visibility:()=>y(a.lt(n.value,100)||W.elfTraining.expandersElfTraining.milestones[2].earned.value),canClick:()=>a.gte(o.actualGain.value,1)&&(a.lt(n.value,100)||W.elfTraining.expandersElfTraining.milestones[2].earned.value),onClick(){!u(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"})),d=Fl(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{r.canClick.value&&r.onClick()}})),c=f(()=>!Ne.milestones[6].earned.value),p=T(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>a.gte(n.value,1),showPopups:c})),m=T(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>a.gte(n.value,10),visibility:()=>y(p.earned.value),showPopups:c})),w=T(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>a.gte(n.value,20),visibility:()=>y(m.earned.value),showPopups:c})),h=T(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>a.gte(n.value,30),visibility:()=>y(w.earned.value),showPopups:c})),A=T(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>a.gte(n.value,40),visibility:()=>y(h.earned.value),showPopups:c})),v=T(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(n.value,50),visibility:()=>y(A.earned.value),showPopups:c})),_=T(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>a.gte(n.value,75),visibility:()=>y(v.earned.value),showPopups:c})),N=T(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>a.gte(n.value,100),visibility:()=>y(_.earned.value),showPopups:c})),P=T(()=>({display:{requirement:"120% Foundation Completed",effectDisplay:"The 1% milestone is now +2% and multiplicative"},shouldEarn:()=>a.gte(n.value,120),visibility:()=>y(W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),H=T(()=>({display:{requirement:"140% Foundation Completed",effectDisplay:"Gain +10% metal for every 10% foundation completed"},shouldEarn:()=>a.gte(n.value,140),visibility:()=>y(W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),B=T(()=>({display:{requirement:"160% Foundation Completed",effectDisplay:"Gain +10% oil for every 10% foundation completed"},shouldEarn:()=>a.gte(n.value,160),visibility:()=>y(W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),E=T(()=>({display:{requirement:"180% Foundation Completed",effectDisplay:"Gain +10% plastic for every 10% foundation completed"},shouldEarn:()=>a.gte(n.value,180),visibility:()=>y(W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),F=T(()=>({display:{requirement:"200% Foundation Completed",effectDisplay:"Double paper, boxes, and all cloth actions"},shouldEarn:()=>a.gte(n.value,200),visibility:()=>y(W.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:c})),z={logGainMilestone1:p,autoCutMilestone1:m,autoPlantMilestone1:w,autoCutMilestone2:h,autoPlantMilestone2:A,logGainMilestone2:v,morePlantsMilestone1:_,logGainMilestone3:N,extraExpansionMilestone1:P,extraExpansionMilestone2:H,extraExpansionMilestone3:B,extraExpansionMilestone4:E,extraExpansionMilestone5:F},{collapseMilestones:ge,display:Q}=Jl(z),fe=jt(()=>({direction:Te.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>R.day.value===ql?a.div(n.value,100):1,display:M(()=>R.day.value===ql?i(S,null,[Z(n.value),s("%")]):"")}));return Lt(()=>{R.day.value===ql&&a.gte(n.value,100)&&R.completeDay()}),{name:e,day:ql,color:t,foundationProgress:n,foundationConversion:o,milestones:z,collapseMilestones:ge,minWidth:700,buildFoundationHK:d,display:M(()=>i(S,null,[i("div",null,[R.day.value===ql?"Complete the foundation to complete the day":`${e} Complete!`]),re(fe),i(Se,null,null),i("div",null,[i("span",null,[s("The foundation is ")]),i("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[Z(n.value)]),s("% completed")]),a.lt(n.value,100)||W.elfTraining.expandersElfTraining.milestones[2].earned.value?i(Se,null,null):null,re(r),i(Se,null,null),Q()]))}}),Ar="elves",Ll=4,Ne=Ot(Ar,function(){const e="Elves",t="red",l="#911D21",o=jt(()=>({direction:Te.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>R.day.value===Ll?a.div(oe.value,6).times(.8333333333333334).add(a.div(a.add(q.coal.value,1).log10(),a.log10(1e9)).clamp(0,1).div(6)):1,display:M(()=>R.day.value===Ll?a.lt(oe.value,6)?i(S,null,[Z(oe.value),s("/6 elves")]):i(S,null,[Z(q.coal.value),s("/"),Z(1e9),s(" coal")]):"")})),r=vr(()=>({thingsToReset:[me,Pt,q],onReset(){setTimeout(()=>{Mt.earned.value?(me.row1Upgrades.forEach(le=>le.bought.value=!0),me.row2Upgrades.forEach(le=>le.bought.value=!0)):Ke.earned.value&&(me.row1Upgrades[4].bought.value=!0,me.row2Upgrades[4].bought.value=!0),Fe.earned.value&&(Pt.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=ae(()=>[b(()=>({multiplier:2,description:"6 Elves Trained",enabled:te.earned})),b(()=>({multiplier:()=>a.times(X.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>a.gt(X.books.cuttersBook.amount.value,0)})),b(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ve.earned}))]),c=ae(()=>[b(()=>({multiplier:2,description:"6 Elves Trained",enabled:te.earned})),b(()=>({multiplier:()=>a.times(X.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>a.gt(X.books.plantersBook.amount.value,0)})),b(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ve.earned}))]),p=ae(()=>[b(()=>({multiplier:2,description:"6 Elves Trained",enabled:te.earned})),b(()=>({multiplier:()=>a.times(X.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>a.gt(X.books.expandersBook.amount.value,0)})),b(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ve.earned}))]),m=ae(()=>[b(()=>({multiplier:2,description:"6 Elves Trained",enabled:te.earned})),b(()=>({multiplier:()=>a.times(X.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>a.gt(X.books.heatedCuttersBook.amount.value,0)})),b(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ve.earned}))]),w=ae(()=>[b(()=>({multiplier:2,description:"6 Elves Trained",enabled:te.earned})),b(()=>({multiplier:()=>a.times(X.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>a.gt(X.books.heatedPlantersBook.amount.value,0)})),b(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ve.earned}))]),h=ae(()=>[b(()=>({multiplier:2,description:"6 Elves Trained",enabled:te.earned})),b(()=>({multiplier:()=>a.times(X.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>a.gt(X.books.fertilizerBook.amount.value,0)})),b(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ve.earned}))]),A=ae(()=>[b(()=>({multiplier:2,description:"6 Elves Trained",enabled:te.earned})),b(()=>({multiplier:()=>a.times(X.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>a.gt(X.books.smallFireBook.amount.value,0)})),b(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ve.earned}))]),v=ae(()=>[b(()=>({multiplier:2,description:"6 Elves Trained",enabled:te.earned})),b(()=>({multiplier:()=>a.times(X.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>a.gt(X.books.bonfireBook.amount.value,0)})),b(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ve.earned}))]),_=ae(()=>[b(()=>({multiplier:2,description:"6 Elves Trained",enabled:te.earned})),b(()=>({multiplier:()=>a.times(X.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>a.gt(X.books.kilnBook.amount.value,0)})),b(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ve.earned}))]),N=ae(()=>[b(()=>({multiplier:2,description:"6 Elves Trained",enabled:te.earned})),b(()=>({multiplier:()=>a.times(X.books.paperBook.amount.value,.1).add(1),description:"The Book Thief",enabled:()=>a.gt(X.books.paperBook.amount.value,0)})),b(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ve.earned}))]),P=ae(()=>[b(()=>({multiplier:2,description:"6 Elves Trained",enabled:te.earned})),b(()=>({multiplier:()=>a.times(X.books.boxBook.amount.value,.1).add(1),description:"Not a box",enabled:()=>a.gt(X.books.boxBook.amount.value,0)})),b(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ve.earned}))]),H=ae(()=>[b(()=>({multiplier:2,description:"6 Elves Trained",enabled:te.earned})),b(()=>({multiplier:()=>a.times(X.books.clothBook.amount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>a.gt(X.books.clothBook.amount.value,0)})),b(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ve.earned}))]),[B,E]=Zt(()=>[{title:"Holly Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:ne.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:ne.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:p,base:10,unit:"/s",visible:ne.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:ne.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:w,base:10,unit:"/s",visible:ne.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:h,base:10,unit:"/s",visible:ne.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:A,base:10,unit:"/s",visible:ne.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:v,base:10,unit:"/s",visible:ne.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:_,base:10,unit:"/s",visible:ne.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:N,base:10,unit:"/s",visible:ne.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:P,base:10,unit:"/s",visible:ne.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:H,base:10,unit:"/s",visible:ne.clothElf.bought}]),F=V(!1),z=M(()=>i(wt,{modelValue:F.value,"onUpdate:modelValue":le=>F.value=le},{header:()=>i("h2",null,[e,s(" Modifiers")]),body:B})),ge=f(()=>{let le=a.pow(4,oe.value).times(1e6);return a.gte(oe.value,9)&&(le=a.times(le,1e15)),le});function Q(le){var tl,al;const it=Me(0),vt=Me(0),Ct=le.hasToggle?Me(!1):V(!0),el=f(()=>le.cooldownModifier.apply(10)),Ut=bt((tl=le.canBuy)!=null?tl:!0),ft=bt((al=le.buyMax)!=null?al:!1);function Nt(Qt){if(xt.bought.value&&u(Ut)){it.value=a.add(it.value,Qt);const nl=a.recip(el.value);vt.value+=Qt/nl.toNumber(),(Ma(le.buyable)?le.buyable:[le.buyable]).forEach(It=>{var Al;for(;ft||a.gte(it.value,nl);)if(le.customCost==null?u(It.canPurchase):a.gte(It.resource.value,le.customCost(It.amount.value)))It.amount.value=a.add(It.amount.value,1),it.value=a.sub(it.value,nl),(Al=le.onAutoPurchase)==null||Al.call(le);else{it.value=nl;break}})}}const xt=O(()=>({...le,buyable:void 0,toggle:Ct,buyProgress:it,update:Nt,resource:q.coal,cost:ge,computedAutoBuyCooldown:el,amountOfTimesDone:vt,name:le.name,display:()=>({title:le.name,description:M(()=>i(S,null,[le.description,xt.bought.value?null:i(S,null,[" ",s("Training this elf will require resetting all your progress from days 1-3.")]),xt.bought.value&&le.hasToggle===!0?i(S,null,[i(ol,{title:le.toggleDesc,"onUpdate:modelValue":Qt=>Ct.value=Qt,modelValue:Ct.value},null)]):null])),showCost:!xt.bought.value}),style:"width: 190px",onPurchase(){var Qt;(Qt=le.onPurchase)==null||Qt.call(le),r.reset()}}));return xt}const fe=Q({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:me.row1Buyables[0],cooldownModifier:d,buyMax:()=>W.elfTraining.cutterElfTraining.milestones[1].earned.value}),ie=Q({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:me.row1Buyables[1],cooldownModifier:c,buyMax:()=>W.elfTraining.planterElfTraining.milestones[1].earned.value}),qe=Q({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:me.row1Buyables[2],cooldownModifier:p,buyMax:()=>W.elfTraining.expandersElfTraining.milestones[1].earned.value}),Be=[fe,ie,qe],K=Q({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:q.heatedCutters,cooldownModifier:m,buyMax:()=>W.elfTraining.heatedCutterElfTraining.milestones[2].earned.value}),ke=Q({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:q.heatedPlanters,cooldownModifier:w,buyMax:()=>W.elfTraining.heatedPlanterElfTraining.milestones[2].earned.value}),Ge=Q({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:q.moreFertilizer,cooldownModifier:h}),Ee=[K,ke,Ge],Ie=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(){Ie.toggle.value&&(q.activeFires.value=a.add(q.activeFires.value,1))},onPurchase(){R.days[4].recentlyUpdated.value=!0}}),Ue=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 le=u(this.buyable.cost);q.activeFires.value=a.sub(q.activeFires.value,le).max(0),q.buildFire.amount.value=a.sub(q.buildFire.amount.value,le).max(0),Ue.toggle.value&&(q.activeBonfires.value=a.add(q.activeBonfires.value,1))},onPurchase(){R.days[4].recentlyUpdated.value=!0},canBuy:q.unlockBonfire.bought}),J=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(){J.toggle.value&&(q.activeKilns.value=a.add(q.activeKilns.value,1))},onPurchase(){R.days[4].recentlyUpdated.value=!0},canBuy:q.unlockKiln.bought}),he=[Ie,Ue,J],se=Q({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(X.books),cooldownModifier:N,visibility:()=>y(He.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:P,visibility:()=>y(He.elfUpgrades.boxElf.bought.value)}),Je=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(He.elfUpgrades.clothElf.bought.value)}),At=[se,We,Je],ne={cuttersElf:fe,plantersElf:ie,expandersElf:qe,heatedCuttersElf:K,heatedPlantersElf:ke,fertilizerElf:Ge,smallFireElf:Ie,bonfireElf:Ue,kilnElf:J,paperElf:se,boxElf:We,clothElf:Je},oe=f(()=>Object.values(ne).filter(le=>le.bought.value).length),Re=T(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>a.gte(oe.value,1)})),Ke=T(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>a.gte(oe.value,2),visibility:()=>y(Re.earned.value)})),ye=T(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>a.gte(oe.value,3),visibility:()=>y(Ke.earned.value)})),pt=T(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(oe.value,4),visibility:()=>y(ye.earned.value)})),st=T(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>a.gte(oe.value,5),visibility:()=>y(pt.earned.value)})),te=T(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>a.gte(oe.value,6),visibility:()=>y(st.earned.value)})),Fe=T(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>a.gte(oe.value,7),visibility:()=>y(te.earned.value&&R.day.value>5)})),ue=T(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>a.gte(oe.value,8),visibility:()=>y(Fe.earned.value)})),Mt=T(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>a.gte(oe.value,9),visibility:()=>y(ue.earned.value)})),Ve=T(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>a.gte(oe.value,10),visibility:()=>y(R.day.value>=10)})),mt=T(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>a.gte(oe.value,11),visibility:()=>y(Ve.earned.value)})),Bt=T(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>a.gte(oe.value,12),visibility:()=>y(mt.earned.value)})),$=[Re,Ke,ye,pt,st,te,Fe,ue,Mt,Ve,mt,Bt],de={manualMilestone:Re,researchMilestone:Ke,coalGainMilestone:ye,logGainMilestone:pt,forestMilestone:st,elvesMilestone:te,foundationMilestone:Fe,forestMilestone2:ue,treeUpgradesMilestone:Mt,elvesMilestone2:Ve,coalUpgradesMilestone:mt,coalGainMilestone2:Bt},{collapseMilestones:j,display:De}=Jl(de);return Xe.on("update",le=>{a.lt(R.day.value,Ll)||Object.values(ne).forEach(it=>it.update(le))}),Lt(()=>{R.day.value===Ll&&a.gte(oe.value,6)&&a.gte(q.coal.value,1e9)&&R.completeDay()}),{name:e,color:t,elves:ne,totalElves:oe,milestones:$,collapseMilestones:j,generalTabCollapsed:E,minWidth:700,display:M(()=>i(S,null,[i("div",null,[R.day.value===Ll?`Reach ${Z(6)} trained elves and ${Z(1e9)} ${q.coal.displayName} to complete the day`:`${e} Complete!`," ",s("-")," ",i("button",{class:"button",style:"display: inline-block;",onClick:()=>F.value=!0},[s("Check Modifiers")])]),re(o),re(z),i(Se,null,null),i("div",{style:"width: 600px"},[Nl(Be,Ee,he,At)]),De()]))}}),Cr="management",Gl=12,W=Ot(Cr,()=>{const e="Management",t="green",l=jt(()=>({direction:Te.Right,width:600,height:25,fillStyle:`backgroundColor: ${t}`,progress:()=>R.day.value===Gl?n.value/(Ne.totalElves.value*5):1,display:M(()=>R.day.value===Gl?i(S,null,[Z(n.value),s("/"),Z(Ne.totalElves.value*5)," ",s("elf levels")]):"")})),n=f(()=>{let j=0;for(const De of Object.values(At))j+=De.level.value;return j}),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=ae(()=>[b(()=>({multiplier:()=>Mt.value,description:"Classroom Effect",enabled:()=>r.bought.value}))]),c=d.apply(1);function p(j,De,...le){const it=Me(0),vt=f(()=>a.pow(10,Ct.value).mul(1e4)),Ct=f(()=>a.min(a.mul(9,it.value).div(1e4).add(1).log10().floor(),Fe.amount.value).toNumber()),el=f(()=>a.sub(it.value,a.pow(10,Ct.value).sub(1).div(9).mul(1e4))),Ut=jt(()=>({direction:Te.Right,width:160,height:12,style:()=>({"margin-top":"8px","box-shadow":oe.value[j.name]?"0 0 12px "+(z.value==j.name?"black":"white"):""}),baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",borderStyle:()=>a.gte(Ct.value,Fe.amount.value)?"border-color: red":"",progress:()=>a.div(el.value,vt.value),display:M(()=>a.gte(Ct.value,Fe.amount.value)?i(S,null,[s("Limit reached")]):i(S,null,[G(el.value),s("/"),G(vt.value),s(" XP")]))})),{collapseMilestones:ft,display:Nt}=Jl(De),xt=ae(()=>[b(()=>({multiplier:c,description:"Global XP Multiplier"})),b(()=>({multiplier:ne,description:"Focus Multiplier",enabled:()=>Re.value<=0&&oe.value[j.name]==!0})),...le]),tl=f(()=>xt.apply(.1));return Tt(()=>({display:{title:j.name,description:M(()=>i(S,null,[j.name,s(" is currently at level "),Z(Ct.value),s(", and achieved a total of "),G(it.value),s(" XP. They buy buyables "),Z(j.computedAutoBuyCooldown.value),s(" times per second, gaining")," ",a.gte(Ct.value,Fe.amount.value)?0:G(a.mul(tl.value,j.computedAutoBuyCooldown.value))," ",s("XP/sec."),re(Ut)]))},style:()=>({width:"190px",background:z.value==j.name?"var(--foreground)":""}),onClick(){z.value=j.name},canClick(){return z.value!==j.name},name:j.name,state:ft,displayMilestone:Nt,level:Ct,exp:it,milestones:De,timeForExp:j.computedAutoBuyCooldown,amountOfTimesDone:j.amountOfTimesDone,elfXPGainComputed:tl,elfXPGain:xt}))}const m=[T(()=>({display:{requirement:"Holly Level 1",effectDisplay:M(()=>i(S,null,[s("Multiply log gain by "),i("sup",null,[s("3")]),i(il,null,{default:()=>[s("Cutter amount")]}),s(".")]))},shouldEarn:()=>Q.level.value>=1})),T(()=>({display:{requirement:"Holly Level 2",effectDisplay:"Holly now buys max."},visibility:()=>y(m[0].earned.value),shouldEarn:()=>Q.level.value>=2})),T(()=>({display:{requirement:"Holly Level 3",effectDisplay:M(()=>i(S,null,[s("Multiply all cloth actions' effectiveness by "),i("sup",null,[s("3")]),i(il,null,{default:()=>[s("Cutter amount")]}),s(".")]))},visibility:()=>y(m[1].earned.value),shouldEarn:()=>Q.level.value>=3})),T(()=>({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})),T(()=>({display:{requirement:"Holly Level 5",effectDisplay:"Raise workshop expansion cost by 0.95"},visibility:()=>y(m[3].earned.value&&R.day.value>=13),shouldEarn:()=>Q.level.value>=5}))],w=[T(()=>({display:{requirement:"Ivy Level 1",effectDisplay:"Planters are now twice as efficent."},shouldEarn:()=>fe.level.value>=1})),T(()=>({display:{requirement:"Ivy Level 2",effectDisplay:"Ivy now buys max."},visibility:()=>y(w[0].earned.value),shouldEarn:()=>fe.level.value>=2})),T(()=>({display:{requirement:"Ivy Level 3",effectDisplay:M(()=>i(S,null,[s("Planting speed is multiplied by 2"),i("sup",null,[s("(log"),i("sub",null,[s("10")]),s("(logs)"),i("sup",null,[s("0.2")]),s(")")])]))},visibility:()=>y(w[1].earned.value),shouldEarn:()=>fe.level.value>=3})),T(()=>({display:{requirement:"Ivy Level 4",effectDisplay:"Divide planter cost by 10"},visibility:()=>y(w[2].earned.value&&R.day.value>=13),shouldEarn:()=>fe.level.value>=4})),T(()=>({display:{requirement:"Ivy Level 5",effectDisplay:"Boost planting/cutting speed based on which is falling behind"},visibility:()=>y(w[3].earned.value&&R.day.value>=13),shouldEarn:()=>fe.level.value>=5}))],h=[T(()=>({display:{requirement:"Hope Level 1",effectDisplay:"Forest size grows by trees planted per second raised to ^0.99"},shouldEarn:()=>ie.level.value>=1})),T(()=>({display:{requirement:"Hope Level 2",effectDisplay:"Hope now buys max."},visibility:()=>y(h[0].earned.value),shouldEarn:()=>ie.level.value>=2})),T(()=>({display:{requirement:"Hope Level 3",effectDisplay:"The workshop can be expanded past 100%, but costs scale faster. It also buys max now."},visibility:()=>y(h[1].earned.value),shouldEarn:()=>ie.level.value>=3})),T(()=>({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})),T(()=>({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=[T(()=>({display:{requirement:"Jack Level 1",effectDisplay:"Heated cutters are less expensive."},shouldEarn:()=>Be.level.value>=1})),T(()=>({display:{requirement:"Jack Level 2",effectDisplay:"Coal gain is raised to the ^1.05"},visibility:()=>y(A[0].earned.value),shouldEarn:()=>Be.level.value>=2})),T(()=>({display:{requirement:"Jack Level 3",effectDisplay:"Jack now buys max."},visibility:()=>y(A[1].earned.value),shouldEarn:()=>Be.level.value>=3})),T(()=>({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:()=>Be.level.value>=4})),T(()=>({display:{requirement:"Jack Level 5",effectDisplay:"Unlock an elf that autobuys oil buyables."},visibility:()=>y(A[3].earned.value&&R.day.value>=13),shouldEarn:()=>Be.level.value>=5}))],v=[T(()=>({display:{requirement:"Mary Level 1",effectDisplay:'"Tillamook Burn Country" affects "Heated Planters" twice.'},shouldEarn:()=>K.level.value>=1})),T(()=>({display:{requirement:"Mary Level 2",effectDisplay:"Double automatic tree planting speed"},visibility:()=>y(v[0].earned.value),shouldEarn:()=>K.level.value>=2})),T(()=>({display:{requirement:"Mary Level 3",effectDisplay:"Mary now buys max."},visibility:()=>y(v[1].earned.value),shouldEarn:()=>K.level.value>=3})),T(()=>({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:()=>K.level.value>=4})),T(()=>({display:{requirement:"Mary Level 5",effectDisplay:M(()=>i(S,null,[s("Auto smelting speed is multiplied by "),i(il,null,{default:()=>[s("total XP/1000")]}),s(".")]))},visibility:()=>y(v[3].earned.value&&R.day.value>=13),shouldEarn:()=>K.level.value>=5}))],_=[T(()=>({display:{requirement:"Noel Level 1",effectDisplay:M(()=>i(S,null,[s("Log gain is multiplied by "),i(il,null,{default:()=>[s("total elf levels")]}),s(".")]))},shouldEarn:()=>K.level.value>=1})),T(()=>({display:{requirement:"Noel Level 2",effectDisplay:`"The Garden Tree's Handbook" affects "Fertilized Soil" twice`},visibility:()=>y(_[0].earned.value),shouldEarn:()=>K.level.value>=2})),T(()=>({display:{requirement:"Noel Level 3",effectDisplay:"Divide the mining drill cost by ln(Total logs + e)"},visibility:()=>y(_[1].earned.value),shouldEarn:()=>K.level.value>=3})),T(()=>({display:{requirement:"Noel Level 4",effectDisplay:M(()=>i(S,null,[s("Reduce oil refinery cost by (Plastic amount)"),i("sup",null,[s("2")])]))},visibility:()=>y(_[2].earned.value&&R.day.value>=13),shouldEarn:()=>K.level.value>=4})),T(()=>({display:{requirement:"Noel Level 5",effectDisplay:"Unlock an elf that autobuys drills and extractors"},visibility:()=>y(_[3].earned.value&&R.day.value>=13),shouldEarn:()=>K.level.value>=5}))],N=[T(()=>({display:{requirement:"Joy Level 1",effectDisplay:"Multiply small fire efficiency by 5."},shouldEarn:()=>Ee.level.value>=1})),T(()=>({display:{requirement:"Joy Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>y(N[0].earned.value),shouldEarn:()=>Ee.level.value>=2})),T(()=>({display:{requirement:"Joy Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>y(N[1].earned.value),shouldEarn:()=>Ee.level.value>=3})),T(()=>({display:{requirement:"Joy Level 4",effectDisplay:"Metal gain is boosted by heavy drills"},visibility:()=>y(N[2].earned.value&&R.day.value>=13),shouldEarn:()=>Ee.level.value>=4})),T(()=>({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:()=>Ee.level.value>=5}))],P=[T(()=>({display:{requirement:"Faith Level 1",effectDisplay:"Multiply bonfire efficiency by 5."},shouldEarn:()=>Ie.level.value>=1})),T(()=>({display:{requirement:"Faith Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>y(P[0].earned.value),shouldEarn:()=>Ie.level.value>=2})),T(()=>({display:{requirement:"Faith Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>y(P[1].earned.value),shouldEarn:()=>Ie.level.value>=3})),T(()=>({display:{requirement:"Faith Level 4",effectDisplay:"Oil gain is boosted by heavy drill drills"},visibility:()=>y(P[2].earned.value&&R.day.value>=13),shouldEarn:()=>Ie.level.value>=4})),T(()=>({display:{requirement:"Faith Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>y(P[3].earned.value&&R.day.value>=13),shouldEarn:()=>Ie.level.value>=5}))],H=[T(()=>({display:{requirement:"Snowball Level 1",effectDisplay:"Multiply kiln efficiency by 5."},shouldEarn:()=>Ue.level.value>=1})),T(()=>({display:{requirement:"Snowball Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>y(H[0].earned.value),shouldEarn:()=>Ue.level.value>=2})),T(()=>({display:{requirement:"Snowball Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>y(H[1].earned.value),shouldEarn:()=>Ue.level.value>=3})),T(()=>({display:{requirement:"Snowball Level 4",effectDisplay:"Plastic gain is boosted by heavy extractors"},visibility:()=>y(H[2].earned.value&&R.day.value>=13),shouldEarn:()=>Ue.level.value>=4})),T(()=>({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:()=>Ue.level.value>=5}))],B=[T(()=>({display:{requirement:"Star Level 1",effectDisplay:"Book cost is divided by total books bought."},shouldEarn:()=>he.level.value>=1})),T(()=>({display:{requirement:"Star Level 2",effectDisplay:"Pulp requires 10x less ash"},visibility:()=>y(B[0].earned.value),shouldEarn:()=>he.level.value>=2})),T(()=>({display:{requirement:"Star Level 3",effectDisplay:"Book cost scaling 5x -> 4x"},visibility:()=>y(B[1].earned.value),shouldEarn:()=>he.level.value>=3})),T(()=>({display:{requirement:"Star Level 4",effectDisplay:M(()=>i(S,null,[s("Multiply XP requirements by 0.95"),i("sup",null,[s("(total books)")])]))},visibility:()=>y(B[2].earned.value&&R.day.value>=13),shouldEarn:()=>he.level.value>=4})),T(()=>({display:{requirement:"Star Level 5",effectDisplay:"Gain 5 free books for all elves that are at level 5 or above."},visibility:()=>y(B[3].earned.value&&R.day.value>=13),shouldEarn:()=>he.level.value>=5}))],E=[T(()=>({display:{requirement:"Bell Level 1",effectDisplay:M(()=>i(S,null,[s("Every box buyable adds "),i(il,null,{default:()=>[s("level")]}),s(" levels to same-row box buyables.")]))},shouldEarn:()=>se.level.value>=1})),T(()=>({display:{requirement:"Bell Level 2",effectDisplay:"Box gain ^1.1"},visibility:()=>y(E[0].earned.value),shouldEarn:()=>se.level.value>=2})),T(()=>({display:{requirement:"Bell Level 3",effectDisplay:"All box buyables scaling bases -1"},visibility:()=>y(E[1].earned.value),shouldEarn:()=>se.level.value>=3})),T(()=>({display:{requirement:"Bell Level 4",effectDisplay:"Unlock a second row of box buyables"},visibility:()=>y(E[2].earned.value&&R.day.value>=13),shouldEarn:()=>se.level.value>=4})),T(()=>({display:{requirement:"Bell Level 5",effectDisplay:"Unlock another row of box upgrades"},visibility:()=>y(E[3].earned.value&&R.day.value>=13),shouldEarn:()=>se.level.value>=5}))],F=[T(()=>({display:{requirement:"Gingersnap Level 1",effectDisplay:"Multiply all primary dye colors by ln(cloth + e)."},shouldEarn:()=>We.level.value>=1})),T(()=>({display:{requirement:"Gingersnap Level 2",effectDisplay:M(()=>i(S,null,[s("Multiply all cloth actions' effectiveness by log"),i("sub",null,[s("10")]),s("(dye sum + 10)")]))},visibility:()=>y(F[0].earned.value),shouldEarn:()=>We.level.value>=2})),T(()=>({display:{requirement:"Gingersnap Level 3",effectDisplay:"Double all dye colors and cloth actions, but reset all dyes."},visibility:()=>y(F[1].earned.value),shouldEarn:()=>We.level.value>=3,onComplete(){["red","yellow","blue","orange","green","purple"].forEach(j=>{Le.dyes[j].amount.value=0,Le.dyes[j].buyable.amount.value=0})}})),T(()=>({display:{requirement:"Gingersnap Level 4",effectDisplay:M(()=>i(S,null,[s("Multiply ALL dye gain by")," ",i(ar,null,{default:()=>[i("div",null,[i(il,null,{default:()=>[s("classrooms")]})]),i("div",null,[s("2")])]}),s("+1, but reset all dyes.")]))},visibility:()=>y(F[2].earned.value&&R.day.value>=13),shouldEarn:()=>We.level.value>=4,onComplete(){["red","yellow","blue","orange","green","purple"].forEach(j=>{Le.dyes[j].amount.value=0,Le.dyes[j].buyable.amount.value=0})}})),T(()=>({display:{requirement:"Gingersnap Level 5",effectDisplay:"Well depth divides metal machine costs"},visibility:()=>y(F[3].earned.value&&R.day.value>=13),shouldEarn:()=>We.level.value>=5}))],z=Me("Holly"),ge=M(()=>{const j=Object.values(At).find(De=>De.name===z.value);return j==null?(console.warn("This should not happen.",z.value),""):i(S,null,[z.value,s("'s milestones: "),j.displayMilestone()])}),Q=p(Ne.elves.cuttersElf,m),fe=p(Ne.elves.plantersElf,w),ie=p(Ne.elves.expandersElf,h),qe=[Q,fe,ie],Be=p(Ne.elves.heatedCuttersElf,A),K=p(Ne.elves.heatedPlantersElf,v),ke=p(Ne.elves.fertilizerElf,_),Ge=[Be,K,ke],Ee=p(Ne.elves.smallFireElf,N),Ie=p(Ne.elves.bonfireElf,P),Ue=p(Ne.elves.kilnElf,H),J=[Ee,Ie,Ue],he=p(Ne.elves.paperElf,B),se=p(Ne.elves.boxElf,E),We=p(Ne.elves.clothElf,F),Je=[he,se,We],At={cutterElfTraining:Q,planterElfTraining:fe,expandersElfTraining:ie,heatedCutterElfTraining:Be,heatedPlanterElfTraining:K,fertilizerElfTraining:ke,smallfireElfTraining:Ee,bonfireElfTraining:Ie,kilnElfTraining:Ue,paperElfTraining:he,boxElfTraining:se,clothElfTraining:We};Xe.on("update",j=>{if(!(R.day.value<Gl)){for(const De of Object.values(At)){const le=Math.floor(De.amountOfTimesDone.value);le>=1&&(De.amountOfTimesDone.value-=le,a.lt(De.level.value,Fe.amount.value)&&(De.exp.value=a.mul(De.elfXPGainComputed.value,le).add(De.exp.value)))}Re.value>0?(Re.value+=j,ne.value=a.pow(Ke.value,1-Math.abs(Math.sin((Re.value-1)*3))),st(12,3)):Re.value=Math.min(Re.value+j,0)}});const ne=Me(1),oe=Me({}),Re=Me(0),Ke=f(()=>10),ye=jt(()=>({direction:Te.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(ne.value,1).div(a.sub(Ke.value,1)).toNumber(),display:M(()=>i(S,null,[G(ne.value),s("x")]))})),pt=Tt(()=>({display:{title:"Focus",description:M(()=>i(S,null,[Re.value<=0?i(S,null,[s("Motivate elves to focus, multiplying 3 random elves' XP gain by up to "),G(Ke.value),s("x")]):"Click to stop the focus bar",Re.value<0?i(S,null,[i("br",null,null),s("Reroll cooldown: "),Kl(-Re.value)]):""]))},style:{width:"300px"},canClick:()=>Re.value>=0,onClick(){Re.value==0?Re.value=1:Re.value>0&&(Re.value=-30)}}));function st(j,De){var it,vt;let le=0;for(oe.value={},De=Math.min(De,j);le<De;){const Ct=(vt=(it=Object.values(At)[Math.floor(Math.random()*j)])==null?void 0:it.name)!=null?vt:"";oe.value[Ct]||(oe.value[Ct]=!0,le++)}}const te=f(()=>{const j=a.pow(10,Fe.amount.value);return{wood:j.mul(1e21),coal:j.mul(1e32),paper:j.mul(1e19),boxes:j.mul(1e13),metalIngots:j.mul(1e12),cloth:j.mul(1e4),plastic:j.mul(1e6),dye:a.add(Fe.amount.value,1).mul(1e4)}}),Fe=Oe(()=>({display:M(()=>i(S,null,[i("h3",null,[s("Build a School")]),i("div",null,[s("You gotta start somewhere, right? Each school increases the maximum level for elves by 1, up to 5.")]),i("div",null,[s("You have "),Z(Fe.amount.value),s(" schools, which are currently letting elves learn up to level")," ",Z(Fe.amount.value),s(".")]),i("div",null,[s("Costs "),G(te.value.wood),s(" logs, "),G(te.value.coal)," ",s("coal, "),G(te.value.paper),s(" paper, "),G(te.value.boxes)," ",s("boxes, "),G(te.value.metalIngots),s(" metal ingots,")," ",G(te.value.cloth),s(" cloth, "),G(te.value.plastic)," ",s("plastic, and requires "),G(te.value.dye),s(" of red, yellow, and blue dye")])])),canPurchase(){return te.value.wood.lte(me.logs.value)&&te.value.coal.lte(q.coal.value)&&te.value.paper.lte(X.paper.value)&&te.value.boxes.lte(et.boxes.value)&&te.value.metalIngots.lte(lt.metal.value)&&te.value.cloth.lte(tt.cloth.value)&&te.value.plastic.lte(He.plastic.value)&&te.value.dye.lte(Le.dyes.blue.amount.value)&&te.value.dye.lte(Le.dyes.red.amount.value)&&te.value.dye.lte(Le.dyes.yellow.amount.value)},onPurchase(){me.logs.value=a.sub(me.logs.value,te.value.wood),q.coal.value=a.sub(q.coal.value,te.value.coal),X.paper.value=a.sub(X.paper.value,te.value.paper),et.boxes.value=a.sub(et.boxes.value,te.value.boxes),lt.metal.value=a.sub(lt.metal.value,te.value.metalIngots),tt.cloth.value=a.sub(tt.cloth.value,te.value.cloth),He.plastic.value=a.sub(He.plastic.value,te.value.plastic),this.amount.value=a.add(this.amount.value,1)},purchaseLimit:5,visibility:f(()=>y(o.bought.value)),style:"width: 600px"})),ue=f(()=>{const j=a.add(Fe.amount.value,1).pow(1.5);return{wood:j.mul(1e21),coal:j.mul(1e32),paper:j.mul(1e19),boxes:j.mul(1e13),metalIngots:j.mul(1e12),cloth:j.mul(1e4),plastic:j.mul(1e6),dye:j.mul(1e4)}}),Mt=f(()=>a.add(Ve.amount.value,1).sqrt()),Ve=Oe(()=>({display:M(()=>i(S,null,[i("h3",null,[s("Build a Classroom")]),i("div",null,[s("Hopefully it makes the school a bit less boring. Multiplies elves' XP gain by")," ",i(il,null,{default:()=>[s("Classrooms + 1")]}),s(".")]),i("div",null,[s("You have "),Z(Fe.amount.value),s(" classrooms, which are currently multiplying elves' XP gain by "),G(Mt.value)]),i("div",null,[s("Costs "),G(ue.value.wood),s(" logs,")," ",G(ue.value.coal),s(" coal, "),G(ue.value.paper)," ",s("paper, "),G(ue.value.boxes),s(" boxes,")," ",G(ue.value.metalIngots),s(" metal ingots,")," ",G(ue.value.cloth),s(" cloth, "),G(ue.value.plastic)," ",s("plastic, and requires "),G(ue.value.dye),s(" of red, yellow, and blue dye")])])),canPurchase(){return ue.value.wood.lte(me.logs.value)&&ue.value.coal.lte(q.coal.value)&&ue.value.paper.lte(X.paper.value)&&ue.value.boxes.lte(et.boxes.value)&&ue.value.metalIngots.lte(lt.metal.value)&&ue.value.cloth.lte(tt.cloth.value)&&ue.value.plastic.lte(He.plastic.value)&&ue.value.dye.lte(Le.dyes.blue.amount.value)&&ue.value.dye.lte(Le.dyes.red.amount.value)&&ue.value.dye.lte(Le.dyes.yellow.amount.value)},onPurchase(){me.logs.value=a.sub(me.logs.value,ue.value.wood),q.coal.value=a.sub(q.coal.value,ue.value.coal),X.paper.value=a.sub(X.paper.value,ue.value.paper),et.boxes.value=a.sub(et.boxes.value,ue.value.boxes),lt.metal.value=a.sub(lt.metal.value,ue.value.metalIngots),tt.cloth.value=a.sub(tt.cloth.value,ue.value.cloth),He.plastic.value=a.sub(He.plastic.value,ue.value.plastic),this.amount.value=a.add(this.amount.value,1)},visibility:f(()=>y(r.bought.value)),style:"width: 600px"})),[mt,Bt]=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:fe.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:Be.elfXPGain,base:.1,unit:" XP"},{title:"Mary XP Gain per Action",modifier:K.elfXPGain,base:.1,unit:" XP"},{title:"Noel XP Gain per Action",modifier:ke.elfXPGain,base:.1,unit:" XP"},{title:"Joy XP Gain per Action",modifier:Ee.elfXPGain,base:.1,unit:" XP"},{title:"Faith XP Gain per Action",modifier:Ie.elfXPGain,base:.1,unit:" XP"},{title:"Snowball XP Gain per Action",modifier:Ue.elfXPGain,base:.1,unit:" XP"},{title:"Star XP Gain per Action",modifier:he.elfXPGain,base:.1,unit:" XP"},{title:"Bell XP Gain per Action",modifier:se.elfXPGain,base:.1,unit:" XP"},{title:"Gingersnap XP Gain per Action",modifier:We.elfXPGain,base:.1,unit:" XP"}]),$=V(!1),de=M(()=>i(wt,{modelValue:$.value,"onUpdate:modelValue":j=>$.value=j},{header:()=>i("h2",null,[e,s(" Modifiers")]),body:mt}));return{name:e,day:Gl,color:t,minWidth:700,elfTraining:At,totalElfLevels:n,currentShown:z,generalTabCollapsed:Bt,teaching:o,schools:Fe,classrooms:Ve,classroomUpgrade:r,focusMultiplier:ne,focusTargets:oe,focusRolling:Re,display:M(()=>i(S,null,[R.day.value===Gl?"Get all elves to level 5.":`${e} Complete!`,s(" -"),i("button",{class:"button",style:"display: inline-block;",onClick:()=>$.value=!0},[s("Check Modifiers")]),re(de),re(l),i("br",null,null),Ht(Fe,Ve)," ",Nl([o,r]),a.gt(Fe.amount.value,0)?i(S,null,[i("br",null,null),s("Click on an elf to see their milestones."),i("br",null,null),i("br",null,null),re(pt),i("br",null,null),Nl([ye],qe,Ge,J,Je),i(Se,null,null),ge()]):""]))}}),kr="cloth",on=8,tt=Ot(kr,function(){const e="Cloth",t="white",l=dt(0,"cloth"),n=dt(0,"wool"),o=dt(10,"sheep"),r=Me(0),d=jt(()=>({direction:Te.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,ne.value)})),c=Tt(()=>({display:{title:"Breed sheep",description:M(()=>i(S,null,[s("Breed "),Ae(a.floor(Je.value)),s(" sheep"),i("br",null,null),re(d)]))},style:{minHeight:"80px"},canClick:()=>a.gte(r.value,ne.value),onClick(){if(a.lt(r.value,ne.value))return;const de=a.floor(Je.value);o.value=a.add(o.value,de),r.value=0}})),p=Me(0),m=jt(()=>({direction:Te.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,ye.value)})),w=Tt(()=>({display:{title:"Shear sheep",description:M(()=>i(S,null,[s("Shear up to "),Ae(a.floor(Re.value)),s(" sheep"),i("br",null,null),re(m)]))},style:{minHeight:"80px"},canClick:()=>a.gte(p.value,ye.value),onClick(){if(a.lt(p.value,ye.value))return;const de=a.min(o.value,Re.value).floor();n.value=a.add(n.value,de),p.value=0}})),h=Me(0),A=jt(()=>({direction:Te.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,Fe.value)})),v=Tt(()=>({display:{title:"Spinning wool",description:M(()=>i(S,null,[s("Spin "),Ae(a.floor(st.value)),s(" wool"),i("br",null,null),re(A)]))},style:{minHeight:"80px"},canClick:()=>a.gte(h.value,Fe.value),onClick(){if(a.lt(h.value,Fe.value))return;const de=a.min(n.value,st.value).floor();l.value=a.add(l.value,de),n.value=a.sub(n.value,de),h.value=0}})),_=Fl(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{c.canClick.value&&c.onClick()}})),N=Fl(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{w.canClick.value&&w.onClick()}})),P=Fl(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{v.canClick.value&&v.onClick()}})),H=Oe(()=>({resource:me.logs,cost(){let de=this.amount.value;return a.gte(de,100)&&(de=a.pow(de,2).div(100)),de=a.pow(.95,X.books.clothBook.amount.value).times(de),a.pow(1.5,de).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),B=Oe(()=>({resource:lt.metal,cost(){let de=this.amount.value;return a.gte(de,100)&&(de=a.pow(de,2).div(100)),de=a.pow(.95,X.books.clothBook.amount.value).times(de),a.pow(1.4,de).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),E=Oe(()=>({resource:X.paper,cost(){let de=this.amount.value;return a.gte(de,100)&&(de=a.pow(de,2).div(100)),de=a.pow(.95,X.books.clothBook.amount.value).times(de),a.pow(1.3,de).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),F=O(()=>({resource:U(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),z=O(()=>({resource:U(n),cost:150,visibility:()=>y(F.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),ge=O(()=>({resource:U(o),cost:200,visibility:()=>y(z.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),fe={treesUpgrade4:O(()=>({resource:U(l),cost:1e3,visibility:()=>y(He.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x log gain"}})),treesUpgrade3:ge,treesUpgrade2:z,treesUpgrade1:F},ie=O(()=>({resource:U(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),qe=O(()=>({resource:U(n),cost:225,visibility:()=>y(ie.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),Be=O(()=>({resource:U(o),cost:300,visibility:()=>y(qe.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),ke={metalUpgrade4:O(()=>({resource:U(l),cost:2e3,visibility:()=>y(He.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:Be,metalUpgrade2:qe,metalUpgrade1:ie},Ge=O(()=>({resource:U(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),Ee=O(()=>({resource:U(n),cost:200,visibility:()=>y(Ge.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),Ie=O(()=>({resource:U(o),cost:400,visibility:()=>y(Ee.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),J={paperUpgrade4:O(()=>({resource:U(l),cost:4e3,visibility:()=>y(He.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:Ie,paperUpgrade2:Ee,paperUpgrade1:Ge},he=f(()=>a.add(me.computedAutoCuttingAmount.value,1).root(3)),se=f(()=>a.add(Le.dyeSum.value,10).log10()),We=ae(()=>[pe(()=>({addend:H.amount,description:"Build more pens"})),b(()=>({multiplier:()=>a.div(He.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(He.buyables.clothGains.amount.value,1)})),b(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:X.upgrades.clothUpgrade.bought})),b(()=>({multiplier:se,description:"Gingersnap Level 2",enabled:W.elfTraining.clothElfTraining.milestones[1].earned})),b(()=>({multiplier:he,description:"Holly Level 3",enabled:W.elfTraining.cutterElfTraining.milestones[2].earned}))]),Je=f(()=>We.apply(1)),At=ae(()=>[]),ne=f(()=>At.apply(1)),oe=ae(()=>[pe(()=>({addend:B.amount,description:"Make stronger shears"})),b(()=>({multiplier:()=>a.div(He.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(He.buyables.clothGains.amount.value,1)})),b(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:X.upgrades.clothUpgrade.bought})),b(()=>({multiplier:se,description:"Gingersnap Level 2",enabled:W.elfTraining.clothElfTraining.milestones[1].earned})),b(()=>({multiplier:he,description:"Holly Level 3",enabled:W.elfTraining.cutterElfTraining.milestones[2].earned}))]),Re=f(()=>oe.apply(1)),Ke=ae(()=>[]),ye=f(()=>Ke.apply(1)),pt=ae(()=>[pe(()=>({addend:E.amount,description:"Learn how to spin"})),b(()=>({multiplier:()=>a.div(He.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(He.buyables.clothGains.amount.value,1)})),b(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:X.upgrades.clothUpgrade.bought})),b(()=>({multiplier:se,description:"Gingersnap Level 2",enabled:W.elfTraining.clothElfTraining.milestones[1].earned})),b(()=>({multiplier:he,description:"Holly Level 3",enabled:W.elfTraining.cutterElfTraining.milestones[2].earned}))]),st=f(()=>pt.apply(1)),te=ae(()=>[]),Fe=f(()=>te.apply(1)),[ue,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:oe,base:1},{title:"Shearing Cooldown",modifier:Ke,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:pt,base:1},{title:"Spinning Cooldown",modifier:te,base:1,visible:!1,unit:"s"}]),Ve=V(!1),mt=M(()=>i(wt,{modelValue:Ve.value,"onUpdate:modelValue":de=>Ve.value=de},{header:()=>i("h2",null,[e,s(" Modifiers")]),body:ue}));Xe.on("update",de=>{a.lt(R.day.value,on)||(a.gte(r.value,ne.value)?r.value=ne.value:(r.value=a.add(r.value,de),c.isHolding.value&&c.onClick()),a.gte(p.value,ye.value)?p.value=ye.value:(p.value=a.add(p.value,de),w.isHolding.value&&w.onClick()),a.gte(h.value,Fe.value)?h.value=Fe.value:(h.value=a.add(h.value,de),v.isHolding.value&&v.onClick()))});const{total:Bt,trackerDisplay:$}=dl({resource:l,goal:1e3,name:e,day:on,color:t,textColor:"var(--feature-foreground)",modal:{show:Ve,display:mt}});return{name:e,color:t,cloth:l,totalCloth:Bt,wool:n,sheep:o,buildPens:H,betterShears:B,fasterSpinning:E,treesUpgrades:fe,metalUpgrades:ke,paperUpgrades:J,generalTabCollapsed:Mt,breedingProgress:r,shearingProgress:p,spinningProgress:h,breedSheepHK:_,shearSheepHK:N,spinWoolHK:P,minWidth:700,display:M(()=>i(S,null,[re($),i(Se,null,null),i(Ft,{resource:l,style:"margin-bottom: 0"},null),i(Ft,{resource:n,style:"margin-bottom: 0"},null),i(Ft,{resource:o,style:"margin-bottom: 0"},null),Ye(c,w,v),Ye(H,B,E),i(Se,null,null),i(Ul,null,{default:()=>[Ht(...Object.values(fe)),Ht(...Object.values(ke)),Ht(...Object.values(J))]})]))}}),Er="dyes",_r=11,Le=Ot(Er,function(){const e="Dyes",t="#D4D4F4";function l(v){const _=dt(0,v.name),N=ae(()=>{const B=[pe(()=>({addend:()=>a.add(H.amount.value,1),description:`${v.name} Chambers`}))];return(v.color==="red"||v.color==="yellow")&&B.push(b(()=>({multiplier:o.orange1,description:"Orange Dye Boost 1"}))),(v.color=="yellow"||v.color=="blue")&&B.push(b(()=>({multiplier:o.green1,description:"Green Dye Boost 1"}))),(v.color=="red"||v.color=="blue")&&B.push(b(()=>({multiplier:o.purple1,description:"Purple Dye Boost 1"}))),(v.color=="red"||v.color=="yellow"||v.color=="blue")&&(B.push(b(()=>({multiplier:2,description:"Wetter Dyes",enabled:c.yellowDyeUpg.bought}))),B.push(b(()=>({multiplier:()=>a.add(tt.cloth.value,Math.E).ln(),description:"Gingersnap Level 1",enabled:W.elfTraining.clothElfTraining.milestones[0].earned})))),B.push(b(()=>({multiplier:2,description:"Gingersnap Level 3",enabled:W.elfTraining.clothElfTraining.milestones[2].earned}))),B}),P=f(()=>N.apply(0)),H=Oe(()=>{const B=bt(v.costs);return{...v,style:()=>({backgroundColor:u(H.canPurchase)?t:"#545454",minWidth:"200px"}),display:M(()=>i("span",null,[i("h3",null,[v.name,s(" Chambers")]),i("br",null,null),s("Create "),G(P.value),s(" "),v.name,v.dyesToReset.length>0?", but reset "+v.dyesToReset.map(E=>E.name).join(", "):"",s("."),i("br",null,null),i("br",null,null),i("span",{class:"white-space: pre-wrap"},[s("Currently:")," ",v.listedBoosts.filter(E=>u(E.visible)).map(E=>re(M(()=>i("div",null,[u(E.desc)]))))]),i("br",null,null),i("div",null,[s("Cost:")," ",u(B).map(E=>re(M(()=>{var F,z;return i("div",null,[G(u(a.pow((F=u(H.cost))!=null?F:a.dInf,u((z=E.root)!=null?z:1)).times(u(E.base))))," ",E.res.displayName,i("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 z;if(u(H.visibility)!=yt.Visible)return!1;const F=(z=E!=null?E:u(H.cost))!=null?z:a.dInf;return u(B).every(ge=>{var Q;return a.div(ge.res.value,u(ge.base)).root(u((Q=ge.root)!=null?Q:1)).gte(F)})}),onPurchase(E){var z;const F=(z=E!=null?E:u(H.cost))!=null?z:a.dInf;u(B).forEach(ge=>{var Q;ge.res.value=a.sub(ge.res.value,a.pow(F,u((Q=ge.root)!=null?Q:1)).times(u(ge.base)))}),_.value=a.add(_.value,P.value),H.amount.value=a.add(H.amount.value,1),v.dyesToReset.forEach(ge=>ge.reset())}}});return{name:v.name,amount:_,buyable:H,toGenerate:N,computedToGenerate:P,display:M(()=>i(Ft,{resource:_,color:v.color,style:"margin: 0; width: 200px; width: 180px; padding: 10px;",sticky:!1},null))}}const n={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(()=>`+${G(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${G(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(()=>`+${Z(o.blue1.value)} forest size (after all other modifiers).`)}],dyesToReset:[]}),orange:l({name:"Orange Dye",color:"orange",costs:()=>[{base:15,root:2,res:n.red.amount},{base:10,root:2,res:n.yellow.amount}],listedBoosts:[{visible:!0,desc:f(()=>`x${G(o.orange1.value)} Red and Yellow Dye gain`)},{visible:!0,desc:f(()=>`/${G(o.orange2.value)} Box buyable costs.`)}],dyesToReset:[{name:"Red Dye",reset(){n.red.amount.value=0,n.red.buyable.amount.value=0}},{name:"Yellow Dye",reset(){n.yellow.amount.value=0,n.yellow.buyable.amount.value=0}}]}),green:l({name:"Green Dye",color:"green",costs:()=>[{base:15,root:2,res:n.yellow.amount},{base:10,root:2,res:n.blue.amount}],listedBoosts:[{visible:!0,desc:f(()=>`x${G(o.green1.value)} Yellow and Blue Dye gain`)},{visible:!0,desc:f(()=>`+${Z(a.sub(o.green2.value,1).times(100))}% Kiln synergy effect.`)}],dyesToReset:[{name:"Yellow Dye",reset(){n.yellow.amount.value=0,n.yellow.buyable.amount.value=0}},{name:"Blue Dye",reset(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}}]}),purple:l({name:"Purple Dye",color:"purple",costs:()=>[{base:15,root:2,res:n.blue.amount},{base:10,root:2,res:n.red.amount}],listedBoosts:[{visible:!0,desc:f(()=>`x${G(o.purple1.value)} Red and Blue Dye gain`)},{visible:!0,desc:f(()=>`x${G(o.purple2.value)} Smelting Speed and Ore Purity`)}],dyesToReset:[{name:"Blue Dye",reset(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}},{name:"Red Dye",reset(){n.red.amount.value=0,n.red.buyable.amount.value=0}}]})},o={red1:f(()=>a.pow(a.add(n.red.amount.value,1).log2().plus(1).log2().div(2),c.blueDyeUpg2.bought.value?1.5:1)),yellow1:f(()=>a.add(n.yellow.amount.value,1).log2().plus(1)),blue1:f(()=>a.add(n.blue.amount.value,1).log2().sqrt().times(5e6)),orange1:f(()=>a.pow(2,a.add(n.orange.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),orange2:f(()=>a.add(n.orange.amount.value,1).log2().plus(1)),green1:f(()=>a.pow(2,a.add(n.green.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),green2:f(()=>a.add(n.green.amount.value,1).log2().plus(1).pow(c.coalUpg.bought.value?2:1)),purple1:f(()=>a.pow(2,a.add(n.purple.amount.value,1).log2().sqrt()).pow(c.coalUpg.bought.value?1.2:1)),purple2:f(()=>a.add(n.purple.amount.value,1).log2().plus(1))},[r,d]=Zt(()=>[{title:"Red Dye Creation",modifier:n.red.toGenerate,base:0},{title:"Yellow Dye Creation",modifier:n.yellow.toGenerate,base:0},{title:"Blue Dye Creation",modifier:n.blue.toGenerate,base:0},{title:"Orange Dye Creation",modifier:n.orange.toGenerate,base:0},{title:"Green Dye Creation",modifier:n.green.toGenerate,base:0},{title:"Purple Dye Creation",modifier:n.purple.toGenerate,base:0}]),c={blueDyeUpg:O(()=>({visibility:()=>y(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(1)||c.blueDyeUpg.bought.value),display:{title:"Is Blue Dye just Water?",description:M(()=>i(S,null,[s("Multiply Log gain by log"),i("sub",null,[s("10")]),s("(Auto Cutting Amount)+1.")]))},cost:1e3,resource:U(n.blue.amount),onPurchase(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}})),redDyeUpg:O(()=>({visibility:()=>y(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(10)||c.redDyeUpg.bought.value),display:{title:"Glistening Paint",description:M(()=>i(S,null,[s("Multiply Ore Purity by log"),i("sub",null,[s("10")]),s("(Cloth)+1.")]))},cost:1500,resource:U(n.red.amount),onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0}})),yellowDyeUpg:O(()=>({visibility:()=>y(a.add(n.orange.amount.value,n.green.amount.value).add(n.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:U(n.yellow.amount),onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0,n.yellow.amount.value=0,n.yellow.buyable.amount.value=0,n.blue.amount.value=0,n.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:U(n.yellow.amount),onPurchase(){n.yellow.amount.value=0,n.yellow.buyable.amount.value=0}})),redDyeUpg2:O(()=>({visibility:()=>y(c.redDyeUpg.bought.value),display:{title:"De Louvre",description:M(()=>i(S,null,[s("Multiply Smelting Speed by "),i(il,null,{default:()=>[s("Refineries+1")]}),s(".")]))},cost:6e3,resource:U(n.red.amount),onPurchase(){n.red.amount.value=0,n.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:U(n.blue.amount),onPurchase(){n.blue.amount.value=0,n.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(){n.red.amount.value=0,n.red.buyable.amount.value=0,n.yellow.amount.value=0,n.yellow.buyable.amount.value=0,n.blue.amount.value=0,n.blue.buyable.amount.value=0}}))},p=V(!1),m=M(()=>i(wt,{modelValue:p.value,"onUpdate:modelValue":v=>p.value=v},{header:()=>i("h2",null,[e,s(" Modifiers")]),body:r})),w=dt(f(()=>Object.values(n).reduce((v,_)=>a.add(v,_.amount.value),0)),"Sum of Dyes"),{total:h,trackerDisplay:A}=dl({resource:w,goal:6e4,name:e,day:_r,color:t,textColor:"var(--feature-foreground)",modal:{show:p,display:m},ignoreTotal:!0});return{name:e,color:t,dyes:n,dyeSum:w,boosts:o,totalDyeSum:h,minWidth:700,generalTabCollapsed:d,upgrades:c,display:M(()=>i(S,null,[re(A),i(Se,null,null),i("div",{style:"width: 620px"},[Ye(n.red.display,n.yellow.display,n.blue.display),Ye(n.red.buyable,n.yellow.buyable,n.blue.buyable),i(Se,null,null),Ye(n.orange.display,n.green.display,n.purple.display),Ye(n.orange.buyable,n.green.buyable,n.purple.buyable)]),i(Se,null,null),i("div",{class:"row",style:"vertical-align: top"},[Ht(c.redDyeUpg,c.redDyeUpg2),Ht(c.yellowDyeUpg,c.yellowDyeUpg2),Ht(c.blueDyeUpg,c.blueDyeUpg2)]),re(c.coalUpg)]))}}),Sr="boxes",Sa=6,et=Ot(Sr,function(){const e="Boxes",t="#964B00",l=dt(0,"boxes"),n=ae(()=>[_l(()=>({exponent:1.1,description:"Bell Level 2",enabled:W.elfTraining.boxElfTraining.milestones[1].earned}))]),o=Rn(()=>({scaling:qa(1e10,1),baseResource:me.logs,gainResource:U(l),roundUpCost:!0,gainModifier:n})),r=Tt(()=>({display:M(()=>i(S,null,[i("span",{style:"font-size: large"},[s("Create "),Z(o.currentGain.value),s(" "),l.displayName]),i("br",null,null),i("span",{style:"font-size: large"},[s("Cost:")," ",Yl(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:U(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:U(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:U(l),cost:4e3})),m={logsUpgrade:d,ashUpgrade:c,coalUpgrade:p},w=O(()=>({resource:U(l),cost:1e8,visibility:()=>y(He.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),h=O(()=>({resource:U(l),cost:1e9,visibility:()=>y(He.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),A=O(()=>({resource:U(l),cost:1e10,visibility:()=>y(He.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),v={oreUpgrade:w,metalUpgrade:h,plasticUpgrade:A},_=O(()=>({resource:U(l),cost:1e16,visibility:()=>y(W.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry cloth in boxes",description:"Double all cloth actions"}})),N=O(()=>({resource:U(l),cost:1e17,visibility:()=>y(W.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry dye in boxes",description:"Double all dye gain"}})),P=O(()=>({resource:U(l),cost:1e18,visibility:()=>y(W.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry experience in boxes???",description:"Double xp gain"}})),H={clothUpgrade:_,dyeUpgrade:N,xpUpgrade:P},B=Oe(()=>({display:{title:"Carry more logs",description:M(()=>i(S,null,[s("Use boxes to carry even more logs, boosting their gain"),i("br",null,null),i("br",null,null),i("div",null,[s("Amount: "),Z(B.amount.value),a.gt(B.freeLevels.value,0)?i(S,null,[s(" (+"),Z(B.freeLevels.value),s(")")]):null])])),effectDisplay:M(()=>i(S,null,[G(a.div(B.totalAmount.value,2).add(1)),s("x")])),showAmount:!1},resource:U(l),cost(){let K=this.amount.value;K=a.pow(.95,X.books.boxBook.amount.value).times(K);let ke=3;return W.elfTraining.boxElfTraining.milestones[2].earned.value&&ke--,a.pow(ke,K).times(100).div(Le.boosts.orange2.value)},visibility:()=>y(d.bought.value),freeLevels:f(()=>W.elfTraining.boxElfTraining.milestones[0].earned.value?a.max(E.amount.value,1).sqrt().floor().add(a.max(F.amount.value,1).sqrt().floor()):0),totalAmount:f(()=>a.add(B.amount.value,B.freeLevels.value))})),E=Oe(()=>({display:{title:"Carry more ash",description:M(()=>i(S,null,[s("Use boxes to carry even more ash, boosting its gain"),i("br",null,null),i("br",null,null),i("div",null,[s("Amount: "),Z(E.amount.value),a.gt(E.freeLevels.value,0)?i(S,null,[s(" (+"),Z(E.freeLevels.value),s(")")]):null])])),effectDisplay:M(()=>i(S,null,[G(a.div(E.totalAmount.value,2).add(1)),s("x")])),showAmount:!1},resource:U(l),cost(){let K=this.amount.value;K=a.pow(.95,X.books.boxBook.amount.value).times(K);let ke=5;return W.elfTraining.boxElfTraining.milestones[2].earned.value&&ke--,a.pow(ke,K).times(1e3).div(Le.boosts.orange2.value)},visibility:()=>y(c.bought.value),freeLevels:f(()=>W.elfTraining.boxElfTraining.milestones[0].earned.value?a.max(B.amount.value,1).sqrt().floor().add(a.max(F.amount.value,1).sqrt().floor()):0),totalAmount:f(()=>a.add(E.amount.value,E.freeLevels.value))})),F=Oe(()=>({display:{title:"Carry more coal",description:M(()=>i(S,null,[s("Use boxes to carry even more coal, boosting its gain"),i("br",null,null),i("br",null,null),i("div",null,[s("Amount: "),Z(F.amount.value),a.gt(F.freeLevels.value,0)?i(S,null,[s(" (+"),Z(F.freeLevels.value),s(")")]):null])])),effectDisplay:M(()=>i(S,null,[G(a.div(F.totalAmount.value,2).add(1)),s("x")])),showAmount:!1},resource:U(l),cost(){let K=this.amount.value;K=a.pow(.95,X.books.boxBook.amount.value).times(K);let ke=7;return W.elfTraining.boxElfTraining.milestones[2].earned.value&&ke--,a.pow(ke,K).times(1e3).div(Le.boosts.orange2.value)},visibility:()=>y(p.bought.value),freeLevels:f(()=>W.elfTraining.boxElfTraining.milestones[0].earned.value?a.max(B.amount.value,1).sqrt().floor().add(a.max(E.amount.value,1).sqrt().floor()):0),totalAmount:f(()=>a.add(F.amount.value,F.freeLevels.value))})),z={logBoxesBuyable:B,ashBoxesBuyable:E,coalBoxesBuyable:F};Xe.on("update",K=>{a.lt(R.day.value,Sa)||(l.value=a.times(K,He.buyables.passiveBoxes.amount.value).times(o.currentGain.value).div(100).add(l.value))});const[ge,Q]=Zt(()=>[{title:"Boxes Gain",modifier:n,base:1}]),fe=V(!1),ie=M(()=>i(wt,{modelValue:fe.value,"onUpdate:modelValue":K=>fe.value=K},{header:()=>i("h2",null,[e,s(" Modifiers")]),body:ge})),{total:qe,trackerDisplay:Be}=dl({resource:l,goal:5e4,name:e,day:Sa,color:t,modal:{display:ie,show:fe}});return{name:e,day:Sa,color:t,boxes:l,totalBoxes:qe,boxesConversion:o,upgrades:m,row2Upgrades:v,row3Upgrades:H,buyables:z,minWidth:700,display:M(()=>i(S,null,[re(Be),i(Se,null,null),i(Ft,{resource:l,color:t,style:"margin-bottom: 0"},null),i(Se,null,null),re(r),i(Se,null,null),Nl(Object.values(m),Object.values(v),Object.values(H)),i(Se,null,null),Ye(...Object.values(z))]))}}),Mr="trees",sn=1,rn=.1,me=Ot(Mr,function(){const e="Trees",t="#4BDC13",l="green",n=dt(0,"logs"),o=dt(0,"saplings"),r=V(0),d=ae(()=>[pe(()=>({addend:()=>a.times(Q.amount.value,10),description:"Expand Forest",enabled:E.bought})),pe(()=>({addend:()=>a.div(Pt.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Pt.milestones.morePlantsMilestone1.earned})),b(()=>({multiplier:2,description:"5 Elves Trained",enabled:Ne.milestones[4].earned})),b(()=>({multiplier:2,description:"8 Elves Trained",enabled:Ne.milestones[7].earned})),b(()=>({multiplier:4,description:"Lumberjack Boots",enabled:tt.treesUpgrades.treesUpgrade1.bought})),pe(()=>({addend:Le.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>a.gte(Le.dyes.blue.amount.value,1)})),pe(()=>({addend:()=>a.pow(qe.value,.99),description:"Hope Level 1",enabled:W.elfTraining.expandersElfTraining.milestones[0].earned}))]),c=dt(f(()=>a.sub(d.apply(10),o.value)),"trees"),p=f(()=>d.apply(10)),m=O(()=>({resource:U(n),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),w=O(()=>({resource:U(n),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),h=O(()=>({resource:U(n),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),A=O(()=>({resource:U(n),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),v=O(()=>({resource:U(n),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),_=[m,w,h,A,v],N=O(()=>({resource:U(n),cost:50,visibility:()=>y(v.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),P=O(()=>({resource:U(n),cost:50,visibility:()=>y(v.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),H=O(()=>({resource:U(n),cost:150,visibility:()=>y(v.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),B=O(()=>({resource:U(n),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:U(n),cost:300,visibility:()=>y(v.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),F=[N,P,H,B,E],z=Oe(()=>({resource:U(n),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,X.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)})),ge=Oe(()=>({resource:U(n),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,X.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=Oe(()=>({resource:U(n),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,X.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)})),fe=[z,ge,Q],ie=ae(()=>[pe(()=>({addend:1,description:"Wooden Fingers",enabled:m.bought})),pe(()=>({addend:Ge,description:"Smart Knives",enabled:H.bought}))]),qe=f(()=>ie.apply(1)),Be=ae(()=>[b(()=>({multiplier:.5,description:"Sharper Fingers",enabled:N.bought})),b(()=>({multiplier:()=>a.pow(.5,Ne.totalElves.value),description:"1 Elf Trained",enabled:Ne.milestones[0].earned}))]),K=f(()=>Be.apply(1)),ke=ae(()=>[pe(()=>({addend:1,description:"Automated Knives",enabled:h.bought})),pe(()=>({addend:z.amount,description:"Generic Cutters",enabled:E.bought})),pe(()=>({addend:()=>a.div(Pt.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Pt.milestones.autoCutMilestone1.earned})),b(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Pt.milestones.autoCutMilestone2.earned})),b(()=>({multiplier:2,description:"Warmer Cutters",enabled:q.warmerCutters.bought})),b(()=>({multiplier:q.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>a.gt(q.heatedCutters.amount.value,0)})),b(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:tt.treesUpgrades.treesUpgrade2.bought}))]),Ge=f(()=>ke.apply(0)),Ee=ae(()=>[pe(()=>({addend:1,description:"Leafy Fingers",enabled:w.bought})),pe(()=>({addend:se,description:"Smart Spades",enabled:B.bought}))]),Ie=f(()=>Ee.apply(1)),Ue=ae(()=>[b(()=>({multiplier:.5,description:"Greener Fingers",enabled:P.bought})),b(()=>({multiplier:()=>a.pow(.5,Ne.totalElves.value),description:"1 Elf Trained",enabled:Ne.milestones[0].earned}))]),J=f(()=>Ue.apply(1)),he=ae(()=>[pe(()=>({addend:1,description:"Automated Spade",enabled:A.bought})),pe(()=>({addend:()=>a.div(ge.amount.value,2),description:"Generic Planters",enabled:E.bought})),pe(()=>({addend:()=>a.div(Pt.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Pt.milestones.autoPlantMilestone1.earned})),b(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Pt.milestones.autoPlantMilestone2.earned})),b(()=>({multiplier:2,description:"Warmer Planters",enabled:q.warmerPlanters.bought})),b(()=>({multiplier:q.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>a.gt(q.heatedPlanters.amount.value,0)})),b(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:tt.treesUpgrades.treesUpgrade3.bought})),b(()=>({multiplier:2,description:"Ivy Level 1",enabled:W.elfTraining.planterElfTraining.milestones[0].earned})),b(()=>({multiplier:2,description:"Mary Level 2",enabled:W.elfTraining.heatedPlanterElfTraining.milestones[1].earned})),b(()=>({multiplier:()=>a.pow(c.value,.2).log10().pow_base(2),description:"Ivy Level 3",enabled:W.elfTraining.planterElfTraining.milestones[2].earned}))]),se=f(()=>he.apply(0)),We=ae(()=>[b(()=>({multiplier:1.25,description:"Research I",enabled:v.bought})),b(()=>({multiplier:1.25,description:"Research II",enabled:E.bought})),b(()=>({multiplier:()=>a.div(Pt.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Pt.milestones.logGainMilestone1.earned})),b(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Pt.milestones.logGainMilestone2.earned})),b(()=>({multiplier:1.25,description:"Ashy Soil",enabled:q.basicFertilizer.bought})),b(()=>({multiplier:q.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>a.gt(q.moreFertilizer.amount.value,0)})),b(()=>({multiplier:2,description:"4 Elves Trained",enabled:Ne.milestones[3].earned})),b(()=>({multiplier:2,description:"Carry logs in boxes",enabled:et.upgrades.logsUpgrade.bought})),b(()=>({multiplier:()=>a.div(et.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:et.upgrades.logsUpgrade.bought})),b(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:tt.treesUpgrades.treesUpgrade4.bought})),b(()=>({multiplier:f(()=>a.add(Ge.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:Le.upgrades.blueDyeUpg.bought})),b(()=>({multiplier:f(()=>a.add(Ge.value,1).root(3)),description:"Holly Level 1",enabled:W.elfTraining.cutterElfTraining.milestones[0].earned})),b(()=>({multiplier:()=>a.sqrt(W.totalElfLevels.value),description:"Noel Level 1",enabled:W.elfTraining.fertilizerElfTraining.milestones[0].earned})),_l(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Pt.milestones.logGainMilestone3.earned}))]),Je=Me(0),At=jt(()=>({direction:Te.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(Je.value,K.value)})),ne=Tt(()=>({display:{title:"Cut trees",description:M(()=>i(S,null,[s("Cut down up to "),Z(a.floor(qe.value))," ",s("tree"),a.eq(qe.value,1)?"":"s",s(" at once!"),i("br",null,null),re(At)]))},style:{minHeight:"80px"},canClick:()=>a.gte(c.value,1)&&a.gte(Je.value,K.value),onClick(){if(a.lt(Je.value,K.value))return;const $=a.floor(a.min(c.value,a.times(qe.value,a.div(Je.value,K.value).floor())));n.value=a.add(n.value,a.times(We.apply(1),$)),o.value=a.add(o.value,$),Je.value=0}})),oe=Me(0),Re=jt(()=>({direction:Te.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(oe.value,J.value)})),Ke=Tt(()=>({display:{title:"Plant trees",description:M(()=>i(S,null,[s("Plant up to "),Z(a.floor(Ie.value))," ",s("tree"),a.eq(Ie.value,1)?"":"s",s(" at once!"),i("br",null,null),re(Re)]))},style:{minHeight:"80px"},canClick:()=>a.gte(o.value,1)&&a.gte(oe.value,J.value),onClick(){if(a.lt(oe.value,J.value))return;const $=a.floor(a.min(o.value,a.times(Ie.value,a.div(oe.value,J.value).floor())));o.value=a.sub(o.value,$),oe.value=0}})),[ye,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:Be,base:1,visible:m.bought,unit:"s"},{title:"Manual Planting Amount",modifier:Ee,base:1,visible:w.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:Ue,base:1,visible:w.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:ke,base:0,visible:h.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:he,base:0,visible:A.bought,unit:"/s"},{title:"Forest Size",modifier:d,base:10,visible:E.bought}]),st=V(!1),te=M(()=>i(wt,{modelValue:st.value,"onUpdate:modelValue":$=>st.value=$},{header:()=>i("h2",null,[e,s(" Modifiers")]),body:ye}));Xe.on("update",$=>{if(a.lt(R.day.value,sn))return;a.gte(Je.value,K.value)?Je.value=K.value:(Je.value=a.add(Je.value,$),ne.isHolding.value&&ne.onClick()),a.gte(oe.value,J.value)?oe.value=J.value:(oe.value=a.add(oe.value,$),Ke.isHolding.value&&Ke.onClick());const de=a.min(c.value,a.times(Ge.value,$)),j=a.mul(We.apply(1),de),De=a.div(j,$);r.value=a.mul(De,rn).add(a.mul(r.value,a.dOne.sub(rn))),n.value=a.add(n.value,j),o.value=a.add(o.value,de);const le=a.min(o.value,a.times(se.value,$));o.value=a.sub(o.value,le)});const Fe=f(()=>a.sub(Ge.value,se.value)),ue=f(()=>a.sub(se.value,Ge.value)),Mt=Fl(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{ne.canClick.value&&ne.onClick()}})),Ve=Fl(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{Ke.canClick.value&&Ke.onClick()}})),{total:mt,trackerDisplay:Bt}=dl({resource:n,goal:1e4,name:e,day:sn,color:l,modal:{show:st,display:te}});return{name:e,color:t,logs:n,totalLogs:mt,trees:c,saplings:o,cutTree:ne,plantTree:Ke,cutTreeHK:Mt,plantTreeHK:Ve,row1Upgrades:_,row2Upgrades:F,row1Buyables:fe,manualCutProgress:Je,manualPlantProgress:oe,generalTabCollapsed:pt,computedAutoCuttingAmount:Ge,minWidth:700,display:M(()=>i(S,null,[re(Bt),i(Se,null,null),i(Ft,{resource:n,color:t,style:"margin-bottom: 0",productionDisplay:a.gt(Ge.value,0)?`+${G(r.value)}/s average<br/>equilibrium: +${An([[Ge.value,"cutting speed"],[se.value,"planting speed"],[a.mul(p.value,20),"forest cap"]],"/s",We.apply(1))}`:void 0},null),i(Ft,{resource:o,color:l,style:"margin-bottom: 0",productionDisplay:sa(Fe.value)},null),i(Ft,{resource:c,color:l,style:"margin-bottom: 0",productionDisplay:sa(ue.value)},null),i(Se,null,null),Ye(ne,Ke),i("div",null,[s("Tip: You can hold down on actions to perform them automatically")]),i(Se,null,null),Nl(_,F),i(Se,null,null),Ye(...fe)]))}});var On="./assets/tree.35808197.png",qn="./assets/sws.714ad454.png",Ln="data:image/png;base64,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",Gn="./assets/elf.9fbfa563.png",Qn="./assets/paperStacks.4c96ec8c.png",$n="data:image/png;base64,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",Vn="./assets/metal.7407f5d1.png",Hn="./assets/cloth.7bcd7f37.png",jn="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==",Wn="./assets/plastic.b8ac74ff.png",Jn="data:image/png;base64,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",Br="./assets/elfManagement.436c8744.png";const R=Ot("main",function(){const e=Me(1),t=f(()=>(+new Date(new Date().getFullYear(),11,e.value)-ce.time)/1e3),l=V(!1),n=V(-1),o=V(""),r=V();function d(m){const w=Me(!1),h=Me(!1);return qt(()=>{const A=m(),v=bt(A.shouldNotify),_=bt(()=>u(v)||u(h));return{...A,opened:w,shouldNotify:_,recentlyUpdated:h,[bl]:rs,[wl]:function(){const{day:N,layer:P,symbol:H,opened:B,shouldNotify:E,story:F,completedStory:z,recentlyUpdated:ge}=this;return{day:N,symbol:H,layer:P,opened:B,recentlyUpdated:ge,shouldNotify:E,onOpenLore(){var ie,qe;const Q=R.day.value>N;n.value=Q?N-1:-1;const fe=u((qe=(ie=Et[P!=null?P:"trees"])==null?void 0:ie.name)!=null?qe:"");o.value=Q?`${fe} - Completed!`:fe,r.value=Q?`${F}<hr style="
|
|
margin: 10px 0;"/>${z}`:F,l.value=!0},onOpenLayer(){if(ge.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(ce.tabs.includes(P!=null?P:"trees")){const Q=ce.tabs.lastIndexOf(P!=null?P:"trees");ce.tabs.splice(Q,1)}else ce.tabs.push(P!=null?P:"trees"),R.minimized.value=!0;else ce.tabs.splice(1,1/0,P!=null?P:"trees")},onUnlockLayer(){P&&(B.value=!0,setTimeout(()=>{var Q,fe;n.value=-1,o.value=u((fe=(Q=Et[P!=null?P:"trees"])==null?void 0:Q.name)!=null?fe:""),r.value=F,ce.devSpeed=null,l.value=!0},1e3))}}}}})}const c=[d(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:On,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:qn,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:Ln,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:Gn,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:Qn,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:$n,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:Vn,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:Hn,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:jn,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:Wn,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:Jn,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:Br,story:"You watch as the elves work, and you realize that they could probably be trained to help out better. Just then, Santa comes over to check on your progress. You reply that you're doing fine, except that the elves may need a bit of behavior management. Santa offers to help, saying that he doesn't want to leave you to do everything. Unfortunately for you, the behavior problems won't fix themselves, so let's get to work!",completedStory:""})),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(){n.value=e.value-1,o.value="Day Complete!",r.value=c[e.value-1].completedStory,l.value=!0,e.value++,R.minimized.value=!1,ce.devSpeed=0}return{name:"Calendar",days:c,day:e,timeUntilNewDay:t,loreScene:n,loreTitle:o,loreBody:r,showLoreModal:l,completeDay:p,minWidth:700,display:M(()=>i(S,null,[ce.devSpeed===0?i("div",null,[s("Game Paused")]):null,ce.devSpeed&&ce.devSpeed!==1?i("div",null,[s("Dev Speed: "),G(ce.devSpeed),s("x")]):null,ce.offlineTime?i("div",null,[s("Offline Time: "),Kl(ce.offlineTime)]):null,i(Se,null,null),i("div",{class:"advent"},[c.reduce((m,w)=>(m[m.length-1].length===4&&m.push([]),m[m.length-1].push(w),m),[[]]).map(m=>Ye(...m))])]))}}),Nr=e=>[R,me,Pt,q,Ne,X,et,lt,tt,Ze,He,Le],Ga=f(()=>!1);function xr(e,t){var l,n,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=(n=t.layers)==null?void 0:n.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 Ir=Object.freeze(Object.defineProperty({__proto__:null,main:R,getInitialLayers:Nr,hasWon:Ga,fixOldSave:xr},Symbol.toStringTag,{value:"Module"}));const Dr={class:"scene"},Pr=["src"],Tr=["src"],Fr=["src"],Ur=["src"],Rr=["src"],Or=["src"],qr=["src"],Lr={key:7,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},Gr=["src"],Qr=["src"],$r=["src"],Vr=["src"],Hr=Ce({__name:"Scene",props:{day:null},setup(e){return(t,l)=>(k(),D("div",Dr,[e.day>=7?(k(),D("img",{key:0,src:u(Hn),class:"scene-item",style:{left:"4%",bottom:"3%",width:"40px",height:"40px"}},null,8,Pr)):L("",!0),e.day>=0?(k(),D("img",{key:1,src:u(On),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,Tr)):L("",!0),e.day>=1?(k(),D("img",{key:2,src:u(qn),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,Fr)):L("",!0),e.day>=2?(k(),D("img",{key:3,src:u(Ln),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,Ur)):L("",!0),e.day>=6?(k(),D("img",{key:4,src:u(Vn),class:"scene-item",style:{left:"72%",bottom:"8%",width:"40px",height:"40px"}},null,8,Rr)):L("",!0),e.day>=8?(k(),D("img",{key:5,src:u(jn),class:"scene-item",style:{left:"80%",bottom:"6%"}},null,8,Or)):L("",!0),e.day>=3?(k(),D("img",{key:6,src:u(Gn),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,qr)):L("",!0),e.day>=4?(k(),D("div",Lr,[e.day>=4?(k(),D("img",{key:0,src:u(Qn),class:"scene-item"},null,8,Gr)):L("",!0),e.day>=5?(k(),D("img",{key:1,src:u($n),class:"scene-item"},null,8,Qr)):L("",!0),e.day>=9?(k(),D("img",{key:2,src:u(Wn),class:"scene-item"},null,8,$r)):L("",!0),e.day>=10?(k(),D("img",{key:3,src:u(Jn),class:"scene-item"},null,8,Vr)):L("",!0)])):L("",!0)]))}});var jr=$e(Hr,[["__scopeId","data-v-47b4d886"]]);const Wr=Ce({components:{Context:En},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:ee(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:ee(Number,String),required:!0},name:{type:ee(String),required:!0},color:ee(String),minimizable:ee(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:l,minimized:n,minWidth:o,tab:r}=St(e),d=ua(t),c=f(()=>je.allowGoBack&&l.value>0&&!n.value);function p(){ce.tabs.splice(u(e.index),1)}Ml(()=>w(n.value,u(o.value))),Xt([n,Go(o)],([h,A])=>w(h,A));function m(h){e.nodes.value=h}function w(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,n,o,r){const d=hl("Context");return k(),D("div",{class:"layer-container",style:ht({"--layer-color":e.unref(e.color)})},[e.showGoBack?(k(),D("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...c)=>e.goBack&&e.goBack(...c))},"\u274C")):L("",!0),e.minimized.value?(k(),D("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=c=>e.minimized.value=!1)},[g("div",null,xe(e.unref(e.name)),1)])):(k(),D("div",{key:2,class:ct(["layer-tab",{showGoBack:e.showGoBack}])},[i(d,{onUpdateNodes:e.updateNodes},{default:ve(()=>[(k(),be(nt(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(k(),D("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=c=>e.minimized.value=!0)}," \u25BC ")):L("",!0)],4)}var zr=$e(Wr,[["render",Jr],["__scopeId","data-v-0158bec3"]]);const zn=e=>(rl("data-v-4b4bda40"),e=e(),ul(),e),Kr=zn(()=>g("h2",null,"Changelog",-1)),Xr=zn(()=>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)),Yr=Ce({__name:"Changelog",setup(e,{expose:t}){const l=V(!1);return t({open(){l.value=!0}}),(n,o)=>(k(),be(wt,{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=r=>l.value=r)},{header:ve(()=>[Kr]),body:ve(()=>[Xr]),_:1},8,["modelValue"]))}});var Zr=$e(Yr,[["__scopeId","data-v-4b4bda40"]]);const eu={class:"info-modal-header"},tu=["src","alt"],lu={class:"info-modal-title"},au={key:0},nu=s(" - "),iu={key:0},ou={key:0},su=g("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),ru=g("br",null,null,-1),uu=g("br",null,null,-1),du=["href"],cu=g("span",{class:"material-icons info-modal-discord"},"discord",-1),pu=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),mu=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),vu=g("br",null,null,-1);var fu=Ce({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const l=e,{title:n,logo:o,author:r,discordName:d,discordLink:c,versionNumber:p,versionTitle:m}=je,w=St(l),h=V(!1),A=f(()=>Kl(ce.timePlayed)),v=f(()=>Qe(M(()=>i(S,null,[Pn.map(re)]))));t({open(){h.value=!0}});function _(){var N;(N=u(w.changelog))==null||N.open()}return(N,P)=>(k(),be(wt,{class:"info-modal",modelValue:h.value,"onUpdate:modelValue":P[0]||(P[0]=H=>h.value=H)},{header:ve(()=>[g("div",eu,[u(o)?(k(),D("img",{key:0,class:"info-modal-logo",src:u(o),alt:u(n)},null,8,tu)):L("",!0),g("div",lu,[g("h2",null,"- "+xe(u(n))+" -",1),g("h4",null,[s(" - v"+xe(u(p)),1),u(m)?(k(),D("span",au,": "+xe(u(m)),1)):L("",!0),nu])])])]),body:ve(({shown:H})=>[H?(k(),D("div",iu,[u(r)?(k(),D("div",ou,"By "+xe(u(r)),1)):L("",!0),su,ru,g("div",{class:"link",onClick:_},"Changelog"),uu,g("div",null,[u(c)?(k(),D("a",{key:0,href:u(c),class:"info-modal-discord-link",target:"_blank"},[cu,s(" "+xe(u(d)),1)],8,du)):L("",!0)]),pu,mu,vu,g("div",null,"Time Played: "+xe(u(A)),1),(k(),be(nt(u(v))))])):L("",!0)]),_:1},8,["modelValue"]))}});const Kn=e=>(rl("data-v-0d685451"),e=e(),ul(),e),gu=Kn(()=>g("h2",null,"Options",-1)),hu=Kn(()=>g("hr",null,null,-1));var yu=Ce({__name:"Options",setup(e,{expose:t}){const l=V(!1);t({open(){l.value=!0}});const n=Object.keys(Ol).map(v=>({label:Cn(v),value:v})),o=f(()=>Qe(M(()=>i(S,null,[Dn.map(re)])))),{showTPS:r,theme:d}=St(at),{autosave:c,usingLog:p}=St(ce),m=f({get(){return ce.devSpeed===0},set(v){ce.devSpeed=v?0:null}}),w=M(()=>i("span",null,[s("Autosave"),i(ut,{display:"Save-specific"},{default:()=>[s("*")]})])),h=M(()=>i("span",null,[s("Pause game"),i(ut,{display:"Save-specific"},{default:()=>[s("*")]})])),A=M(()=>i("span",null,[s("Use log for progress bar"),i(ut,{display:"Save-specific"},{default:()=>[s("*")]})]));return(v,_)=>(k(),be(wt,{modelValue:l.value,"onUpdate:modelValue":_[5]||(_[5]=N=>l.value=N)},{header:ve(()=>[gu]),body:ve(()=>[i(La,{title:"Theme",options:u(n),modelValue:u(d),"onUpdate:modelValue":_[0]||(_[0]=N=>gt(d)?d.value=N:null)},null,8,["options","modelValue"]),(k(),be(nt(u(o)))),i(ol,{title:"Show TPS",modelValue:u(r),"onUpdate:modelValue":_[1]||(_[1]=N=>gt(r)?r.value=N:null)},null,8,["modelValue"]),hu,i(ol,{title:u(w),modelValue:u(c),"onUpdate:modelValue":_[2]||(_[2]=N=>gt(c)?c.value=N:null)},null,8,["title","modelValue"]),u(je).enablePausing?(k(),be(ol,{key:0,title:u(h),modelValue:u(m),"onUpdate:modelValue":_[3]||(_[3]=N=>gt(m)?m.value=N:null)},null,8,["title","modelValue"])):L("",!0),i(ol,{title:u(A),modelValue:u(p),"onUpdate:modelValue":_[4]||(_[4]=N=>gt(p)?p.value=N:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var bu=$e(yu,[["__scopeId","data-v-0d685451"]]);const wu=["onSubmit"],Au={class:"field"},Cu={key:0,class:"field-title"},ku=["placeholder"],Eu=Ce({__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,n=yl(Yt(l,"title"),"span"),o=Vt(null);da(()=>{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(),D("form",{onSubmit:Vl(d,["prevent"])},[g("div",Au,[u(n)?(k(),D("span",Cu,[(k(),be(nt(u(n))))])):L("",!0),e.textArea?(k(),be(u(fi),{key:1,modelValue:u(r),"onUpdate:modelValue":m[0]||(m[0]=w=>gt(r)?r.value=w:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:c,ref_key:"field",ref:o},null,8,["modelValue","placeholder","maxHeight"])):ca((k(),D("input",{key:2,type:"text","onUpdate:modelValue":m[1]||(m[1]=w=>gt(r)?r.value=w:null),placeholder:e.placeholder,class:ct({fullWidth:!e.title}),onBlur:c,ref_key:"field",ref:o},null,42,ku)),[[ui,u(r)]])])],40,wu))}});var Xn=$e(Eu,[["__scopeId","data-v-67b44a54"]]);const _u={key:0},Su=["onClick","disabled"],Mu={key:0},Bu=["onClick"],Nu=Ce({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const n=St(e),o=V(!1);Xt(o,c=>{t("confirmingChanged",c)});function r(){if(u(n.skipConfirm)){t("click");return}o.value&&t("click"),o.value=!o.value}function d(){o.value=!1}return(c,p)=>(k(),D("span",{class:ct(["container",{confirming:o.value}])},[o.value?(k(),D("span",_u,"Are you sure?")):L("",!0),g("button",{onClick:Vl(r,["stop"]),class:"button danger",disabled:e.disabled},[o.value?(k(),D("span",Mu,"Yes")):$t(c.$slots,"default",{key:1},void 0,!0)],8,Su),o.value?(k(),D("button",{key:1,class:"button",onClick:Vl(d,["stop"])},"No",8,Bu)):L("",!0)],2))}});var xu=$e(Nu,[["__scopeId","data-v-2f8ef34c"]]);const Iu=["onClick"],Du=Ce({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=V(!1),n=V(null);function o(){t("click"),n.value&&clearTimeout(n.value),l.value=!1,Ml(()=>{l.value=!0,n.value=setTimeout(()=>l.value=!1,500)})}return(r,d)=>(k(),D("button",{onClick:Vl(o,["stop"]),class:ct(["feedback",{activated:l.value,left:e.left}])},[$t(r.$slots,"default",{},void 0,!0)],10,Iu))}});var Pu=$e(Du,[["__scopeId","data-v-01a1b95c"]]);const cl=e=>(rl("data-v-5285ac49"),e=e(),ul(),e),Tu=cl(()=>g("div",{class:"handle material-icons"},"drag_handle",-1)),Fu={key:0,class:"actions"},Uu=cl(()=>g("span",{class:"material-icons"},"content_paste",-1)),Ru=cl(()=>g("span",{class:"material-icons"},"content_copy",-1)),Ou=cl(()=>g("span",{class:"material-icons"},"edit",-1)),qu=cl(()=>g("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Lu={key:1,class:"actions"},Gu=cl(()=>g("span",{class:"material-icons"},"check",-1)),Qu=cl(()=>g("span",{class:"material-icons"},"close",-1)),$u={key:2,class:"details"},Vu={class:"save-version"},Hu=cl(()=>g("br",null,null,-1)),ju={key:0},Wu={key:1},Ju={key:3,class:"details"},zu={key:4,class:"details error"},Ku=cl(()=>g("br",null,null,-1)),Xu=Ce({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const l=e,{save:n}=St(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=n.value.name||"");const p=f(()=>n.value&&n.value.id===ce.id),m=f(()=>p.value?ce.time:n.value&&n.value.time||0),w=ua(f(()=>{var A,v,_,N;return`Day ${(N=(_=(v=(A=n.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(),D("div",{class:ct(["save",{active:u(p)}])},[Tu,r.value?(k(),D("div",Lu,[g("button",{onClick:h,class:"button"},[i(ut,{display:"Save",direction:u(Te).Left,class:"info"},{default:ve(()=>[Gu]),_:1},8,["direction"])]),g("button",{onClick:v[5]||(v[5]=_=>r.value=!r.value),class:"button"},[i(ut,{display:"Cancel",direction:u(Te).Left,class:"info"},{default:ve(()=>[Qu]),_:1},8,["direction"])])])):(k(),D("div",Fu,[u(n).error==null&&!d.value?(k(),be(Pu,{key:0,onClick:v[0]||(v[0]=_=>t("export")),class:"button",left:""},{default:ve(()=>[i(ut,{display:"Export",direction:u(Te).Left,class:"info"},{default:ve(()=>[Uu]),_:1},8,["direction"])]),_:1})):L("",!0),u(n).error==null&&!d.value?(k(),D("button",{key:1,onClick:v[1]||(v[1]=_=>t("duplicate")),class:"button"},[i(ut,{display:"Duplicate",direction:u(Te).Left,class:"info"},{default:ve(()=>[Ru]),_:1},8,["direction"])])):L("",!0),u(n).error==null&&!d.value?(k(),D("button",{key:2,onClick:v[2]||(v[2]=_=>r.value=!r.value),class:"button"},[i(ut,{display:"Edit Name",direction:u(Te).Left,class:"info"},{default:ve(()=>[Ou]),_:1},8,["direction"])])):L("",!0),i(xu,{disabled:u(p),onClick:v[3]||(v[3]=_=>t("delete")),onConfirmingChanged:v[4]||(v[4]=_=>d.value=_)},{default:ve(()=>[i(ut,{display:"Delete",direction:u(Te).Left,class:"info"},{default:ve(()=>[qu]),_:1},8,["direction"])]),_:1},8,["disabled"])])),u(n).error==null&&!r.value?(k(),D("div",$u,[g("button",{class:"button open",onClick:v[6]||(v[6]=_=>t("open"))},[g("h3",null,xe(u(n).name),1)]),g("span",Vu,"v"+xe(u(n).modVersion),1),Hu,u(m)?(k(),D("div",ju,"Last played "+xe(u(o).format(u(m))),1)):L("",!0),u(w)?(k(),D("div",Wu,[(k(),be(nt(u(w))))])):L("",!0)])):u(n).error==null&&r.value?(k(),D("div",Ju,[i(Xn,{modelValue:c.value,"onUpdate:modelValue":v[7]||(v[7]=_=>c.value=_),class:"editname",onSubmit:h},null,8,["modelValue"])])):(k(),D("div",zu,[s(" Error: Failed to load save with id "+xe(u(n).id),1),Ku,s(xe(u(n).error),1)]))],2))}});var Yu=$e(Xu,[["__scopeId","data-v-5285ac49"]]);const Qa=e=>(rl("data-v-3b9991aa"),e=e(),ul(),e),Zu=Qa(()=>g("h2",null,"Saves Manager",-1)),ed={class:"modal-footer"},td={class:"field"},ld=Qa(()=>g("span",{class:"field-title"},"Create Save",-1)),ad={class:"field-buttons"},nd={class:"footer"},id=Qa(()=>g("div",{style:{"flex-grow":"1"}},null,-1)),od=Ce({__name:"SavesManager",setup(e,{expose:t}){const l=V(!1),n=V(null);t({open(){l.value=!0}});const o=V(!1),r=V(""),d=V(null);Xt(r,B=>{B?Ml(()=>{try{if(B[0]!=="{")if(B[0]==="e")B=decodeURIComponent(escape(atob(B)));else if(B[0]==="\u1BE1")B=vl.decompressFromUTF16(B);else{console.warn("Unable to determine preset encoding",B),o.value=!0;return}const E=JSON.parse(B);if(typeof E!="object"){o.value=!0;return}const F=aa();E.id=F,Jt(E),r.value="",o.value=!1,at.saves.push(F)}catch{o.value=!0}}):o.value=!1});let c={},p=V(Object.keys(c).reduce((B,E)=>(B.push({label:E.split("/").slice(-1)[0].slice(0,-4),value:c[E]}),B),[]));const m=ma({});function w(B){if(m[B]==null){let E=localStorage.getItem(B);if(E==null)m[B]={error:"Save doesn't exist in localStorage",id:B};else if(E==="dW5kZWZpbmVk")m[B]={error:"Save is undefined",id:B};else try{if(E[0]!=="{")if(E[0]==="e")E=decodeURIComponent(escape(atob(E)));else if(E[0]==="\u1BE1")E=vl.decompressFromUTF16(E);else return console.warn("Unable to determine preset encoding",E),o.value=!0,m[B]={error:"Unable to determine preset encoding",id:B},m[B];m[B]={...JSON.parse(E),id:B}}catch(F){m[B]={error:F,id:B},console.warn(`SavesManager: Failed to load info about save with id ${B}:
|
|
${F}
|
|
${E}`)}}return m[B]}Xt(l,B=>{B&&Object.keys(m).forEach(E=>delete m[E])});const h=f(()=>at.saves.reduce((B,E)=>(B[E]=w(E),B),{}));function A(B){let E;switch(ce.id===B?E=Nn(ce[ot]):E=JSON.stringify(h.value[B]),je.exportEncoding){default:console.warn(`Unknown save encoding: ${je.exportEncoding}. Defaulting to lz`);case"lz":E=vl.compressToUTF16(E);break;case"base64":E=btoa(unescape(encodeURIComponent(E)));break;case"plain":break}const F=document.createElement("textarea");F.value=E,document.body.appendChild(F),F.select(),F.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(F)}function v(B){ce.id===B&&Jt();const E={...h.value[B],id:aa()};Jt(E),at.saves.push(E.id)}function _(B){at.saves=at.saves.filter(E=>E!==B),localStorage.removeItem(B),m[B]=void 0}function N(B){h.value[ce.id].time=ce.time,Jt(),m[ce.id]=void 0,Sl(h.value[B]),m[B]=void 0}function P(B){if(d.value=B,Ml(()=>{d.value=null}),B[0]!=="{")if(B[0]==="e")B=decodeURIComponent(escape(atob(B)));else if(B[0]==="\u1BE1")B=vl.decompressFromUTF16(B);else{console.warn("Unable to determine preset encoding",B);return}const E=JSON.parse(B);E.id=aa(),Jt(E),at.saves.push(E.id),N(E.id)}function H(B,E){const F=h.value[B];F&&(F.name=E,ce.id===B?(ce.name=E,Jt()):(Jt(F),m[B]=void 0))}return(B,E)=>(k(),be(wt,{modelValue:l.value,"onUpdate:modelValue":E[4]||(E[4]=F=>l.value=F),ref_key:"modal",ref:n},{header:ve(()=>[Zu]),body:ve(({shown:F})=>[F?(k(),be(u(vi),{key:0,list:u(at).saves,handle:".handle",itemKey:z=>z},{item:ve(({element:z})=>[i(Yu,{save:u(h)[z],onOpen:ge=>N(z),onExport:ge=>A(z),onEditName:ge=>H(z,ge),onDuplicate:ge=>v(z),onDelete:ge=>_(z)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):L("",!0)]),footer:ve(()=>[g("div",ed,[i(Xn,{modelValue:r.value,"onUpdate:modelValue":E[0]||(E[0]=F=>r.value=F),title:"Import Save",placeholder:"Paste your save here!",class:ct({importingFailed:o.value})},null,8,["modelValue","class"]),g("div",td,[ld,g("div",ad,[g("button",{class:"button",onClick:E[1]||(E[1]=F=>N(u(Tl)().id))},"New Game"),Object.keys(u(p)).length>0?(k(),be(La,{key:0,options:u(p),modelValue:d.value,"onUpdate:modelValue":E[2]||(E[2]=F=>P(F)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):L("",!0)])]),g("div",nd,[id,g("button",{class:"button modal-default-button",onClick:E[3]||(E[3]=F=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Yn=$e(od,[["__scopeId","data-v-3b9991aa"]]);const Gt=e=>(rl("data-v-8495e562"),e=e(),ul(),e),sd=["src","alt"],rd={key:1,class:"title"},ud=Gt(()=>g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),dd={class:"discord"},cd={class:"discord-links"},pd={key:0},md=["href"],vd=Gt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),fd=Gt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),gd={href:"https://forums.moddingtree.com/",target:"_blank"},hd=Gt(()=>g("span",{class:"material-icons"},"forum",-1)),yd=Gt(()=>g("span",{class:"material-icons"},"info",-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"},"library_books",-1)),Cd=Gt(()=>g("span",{class:"material-icons"},"settings",-1)),kd=Gt(()=>g("span",{class:"material-icons"},"info",-1)),Ed={href:"https://forums.moddingtree.com/",target:"_blank"},_d=Gt(()=>g("span",{class:"material-icons"},"forum",-1)),Sd={class:"discord"},Md={class:"discord-links"},Bd={key:0},Nd=["href"],xd=Gt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Id=Gt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Dd=Ce({__name:"Nav",setup(e){const t=V(null),l=V(null),n=V(null),o=V(null),{useHeader:r,banner:d,title:c,discordName:p,discordLink:m,versionNumber:w}=je;function h(){window.open(m,"mywindow")}return(A,v)=>(k(),D(S,null,[u(r)?(k(),D("div",Bl({key:0,class:"nav"},A.$attrs),[u(d)?(k(),D("img",{key:0,src:u(d),class:"banner",alt:u(c)},null,8,sd)):(k(),D("div",rd,xe(u(c)),1)),g("div",{onClick:v[0]||(v[0]=_=>{var N;return(N=o.value)==null?void 0:N.open()}),class:"version-container"},[i(ut,{display:"Changelog",direction:u(Te).Down,class:"version"},{default:ve(()=>[g("span",null,"v"+xe(u(w)),1)]),_:1},8,["direction"])]),ud,g("div",dd,[g("span",{onClick:h,class:"material-icons"},"discord"),g("ul",cd,[u(m)?(k(),D("li",pd,[g("a",{href:u(m),target:"_blank"},xe(u(p)),9,md)])):L("",!0),vd,fd])]),g("div",null,[g("a",gd,[i(ut,{display:"Forums",direction:u(Te).Down,yoffset:"5px"},{default:ve(()=>[hd]),_:1},8,["direction"])])]),g("div",{onClick:v[1]||(v[1]=_=>{var N;return(N=t.value)==null?void 0:N.open()})},[i(ut,{display:"Info",direction:u(Te).Down,class:"info"},{default:ve(()=>[yd]),_:1},8,["direction"])]),g("div",{onClick:v[2]||(v[2]=_=>{var N;return(N=l.value)==null?void 0:N.open()})},[i(ut,{display:"Saves",direction:u(Te).Down,xoffset:"-20px"},{default:ve(()=>[bd]),_:1},8,["direction"])]),g("div",{onClick:v[3]||(v[3]=_=>{var N;return(N=n.value)==null?void 0:N.open()})},[i(ut,{display:"Options",direction:u(Te).Down,xoffset:"-66px"},{default:ve(()=>[wd]),_:1},8,["direction"])])],16)):(k(),D("div",Bl({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"},[i(ut,{display:"Changelog",direction:u(Te).Right,xoffset:"25%",class:"version"},{default:ve(()=>[g("span",null,"v"+xe(u(w)),1)]),_:1},8,["direction"])]),g("div",{onClick:v[5]||(v[5]=_=>{var N;return(N=l.value)==null?void 0:N.open()})},[i(ut,{display:"Saves",direction:u(Te).Right},{default:ve(()=>[Ad]),_:1},8,["direction"])]),g("div",{onClick:v[6]||(v[6]=_=>{var N;return(N=n.value)==null?void 0:N.open()})},[i(ut,{display:"Options",direction:u(Te).Right},{default:ve(()=>[Cd]),_:1},8,["direction"])]),g("div",{onClick:v[7]||(v[7]=_=>{var N;return(N=t.value)==null?void 0:N.open()})},[i(ut,{display:"Info",direction:u(Te).Right},{default:ve(()=>[kd]),_:1},8,["direction"])]),g("div",null,[g("a",Ed,[i(ut,{display:"Forums",direction:u(Te).Right,xoffset:"7px"},{default:ve(()=>[_d]),_:1},8,["direction"])])]),g("div",Sd,[g("span",{onClick:h,class:"material-icons"},"discord"),g("ul",Md,[u(m)?(k(),D("li",Bd,[g("a",{href:u(m),target:"_blank"},xe(u(p)),9,Nd)])):L("",!0),xd,Id])])],16)),i(fu,{ref_key:"info",ref:t,changelog:o.value},null,8,["changelog"]),i(Yn,{ref_key:"savesManager",ref:l},null,512),i(bu,{ref_key:"options",ref:n},null,512),i(Zr,{ref_key:"changelog",ref:o},null,512)],64))}});var Zn=$e(Dd,[["__scopeId","data-v-8495e562"]]);const $a=e=>(rl("data-v-248e2ebb"),e=e(),ul(),e),Pd={class:"inner-tab"},Td={key:1},Fd=$a(()=>g("br",null,null,-1)),Ud=s(" You can help continue the "),Rd=$a(()=>g("i",null,"advent",-1)),Od=s("ure at: "),qd=$a(()=>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)),Ld=Ce({__name:"Game",setup(e){const t=Yt(ce,"tabs"),l=f(()=>Object.keys(Et)),n=je.useHeader,o=yl(R.loreBody);function r(d){const{display:c,minimized:p,minWidth:m,name:w,color:h,minimizable:A,nodes:v}=d;return{display:c,minimized:p,minWidth:m,name:w,color:h,minimizable:A,nodes:v}}return(d,c)=>(k(),D("div",{class:ct(["tabs-container",{useHeader:u(n)}])},[(k(!0),D(S,null,cn(u(t),(p,m)=>{var w,h;return k(),D("div",{key:m,class:ct(["tab",u((w=u(Et)[p])==null?void 0:w.classes)]),ref_for:!0,ref:`tab-${m}`,style:ht(u((h=u(Et)[p])==null?void 0:h.style))},[m===0&&!u(n)?(k(),be(Zn,{key:0})):L("",!0),g("div",Pd,[u(l).includes(p)?(k(),be(zr,Bl({key:0},r(u(Et)[p]),{index:m,tab:()=>{var A;return(A=d.$refs[`tab-${m}`])==null?void 0:A[0]}}),null,16,["index","tab"])):(k(),be(nt(p),{key:1,index:m},null,8,["index"]))])],6)}),128)),i(wt,{modelValue:u(R).showLoreModal.value,"onUpdate:modelValue":c[0]||(c[0]=p=>u(R).showLoreModal.value=p)},{header:ve(()=>[g("h2",null,xe(u(R).loreTitle.value),1)]),body:ve(()=>[u(o)?(k(),be(nt(u(o)),{key:0})):L("",!0),u(R).loreScene.value!==-1?(k(),D("div",Td,[i(jr,{day:u(R).loreScene.value},null,8,["day"]),Fd,Ud,Rd,Od,qd])):L("",!0)]),_:1},8,["modelValue"])],2))}});var Gd=$e(Ld,[["__scopeId","data-v-248e2ebb"]]);const Zl=e=>(rl("data-v-4a50ce42"),e=e(),ul(),e),Qd={class:"game-over-modal-header"},$d=["src","alt"],Vd={class:"game-over-modal-title"},Hd=Zl(()=>g("h2",null,"Congratulations!",-1)),jd={key:0},Wd=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)),zd=Zl(()=>g("br",null,null,-1)),Kd=["href"],Xd=Zl(()=>g("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Yd=Ce({__name:"GameOverScreen",setup(e){const{title:t,logo:l,discordName:n,discordLink:o,versionNumber:r,versionTitle:d}=je,c=f(()=>Kl(ce.timePlayed)),p=f(()=>Ga.value&&!ce.keepGoing),m=Yt(ce,"autosave");function w(){ce.keepGoing=!0}function h(){Sl(Tl())}return(A,v)=>(k(),be(wt,{"model-value":u(p)},{header:ve(()=>[g("div",Qd,[u(l)?(k(),D("img",{key:0,class:"game-over-modal-logo",src:u(l),alt:u(t)},null,8,$d)):L("",!0),g("div",Vd,[Hd,g("h4",null,"You've beaten "+xe(u(t))+" v"+xe(u(r))+": "+xe(u(d)),1)])])]),body:ve(({shown:_})=>[_?(k(),D("div",jd,[g("div",null,"It took you "+xe(u(c))+" to beat the game.",1),Wd,Jd,zd,g("div",null,[g("a",{href:u(o),class:"game-over-modal-discord-link"},[Xd,s(" "+xe(u(n)),1)],8,Kd)]),i(ol,{title:"Autosave",modelValue:u(m),"onUpdate:modelValue":v[0]||(v[0]=N=>gt(m)?m.value=N:null)},null,8,["modelValue"])])):L("",!0)]),footer:ve(()=>[g("div",{class:"game-over-footer"},[g("button",{onClick:w,class:"button"},"Keep Going"),g("button",{onClick:h,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var Zd=$e(Yd,[["__scopeId","data-v-4a50ce42"]]);const ha=e=>(rl("data-v-3de07c06"),e=e(),ul(),e),ec=ha(()=>g("div",{class:"nan-modal-header"},[g("h2",null,"NaN value detected!")],-1)),tc={key:0},lc=ha(()=>g("br",null,null,-1)),ac=["href"],nc=ha(()=>g("span",{class:"material-icons nan-modal-discord"},"discord",-1)),ic=ha(()=>g("br",null,null,-1)),oc={class:"nan-footer"},sc=Ce({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:l}=je,n=Yt(ce,"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 ce.devSpeed===0},set(v){ce.devSpeed=v?null:0}});function w(){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(),D(S,null,[i(wt,Bl({modelValue:u(o),"onUpdate:modelValue":_[4]||(_[4]=N=>gt(o)?o.value=N:null)},v.$attrs),{header:ve(()=>[ec]),body:ve(()=>[g("div",null,[s(' Attempted to assign "'+xe(u(d))+'" to NaN',1),u(p)?(k(),D("span",tc,xe(" ")+"(previously "+xe(u(G)(u(p)))+")",1)):L("",!0),s(". Auto-saving has been "+xe(u(n)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),lc,g("div",null,[g("a",{href:u(l),class:"nan-modal-discord-link"},[nc,s(" "+xe(u(t)),1)],8,ac)]),ic,i(ol,{title:"Autosave",modelValue:u(n),"onUpdate:modelValue":_[0]||(_[0]=N=>gt(n)?n.value=N:null)},null,8,["modelValue"]),u(je).enablePausing?(k(),be(ol,{key:0,title:"Pause game",modelValue:u(m),"onUpdate:modelValue":_[1]||(_[1]=N=>gt(m)?m.value=N:null)},null,8,["modelValue"])):L("",!0)]),footer:ve(()=>[g("div",oc,[g("button",{onClick:_[2]||(_[2]=N=>{var P;return(P=r.value)==null?void 0:P.open()}),class:"button"},"Open Saves Manager"),g("button",{onClick:w,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(),D("button",{key:0,onClick:_[3]||(_[3]=N=>o.value=!1),class:"button"}," Set to previous ")):L("",!0),g("button",{onClick:A,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),i(Yn,{ref_key:"savesManager",ref:r},null,512)],64))}});var rc=$e(sc,[["__scopeId","data-v-3de07c06"]]);const uc={key:0,class:"tpsDisplay"},dc={key:0,class:"low"},cc=Ce({__name:"TPS",setup(e){const t=f(()=>a.div(rt.lastTenTicks.length,rt.lastTenTicks.reduce((r,d)=>r+d,0))),l=V([]);Lt(()=>{l.value.push(Math.round(t.value.toNumber())),l.value.length>10&&(l.value=l.value.slice(1))});const n=f(()=>l.value.reduce((r,d)=>a.max(r,d),0)),o=f(()=>a.sub(t.value,n.value).gt(1));return(r,d)=>u(t).isNan()?L("",!0):(k(),D("div",uc,[s(" TPS: "+xe(u(Z)(u(t)))+" ",1),i(pa,{name:"fade"},{default:ve(()=>[u(o)?(k(),D("span",dc,xe(u(Z)(u(n))),1)):L("",!0)]),_:1})]))}});var pc=$e(cc,[["__scopeId","data-v-46a3ed5b"]]);var mc=Ce({__name:"App",setup(e){const t=je.useHeader,l=f(()=>Ol[at.theme].variables),n=Yt(at,"showTPS"),o=f(()=>Qe(M(()=>i(S,null,[Uo.map(re)]))));return(r,d)=>(k(),D(S,null,[g("div",{id:"modal-root",style:ht(u(l))},null,4),g("div",{class:ct(["app",{useHeader:u(t)}]),style:ht(u(l))},[u(t)?(k(),be(Zn,{key:0})):L("",!0),i(Gd),u(u(n))?(k(),be(pc,{key:1})):L("",!0),i(Zd),i(rc),(k(),be(nt(u(o))))],6)],64))}});var vc=$e(mc,[["__scopeId","data-v-580927bb"]]);function fc(e={}){const{immediate:t=!1,onNeedRefresh:l,onOfflineReady:n,onRegistered:o,onRegisterError:r}=e;let d,c;const p=async(m=!0)=>{m&&(d==null||d.addEventListener("controlling",w=>{w.isUpdate&&window.location.reload()})),c&&c.waiting&&await hi(c.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){d=new gi("./sw.js",{scope:"./",type:"classic"}),d.addEventListener("activated",m=>{m.isUpdate||n==null||n()});{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 gc(e={}){const{immediate:t=!0,onNeedRefresh:l,onOfflineReady:n,onRegistered:o,onRegisterError:r}=e,d=V(!1),c=V(!1);return{updateServiceWorker:fc({immediate:t,onNeedRefresh(){d.value=!0,l==null||l()},onOfflineReady(){c.value=!0,n==null||n()},onRegistered:o,onRegisterError:r}),offlineReady:c,needRefresh:d}}document.title=je.title;window.projInfo=je;if(je.id==="")throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c
|
|
Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await Io();const{globalBus:e}=await ia(()=>Promise.resolve().then(function(){return vo}),void 0),{startGameLoop:t}=await ia(()=>import("./gameLoop.4c366b65.js"),["assets/gameLoop.4c366b65.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=di(vc);e.emit("setupVue",l),l.mount("#app"),Ml(()=>{const n=mn(),{updateServiceWorker:o}=gc({onNeedRefresh(){n.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(){n.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(r){r&&setInterval(()=>r.update(),60*60*1e3)}})}),t()});export{a as D,ia as _,rt as a,je as b,Ir as c,Xe as g,Ua as l,ce as p,at as s};
|