mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2024-11-23 17:01:49 +00:00
19 lines
232 KiB
JavaScript
19 lines
232 KiB
JavaScript
/* empty css */import"./vue.92681fcb.js";import{Z as f,l as nt,aa as ue,t as Q,ay as aa,ar as wl,aE as C,a0 as I,aK as qt,a1 as g,O as D,aG as Wl,A as vt,_ as ae,a8 as i,b6 as X,b8 as na,bs as tn,C as r,aq as Al,bu as Fl,bb as oa,T as Zn,a7 as c,u as ia,j as eo,bv as wa,q as Ql,b1 as jt,G as lt,aC as ln,w as Tt,b2 as Dt,ao as to,I as ot,J as fe,$ as T,aH as Zt,aF as el,z as Wt,aN as We,al as Jl,aL as cl,H as lo,aJ as an,bn as ao,br as no,be as oo}from"./@vue.4ce677c2.js";import{c as nn}from"./nanoevents.1080beb7.js";import{L as rl}from"./lz-string.731cedc5.js";import{i as io}from"./is-plain-object.906d88e8.js";import{Y as so}from"./vue-next-select.a2bfab1d.js";import{s as ro,u as on}from"./vue-toastification.6f567382.js";import{D as uo}from"./vuedraggable.7949458c.js";import{p as co}from"./vue-textarea-autosize.35804eaf.js";import{v as po,n as mo}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const go=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 s of o)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function l(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerpolicy&&(s.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?s.credentials="include":o.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(o){if(o.ep)return;o.ep=!0;const s=l(o);fetch(o.href,s)}};go();const fo="modulepreload",$a={},vo="./",Yl=function(t,l){return!l||l.length===0?t():Promise.all(l.map(n=>{if(n=`${vo}${n}`,n in $a)return;$a[n]=!0;const o=n.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${s}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":fo,o||(u.as="script",u.crossOrigin=""),u.href=n,document.head.appendChild(u),o)return new Promise((d,p)=>{u.addEventListener("load",d),u.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},ho="./projInfo-schema.json",yo="Advent Incremental",bo="An incremental game you play a day at a time, leading up to Christmas!",wo="advent-incremental",Ao="thepaperpilot and friends",Co="",ko="",_o="0.3",So="Initial Commit",Eo=!0,Bo=!1,No=2,Io=!0,Mo=null,Do="",xo=["main"],Po=3600,Uo=0,Fo=!0,Ro="base64";var Ie={$schema:ho,title:yo,description:bo,id:wo,author:Ao,discordName:Co,discordLink:ko,versionNumber:_o,versionTitle:So,allowGoBack:Eo,defaultShowSmall:Bo,defaultDecimalsShown:No,useHeader:Io,banner:Mo,logo:Do,initialTabs:xo,maxTickLength:Po,offlineLimit:Uo,enablePausing:Fo,exportEncoding:Ro};const fa=17,To=9e15,Oo=Math.log10(9e15),Qo=1/9e15,$o=308,Go=-324,Ga=5,Vo=function(){const e=[];for(let l=Go+1;l<=$o;l++)e.push(Number("1e"+l));const t=323;return function(l){return e[l+t]}}(),hl=[2,Math.E,3,4,5,6,7,8,9,10],qo=[[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]],Ho=[[-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]],b=function(t){return a.fromValue_noAlloc(t)},ie=function(e,t,l){return a.fromComponents(e,t,l)},ve=function(t,l,n){return a.fromComponents_noNormalize(t,l,n)},sl=function(t,l){const n=l+1,o=Math.ceil(Math.log10(Math.abs(t))),s=Math.round(t*Math.pow(10,n-o))*Math.pow(10,o-n);return parseFloat(s.toFixed(Math.max(n-o,0)))},va=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},Lo=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},sn=.5671432904097838,Va=function(e,t=1e-10){let l,n;if(!Number.isFinite(e)||e===0)return e;if(e===1)return sn;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 qa(e,t=1e-10){let l,n,o,s;if(!Number.isFinite(e.mag)||e===a.dZero)return e;if(e===a.dOne)return b(sn);a.abs(e),l=a.ln(e);for(let u=0;u<100;++u){if(n=a.exp(-l),o=l.sub(e.mul(n)),s=l.sub(o.div(l.add(1).sub(l.add(2).mul(o).div(a.mul(2,l).add(2))))),a.abs(s.sub(l)).lt(a.abs(s).mul(t)))return s;l=s}throw Error(`Iteration failed to converge: ${e.toString()}`)}const B=class{constructor(e){this.sign=Number.NaN,this.mag=Number.NaN,this.layer=Number.NaN,e instanceof B||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/Vo(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 B().fromComponents(e,t,l)}static fromComponents_noNormalize(e,t,l){return new B().fromComponents_noNormalize(e,t,l)}static fromMantissaExponent(e,t){return new B().fromMantissaExponent(e,t)}static fromMantissaExponent_noNormalize(e,t){return new B().fromMantissaExponent_noNormalize(e,t)}static fromDecimal(e){return new B().fromDecimal(e)}static fromNumber(e){return new B().fromNumber(e)}static fromString(e){return new B().fromString(e)}static fromValue(e){return new B().fromValue(e)}static fromValue_noAlloc(e){return e instanceof B?e:new B(e)}static abs(e){return b(e).abs()}static neg(e){return b(e).neg()}static negate(e){return b(e).neg()}static negated(e){return b(e).neg()}static sign(e){return b(e).sign}static sgn(e){return b(e).sign}static round(e){return b(e).round()}static floor(e){return b(e).floor()}static ceil(e){return b(e).ceil()}static trunc(e){return b(e).trunc()}static add(e,t){return b(e).add(t)}static plus(e,t){return b(e).add(t)}static sub(e,t){return b(e).sub(t)}static subtract(e,t){return b(e).sub(t)}static minus(e,t){return b(e).sub(t)}static mul(e,t){return b(e).mul(t)}static multiply(e,t){return b(e).mul(t)}static times(e,t){return b(e).mul(t)}static div(e,t){return b(e).div(t)}static divide(e,t){return b(e).div(t)}static recip(e){return b(e).recip()}static reciprocal(e){return b(e).recip()}static reciprocate(e){return b(e).reciprocate()}static cmp(e,t){return b(e).cmp(t)}static cmpabs(e,t){return b(e).cmpabs(t)}static compare(e,t){return b(e).cmp(t)}static isNaN(e){return e=b(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag)}static isFinite(e){return e=b(e),isFinite(e.sign)&&isFinite(e.layer)&&isFinite(e.mag)}static eq(e,t){return b(e).eq(t)}static equals(e,t){return b(e).eq(t)}static neq(e,t){return b(e).neq(t)}static notEquals(e,t){return b(e).notEquals(t)}static lt(e,t){return b(e).lt(t)}static lte(e,t){return b(e).lte(t)}static gt(e,t){return b(e).gt(t)}static gte(e,t){return b(e).gte(t)}static max(e,t){return b(e).max(t)}static min(e,t){return b(e).min(t)}static minabs(e,t){return b(e).minabs(t)}static maxabs(e,t){return b(e).maxabs(t)}static clamp(e,t,l){return b(e).clamp(t,l)}static clampMin(e,t){return b(e).clampMin(t)}static clampMax(e,t){return b(e).clampMax(t)}static cmp_tolerance(e,t,l){return b(e).cmp_tolerance(t,l)}static compare_tolerance(e,t,l){return b(e).cmp_tolerance(t,l)}static eq_tolerance(e,t,l){return b(e).eq_tolerance(t,l)}static equals_tolerance(e,t,l){return b(e).eq_tolerance(t,l)}static neq_tolerance(e,t,l){return b(e).neq_tolerance(t,l)}static notEquals_tolerance(e,t,l){return b(e).notEquals_tolerance(t,l)}static lt_tolerance(e,t,l){return b(e).lt_tolerance(t,l)}static lte_tolerance(e,t,l){return b(e).lte_tolerance(t,l)}static gt_tolerance(e,t,l){return b(e).gt_tolerance(t,l)}static gte_tolerance(e,t,l){return b(e).gte_tolerance(t,l)}static pLog10(e){return b(e).pLog10()}static absLog10(e){return b(e).absLog10()}static log10(e){return b(e).log10()}static log(e,t){return b(e).log(t)}static log2(e){return b(e).log2()}static ln(e){return b(e).ln()}static logarithm(e,t){return b(e).logarithm(t)}static pow(e,t){return b(e).pow(t)}static pow10(e){return b(e).pow10()}static root(e,t){return b(e).root(t)}static factorial(e,t){return b(e).factorial()}static gamma(e,t){return b(e).gamma()}static lngamma(e,t){return b(e).lngamma()}static exp(e){return b(e).exp()}static sqr(e){return b(e).sqr()}static sqrt(e){return b(e).sqrt()}static cube(e){return b(e).cube()}static cbrt(e){return b(e).cbrt()}static tetrate(e,t=2,l=ve(1,0,1)){return b(e).tetrate(t,l)}static iteratedexp(e,t=2,l=ve(1,0,1)){return b(e).iteratedexp(t,l)}static iteratedlog(e,t=10,l=1){return b(e).iteratedlog(t,l)}static layeradd10(e,t){return b(e).layeradd10(t)}static layeradd(e,t,l=10){return b(e).layeradd(t,l)}static slog(e,t=10){return b(e).slog(t)}static lambertw(e){return b(e).lambertw()}static ssqrt(e){return b(e).ssqrt()}static pentate(e,t=2,l=ve(1,0,1)){return b(e).pentate(t,l)}static affordGeometricSeries(e,t,l,n){return this.affordGeometricSeries_core(b(e),b(t),b(l),n)}static sumGeometricSeries(e,t,l,n){return this.sumGeometricSeries_core(e,b(t),b(l),n)}static affordArithmeticSeries(e,t,l,n){return this.affordArithmeticSeries_core(b(e),b(t),b(l),b(n))}static sumArithmeticSeries(e,t,l,n){return this.sumArithmeticSeries_core(b(e),b(t),b(l),b(n))}static efficiencyOfPurchase(e,t,l){return this.efficiencyOfPurchase_core(b(e),b(t),b(l))}static randomDecimalForTesting(e){if(Math.random()*20<1)return ve(0,0,0);const t=Math.random()>.5?1:-1;if(Math.random()*20<1)return ve(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)),ie(t,l,o)}static affordGeometricSeries_core(e,t,l,n){const o=t.mul(l.pow(n));return B.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(B.sub(1,l.pow(e))).div(B.sub(1,l))}static affordArithmeticSeries_core(e,t,l,n){const s=t.add(n.mul(l)).sub(l.div(2)),u=s.pow(2);return s.neg().add(u.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<Qo)return this.layer+=1,this.mag=Math.log10(this.mag),this;let e=Math.abs(this.mag),t=Math.sign(this.mag);if(e>=To)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e<Oo&&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]),y=t[1].split(";");let S=1;if(y.length===2&&(S=parseFloat(y[1]),isFinite(S)||(S=1)),isFinite(A)&&isFinite(v)){const x=B.pentate(A,v,S);return this.sign=x.sign,this.layer=x.layer,this.mag=x.mag,this}}const l=e.split("^^");if(l.length===2){const A=parseFloat(l[0]),v=parseFloat(l[1]),y=l[1].split(";");let S=1;if(y.length===2&&(S=parseFloat(y[1]),isFinite(S)||(S=1)),isFinite(A)&&isFinite(v)){const x=B.tetrate(A,v,S);return this.sign=x.sign,this.layer=x.layer,this.mag=x.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 y=B.pow(A,v);return this.sign=y.sign,this.layer=y.layer,this.mag=y.mag,this}}e=e.trim().toLowerCase();let o,s,u=e.split("pt");if(u.length===2){o=10,s=parseFloat(u[0]),u[1]=u[1].replace("(",""),u[1]=u[1].replace(")","");let A=parseFloat(u[1]);if(isFinite(A)||(A=1),isFinite(o)&&isFinite(s)){const v=B.tetrate(o,s,A);return this.sign=v.sign,this.layer=v.layer,this.mag=v.mag,this}}if(u=e.split("p"),u.length===2){o=10,s=parseFloat(u[0]),u[1]=u[1].replace("(",""),u[1]=u[1].replace(")","");let A=parseFloat(u[1]);if(isFinite(A)||(A=1),isFinite(o)&&isFinite(s)){const v=B.tetrate(o,s,A);return this.sign=v.sign,this.layer=v.layer,this.mag=v.mag,this}}const d=e.split("e"),p=d.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 y=m[1].charCodeAt(v);if(y>=43&&y<=57||y===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(d[0]);if(w===0)return this.sign=0,this.layer=0,this.mag=0,this;let h=parseFloat(d[d.length-1]);if(p>=2){const A=parseFloat(d[d.length-2]);isFinite(A)&&(h*=Math.sign(A),h+=va(A))}if(!isFinite(w))this.sign=d[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=B.mul(ie(1,2,h),b(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 B||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:sl(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:sl(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<=Ga?(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):sl(this.m,e)+"e"+sl(this.e,e):this.layer===1?sl(this.m,e)+"e"+sl(this.e,e):this.layer<=Ga?(this.sign===-1?"-":"")+"e".repeat(this.layer)+sl(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+sl(this.mag,e)}abs(){return ve(this.sign===0?0:1,this.layer,this.mag)}neg(){return ve(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?B.dZero:this.layer===0?ie(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?B.dZero:this.layer===0?ie(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?B.dZero:this.layer===0?ie(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?B.dZero:this.layer===0?ie(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=b(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 ve(0,0,0);let l,n;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(B.cmpabs(this,t)>0?(l=this,n=t):(l=t,n=this),l.layer===0&&n.layer===0)return b(l.sign*l.mag+n.sign*n.mag);const o=l.layer*Math.sign(l.mag),s=n.layer*Math.sign(n.mag);if(o-s>=2)return l;if(o===0&&s===-1){if(Math.abs(n.mag-Math.log10(l.mag))>fa)return l;{const u=Math.pow(10,Math.log10(l.mag)-n.mag),d=n.sign+l.sign*u;return ie(Math.sign(d),1,n.mag+Math.log10(Math.abs(d)))}}if(o===1&&s===0){if(Math.abs(l.mag-Math.log10(n.mag))>fa)return l;{const u=Math.pow(10,l.mag-Math.log10(n.mag)),d=n.sign+l.sign*u;return ie(Math.sign(d),1,Math.log10(n.mag)+Math.log10(Math.abs(d)))}}if(Math.abs(l.mag-n.mag)>fa)return l;{const u=Math.pow(10,l.mag-n.mag),d=n.sign+l.sign*u;return ie(Math.sign(d),1,n.mag+Math.log10(Math.abs(d)))}}plus(e){return this.add(e)}sub(e){return this.add(b(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=b(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return ve(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return ve(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 b(l.sign*n.sign*l.mag*n.mag);if(l.layer>=3||l.layer-n.layer>=2)return ie(l.sign*n.sign,l.layer,l.mag);if(l.layer===1&&n.layer===0)return ie(l.sign*n.sign,1,l.mag+Math.log10(n.mag));if(l.layer===1&&n.layer===1)return ie(l.sign*n.sign,1,l.mag+n.mag);if(l.layer===2&&n.layer===1){const o=ie(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ie(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return ie(l.sign*n.sign,o.layer+1,o.sign*o.mag)}if(l.layer===2&&n.layer===2){const o=ie(Math.sign(l.mag),l.layer-1,Math.abs(l.mag)).add(ie(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)));return ie(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=b(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?B.dNaN:this.layer===0?ie(this.sign,0,1/this.mag):ie(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=b(e);return this.sign>t.sign?1:this.sign<t.sign?-1:this.sign*this.cmpabs(e)}cmpabs(e){const t=b(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=b(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=b(e);return this.lt(t)?t:this}min(e){const t=b(e);return this.gt(t)?t:this}maxabs(e){const t=b(e);return this.cmpabs(t)<0?t:this}minabs(e){const t=b(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=b(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=b(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=va(o)),this.layer<l.layer&&(n=va(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=b(e);return!this.eq_tolerance(l,t)&&this.lt(l)}lte_tolerance(e,t){const l=b(e);return this.eq_tolerance(l,t)||this.lt(l)}gt_tolerance(e,t){const l=b(e);return!this.eq_tolerance(l,t)&&this.gt(l)}gte_tolerance(e,t){const l=b(e);return this.eq_tolerance(l,t)||this.gt(l)}pLog10(){return this.lt(B.dZero)?B.dZero:this.log10()}absLog10(){return this.sign===0?B.dNaN:this.layer>0?ie(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ie(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?B.dNaN:this.layer>0?ie(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):ie(this.sign,0,Math.log10(this.mag))}log(e){return e=b(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?B.dNaN:this.layer===0&&e.layer===0?ie(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):B.div(this.log10(),e.log10())}log2(){return this.sign<=0?B.dNaN:this.layer===0?ie(this.sign,0,Math.log2(this.mag)):this.layer===1?ie(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?ie(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):ie(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?B.dNaN:this.layer===0?ie(this.sign,0,Math.log(this.mag)):this.layer===1?ie(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?ie(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):ie(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=b(e),l=this,n=t;if(l.sign===0)return n.eq(0)?ve(1,0,1):l;if(l.sign===1&&l.layer===0&&l.mag===1)return l;if(n.sign===0)return ve(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:B.dNaN:o}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return B.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 ie(1,0,t);if(e.sign===0)return B.dOne;e=ve(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?ie(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?ie(-e.sign,e.layer+1,-e.mag):B.dOne}pow_base(e){return b(e).pow(this)}root(e){const t=b(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?B.exp(B.mul(this,B.ln(this).sub(1))):B.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(ve(1,0,24)))return b(Lo(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,s=1/o,u=t+s;if(u===t||(t=u,n=n*l,o=360*n,s=1/o,u=t-s,u===t))return B.exp(t);t=u,n=n*l,o=1260*n;let d=1/o;return t=t+d,n=n*l,o=1680*n,d=1/o,t=t-d,B.exp(t)}else return this.layer===1?B.exp(B.mul(this,B.ln(this).sub(1))):B.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?B.dOne:this.layer===0&&this.mag<=709.7?b(Math.exp(this.sign*this.mag)):this.layer===0?ie(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?ie(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):ie(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return b(Math.sqrt(this.sign*this.mag));if(this.layer===1)return ie(1,2,Math.log10(this.mag)-.3010299956639812);{const e=B.div(ve(this.sign,this.layer-1,this.mag),ve(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=ve(1,0,1)){if(e===1)return B.pow(this,t);if(e===0)return new B(t);if(this.eq(B.dOne))return B.dOne;if(this.eq(-1))return B.pow(this,t);if(e===Number.POSITIVE_INFINITY){const o=this.toNumber();if(o<=1.444667861009766&&o>=.06598803584531254){if(o>1.444667861009099)return new B(Math.E);const s=B.ln(this).neg();return s.lambertw().div(s)}else return o>1.444667861009766?new B(Number.POSITIVE_INFINITY):B.dNaN}if(this.eq(B.dZero)){let o=Math.abs((e+1)%2);return o>1&&(o=2-o),new B(o)}if(e<0)return B.iteratedlog(t,this,-e);t=b(t);const l=e;e=Math.trunc(e);const n=l-e;if(this.gt(B.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let o=0;o<e;++o){const s=t;if(t=this.pow(t),s.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(B.dOne)?this.gt(10)?t=this.pow(n):(t=b(B.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 ve(t.sign,t.layer+(e-o-1),t.mag);if(o>1e4)return t}return t}iteratedexp(e=2,t=ve(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return B.tetrate(e,-t,this);e=b(e);let l=b(this);const n=t;t=Math.trunc(t);const o=n-t;if(l.layer-e.layer>3){const s=Math.min(t,l.layer-e.layer-3);t-=s,l.layer-=s}for(let s=0;s<t;++s){if(l=l.log(e),!isFinite(l.layer)||!isFinite(l.mag))return l.normalize();if(s>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=b(e),e.lte(B.dZero)||e.eq(B.dOne))return B.dNaN;if(e.lt(B.dOne))return this.eq(B.dOne)?B.dZero:this.eq(B.dZero)?B.dNegOne:B.dNaN;if(this.mag<0||this.eq(B.dZero))return B.dNegOne;let t=0,l=b(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(B.dZero))l=B.pow(e,l),t-=1;else{if(l.lte(B.dOne))return b(t+B.slog_critical(e.toNumber(),l.toNumber()));t+=1,l=B.log(l,e)}return b(t)}static slog_critical(e,t){return e>10?t-1:B.critical_section(e,t,Ho)}static tetrate_critical(e,t){return B.critical_section(e,t,qo)}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 d=0;d<hl.length;++d)if(hl[d]==e){n=l[d][Math.floor(t)],o=l[d][Math.ceil(t)];break}else if(hl[d]<e&&hl[d+1]>e){const p=(e-hl[d])/(hl[d+1]-hl[d]);n=l[d][Math.floor(t)]*(1-p)+l[d+1][Math.floor(t)]*p,o=l[d][Math.ceil(t)]*(1-p)+l[d+1][Math.ceil(t)]*p;break}const s=t-Math.floor(t);return n*(1-s)+o*s}layeradd10(e){e=B.fromValue_noAlloc(e).toNumber();const t=b(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?B.tetrate(t,n):Number.isFinite(n)?n>=-1?B.log(B.tetrate(t,n+1),t):B.log(B.log(B.tetrate(t,n+2),t),t):B.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return b(Va(this.toNumber()));if(this.layer===0)return b(Va(this.sign*this.mag));if(this.layer===1)return qa(this);if(this.layer===2)return qa(this);if(this.layer>=3)return ve(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return ve(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=ve(1,0,1)){t=b(t);const l=e;e=Math.trunc(e);const n=l-e;n!==0&&(t.eq(B.dOne)?(++e,t=new B(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?b(Math.sin(this.sign*this.mag)):ve(0,0,0)}cos(){return this.mag<0?B.dOne:this.layer===0?b(Math.cos(this.sign*this.mag)):ve(0,0,0)}tan(){return this.mag<0?this:this.layer===0?b(Math.tan(this.sign*this.mag)):ve(0,0,0)}asin(){return this.mag<0?this:this.layer===0?b(Math.asin(this.sign*this.mag)):ve(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?b(Math.acos(this.toNumber())):this.layer===0?b(Math.acos(this.sign*this.mag)):ve(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?b(Math.atan(this.sign*this.mag)):b(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 B.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return B.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?ve(Number.NaN,Number.NaN,Number.NaN):B.ln(this.add(1).div(b(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(B.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=B;a.dZero=ve(0,0,0);a.dOne=ve(1,0,1);a.dNegOne=ve(-1,0,1);a.dTwo=ve(1,0,2);a.dTen=ve(1,0,10);a.dNaN=ve(Number.NaN,Number.NaN,Number.NaN);a.dInf=ve(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);a.dNegInf=ve(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);a.dNumberMax=ie(1,0,Number.MAX_VALUE);a.dNumberMin=ie(1,0,Number.MIN_VALUE);const jo=new a(1);function Pl(e,t,l=!0){let n=a.log10(e).floor(),o=a.div(e,a.pow(10,n));o.toStringWithDecimalPlaces(t)==="10"&&(o=jo,n=n.add(1));const s=n.gte(1e9)?de(n,Math.max(Math.max(t,3),Ie.defaultDecimalsShown)):n.gte(1e4)?Xl(n,0):n.toStringWithDecimalPlaces(0);return l?o.toStringWithDecimalPlaces(t)+"e"+s:"e"+s}function Xl(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 rn(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()),Ie.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const Wo=new a("eeee1000"),Ko=new a("e100000"),Ha=new a("e1000"),un=new a(1e9),zo=new a(1e6),Jo=new a(1e3),Yo=new a(.98),Xo=new a(.001),dn=new a(0);function de(e,t,l){if(t==null&&(t=Ie.defaultDecimalsShown),l=l!=null?l:Ie.defaultShowSmall,e=new a(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+de(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(Wo)){const n=e.slog();return n.gte(zo)?"F"+de(n.floor()):a.pow(10,n.sub(n.floor())).toStringWithDecimalPlaces(3)+"F"+Xl(n.floor(),0)}else{if(e.gte(Ko))return Pl(e,0,!1);if(e.gte(Ha))return Pl(e,0);if(e.gte(un))return Pl(e,t);if(e.gte(Jo))return Xl(e,0);if(e.gte(Xo)||!l)return rn(e,t);if(e.eq(dn))return 0 .toFixed(t)}return e=cn(e),e.lt(Ha)?Pl(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):de(e,t)+"\u207B\xB9"}function se(e){return e=new a(e),e.sign<0?"-"+se(e.neg()):e.gte(un)||e.lte(Yo)&&!e.eq(dn)?de(e):de(e,0)}function Ca(e,t){return t==null&&(t=Ie.defaultDecimalsShown),a.lt(e,0)?"-"+Ca(a.neg(e),t):a.gt(e,2**51)?de(a.div(e,31536e3))+"y":(e=new a(e).toNumber(),e<60?de(e)+"s":e<3600?se(Math.floor(e/60))+"m "+de(e%60,t)+"s":e<86400?se(Math.floor(e/3600))+"h "+se(Math.floor(e/60)%60)+"m "+se(e%60)+"s":e<31536e3?se(Math.floor(e/84600)%365)+"d "+se(Math.floor(e/3600)%24)+"h "+se(Math.floor(e/60)%60)+"m":se(Math.floor(e/31536e3))+"y "+se(Math.floor(e/84600)%365)+"d "+se(Math.floor(e/3600)%24)+"h")}function Zo(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 ei(e,t){return de(e,t,!0)}function cn(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 pn(e,t,l=a.dOne){let n=e[0][0],o=e[0][1];for(let s=1;s<e.length;s++)a.lt(e[s][0],n)&&(n=e[s][0],o=e[s][1]);return de(a.times(n,l))+t+", limited by "+o}function mn(e){return{[-1]:`${de(e)}/s`,0:"",1:`+${de(e)}/s`}[a.compare(e,0)]}var ti=Object.freeze(Object.defineProperty({__proto__:null,default:a,exponentialFormat:Pl,commaFormat:Xl,regularFormat:rn,format:de,formatWhole:se,formatTime:Ca,toPlaces:Zo,formatSmall:ei,invertOOM:cn,formatLimit:pn,formatGain:mn},Symbol.toStringTag,{value:"Module"}));const{exponentialFormat:li,commaFormat:ai,regularFormat:ni,format:le,formatWhole:re,formatTime:sa,toPlaces:oi,formatSmall:ii,formatLimit:gn,invertOOM:si,formatGain:Zl}=ti;window.Decimal=a;window.exponentialFormat=li;window.commaFormat=ai;window.regularFormat=ni;window.format=le;window.formatWhole=re;window.formatTime=sa;window.toPlaces=oi;window.formatSmall=ii;window.formatLimit=gn;window.invertOOM=si;window.formatGain=Zl;function fn(e){let t=e.replace(/([A-Z])/g," $1");return t=t.charAt(0).toUpperCase()+t.slice(1),t}function Aa(e){return typeof e=="function"}var ke=(e=>(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(ke||{});const Rl=Symbol("DoNotCache");function G(e,t){const l=e[t];Aa(l)&&l.length===0&&!l[Rl]?e[t]=f(l.bind(e)):Aa(l)&&(e[t]=l.bind(e),e[t][Rl]=!0)}function gt(e){return Aa(e)&&!e[Rl]&&(e=f(e)),e}const ml=Symbol("Component"),gl=Symbol("GatherProps");let ri=0;function Ml(e="feature-"){return e+ri++}var it=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(it||{});function N(e){return e[Rl]=!0,e}function M(e,t=2){return e?0:t}function ft(e,t,l){e[t]===void 0&&l!=null&&(e[t]=l)}function vn(e,...t){const l=[],n=o=>{Object.keys(o).forEach(s=>{const u=o[s];u&&typeof u=="object"&&(t.includes(u.type)?l.push(u):!(u instanceof a)&&!nt(u)&&n(u))})};return n(e),l}const yl={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 ka=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(ka||{}),$l={classic:yl,paper:{...yl,variables:{...yl.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:{...yl,variables:{...yl.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:{...yl,variables:{...yl.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};const Te=nn();document.fonts.onloadingdone=()=>Te.emit("fontsLoaded");var ui=Object.freeze(Object.defineProperty({__proto__:null,globalBus:Te},Symbol.toStringTag,{value:"Module"}));var Be=(e,t)=>{const l=e.__vccOpts||e;for(const[n,o]of t)l[n]=o;return l};const di=ue({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var w;const l=Q({}),n=new ResizeObserver(d),o=Q(null);aa(()=>{const h=o.value;h!=null&&n.observe(h)});let s=!0,u=Q((w=o.value)==null?void 0:w.getBoundingClientRect());function d(){s&&(s=!1,wl(()=>{var h;u.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),s=!0}))}Te.on("fontsLoaded",d);const p={attributes:!1,childList:!0,subtree:!1};Wl(_a,(h,A)=>{const v=new MutationObserver(()=>m(h));v.observe(A,p),l.value[h]={element:A,observer:v,rect:A.getBoundingClientRect()},d()}),Wl(Sa,h=>{var A;(A=l.value[h])==null||A.observer.disconnect(),l.value[h]=void 0,d()}),Wl(Ea,l),Wl(Ba,u);function m(h){const A=l.value[h];A!=null&&(A.rect=A.element.getBoundingClientRect(),t("updateNodes",l.value))}return(h,A)=>(C(),I(D,null,[qt(h.$slots,"default",{},void 0,!0),g("div",{ref_key:"resizeListener",ref:o,class:"resize-listener"},null,512)],64))}});var hn=Be(di,[["__scopeId","data-v-2b1dc1bc"]]);const ci=["onPointerdown"],pi={class:"modal-wrapper"},mi={class:"modal-container"},gi={class:"modal-header"},fi=c(" default header "),vi={class:"modal-body"},hi=c(" default body "),yi={class:"modal-footer"},bi=g("div",{class:"modal-default-flex-grow"},null,-1),ht=ue({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:l}){const o=vt(e),s=f(()=>o.modelValue||d.value);function u(){l("update:modelValue",!1)}const d=Q(!1),p=Q(null),m=f(()=>{var w,h;return(h=(w=p.value)==null?void 0:w.nodes)!=null?h:null});return t({isOpen:s,nodes:m}),(w,h)=>(C(),ae(Zn,{to:"#modal-root"},[i(oa,{name:"modal",onBeforeEnter:h[0]||(h[0]=A=>d.value=!0),onAfterLeave:h[1]||(h[1]=A=>d.value=!1)},{default:X(()=>[na(g("div",Al({class:"modal-mask",onPointerdown:Fl(u,["self"])},w.$attrs),[g("div",pi,[g("div",mi,[g("div",gi,[qt(w.$slots,"header",{shown:r(s)},()=>[fi])]),g("div",vi,[i(hn,{ref_key:"contextRef",ref:p},{default:X(()=>[qt(w.$slots,"body",{shown:r(s)},()=>[hi])]),_:3},512)]),g("div",yi,[qt(w.$slots,"footer",{shown:r(s)},()=>[g("div",{class:"modal-default-footer"},[bi,g("button",{class:"button modal-default-button",onClick:u}," Close ")])])])])])],16,ci),[[tn,e.modelValue]])]),_:3})]))}}),_a=Symbol("RegisterNode"),Sa=Symbol("UnregisterNode"),Ea=Symbol("Nodes"),Ba=Symbol("Bounds"),wt=ia({});window.layers=wt;const El={},$t=[];function xt(e,t){return _t(()=>{const l={},n=l.emitter=nn();if(l.on=n.on.bind(n),l.emit=n.emit.bind(n),l.nodes=Q({}),l.id=e,$t.push(e),El[e]=new Set,l.minimized=Ae(!1),Object.assign(l,t.call(l)),$t[$t.length-1]==null||$t[$t.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
|
|
Stack: ${$t}
|
|
Trying to pop ${l.id}`;return $t.pop(),G(l,"color"),G(l,"display"),G(l,"name"),ft(l,"name",l.id),G(l,"minWidth"),ft(l,"minWidth",600),G(l,"minimizable"),ft(l,"minimizable",!0),l})}function yn(e,t){if(console.info("Adding layer",e.id),wt[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,wt[e.id]);return}ft(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),wt[e.id]=e,Te.emit("addLayer",e,t.layers[e.id])}function wi(e){return wt[e]}function bn(e){console.info("Removing layer",e.id),Te.emit("removeLayer",e),wt[e.id]=void 0}function Ai(e){bn(e),yn(e,z)}function Ci(e){const t=Q(!1);return{openModal:()=>t.value=!0,modal:N(()=>i(ht,{modelValue:t.value,"onUpdate:modelValue":l=>t.value=l},{header:()=>i("h2",null,[r(e.name)]),body:r(e.display)}))}}Te.on("update",function(t){Object.values(wt).forEach(l=>{l==null||l.emit("preUpdate",t)}),Object.values(wt).forEach(l=>{l==null||l.emit("update",t)}),Object.values(wt).forEach(l=>{l==null||l.emit("postUpdate",t)})});var ki=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:_a,UnregisterNodeInjectionKey:Sa,NodesInjectionKey:Ea,BoundsInjectionKey:Ba,layers:wt,persistentRefs:El,addingLayers:$t,createLayer:xt,addLayer:yn,getLayer:wi,removeLayer:bn,reloadLayer:Ai,setupLayerModal:Ci},Symbol.toStringTag,{value:"Module"}));const Na=Symbol("PersistentState"),dl=Symbol("DefaultValue"),ea=Symbol("StackTrace"),wn=Symbol("Deleted"),Tl=Symbol("NonPersistent"),Ul=Symbol("SaveDataPath");function _i(){var e;return((e=new Error().stack)==null?void 0:e.split(`
|
|
`).slice(3,5).map(t=>t.trim()).join(`
|
|
`))||""}function Ae(e){const t=nt(e)?e:Q(e);t[Na]=t,t[dl]=nt(e)?e.value:e,t[ea]=_i(),t[wn]=!1;const l=f({get(){return t.value},set(n){t.value=n}});return l[dl]=t[dl],t[Tl]=l,t[Ul]=void 0,$t.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
|
|
Created at:
|
|
`+t[ea]):El[$t[$t.length-1]].add(t),t}function Si(e){return e&&typeof e=="object"&&Na in e}function F(e){return e[Tl]}Te.on("addLayer",(e,t)=>{const l=[],n=(o,s=[])=>{let u=!1;return Object.keys(o).forEach(d=>{let p=o[d];if(p&&typeof p=="object")if(Je in p&&(p=p[Je]),Si(p)){if(u=!0,p[wn]){console.warn("Deleted persistent ref present in returned object. Ignoring...",p,`
|
|
Created at:
|
|
`+p[ea]);return}El[e.id].delete(p);const m=[e.id,...s,d];p[Ul]!=null&&JSON.stringify(m)!==JSON.stringify(p[Ul])&&console.error(`Persistent ref is being saved to \`${m.join(".")}\` when it's already present at \`${p[Ul].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,p),p[Ul]=m;const w=s.reduce((A,v)=>(v in A||(A[v]={}),A[v]),t),h=w[d];w[d]=p[Na],eo(w)?h!=null?w[d]=h:w[d]=p[dl]:h!=null?w[d].value=h:w[d].value=p[dl]}else!(p instanceof a)&&!nt(p)&&!l.includes(p)&&(typeof p.type=="symbol"&&l.push(p),n(p,[...s,d])&&(wa(p)&&!wa(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.",Je in o?o[Je]:o,d):u=!0))}),u};n(e[Je]),El[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[ea])}),El[e.id].clear()});const Je=Symbol("ProxyState"),Sl=Symbol("ProxyPath");function _t(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(s,u){if(u===Je)return o();const d=o()[u];return d&&typeof d=="object"&&Tl in d?d[Tl]:d},set(s,u,d){return o()[u]=d,!0},has(s,u){return u===Je?!0:Reflect.has(o(),u)},ownKeys(){return Reflect.ownKeys(o())},getOwnPropertyDescriptor(s,u){return n||(Object.assign(l,e(l)),n=!0),Object.getOwnPropertyDescriptor(s,u)}})}var et=window.state=ia({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const An=Ql({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},usingLog:!1});function Cn(e){return JSON.stringify(e,(t,l)=>r(l))}const kn={get(e,t){var n;if(t===Je||t===Sl)return e[t];const l=e[Je][t];if(t!=="value"&&(io(l)||Array.isArray(l))){if(l!==((n=e[t])==null?void 0:n[Je])){const o=[...e[Sl],t];e[t]=new Proxy({[Je]:l,[Sl]:o},kn)}return e[t]}return l},set(e,t,l,n){if(!et.hasNaN&&(typeof l=="number"&&isNaN(l)||l instanceof a&&(isNaN(l.sign)||isNaN(l.layer)||isNaN(l.mag)))){const o=e[Je][t];if(!(typeof o=="number"&&isNaN(o)||o instanceof a&&(isNaN(o.sign)||isNaN(o.layer)||isNaN(o.mag))))throw An.autosave=!1,et.hasNaN=!0,et.NaNPath=[...e[Sl],t],et.NaNReceiver=n,console.error("Attempted to set NaN value",[...e[Sl],t],e[Je]),"Attempted to set NaN value. See above for details"}return e[Je][t]=l,!0},ownKeys(e){return Reflect.ownKeys(e[Je])},has(e,t){return Reflect.has(e[Je],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[Je],t)}};var z=window.player=new Proxy({[Je]:An,[Sl]:["player"]},kn);function _n(e={}){return Object.assign({id:`${Ie.id}-0`,name:"Default Save",tabs:Ie.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Ie.id,modVersion:Ie.versionNumber,layers:{}},e)}function Gt(e){const t=rl.compressToUTF16(Cn(e!=null?e:z[Je]));return localStorage.setItem((e!=null?e:z[Je]).id,t),t}async function Ei(){Ni();try{let e=localStorage.getItem(Ye.active);if(e==null){await bl(Bl());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=rl.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==Ie.id){await bl(Bl());return}t.id=Ye.active,await bl(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
|
|
`,e),await bl(Bl())}}function Bl(){const e=zl(),t=_n({id:e});return Gt(t),Ye.saves.push(e),t}function zl(){let e,t=0;do e=`${Ie.id}-${t++}`;while(localStorage.getItem(e));return e}const Ia=Q(!1);async function bl(e){console.info("Loading save",e),Ia.value=!0;const{layers:t,removeLayer:l,addLayer:n}=await Yl(()=>Promise.resolve().then(function(){return ki}),void 0),{fixOldSave:o,getInitialLayers:s}=await Yl(()=>Promise.resolve().then(function(){return yr}),void 0);for(const u in t){const d=t[u];d&&l(d)}s(e).forEach(u=>n(u,e)),e=_n(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,Ie.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Ie.versionNumber&&o(e.modVersion,e),Object.assign(z,e),Ye.active=z.id,Te.emit("onLoad")}setInterval(()=>{z.autosave&&Gt()},1e3);window.onbeforeunload=()=>{z.autosave&&Gt()};window.save=Gt;const Bi=window.hardReset=async()=>{await bl(Bl())},Ol=Ql({active:"",saves:[],showTPS:!0,theme:ka.Nordic,unthrottled:!1});jt(Ol,e=>{const t=rl.compressToUTF16(JSON.stringify(e));localStorage.setItem(Ie.id,t)},{deep:!0});var Ye=window.settings=Ol;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:ka.Nordic};Te.emit("loadSettings",e),Object.assign(Ol,e),Bi()};function Ni(){try{let e=localStorage.getItem(Ie.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=rl.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Ol,t)}Te.emit("loadSettings",Ol)}catch{}}const Sn=Ql([]);function Ii(e){Sn.push(e)}const En=Ql([]);function Mi(e){En.push(e)}const Di=Ql([]),xi={class:"table"},Bt=ue({__name:"Column",setup(e){const t=f(()=>$l[Ye.theme].mergeAdjacent);return(l,n)=>(C(),I("div",xi,[g("div",{class:lt(["col",{mergeAdjacent:r(t)}])},[qt(l.$slots,"default")],2)]))}}),Pi={class:"table"},Il=ue({__name:"Row",setup(e){const t=f(()=>$l[Ye.theme].mergeAdjacent);return(l,n)=>(C(),I("div",Pi,[g("div",{class:lt(["row",{mergeAdjacent:r(t)}])},[qt(l.$slots,"default")],2)]))}});function Ma(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!to(e)}function Ee(e,t="span"){return typeof e=="function"?ue({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),ue({template:e})):ue({render:()=>({})}):e}function Z(e){if(Xt(e))return typeof e=="function"?e():Ee(e);const t=e[ml];return i(t,e[gl](),null)}function ye(...e){let t;return i(Il,null,Ma(t=e.map(Z))?t:{default:()=>[t]})}function Ht(...e){let t;return i(Bt,null,Ma(t=e.map(Z))?t:{default:()=>[t]})}function Lt(e){if(Xt(e))return typeof e=="function"?e():typeof e=="string"?i(D,null,[e]):i(e,null,null);const t=e[ml];return i(t,e[gl](),null)}function Ui(...e){let t;return i(Bt,null,Ma(t=e.map(Lt))?t:{default:()=>[t]})}function Xt(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Rl]===!0}function Bn(e,t,l){const n=Q(null),o=Q(void 0);function s(p){n.value||(n.value=setInterval(d,250)),o.value=p,l&&(l.value=!0)}function u(){n.value&&(clearInterval(n.value),n.value=null),l&&(l.value=!1)}function d(){t&&t.value?t.value():e&&e.value&&e.value(o.value)}return ln(u),{start:s,stop:u,handleHolding:d}}function Fi(e,t){const l=f(()=>e.filter(n=>r(n.visibility)===it.Visible&&t(n)));return{firstFeature:f(()=>l.value[0]),collapsedContent:N(()=>Ht(...l.value.slice(1))),hasCollapsedContent:f(()=>l.value.length>1)}}function ta(e,t="div"){const l=Tt();return Dt(()=>{l.value=Ee(rt(e),t)}),l}function pl(e,t="div"){const l=Tt(null);return Dt(()=>{const n=rt(e);l.value=n==null?null:Ee(n,t)}),l}function Ri(e){return f(()=>rt(e))}function rt(e){return r(r(e))}function V(...e){return e.includes(Object)||e.push(Object),e}const ce=ue({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,l)=>(C(),I("div",{style:ot({width:e.width,height:e.height})},null,4))}});const Ti={},Oi={class:"notif"};function Qi(e,t){return C(),I("div",Oi,"!")}var La=Be(Ti,[["render",Qi],["__scopeId","data-v-66323fd4"]]);const ra=e=>(Zt("data-v-9de19f28"),e=e(),el(),e),$i={key:0,class:"day feature dontMerge opened"},Gi={class:"date"},Vi=c("Dec"),qi=ra(()=>g("br",null,null,-1)),Hi={class:"date"},Li=c("Dec"),ji=ra(()=>g("br",null,null,-1)),Wi=ra(()=>g("div",{class:"doors"},null,-1)),Ki={class:"date"},zi=c("Dec"),Ji=ra(()=>g("br",null,null,-1)),Yi={key:0,class:"material-icons lock"},Xi={key:1,class:"timer"},Zi={key:2,class:"timer"},es=ue({__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(j.day.value,l.day)&&new Date().getMonth()===11&&new Date().getDate()>=l.day);function o(){n.value&&t("unlockLayer")}return(s,u)=>e.opened.value?(C(),I("div",$i,[i(oa,{appear:"",name:"door"},{default:X(()=>[g("div",{class:"doors",onClick:u[0]||(u[0]=d=>t("openLayer"))},[g("div",Gi,[Vi,qi,c(fe(e.day),1)]),g("div",Hi,[Li,ji,c(fe(e.day),1)])])]),_:1}),g("div",{class:"icon",style:ot({backgroundImage:`url(${e.symbol})`})},null,4),g("div",{class:"lore",onClick:u[1]||(u[1]=d=>t("openLore"))},"?"),r(e.shouldNotify)?(C(),ae(La,{key:0})):T("",!0)])):(C(),I("div",{key:1,class:lt(["day feature dontMerge",{can:r(n),locked:!r(n),canOpen:r(n)}]),onClick:o},[Wi,g("div",Ki,[zi,Ji,c(fe(e.day),1)]),r(n)?T("",!0):(C(),I("div",Yi,"lock")),r(j).day.value===e.day&&!r(n)?(C(),I("div",Xi,fe(r(Ca)(r(j).timeUntilNewDay.value,0)),1)):r(j).day.value===e.day&&e.layer==null?(C(),I("div",Zi,"NYI")):T("",!0),r(n)?(C(),ae(La,{key:3})):T("",!0)],2))}});var ts=Be(es,[["__scopeId","data-v-9de19f28"]]);const ls=ue({__name:"Collapsible",props:{collapsed:null,display:null,content:null},setup(e){const t=e,l=ta(Wt(t,"display")),n=ta(Wt(t,"content"));return(o,s)=>(C(),ae(Bt,{class:"collapsible-container"},{default:X(()=>[g("button",{onClick:s[0]||(s[0]=u=>e.collapsed.value=!e.collapsed.value),class:"feature collapsible-toggle"},[(C(),ae(We(r(l))))]),e.collapsed.value?T("",!0):(C(),ae(We(r(n)),{key:0}))]),_:1}))}});var as=Be(ls,[["__scopeId","data-v-a72c16aa"]]);const ns={key:0},os={key:0,class:"mark star"},is=["src"],ss=ue({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,l)=>e.mark?(C(),I("div",ns,[e.mark===!0?(C(),I("div",os)):(C(),I("img",{key:1,class:"mark",src:e.mark},null,8,is))])):T("",!0)}});var ua=Be(ss,[["__scopeId","data-v-2207999f"]]);const rs=ue({__name:"Node",props:{id:null},setup(e){const l=vt(e),n=Jl(_a,()=>{}),o=Jl(Sa,()=>{}),s=Tt(null),u=f(()=>s.value&&s.value.parentElement);return jt([u,l.id],([d,p],[m,w])=>{m&&o(r(w)),d&&n(p,d)}),ln(()=>o(r(l.id))),(d,p)=>(C(),I("div",{class:"node",ref_key:"node",ref:s},null,512))}});var Gl=Be(rs,[["__scopeId","data-v-a48cb382"]]);const us=ue({props:{progress:{type:V(String,Object,Number),required:!0},width:{type:V(Number),required:!0},height:{type:V(Number),required:!0},direction:{type:V(String),required:!0},display:V(Object,String,Function),visibility:{type:V(Number),required:!0},style:V(Object,String,Array),classes:V(Object),borderStyle:V(Object,String,Array),textStyle:V(Object,String,Array),baseStyle:V(Object,String,Array),fillStyle:V(Object,String,Array),mark:V(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:ua,Node:Gl},setup(e){const{progress:t,width:l,height:n,direction:o,display:s}=vt(e),u=f(()=>{let m=t.value instanceof a?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(m,0),1))*100}),d=f(()=>{const m={width:rt(l)+.5+"px",height:rt(n)+.5+"px"};switch(r(o)){case ke.Up:m.clipPath=`inset(${u.value}% -2px -2px -2px)`,m.width=rt(l)+2+"px";break;case ke.Down:m.clipPath=`inset(-2px -2px ${u.value}% -2px)`,m.width=rt(l)+2+"px";break;case ke.Right:m.clipPath=`inset(-2px ${u.value}% -2px -2px)`;break;case ke.Left:m.clipPath=`inset(-2px -2px -2px ${u.value} + '%)`;break;case ke.Default:m.clipPath="inset(-2px 50% -2px -2px)";break}return m}),p=pl(s);return{normalizedProgress:u,barStyle:d,component:p,unref:r,Visibility:it}}});function ds(e,t,l,n,o,s){var p,m,w,h,A,v,y;const u=cl("MarkNode"),d=cl("Node");return e.unref(e.visibility)!==e.Visibility.None?(C(),I("div",{key:0,style:ot([{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:lt({bar:!0,...e.unref(e.classes)})},[g("div",{class:"overlayTextContainer border",style:ot([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(m=e.unref(e.borderStyle))!=null?m:{}])},[e.component?(C(),I("span",{key:0,class:"overlayText",style:ot(e.unref(e.textStyle))},[(C(),ae(We(e.component)))],4)):T("",!0)],4),g("div",{class:"border",style:ot([{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:ot([e.barStyle,(v=e.unref(e.style))!=null?v:{},(y=e.unref(e.fillStyle))!=null?y:{}])},null,4)],4),i(u,{mark:e.unref(e.mark)},null,8,["mark"]),i(d,{id:e.id},null,8,["id"])],6)):T("",!0)}var cs=Be(us,[["render",ds],["__scopeId","data-v-730cc7a0"]]);const ps=Symbol("Bar");function Yt(e){return _t(()=>{const t=e();return t.id=Ml("bar-"),t.type=ps,t[ml]=cs,G(t,"visibility"),ft(t,"visibility",it.Visible),G(t,"width"),G(t,"height"),G(t,"direction"),G(t,"style"),G(t,"classes"),G(t,"borderStyle"),G(t,"baseStyle"),G(t,"textStyle"),G(t,"fillStyle"),G(t,"progress"),G(t,"display"),G(t,"mark"),t[gl]=function(){const{progress:l,width:n,height:o,direction:s,display:u,visibility:d,style:p,classes:m,borderStyle:w,textStyle:h,baseStyle:A,fillStyle:v,mark:y,id:S}=this;return{progress:l,width:n,height:o,direction:s,display:u,visibility:d,style:r(p),classes:m,borderStyle:w,textStyle:h,baseStyle:A,fillStyle:v,mark:y,id:S}},t})}var ms=ue({props:{display:{type:V(Object,String,Function),required:!0},visibility:{type:V(Number),required:!0},style:V(Object,String,Array),classes:V(Object),onClick:Function,onHold:Function,canClick:{type:V(Boolean),required:!0},small:Boolean,mark:V(Boolean,String),id:{type:String,required:!0},isHolding:Object},components:{Node:Gl,MarkNode:ua},setup(e){const{display:t,onClick:l,onHold:n}=vt(e),o=Tt("");Dt(()=>{const d=rt(t);if(d==null){o.value="";return}if(Xt(d)){o.value=Ee(d);return}const p=Ee(d.title||"","h3"),m=Ee(d.description,"div");o.value=Ee(N(()=>i("span",null,[d.title?i("div",null,[i(p,null,null)]):null,i(m,null,null)])))});const{start:s,stop:u}=Bn(l,n,e.isHolding);return{start:s,stop:u,comp:o,Visibility:it,unref:r}}});function gs(e,t,l,n,o,s){var p;const u=cl("MarkNode"),d=cl("Node");return e.unref(e.visibility)!==e.Visibility.None?(C(),I("button",{key:0,style:ot([{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:lt({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)?(C(),ae(We(e.unref(e.comp)),{key:0})):T("",!0),i(u,{mark:e.unref(e.mark)},null,8,["mark"]),i(d,{id:e.id},null,8,["id"])],38)):T("",!0)}var Nn=Be(ms,[["render",gs],["__scopeId","data-v-8cedd7da"]]);const fs=Symbol("Clickable");function Mt(e){return _t(()=>{var l;const t=(l=e==null?void 0:e())!=null?l:{};if(t.id=Ml("clickable-"),t.type=fs,t[ml]=Nn,t.isHolding=Q(!1),G(t,"visibility"),ft(t,"visibility",it.Visible),G(t,"canClick"),ft(t,"canClick",!0),G(t,"classes"),G(t,"style"),G(t,"mark"),G(t,"display"),t.onClick){const n=t.onClick.bind(t);t.onClick=function(o){r(t.canClick)&&n(o)}}if(t.onHold){const n=t.onHold.bind(t);t.onHold=function(){r(t.canClick)&&n()}}return t[gl]=function(){const{display:n,visibility:o,style:s,classes:u,onClick:d,onHold:p,isHolding:m,canClick:w,small:h,mark:A,id:v}=this;return{display:n,visibility:o,style:r(s),classes:u,onClick:d,onHold:p,isHolding:m,canClick:w,small:h,mark:A,id:v}},t})}function tt(e,t="points",l=0,n=void 0){const o=nt(e)?e:Ae(e);if(o.displayName=t,o.precision=l,o.small=n,!nt(e)){const s=o[Tl];s.displayName=t,s.precision=l,s.small=n}return o}function ja(e){const t=Ae(e.value);return jt(e,l=>{Ia.value||a.gt(l,t.value)&&(t.value=l)}),t}function vs(e){const t=Ae(e.value);return jt(e,(l,n)=>{Ia.value||a.gt(l,n)&&(t.value=a.add(t.value,a.sub(l,n)))}),t}new a("10^^8");new a("1e100");function Vl(e,t){const l=t!=null?t:e.value;return a.eq(e.precision,0)?re(e.small?l:a.floor(l)):le(l,e.precision,e.small)}const hs=["x1","y1","x2","y2"],ys=ue({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const l=vt(e),n=f(()=>{const s=l.startNode.value.rect,u=l.boundingRect.value,d=u?{x:s.x+s.width/2-u.x,y:s.y+s.height/2-u.y}:{x:0,y:0};return l.link.value.offsetStart&&(d.x+=l.link.value.offsetStart.x,d.y+=l.link.value.offsetStart.y),d}),o=f(()=>{const s=l.endNode.value.rect,u=l.boundingRect.value,d=u?{x:s.x+s.width/2-u.x,y:s.y+s.height/2-u.y}:{x:0,y:0};return l.link.value.offsetEnd&&(d.x+=l.link.value.offsetEnd.x,d.y+=l.link.value.offsetEnd.y),d});return(s,u)=>(C(),I("line",Al({"stroke-width":"15px",stroke:"white"},e.link,{x1:r(n).x,y1:r(n).y,x2:r(o).x,y2:r(o).y}),null,16,hs))}});const bs=ue({__name:"Links",props:{links:null},setup(e){var p;const l=Wt(e,"links"),n=Q(null),o=Jl(Ea,Q({})),s=Jl(Ba,Q(void 0)),u=Q((p=n.value)==null?void 0:p.getBoundingClientRect());jt(s,()=>{var m;return u.value=(m=n.value)==null?void 0:m.getBoundingClientRect()}),aa(()=>{var m;return u.value=(m=n.value)==null?void 0:m.getBoundingClientRect()});const d=f(()=>{var w,h;const m=o.value;return(h=(w=l.value)==null?void 0:w.filter(A=>{var v,y;return((v=m[A.startNode.id])==null?void 0:v.rect)&&((y=m[A.startNode.id])==null?void 0:y.rect)}))!=null?h:[]});return(m,w)=>(C(),I(D,null,[r(d)?(C(),I("svg",lo(Al({key:0},m.$attrs)),[(C(!0),I(D,null,an(r(d),(h,A)=>(C(),ae(ys,{key:A,link:h,boundingRect:u.value,startNode:r(o)[h.startNode.id],endNode:r(o)[h.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):T("",!0),g("div",{ref_key:"resizeListener",ref:n,class:"resize-listener"},null,512)],64))}});var ws=Be(bs,[["__scopeId","data-v-063f6d6b"]]);ue({props:{nodes:{type:V(Array),required:!0},leftSideNodes:V(Array),rightSideNodes:V(Array),branches:V(Array)},components:{Links:ws},setup(e){const{nodes:t,leftSideNodes:l,rightSideNodes:n}=vt(e),o=Tt();Dt(()=>{const d=rt(t);o.value=Ee(N(()=>i(D,null,[d.map(p=>i("span",{class:"row tree-row",style:"margin: 50px auto;"},[p.map(Lt)]))])))});const s=Tt();Dt(()=>{const d=rt(l);s.value=d?Ee(N(()=>i("span",{class:"left-side-nodes small"},[d.map(Lt)]))):""});const u=Tt();return Dt(()=>{const d=rt(n);u.value=d?Ee(N(()=>i("span",{class:"side-nodes small"},[d.map(Lt)]))):""}),{unref:r,nodesComp:o,leftNodesComp:s,rightNodesComp:u}}});ue({props:{display:V(Object,String,Function),visibility:{type:V(Number),required:!0},style:V(String,Object,Array),classes:V(Object),onClick:Function,onHold:Function,color:V(String),glowColor:V(String),canClick:{type:V(Boolean),required:!0},mark:V(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:ua,Node:Gl},setup(e){const{onClick:t,onHold:l,display:n}=vt(e),o=pl(n),{start:s,stop:u}=Bn(t,l);return{start:s,stop:u,comp:o,unref:r,Visibility:it,isCoercableComponent:Xt}}});function tl(e){const t=[],l={};let n=!1;function o(){return n||(t.push(...e()),l.base=t.map(d=>gt(d.base)),l.baseText=t.map(d=>gt(d.baseText)),l.visible=t.map(d=>gt(d.visible)),n=!0),t}const s=Ae({});return[N(()=>{const d=o();let p=!0;const m=d.map((w,h)=>{var S,x,W;if(r(l.visible[h])===!1)return null;const A=i("h3",{onClick:()=>s.value[h]=!s.value[h],style:"cursor: pointer"},[i("span",{class:"modifier-toggle"+(r(s.value[h])?" collapsed":"")},[c("\u25BC")]),w.title,w.subtitle?i("span",{class:"subtitle"},[c(" ("),w.subtitle,c(")")]):null]),v=r(s.value[h])?null:i(D,null,[i("div",{class:"modifier-container"},[i("span",{class:"modifier-description"},[Lt((S=r(l.baseText[h]))!=null?S:"Base")]),i("span",{class:"modifier-amount"},[le((x=r(l.base[h]))!=null?x:1),w.unit])]),Lt(r(w.modifier.description))]),y=!p;return p=!1,i(D,null,[y?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"},[c("Total")]),i("span",{class:"modifier-amount"},[le(w.modifier.apply((W=r(l.base[h]))!=null?W:1)),w.unit])])])])});return i(D,null,[m])}),s]}function la(e){const t=Object.values(e).reverse(),l=Ae(!0),n=f(()=>t.filter(p=>p.earned.value===!1)),{firstFeature:o,collapsedContent:s,hasCollapsedContent:u}=Fi(t,p=>p.earned.value),d=N(()=>{const p=[...n.value];return o.value&&p.push(o.value),Ui(...p,N(()=>na(i(as,{collapsed:l,content:s,display:l.value?"Show other completed milestones":"Hide other completed milestones"},null),[[tn,r(u)]])))});return{collapseMilestones:l,display:d}}function ll(e){const t=e.ignoreTotal?e.resource:vs(e.resource),l=()=>{var d,p;if(j.day.value!==e.day)return 1;let s=a.add(t.value,1),u=e.goal;return((p=(d=e.usingLog)==null?void 0:d.value)!=null?p:z.usingLog)&&(s=s.log10(),u=a.log10(u)),a.div(s,u)},n=Yt(()=>({direction:ke.Right,width:600,height:25,fillStyle:{backgroundColor:e.color},textStyle:e.textColor?{color:e.textColor}:void 0,progress:l,display:N(()=>j.day.value===e.day?i(D,null,[se(t.value),c("/"),se(e.goal)]):"")})),o=N(()=>i(D,null,[i("div",null,[j.day.value===e.day?i(D,null,[c("Reach "),se(e.goal),c(" "),e.ignoreTotal?"":"total ",e.resource.displayName,c(" to complete the day")]):i(D,null,[e.name,c(" Complete!")]),e.modal?i(D,null,[" ",c("-")," ",i("button",{class:"button",style:"display: inline-block;",onClick:()=>e.modal.show.value=!0},[c("Check Modifiers")])]):void 0]),Z(n),e.modal?Z(e.modal.display):void 0]));return Dt(()=>{j.day.value===e.day&&a.gte(t.value,e.goal)&&j.completeDay()}),{total:t,trackerDisplay:o}}function Vt(e){var u;const t=(u=e.style)!=null?u:{minHeight:"20px",width:"40px",color:"var(--foreground)"},l=Mt(()=>({display:"0",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=0}})),n=Mt(()=>({display:"-",style:t,canClick(){return a.gt(e.active.value,0)},onClick(){e.active.value=a.sub(e.active.value,1)}})),o=Mt(()=>({display:"+",style:t,canClick(){return a.lt(e.active.value,e.buyable.amount.value)},onClick(){e.active.value=a.add(e.active.value,1)}})),s=Mt(()=>({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:s}}const As=Symbol("Buyable");function Se(e){const t=Ae(0);return _t(()=>{var s,u,d;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=Ml("buyable-"),l.type=As,l[ml]=Nn,l.amount=t,l.amount[dl]=(s=l.initialValue)!=null?s:0,l.canAfford=f(()=>{const p=l,m=r(p.cost);return p.resource!=null&&m!=null&&a.gte(p.resource.value,m)}),l.canPurchase==null&&(l.canPurchase=f(()=>r(l.visibility)===it.Visible&&r(l.canAfford)&&a.lt(l.amount.value,r(l.purchaseLimit)))),l.maxed=f(()=>a.gte(l.amount.value,r(l.purchaseLimit))),G(l,"classes");const n=l.classes;l.classes=f(()=>{const p=r(n)||{};return l.maxed.value&&(p.bought=!0),p}),G(l,"canPurchase"),l.canClick=l.canPurchase,l.onClick=l.purchase=(d=(u=l.onClick)!=null?u:l.purchase)!=null?d:function(){var w;const p=l;if(!r(p.canPurchase))return;const m=r(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)},G(l,"display");const o=l.display;return l.display=N(()=>{const p=r(o);if(Xt(p)){const m=Ee(p);return i(m,null,null)}if(p!=null&&l.cost!=null&&l.resource!=null){const m=l,w=Ee(p.title||"","h3"),h=Ee(p.description||""),A=Ee(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),r(m.purchaseLimit)===a.dInf?i(D,null,[c("Amount: "),re(m.amount.value)]):i(D,null,[c("Amount: "),re(m.amount.value),c(" /")," ",re(r(m.purchaseLimit))])]),p.effectDisplay?i("div",null,[i("br",null,null),c("Currently: "),i(A,null,null)]):null,m.cost&&!m.maxed.value?i("div",null,[c("Cost: "),le(r(m.cost)||0)," ",l.resource.displayName]):null])}return""}),G(l,"visibility"),ft(l,"visibility",it.Visible),G(l,"cost"),G(l,"resource"),G(l,"purchaseLimit"),ft(l,"purchaseLimit",a.dInf),G(l,"style"),G(l,"mark"),G(l,"small"),l[gl]=function(){const{display:p,visibility:m,style:w,classes:h,onClick:A,canClick:v,small:y,mark:S,id:x}=this;return{display:p,visibility:m,style:r(w),classes:h,onClick:A,canClick:v,small:y,mark:S,id:x}},l})}const da=ia({}),Da=Symbol("Hotkey");function Nl(e){return _t(()=>{const t=e();return t.type=Da,G(t,"enabled"),ft(t,"enabled",!0),G(t,"description"),t})}Te.on("addLayer",e=>{vn(e,Da).forEach(t=>{da[t.key]=t})});Te.on("removeLayer",e=>{vn(e,Da).forEach(t=>{da[t.key]=void 0})});document.onkeydown=function(e){var n;if(((n=e.target)==null?void 0:n.tagName)==="INPUT"||Ua.value&&!z.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const l=da[t];l&&r(l.enabled)&&(e.preventDefault(),l.onPress())};Mi(N(()=>{const e=Object.values(da).filter(t=>r(t==null?void 0:t.enabled));return e.length===0?"":i("div",null,[i("br",null,null),i("h4",null,[c("Hotkeys")]),e.map(t=>i("div",null,[t==null?void 0:t.key,c(": "),t==null?void 0:t.description]))])}));const Cs=ue({__name:"Sticky",setup(e){const t=Q("0"),l=new ResizeObserver(o),n=Tt(null);function o(){let s=n.value;if(s==null)return;let u=0;for(;s.previousSibling;){const d=s.previousSibling;d.dataset&&"vSticky"in d.dataset&&(u+=d.offsetHeight),s=d}t.value=u+"px"}return wl(o),document.fonts.ready.then(o),aa(()=>{var u;const s=(u=n.value)==null?void 0:u.parentElement;s&&l.observe(s)}),(s,u)=>(C(),I("div",{class:"sticky",style:ot({top:t.value}),ref_key:"element",ref:n,"data-v-sticky":""},[qt(s.$slots,"default",{},void 0,!0)],4))}});var ks=Be(Cs,[["__scopeId","data-v-cccac690"]]);const Wa=ue({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,l=f(()=>Vl(t.resource));return(n,o)=>(C(),I("h2",{style:ot({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},fe(r(l)),5))}});const _s={class:"main-display"},Ss={key:0},Es={key:1},Bs=c(", "),Ns={key:2},Is=g("br",null,null,-1),Ms={class:"main-display"},Ds={key:0},xs={key:1},Ps=c(", "),Us={key:2},Fs=g("br",null,null,-1),kt=ue({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null,productionDisplay:null,sticky:{type:Boolean,default:!0}},setup(e){const l=vt(e),n=Q(null),o=pl(l.effectDisplay),s=Q(null),u=pl(l.productionDisplay),d=f(()=>a.lt(l.resource.value,"1e1000"));return(p,m)=>{var w,h;return e.sticky?(C(),ae(ks,{key:0},{default:X(()=>{var A,v,y,S;return[g("div",{class:lt(["main-display-container",(A=e.classes)!=null?A:{}]),style:ot([{"min-height":`${((y=(v=n.value)==null?void 0:v.$el.clientHeight)!=null?y:0)+50}px`},(S=e.style)!=null?S:{}])},[g("div",_s,[r(d)?(C(),I("span",Ss,"You have ")):T("",!0),i(Wa,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),c(" "+fe(e.resource.displayName),1),r(o)?(C(),I("span",Es,[Bs,(C(),ae(We(r(o)),{ref_key:"effectRef",ref:n},null,512))])):T("",!0),r(u)?(C(),I("span",Ns,[Is,(C(),ae(We(r(u)),{ref_key:"productionRef",ref:s},null,512))])):T("",!0)])],6)]}),_:1})):(C(),I("div",{key:1,class:lt(["main-display-container",(w=e.classes)!=null?w:{}]),style:ot([{"min-height":"50px"},(h=e.style)!=null?h:{}])},[g("div",Ms,[r(d)?(C(),I("span",Ds,"You have ")):T("",!0),i(Wa,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),c(" "+fe(e.resource.displayName),1),r(o)?(C(),I("span",xs,[Ps,(C(),ae(We(r(o)),{ref_key:"effectRef",ref:n},null,512))])):T("",!0),r(u)?(C(),I("span",Us,[Fs,(C(),ae(We(r(u)),{ref_key:"productionRef",ref:s},null,512))])):T("",!0)])],6))}}});var Rs=ue({props:{display:{type:V(String,Object,Function),required:!0},visibility:{type:V(Number),required:!0},style:V(String,Object,Array),classes:V(Object),resource:Object,cost:V(String,Object,Number),canPurchase:{type:V(Boolean),required:!0},bought:{type:V(Boolean),required:!0},mark:V(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:Gl,MarkNode:ua},setup(e){const{display:t,cost:l}=vt(e),n=Tt("");return Dt(()=>{const o=rt(t);if(o==null){n.value="";return}if(Xt(o)){n.value=Ee(o);return}const s=rt(l),u=Ee(o.title||"","h3"),d=Ee(o.description,"div"),p=Ee(o.effectDisplay||"");n.value=Ee(N(()=>{var m;return i("span",null,[o.title?i("div",null,[i(u,null,null)]):null,i(d,null,null),o.effectDisplay?i("div",null,[c("Currently: "),i(p,null,null)]):null,e.resource!=null&&o.showCost!==!1?i(D,null,[i("br",null,null),c("Cost: "),e.resource&&Vl(e.resource,s)," ",(m=e.resource)==null?void 0:m.displayName]):null])}))}),{component:n,unref:r,Visibility:it}}});const Ts=["disabled"];function Os(e,t,l,n,o,s){var p;const u=cl("MarkNode"),d=cl("Node");return e.unref(e.visibility)!==e.Visibility.None?(C(),I("button",{key:0,style:ot([{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:lt({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)?(C(),ae(We(e.unref(e.component)),{key:0})):T("",!0),i(u,{mark:e.unref(e.mark)},null,8,["mark"]),i(d,{id:e.id},null,8,["id"])],14,Ts)):T("",!0)}var Qs=Be(Rs,[["render",Os],["__scopeId","data-v-7f411ac8"]]);const $s=Symbol("Upgrade");function R(e){const t=Ae(!1);return _t(()=>{const l=e();return l.id=Ml("upgrade-"),l.type=$s,l[ml]=Qs,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,r(n.cost))}):G(l,"canAfford"),l.canPurchase=f(()=>r(l.visibility)===it.Visible&&r(l.canAfford)&&!r(l.bought)),l.purchase=function(){var o;const n=l;!r(n.canPurchase)||(n.resource!=null&&n.cost!=null&&(n.resource.value=a.sub(n.resource.value,r(n.cost))),t.value=!0,(o=n.onPurchase)==null||o.call(n))},G(l,"visibility"),ft(l,"visibility",it.Visible),G(l,"classes"),G(l,"style"),G(l,"display"),G(l,"mark"),G(l,"cost"),G(l,"resource"),l[gl]=function(){const{display:n,visibility:o,style:s,classes:u,resource:d,cost:p,canPurchase:m,bought:w,mark:h,id:A,purchase:v}=this;return{display:n,visibility:o,style:r(s),classes:u,resource:d,cost:p,canPurchase:m,bought:w,mark:h,id:A,purchase:v}},l})}function J(e){return _t(()=>{const{addend:t,description:l,enabled:n}=e(),o=gt(t),s=gt(l),u=n==null?void 0:gt(n);return{apply:d=>a.add(d,r(o)),revert:d=>a.sub(d,r(o)),enabled:u,description:l==null?void 0:N(()=>i("div",{class:"modifier-container"},[r(s)?i("span",{class:"modifier-description"},[Lt(r(s))]):null,i("span",{class:"modifier-amount"},[a.gte(r(o),0)?"+":"",le(r(o))])]))}})}function k(e){return _t(()=>{const{multiplier:t,description:l,enabled:n}=e(),o=gt(t),s=gt(l),u=n==null?void 0:gt(n);return{apply:d=>a.times(d,r(o)),revert:d=>a.div(d,r(o)),enabled:u,description:l==null?void 0:N(()=>i("div",{class:"modifier-container"},[r(s)?i("span",{class:"modifier-description"},[Lt(r(s))]):null,i("span",{class:"modifier-amount"},[c("\xD7"),le(r(o))])]))}})}function In(e){return _t(()=>{const{exponent:t,description:l,enabled:n,supportLowNumbers:o}=e(),s=gt(t),u=gt(l),d=n==null?void 0:gt(n);return{apply:p=>{let m=p;return o&&(m=a.add(m,1)),m=a.pow(m,r(s)),o&&(m=a.sub(m,1)),m},revert:p=>{let m=p;return o&&(m=a.add(m,1)),m=a.root(m,r(s)),o&&(m=a.sub(m,1)),m},enabled:d,description:l==null?void 0:N(()=>i("div",{class:"modifier-container"},[r(u)?i("span",{class:"modifier-description"},[Lt(r(u)),o?" (+1 effective)":null]):null,i("span",{class:"modifier-amount"},[c("^"),le(r(s))])]))}})}function H(e){return _t(()=>{const t=e();return{apply:l=>t.filter(n=>r(n.enabled)!==!1).reduce((n,o)=>o.apply(n),l),revert:t.every(l=>l.revert!=null)?l=>t.filter(n=>r(n.enabled)!==!1).reduceRight((n,o)=>o.revert(n),l):void 0,enabled:f(()=>t.filter(l=>r(l.enabled)!==!1).length>0),description:N(()=>i(D,null,[t.filter(l=>r(l.enabled)!==!1).map(l=>r(l.description)).filter(l=>l).map(Lt)]))}})}function Mn(e){return _t(()=>{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),r(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=r(t.currentGain),n=r(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}),G(t,"currentGain"),G(t,"actualGain"),G(t,"currentAt"),G(t,"nextAt"),G(t,"buyMax"),ft(t,"buyMax",!0),G(t,"roundUpCost"),ft(t,"roundUpCost",!0),t})}function xa(e,t){const l=gt(e),n=gt(t);return{currentGain(o){let s=r(o.baseResource.value);if(o.costModifier&&(s=o.costModifier.apply(s)),a.lt(s,r(l)))return 0;const u=a.div(s,r(l)).pow(r(n));return u.isNan()?new a(0):u},currentAt(o){let s=r(o.currentGain);return o.gainModifier&&(s=o.gainModifier.revert(s)),s=a.max(0,s).root(r(n)).times(r(l)),o.costModifier&&(s=o.costModifier.revert(s)),s},nextAt(o){let s=a.add(r(o.currentGain),1).floor();return o.gainModifier&&(s=o.gainModifier.revert(s)),s=a.max(0,s).root(r(n)).times(r(l)).max(r(l)),o.costModifier&&(s=o.costModifier.revert(s)),s}}}function Dn(e){return Mn(e)}function Gs(e){return Mn(()=>{const t=e();return ft(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),r(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 r(t.buyMax)||(l=l.min(1)),l})),ft(t,"convert",function(){var o;const l=r(t.actualGain),n=r(t.currentAt);t.gainResource.value=t.gainModifier?t.gainModifier.apply(r(t.currentGain)):r(t.currentGain),t.spend(l,n),(o=t.onConvert)==null||o.call(t,l)}),t})}const Vs={class:"field"},qs=ue({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,n=f(()=>Ee(r(l.title)||"<span></span>","span")),o=f({get(){return!!l.modelValue},set(s){t("update:modelValue",s)}});return(s,u)=>(C(),I("label",Vs,[na(g("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":u[0]||(u[0]=d=>nt(o)?o.value=d:null)},null,512),[[ao,r(o)]]),(C(),ae(We(r(n))))]))}});var Jt=Be(qs,[["__scopeId","data-v-33d57459"]]);const Hs={class:"field"},Ls={key:0,class:"field-title"},Pa=ue({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var u;const l=e,n=pl(Wt(l,"title"),"span"),o=Q((u=l.options.find(d=>d.value===l.modelValue))!=null?u:null);jt(Wt(l,"modelValue"),d=>{var p;rt(o)!==d&&(o.value=(p=l.options.find(m=>m.value===d))!=null?p:null)});function s(d){t("update:modelValue",d.value)}return(d,p)=>(C(),I("div",Hs,[r(n)?(C(),I("span",Ls,[(C(),ae(We(r(n))))])):T("",!0),i(r(so),{options:e.options,modelValue:o.value,"onUpdate:modelValue":[p[0]||(p[0]=m=>o.value=m),s],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});var js=ue({props:{visibility:{type:V(Number),required:!0},display:{type:V(String,Object,Function),required:!0},style:V(String,Object,Array),classes:V(Object),earned:{type:V(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:Gl},setup(e){const{display:t}=vt(e),l=Tt("");return Dt(()=>{const n=rt(t);if(n==null){l.value="";return}if(Xt(n)){l.value=Ee(n);return}const o=Ee(n.requirement,"h3"),s=Ee(n.effectDisplay||"","b"),u=Ee(n.optionsDisplay||"","span");l.value=Ee(N(()=>i("span",null,[i(o,null,null),n.effectDisplay?i("div",null,[i(s,null,null)]):null,n.optionsDisplay?i("div",{class:"equal-spaced"},[i(u,null,null)]):null])))}),{comp:l,unref:r,Visibility:it}}});function Ws(e,t,l,n,o,s){var d;const u=cl("Node");return e.unref(e.visibility)!==e.Visibility.None?(C(),I("div",{key:0,style:ot([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(d=e.unref(e.style))!=null?d:{}]),class:lt({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(C(),ae(We(e.unref(e.comp)))),i(u,{id:e.id},null,8,["id"])],6)):T("",!0)}var Ks=Be(js,[["render",Ws],["__scopeId","data-v-f4e8794e"]]);Te.on("setupVue",e=>e.use(ro));const Ka=on(),zs=Symbol("Milestone");let ul;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(ul||(ul={}));function _e(e){const t=Ae(!1);return _t(()=>{var o;const l=(o=e==null?void 0:e())!=null?o:{};l.id=Ml("milestone-"),l.type=zs,l[ml]=Ks,l.earned=t,l.complete=function(){var u;const s=l;if(t.value=!0,(u=s.onComplete)==null||u.call(s),s.display&&r(s.showPopups)===!0){const d=r(s.display),p=Ee(Xt(d)?d:d.requirement);Ka(i(D,null,[i("h3",null,[c("Milestone earned!")]),i("div",null,[i(p,null,null)])]))}},G(l,"visibility"),ft(l,"visibility",it.Visible);const n=l.visibility;if(l.visibility=f(()=>{const s=r(l.display);switch(Ye.msDisplay){default:case ul.All:return r(n);case ul.Configurable:return r(l.earned)&&!(s!=null&&typeof s=="object"&&"optionsDisplay"in s)?it.None:r(n);case ul.Incomplete:return r(l.earned)?it.None:r(n);case ul.None:return it.None}}),G(l,"style"),G(l,"classes"),G(l,"display"),G(l,"showPopups"),l[gl]=function(){const{visibility:s,display:u,style:d,classes:p,earned:m,id:w}=this;return{visibility:s,display:u,style:r(d),classes:p,earned:m,id:w}},l.shouldEarn){const s=l;Dt(()=>{var u,d;if(Ye.active===z.id&&!s.earned.value&&r(s.visibility)===it.Visible&&((u=s.shouldEarn)==null?void 0:u.call(s))&&(s.earned.value=!0,(d=s.onComplete)==null||d.call(s),s.display&&r(s.showPopups)===!0)){const p=r(s.display),m=Ee(Xt(p)?p:p.requirement);Ka(i(D,null,[i("h3",null,[c("Milestone earned!")]),i("div",null,[i(m,null,null)])]))}})}return l})}Te.on("loadSettings",e=>{ft(e,"msDisplay",ul.All)});const Js=Object.values(ul).map(e=>({label:fn(e),value:e}));Ii(N(()=>i(Pa,{title:"Show Milestones",options:Js,"onUpdate:modelValue":e=>Ye.msDisplay=e,modelValue:Ye.msDisplay},null)));const Ys=Symbol("Reset");function Xs(e){return _t(()=>{const t=e();return t.id=Ml("reset-"),t.type=Ys,t.reset=function(){var n;const l=o=>{if(o&&typeof o=="object")if(dl in o){const s=o;s.value=s[dl]}else!(o instanceof a)&&!nt(o)&&Object.values(o).forEach(s=>l(s))};r(t.thingsToReset).forEach(l),Te.emit("reset",t),(n=t.onReset)==null||n.call(t)},G(t,"thingsToReset"),t})}const Kl={};Te.on("removeLayer",e=>{var t;(t=Kl[e.id])==null||t.call(Kl),Kl[e.id]=void 0});const Zs={},er={style:{"white-space":"nowrap"}},tr=g("span",{style:{"font-size":"larger","font-family":"initial"}},"\u221A",-1),lr={style:{"text-decoration":"overline"}};function ar(e,t){return C(),I("span",er,[tr,g("span",lr,[qt(e.$slots,"default")])])}var xn=Be(Zs,[["render",ar]]);const nr="dyes",or=11,Xe=xt(nr,function(){const e="Dyes",t="#D4D4F4";function l(v){return _t(()=>{const y=v(),S=tt(0,v().name),x=H(()=>[J(()=>({addend:()=>a.add(E.amount.value,1),description:`${y.name} Chambers`})),k(()=>({multiplier:o.orange1,description:"Orange Dye Boost 1",enabled:y.color=="red"||y.color=="yellow"})),k(()=>({multiplier:o.green1,description:"Green Dye Boost 1",enabled:y.color=="yellow"||y.color=="blue"})),k(()=>({multiplier:o.purple1,description:"Purple Dye Boost 1",enabled:y.color=="red"||y.color=="blue"})),k(()=>({multiplier:2,description:"Wetter Dyes",enabled:()=>d.yellowDyeUpg.bought.value&&y.color=="red"||y.color=="yellow"||y.color=="blue"}))]),W=f(()=>x.apply(0)),E=Se(()=>({...y,style:()=>({backgroundColor:r(E.canPurchase)?t:"#545454",minWidth:"200px"}),display:N(()=>i("span",null,[i("h3",null,[y.name,c(" Chambers")]),i("br",null,null),c("Create "),le(W.value),c(" "),y.name,y.dyesToReset.length>0?", but reset "+y.dyesToReset.map(_=>_.name).join(", "):"",c("."),i("br",null,null),i("br",null,null),i("span",{class:"white-space: pre-wrap"},[c("Currently: "),y.listedBoosts.filter(_=>r(_.visible)).map(_=>Z(N(()=>i("div",null,[r(_.desc)]))))]),i("br",null,null),i("div",null,[c("Cost: "),y.costs.map(_=>Z(N(()=>{var U,ee;return i("div",null,[le(r(a.pow((U=r(E.cost))!=null?U:a.dInf,r((ee=_.root)!=null?ee:1)).times(r(_.base))))," ",_.res.displayName,i("br",null,null)])})))])])),cost(){let _=E.amount.value;return a.gte(_,25)&&(_=a.pow(_,2).div(20)),a.gte(_,10)&&(_=a.pow(_,2).div(5)),a.div(_,10).plus(1)},canPurchase:f(_=>{var ee;if(r(E.visibility)!=it.Visible)return!1;const U=(ee=_!=null?_:r(E.cost))!=null?ee:a.dInf;return y.costs.every(me=>{var q;return a.div(me.res.value,r(me.base)).root(r((q=me.root)!=null?q:1)).gte(U)})}),onPurchase(_){var ee;const U=(ee=_!=null?_:r(E.cost))!=null?ee:a.dInf;y.costs.forEach(me=>{var q;me.res.value=a.sub(me.res.value,a.pow(U,r((q=me.root)!=null?q:1)).times(r(me.base)))}),S.value=a.add(S.value,W.value),E.amount.value=a.add(E.amount.value,1),y.dyesToReset.forEach(me=>me.reset())}}));return{name:y.name,amount:S,buyable:E,toGenerate:x,computedToGenerate:W,display:N(()=>i("div",{class:"col",style:"max-width: 200px"},[i(kt,{resource:S,color:y.color,style:"margin-bottom: 0"},null),i(ce,null,null),Z(E)]))}})}const n={red:l(()=>({name:"Red Dye",color:"red",costs:[{base:"2e18",root:5,res:he.logs},{base:f(()=>d.yellowDyeUpg2.bought.value?"2.5e5":"5e5"),root:2,res:Ve.oil}],listedBoosts:[{visible:!0,desc:f(()=>`+${le(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:he.logs},{base:f(()=>d.yellowDyeUpg2.bought.value?"5e5":"1e6"),root:2,res:Ve.oil}],listedBoosts:[{visible:!0,desc:f(()=>`x${le(o.yellow1.value)} Paper & Plastic gain`)}],dyesToReset:[]})),blue:l(()=>({name:"Blue Dye",color:"blue",costs:[{base:"5e17",root:5,res:he.logs},{base:f(()=>d.yellowDyeUpg2.bought.value?"1e6":"2e6"),root:2,res:Ve.oil}],listedBoosts:[{visible:!0,desc:f(()=>`+${re(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${le(o.orange1.value)} Red and Yellow Dye gain`)},{visible:!0,desc:f(()=>`/${le(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${le(o.green1.value)} Yellow and Blue Dye gain`)},{visible:!0,desc:f(()=>`x${re(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${le(o.purple1.value)} Red and Blue Dye gain`)},{visible:!0,desc:f(()=>`x${le(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),d.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(d.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(d.coalUpg.bought.value?1.2:1)),green2:f(()=>a.add(n.green.amount.value,1).log2().plus(1).pow(d.coalUpg.bought.value?2:1)),purple1:f(()=>a.pow(2,a.add(n.purple.amount.value,1).log2().sqrt()).pow(d.coalUpg.bought.value?1.2:1)),purple2:f(()=>a.add(n.purple.amount.value,1).log2().plus(1))},[s,u]=tl(()=>[{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}]),d={blueDyeUpg:R(()=>({visibility:()=>M(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(1)||d.blueDyeUpg.bought.value),display:{title:"Is Blue Dye just Water?",description:N(()=>i(D,null,[c("Multiply Log gain by log"),i("sub",null,[c("10")]),c("(Auto Cutting Amount)+1.")]))},cost:1e3,resource:n.blue.amount,onPurchase(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}})),redDyeUpg:R(()=>({visibility:()=>M(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(10)||d.redDyeUpg.bought.value),display:{title:"Glistening Paint",description:N(()=>i(D,null,[c("Multiply Ore Purity by log"),i("sub",null,[c("10")]),c("(Cloth)+1.")]))},cost:1500,resource:n.red.amount,onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0}})),yellowDyeUpg:R(()=>({visibility:()=>M(a.add(n.orange.amount.value,n.green.amount.value).add(n.purple.amount.value).gte(100)||d.yellowDyeUpg.bought.value),display:{title:"Wetter Dyes",description:"Double Red, Yellow, and Blue Dye gain, but reset their amounts."},cost:2e3,resource: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:R(()=>({visibility:()=>M(d.yellowDyeUpg.bought.value),display:{title:"Golden Wash",description:"Halve the Oil cost of Red, Yellow, and Blue Dyes."},cost:5e3,resource:n.yellow.amount,onPurchase(){n.yellow.amount.value=0,n.yellow.buyable.amount.value=0}})),redDyeUpg2:R(()=>({visibility:()=>M(d.redDyeUpg.bought.value),display:{title:"De Louvre",description:N(()=>i(D,null,[c("Multiply Smelting Speed by "),i(xn,null,{default:()=>[c("Refineries+1")]}),c(".")]))},cost:6e3,resource:n.red.amount,onPurchase(){n.red.amount.value=0,n.red.buyable.amount.value=0}})),blueDyeUpg2:R(()=>({visibility:()=>M(d.blueDyeUpg.bought.value),display:{title:"Hydrophobia",description:"Raise Red Dye's effect ^1.5."},cost:7500,resource:n.blue.amount,onPurchase(){n.blue.amount.value=0,n.blue.buyable.amount.value=0}})),coalUpg:R(()=>({visibility:()=>M(d.blueDyeUpg2.bought.value&&d.redDyeUpg2.bought.value&&d.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:O.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=Q(!1),m=N(()=>i(ht,{modelValue:p.value,"onUpdate:modelValue":v=>p.value=v},{header:()=>i("h2",null,[e,c(" Modifiers")]),body:s})),w=tt(f(()=>Object.values(n).reduce((v,y)=>a.add(v,y.amount.value),0)),"Sum of Dyes"),{total:h,trackerDisplay:A}=ll({resource:w,goal:6e4,name:e,day:or,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:u,upgrades:d,display:N(()=>i(D,null,[Z(A),i(ce,null,null),ye(n.red.display,n.yellow.display,n.blue.display),i(ce,null,null),ye(n.orange.display,n.green.display,n.purple.display),i(ce,null,null),i("div",{class:"row",style:"vertical-align: top"},[Ht(d.redDyeUpg,d.redDyeUpg2),Ht(d.yellowDyeUpg,d.yellowDyeUpg2),Ht(d.blueDyeUpg,d.blueDyeUpg2)]),Z(d.coalUpg)]))}}),ir="oil",ha=9,Ve=xt(ir,function(){const e="Oil",t="#000000",l="var(--foreground)",n=tt(0,"oil"),o=tt(0,"depth"),s=Ae(0),u=f(()=>a.lt(o.value,990)?a.add(10,o.value):a.pow(1.001,a.sub(o.value,990)).mul(1e3));function d(){if(a.lt(o.value,990)){const Ge=a.min(a.affordArithmeticSeries(s.value,10,1,o.value),a.sub(990,o.value)),At=a.sumArithmeticSeries(Ge,10,1,o.value);s.value=a.sub(s.value,At),o.value=a.add(o.value,Ge)}if(a.gte(o.value,990)){const Ge=a.affordGeometricSeries(s.value,1e3,1.001,a.sub(o.value,990)),At=a.sumGeometricSeries(Ge,1e3,1.001,a.sub(o.value,990));s.value=a.sub(s.value,At),o.value=a.add(o.value,Ge)}}const p=Ae(0),m=f(()=>a.times(a.pow(p.value,W.value).pow(2),1e14)),w=f(()=>a.times(a.pow(p.value,W.value),1)),h=Se(()=>({resource:bt.metal,cost(){const Ge=new a(this.amount.value);return a.pow(1.3,Ge).times(25e3)},display:N(()=>i(D,null,[i("h3",null,[c("Heavy Drill")]),i("br",null,null),c("A large drill specialized at deep mining."),i("br",null,null),c("Consumes 1e14*(Heavy Drills amount)"),i("sup",null,[c("2")]),c(" coal/sec for (Heavy Drills amount) drill power."),i("br",null,null),i("br",null,null),c("Currently:"),i("br",null,null),c("-"),de(m.value),c(" coal/sec"),i("br",null,null),c("+"),de(w.value),c(" drill power"),i("br",null,null),i("br",null,null),c("Cost: "),se(r(h.cost)),c(" "),h.resource.displayName])),onPurchase(){p.value=a.add(p.value,1)},style:{color:l,width:"160px"}})),{min:A,max:v,add:y,remove:S}=Vt({buyable:h,active:p}),x=Ae(0),W=f(()=>a.add(x.value,Math.E).ln()),E=Se(()=>({resource:bt.metal,cost(){const Ge=new a(this.amount.value);return a.pow(2,Ge).times(1e5)},display:N(()=>i(D,null,[i("h3",null,[c("Heavy Drill Drill")]),i("br",null,null),c("Attach extra drills to Heavy Drills to make them faster"),i("br",null,null),c("Raise amount of effective Heavy Drills by ^ln(Heavy Drill Drill amount + e)."),i("br",null,null),c("(also affects coal consumption)."),i("br",null,null),i("br",null,null),c("Currently:"),i("br",null,null),c("^"),de(W.value),c(" Heavy Drill amount"),i("br",null,null),i("br",null,null),c("Cost: "),se(r(E.cost)),c(" "),E.resource.displayName])),onPurchase(){x.value=a.add(x.value,1)},style:{color:l,width:"160px"}})),{min:_,max:U,add:ee,remove:me}=Vt({buyable:E,active:x}),q=Ae(0),Ne=f(()=>a.pow(1/3,q.value)),ge=f(()=>a.pow(2,q.value)),Oe=f(()=>a.pow(1.2,q.value)),De=Se(()=>({resource:bt.metal,cost(){const Ge=new a(this.amount.value);return a.pow(8,Ge).times(2e5)},display:N(()=>i(D,null,[i("h3",null,[c("Heavy Extractor")]),i("br",null,null),c("Attach extractors to the drill to mine coal and ore, but with a price."),i("br",null,null),c("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),c("Currently:"),i("br",null,null),c("\xD7"),de(Ne.value),c(" drill power"),i("br",null,null),c("\xD7"),de(ge.value),c(" coal/sec"),i("br",null,null),c("\xD7"),de(Oe.value),c(" ore/sec"),i("br",null,null),i("br",null,null),c("Cost: "),se(r(De.cost))," ",De.resource.displayName])),onPurchase(){q.value=a.add(q.value,1)},style:{color:l,width:"160px"}})),{min:Pe,max:Me,add:Fe,remove:L}=Vt({buyable:De,active:q}),Ce=Ae(0),we=f(()=>a.pow(Et[3].bought.value?4:5,Ce.value)),be=f(()=>a.add(Ce.value,Qa.value).pow(2).mul(p.value).mul(a.add(x.value,1)).mul(q.value).mul(o.value).div(1e5)),Qe=Se(()=>({resource:bt.metal,cost(){const Ge=new a(this.amount.value);let At=a.pow(16,Ge).times(2e6);return Et[4].bought.value&&(At=At.div(a.add(vl.value,1).root(6))),At},display:N(()=>i(D,null,[i("h3",null,[c("Oil Pump")]),i("br",null,null),c("Pump that oil from the ground."),i("br",null,null),c("Gain oil based on the number of Heavy Drills and Heavy Drill Drills active and well depth, but coal usage is multiplied by "),Et[3].bought.value?4:5,c("\xD7."),i("br",null,null),i("br",null,null),c("Currently:"),i("br",null,null),c("\xD7"),de(we.value),c(" coal usage"),i("br",null,null),c("+"),de(be.value),c(" oil/sec"),i("br",null,null),i("br",null,null),c("Cost: "),se(r(Qe.cost)),c(" "),Qe.resource.displayName])),onPurchase(){Ce.value=a.add(Ce.value,1)},style:{color:l,width:"160px"}})),{max:Ue,min:ut,add:Re,remove:Ut}=Vt({buyable:Qe,active:Ce}),ne=Ae(0),oe=f(()=>a.pow(ne.value,2)),Ze=f(()=>a.pow(ne.value,3).mul(1e19)),je=f(()=>a.add(ne.value,1)),pe=Se(()=>({resource:F(n),cost(){const Ge=new a(this.amount.value);return a.pow(2,Ge).times(50)},display:N(()=>i(D,null,[i("h3",null,[c("Oil Burner")]),i("br",null,null),c("Burn oil as fuel."),i("br",null,null),c("(Oil Burner Amount)"),i("sup",null,[c("2")]),c(" unit of oil can give 1e19*(Oil Burner Amount)"),i("sup",null,[c("3")]),c(" units of coal."),i("br",null,null),i("br",null,null),c("Currently:"),i("br",null,null),c("-"),de(oe.value),c(" oil/sec"),i("br",null,null),c("-"),de(Ze.value),c(" coal consumption"),Et[2].bought.value?i(D,null,[i("br",null,null),c("\xD7"),de(je.value),c(" to auto smelting multi")]):"",i("br",null,null),i("br",null,null),c("Cost: "),se(r(pe.cost)),c(" "),pe.resource.displayName])),onPurchase(){ne.value=a.add(ne.value,1)},style:{color:l,width:"160px"}})),{max:dt,min:Ke,add:xe,remove:yt}=Vt({buyable:pe,active:ne}),He=Ae(0),Ft=f(()=>a.pow(He.value,2).mul(100)),$e=f(()=>a.add(He.value,1)),ct=Se(()=>({resource:bt.metal,cost(){const Ge=new a(this.amount.value);let At=a.pow(10,Ge).times(1e7);return Et[4].bought.value&&(At=At.div(a.add(vl.value,1).root(6))),At},display:N(()=>i(D,null,[i("h3",null,[c("Oil Smelter")]),i("br",null,null),c("Use oil as a crucible fuel."),i("br",null,null),c("Burn 100x"),i("sup",null,[c("2")]),c(" oil to smelt +100% faster."),i("br",null,null),i("br",null,null),c("Currently:"),i("br",null,null),c("-"),de(Ft.value),c(" oil/sec"),i("br",null,null),c("\xD7"),de($e.value),c(" smelting speed"),i("br",null,null),i("br",null,null),c("Cost: "),se(r(ct.cost)),c(" "),ct.resource.displayName])),onPurchase(){He.value=a.add(He.value,1)},style:{color:l,width:"160px"}})),{max:Y,min:$,add:Ot,remove:nl}=Vt({buyable:ct,active:He}),st=[_e(()=>({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)})),_e(()=>({display:{requirement:"10m Well Depth",effectDisplay:"Drill too slow? Unlock some drill upgrades!"},shouldEarn:()=>a.gte(o.value,10),visibility:()=>M(st[0].earned.value)})),_e(()=>({display:{requirement:"25m Well Depth",effectDisplay:"Gain 5% more ore for each metre of well depth."},shouldEarn:()=>a.gte(o.value,25),visibility:()=>M(st[1].earned.value)})),_e(()=>({display:{requirement:"60m Well Depth",effectDisplay:"Drill still too slow? Try unlocking another drill!"},shouldEarn:()=>a.gte(o.value,60),visibility:()=>M(st[2].earned.value)})),_e(()=>({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:()=>M(st[3].earned.value)})),_e(()=>({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:()=>M(st[4].earned.value)})),_e(()=>({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:()=>M(a.gte(o.value,1e3))})),_e(()=>({display:{requirement:"3,000m Well Depth",effectDisplay:"You found a large oil spot! Double oil gain!"},shouldEarn:()=>a.gte(o.value,3e3),visibility:()=>M(a.gte(o.value,2e3))}))],{collapseMilestones:te,display:Nt}=la(st),St=[_e(()=>({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(vl.value,100)})),_e(()=>({display:{requirement:"500 total oil",effectDisplay:"Unlocks oil upgrades! These can be bought with oil."},shouldEarn:()=>a.gte(vl.value,500),visibility:()=>M(St[0].earned.value)})),_e(()=>({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(vl.value,1e4),visibility:()=>M(St[1].earned.value)}))],{collapseMilestones:Cl,display:kl}=la(St),Rt=[R(()=>({resource:O.coal,cost:1e18,display:{title:"Coal Drill Synergy",description:"Increase drill power by +4% per coal Mining Drill owned.",effectDisplay:N(()=>i(D,null,[c("x"),de(ze[0].value)]))},style:{color:l}})),R(()=>({resource:bt.metal,cost:15e4,display:{title:"Metal Drill Synergy",description:"Increase drill power by +4% per ore Mining Drill owned.",effectDisplay:N(()=>i(D,null,[c("x"),de(ze[1].value)]))},style:{color:l}})),R(()=>({resource:O.coal,cost:1e20,display:{title:"Coal Drill Upgrade",description:"Increase drill power by +6% per OoM of coal owned.",effectDisplay:N(()=>i(D,null,[c("x"),de(ze[2].value)]))},style:{color:l}})),R(()=>({resource:bt.metal,cost:15e5,display:{title:"Metal Drill Upgrade",description:"Increase drill power by +10% per OoM of metal ingot owned.",effectDisplay:N(()=>i(D,null,[c("x"),de(ze[3].value)]))},style:{color:l}})),R(()=>({resource:F(n),cost:100,display:{title:"Drill Oil",description:"Increase previous upgrades' effect by +0.1% per Heavy Drill owned.",effectDisplay:N(()=>i(D,null,[c("+"),de(a.mul(ze[4].value,100)),c("%")]))},style:{color:l}}))],ze=[f(()=>a.mul(O.buildDrill.amount.value,a.add(.04,zt.value)).add(1)),f(()=>a.mul(bt.oreDrill.amount.value,a.add(.04,zt.value)).add(1)),f(()=>a.mul(a.max(O.coal.value,1).log10().floor(),a.add(.06,zt.value)).add(1)),f(()=>a.mul(a.max(bt.metal.value,1).log10().floor(),a.add(.1,zt.value)).add(1)),f(()=>a.mul(h.amount.value,.001))],Et=[R(()=>({resource:F(n),cost:100,display:{title:"Oil the Oil Pump",description:"Double oil gain."},style:{color:l}})),R(()=>({resource:F(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}})),R(()=>({resource:F(n),cost:1500,display:{title:"Blaster Burner",description:"The Oil Burner can now increase your metal gain."},style:{color:l}})),R(()=>({resource:F(n),cost:25e3,display:{title:"Oil Integration",description:"Reduce Oil Pump's coal consumption multipler from 5 to 4"},style:{color:l}})),R(()=>({resource:F(n),cost:5e4,display:{title:"Be One with the Oil",description:N(()=>i(D,null,[c("Divide metal ingot prices of oil buildings by "),i("sup",null,[c("6")]),i(xn,null,{default:()=>[c("total oil + 1")]})]))},style:{color:l}}))],It=H(()=>[J(()=>({addend:()=>a.negate(m.value),description:"Heavy Drill",enabled:()=>a.gt(p.value,0)})),k(()=>({multiplier:we,description:"Oil Pump",enabled:()=>a.gt(Ce.value,0)})),J(()=>({addend:pa,description:"Oil to Coal Substitution",enabled:()=>a.gt(pa.value,0)}))]),ol=f(()=>It.apply(0)),Qt=H(()=>[J(()=>({addend:w,description:"Heavy Drill",enabled:()=>a.gt(p.value,0)})),k(()=>({multiplier:Ne,description:"Heavy Extractor",enabled:()=>a.gt(q.value,0)})),k(()=>({multiplier:ze[0],description:"Coal Drill Synergy",enabled:Rt[0].bought})),k(()=>({multiplier:ze[1],description:"Metal Drill Synergy",enabled:Rt[1].bought})),k(()=>({multiplier:ze[2],description:"Coal Drill Upgrade",enabled:Rt[2].bought})),k(()=>({multiplier:ze[3],description:"Metal Drill Upgrade",enabled:Rt[3].bought})),k(()=>({multiplier:2,description:"Guide to drilling",enabled:K.upgrades.drillingUpgrade.bought})),k(()=>({multiplier:()=>Kt.value,description:"Effectiveness",enabled:()=>a.lt(Kt.value,1)}))]),fl=f(()=>Qt.apply(0)),Hl=H(()=>[J(()=>({addend:ze[4],description:"Drill Oil",enabled:Rt[4].bought}))]),zt=f(()=>Hl.apply(0)),Ll=H(()=>[J(()=>({addend:be,description:"Oil Pump",enabled:()=>a.gt(Ce.value,0)})),k(()=>({multiplier:2,description:"Oil the Oil Pump",enabled:Et[0].bought})),k(()=>({multiplier:2,description:"3000m Well Depth",enabled:st[7].earned})),k(()=>({multiplier:2,description:"Oil and where to find it",enabled:K.upgrades.oilUpgrade.bought})),k(()=>({multiplier:()=>Kt.value,description:"Effectiveness",enabled:()=>a.lt(Kt.value,1)}))]),_l=f(()=>Ll.apply(0)),jl=H(()=>[J(()=>({addend:()=>a.negate(oe.value),description:"Oil Burner",enabled:()=>a.gt(ne.value,0)})),J(()=>({addend:()=>a.negate(Ft.value),description:"Oil Smelter",enabled:()=>a.gt(He.value,0)})),J(()=>({addend:()=>a.negate(qe.oilCost.value),description:"Oil Refinery",enabled:()=>a.gt(qe.activeRefinery.value,0)}))]),P=f(()=>jl.apply(0)),Ta=H(()=>[J(()=>({addend:Ze,description:"Oil Burner",enabled:()=>a.gt(ne.value,0)})),k(()=>({multiplier:()=>il.value,description:"Effectiveness",enabled:()=>a.lt(il.value,1)}))]),pa=f(()=>Ta.apply(0)),Oa=H(()=>[J(()=>({addend:Xe.boosts.red1,description:"Red Dye Boost 1",enabled:()=>a.gte(Xe.dyes.red.amount.value,1)}))]),Qa=f(()=>Oa.apply(0)),[zn,Jn]=tl(()=>[{title:"Coal Consumption",modifier:It,unit:"/s",base:0},{title:"Drill Power",modifier:Qt,base:0},{title:"Upgrade Bonus",modifier:Hl,base:0,visible(){return a.gt(zt.value,0)}},{title:"Oil Speed",modifier:Ll,unit:"/s",base:0,visible(){return a.gt(_l.value,0)}},{title:"Oil Consumption",modifier:jl,unit:"/s",base:0,visible(){return a.lt(P.value,0)}},{title:"Oil to Coal Substitution",modifier:Ta,unit:"/s",base:0,visible(){return a.gt(pa.value,0)}},{title:"Extra Oil Pumps",modifier:Oa,base:0,visible(){return a.gt(Qa.value,0)}}]),ma=Q(!1),Yn=N(()=>i(ht,{modelValue:ma.value,"onUpdate:modelValue":Ge=>ma.value=Ge},{header:()=>i("h2",null,[e,c(" Modifiers")]),body:zn})),Kt=Q(a.dOne),il=Q(a.dOne);Te.on("update",Ge=>{if(a.lt(j.day.value,ha))return;const At=a.negate(ol.value);a.gt(At,0)?(Kt.value=a.min(a.div(O.coal.value,At),1),O.coal.value=a.sub(O.coal.value,a.mul(At,Kt.value).mul(Ge))):Kt.value=a.dOne,s.value=a.add(s.value,a.mul(fl.value,Ge)),n.value=a.add(n.value,a.mul(_l.value,Ge)),d();const ga=a.negate(P.value);a.gt(ga,0)?(il.value=a.min(a.div(n.value,ga),1),n.value=a.sub(n.value,a.mul(ga,il.value).mul(Ge)).max(0)):il.value=a.dOne});const{total:vl,trackerDisplay:Xn}=ll({resource:n,goal:25e4,name:e,day:ha,color:t,modal:{show:ma,display:Yn}});return{name:e,day:ha,color:t,oil:n,totalOil:vl,depth:o,drillProgress:s,activeHeavy:p,buildHeavy:h,activeHeavy2:x,buildHeavy2:E,activeExtractor:q,buildExtractor:De,activePump:Ce,buildPump:Qe,activeBurner:ne,buildBurner:pe,activeSmelter:He,buildSmelter:ct,extractorCoal:ge,extractorOre:Oe,coalEffectiveness:Kt,oilEffectiveness:il,depthMilestones:st,collapsedDepthMilestones:te,row1Upgrades:Rt,row2Upgrades:Et,minWidth:700,oilMilestones:St,collapsedOilMilestones:Cl,generalTabCollapsed:Jn,display:N(()=>i(D,null,[Z(Xn),i(ce,null,null),a.lt(Kt.value,1)?i("div",null,[c("Coal efficiency: "),de(a.mul(Kt.value,100)),c("%")]):null,a.lt(il.value,1)?i("div",null,[c("Oil efficiency: "),de(a.mul(il.value,100)),c("%")]):null,i(kt,{resource:n,color:t,sticky:!0,productionDisplay:N(()=>i(D,null,[a.lt(o.value,1e3)?"Reach 1000m to start gaining oil":i(D,null,[Zl(a.add(_l.value,P.value))])]))},null),a.eq(_l.value,0)?i(D,null,[c("(Need at least 1 Oil Pump, 1 Heavy Drill and 1 Heavy Extractor active to gain oil)"),i("br",null,null)]):"",i(Il,null,{default:()=>[st[6].earned.value?i(Bt,null,{default:()=>[Z(Qe),i("div",null,[se(a.floor(Ce.value)),c("/"),se(a.floor(Qe.amount.value))]),ye(ut,Ut,Re,Ue)]}):null,St[0].earned.value?i(Bt,null,{default:()=>[Z(pe),i("div",null,[se(a.floor(ne.value)),c("/"),se(a.floor(pe.amount.value))]),ye(Ke,yt,xe,dt)]}):null,St[2].earned.value?i(Bt,null,{default:()=>[Z(ct),i("div",null,[se(a.floor(He.value)),c("/"),se(a.floor(ct.amount.value))]),ye($,nl,Ot,Y)]}):null]}),i("br",null,null),i("div",null,[i("span",null,[c("The well is ")]),i("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[se(o.value)]),c("m deep"),i("br",null,null),c("Next at "),de(a.sub(u.value,s.value)),c(" drill power seconds")]),i("div",null,[i("span",null,[c("Your drill power is ")]),i("h2",{style:"color: #6f767f; text-shadow: 0 0 10px #6f767f"},[de(fl.value)])]),i(ce,null,null),i(Il,null,{default:()=>[i(Bt,null,{default:()=>[Z(h),i("div",null,[se(a.floor(p.value)),c("/"),se(a.floor(h.amount.value))]),ye(A,S,y,v)]}),st[3].earned.value?i(Bt,null,{default:()=>[Z(E),i("div",null,[se(a.floor(x.value)),c("/"),se(a.floor(E.amount.value))]),ye(_,me,ee,U)]}):null,st[5].earned.value?i(Bt,null,{default:()=>[Z(De),i("div",null,[se(a.floor(q.value)),c("/"),se(a.floor(De.amount.value))]),ye(Pe,L,Fe,Me)]}):null]}),i(ce,null,null),st[1].earned.value?ye(...Rt):null,St[1].earned.value?ye(...Et):null,i(ce,null,null),Nt(),a.gte(vl.value,50)?kl():""]))}}),sr="plastic",za=10,qe=xt(sr,function(){const e="Plastic",t="#DCD9CD",l=tt(0,"plastic"),[n,o]=tl(()=>[{title:"Plastic Gain",modifier:De,base:0}]),s=Q(!1),u=N(()=>i(ht,{modelValue:s.value,"onUpdate:modelValue":L=>s.value=L},{header:()=>i("h2",null,[e,c(" Modifiers")]),body:n})),d=Ae(0),p=f(()=>a.times(d.value,100)),m=Se(()=>({resource:bt.metal,cost(){const L=new a(this.amount.value);return a.pow(1.2,L).times(1e7)},display:N(()=>i(D,null,[i("h3",null,[c("Refinery")]),i("br",null,null),c("Refines oil into plastic pellets"),i("br",null,null),c("Consumes 100 oil/s to create 1 plastic/s"),i("br",null,null),i("br",null,null),c("Currently:"),i("br",null,null),c("-"),le(p.value),c(" oil/sec"),i("br",null,null),c("+"),le(d.value),c(" plastic/sec"),i("br",null,null),i("br",null,null),c("Cost: "),re(r(m.cost))," ",m.resource.displayName])),onPurchase(){d.value=a.add(d.value,1)},style:{width:"300px"}})),{min:w,max:h,add:A,remove:v}=Vt({buyable:m,active:d,style:{minHeight:"20px",width:"40px",color:"var(--feature-foreground)"}}),y=f(()=>a.pow(5,a.add([...Object.values(E),...Object.values(me)].filter(L=>L.bought.value).length,2))),S=R(()=>({resource:F(l),cost:y,display:()=>({title:"Plastic Scissors",description:"Unlock paper upgrades",showCost:!S.bought.value})})),x=R(()=>({resource:F(l),cost:y,display:()=>({title:"Plastic Level",description:"Unlock box upgrades",showCost:!x.bought.value})})),W=R(()=>({resource:F(l),cost:y,display:()=>({title:"Plastic Cane",description:"Unlock cloth upgrades",showCost:!W.bought.value})})),E={paperTools:S,boxTools:x,clothTools:W},_=R(()=>({resource:F(l),cost:y,visibility:()=>M(S.bought.value),display:()=>({title:"Paper Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!_.bought.value})})),U=R(()=>({resource:F(l),cost:y,visibility:()=>M(x.bought.value),display:()=>({title:"Box Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!U.bought.value})})),ee=R(()=>({resource:F(l),cost:y,visibility:()=>M(W.bought.value),display:()=>({title:"Cloth Elf Recruitment",description:"Double plastic gain and unlock a new elf for training",showCost:!ee.bought.value})})),me={paperElf:_,boxElf:U,clothElf:ee},q=Se(()=>({resource:F(l),cost(){const L=this.amount.value;return a.pow(1.3,L).times(100)},visibility:()=>M(_.bought.value),display:{title:"Plastic Printing Press",description:"Gain +1% of your paper gain per second",effectDisplay:N(()=>i(D,null,[re(q.amount.value),c("%")])),showAmount:!1}})),Ne=Se(()=>({resource:F(l),cost(){const L=this.amount.value;return a.pow(1.3,L).times(100)},visibility:()=>M(U.bought.value),display:{title:"Plastic Box Folder",description:"Gain +1% of your box gain per second",effectDisplay:N(()=>i(D,null,[re(Ne.amount.value),c("%")])),showAmount:!1}})),ge=Se(()=>({resource:F(l),cost(){const L=this.amount.value;return a.pow(1.3,L).times(100)},visibility:()=>M(ee.bought.value),display:{title:"Plastic Shepherd",description:"All cloth actions are +10% more efficient",effectDisplay:N(()=>i(D,null,[re(a.times(ge.amount.value,10)),c("%")])),showAmount:!1}})),Oe={passivePaper:q,passiveBoxes:Ne,clothGains:ge},De=H(()=>[J(()=>({addend:d,description:"Oil Refinery",enabled:()=>a.gt(d.value,0)})),k(()=>({multiplier:2,description:"Paper Elf Recruitment",enabled:_.bought})),k(()=>({multiplier:2,description:"Box Elf Recruitment",enabled:U.bought})),k(()=>({multiplier:2,description:"Cloth Elf Recruitment",enabled:ee.bought})),k(()=>({multiplier:2,description:"Carry plastic in boxes",enabled:pt.row2Upgrades.plasticUpgrade.bought})),k(()=>({multiplier:()=>Ve.oilEffectiveness.value,description:"Effectiveness",enabled:()=>a.lt(Ve.oilEffectiveness.value,1)})),k(()=>({multiplier:Xe.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Xe.dyes.yellow.amount.value,1)}))]),Pe=f(()=>De.apply(0));Te.on("update",L=>{a.lt(j.day.value,za)||(l.value=a.times(L,Pe.value).add(l.value))});const{total:Me,trackerDisplay:Fe}=ll({resource:l,goal:25e4,name:e,day:za,color:t,textColor:"var(--feature-foreground)",modal:{show:s,display:u}});return{name:e,color:t,plastic:l,totalPlastic:Me,buildRefinery:m,activeRefinery:d,oilCost:p,upgrades:E,elfUpgrades:me,buyables:Oe,generalTabCollapsed:o,minWidth:700,display:N(()=>i(D,null,[Z(Fe),i(ce,null,null),i(kt,{resource:l,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(Pe.value,0)?`+${le(Pe.value)}/s`:void 0},null),i(ce,null,null),i(Bt,null,{default:()=>[Z(m),i("div",null,[re(a.floor(d.value)),c("/"),re(a.floor(m.amount.value))]),ye(w,v,A,h)]}),i(Il,null,{default:()=>[Ht(S,_,q),Ht(x,U,Ne),Ht(W,ee,ge)]})]))}}),rr="workshop",Dl=2,Ct=xt(rr,function(){const e="Workshop",t="#D66B02",l="#D66B02",n=tt(0,"foundation progress"),o=Gs(()=>({scaling:xa(250,1.5),baseResource:he.logs,gainResource:F(n),roundUpCost:!0,buyMax:!1,spend(U,ee){he.logs.value=a.sub(he.logs.value,ee)}})),s=Mt(()=>({display:N(()=>i(D,null,[i("b",{style:"font-size: x-large"},[c("Build part of the foundation")]),i("br",null,null),i("br",null,null),i("span",{style:"font-size: large"},[c("Cost:")," ",Vl(he.logs,a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value)," ",he.logs.displayName])])),visibility:()=>M(a.lt(n.value,100)),canClick:()=>a.gte(o.actualGain.value,1)&&a.lt(n.value,100),onClick(){!r(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"})),u=Nl(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{s.canClick.value&&s.onClick()}})),d=f(()=>!Le.milestones[6].earned.value),p=_e(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>a.gte(n.value,1),showPopups:d})),m=_e(()=>({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:()=>M(p.earned.value),showPopups:d})),w=_e(()=>({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:()=>M(m.earned.value),showPopups:d})),h=_e(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>a.gte(n.value,30),visibility:()=>M(w.earned.value),showPopups:d})),A=_e(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>a.gte(n.value,40),visibility:()=>M(h.earned.value),showPopups:d})),v=_e(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(n.value,50),visibility:()=>M(A.earned.value),showPopups:d})),y=_e(()=>({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:()=>M(v.earned.value),showPopups:d})),S=_e(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>a.gte(n.value,100),visibility:()=>M(y.earned.value),showPopups:d})),x={logGainMilestone1:p,autoCutMilestone1:m,autoPlantMilestone1:w,autoCutMilestone2:h,autoPlantMilestone2:A,logGainMilestone2:v,morePlantsMilestone1:y,logGainMilestone3:S},{collapseMilestones:W,display:E}=la(x),_=Yt(()=>({direction:ke.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>j.day.value===Dl?a.div(n.value,100):1,display:N(()=>j.day.value===Dl?i(D,null,[re(n.value),c("%")]):"")}));return Dt(()=>{j.day.value===Dl&&a.gte(n.value,100)&&j.completeDay()}),{name:e,day:Dl,color:t,foundationProgress:n,foundationConversion:o,milestones:x,collapseMilestones:W,minWidth:700,buildFoundationHK:u,display:N(()=>i(D,null,[i("div",null,[j.day.value===Dl?"Complete the foundation to complete the day":`${e} Complete!`]),Z(_),i(ce,null,null),i("div",null,[i("span",null,[c("The foundation is ")]),i("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[re(n.value)]),c("% completed")]),a.lt(n.value,100)?i(ce,null,null):null,Z(s),i(ce,null,null),E()]))}}),ur="elves",xl=4,Le=xt(ur,function(){const e="Elves",t="red",l="#911D21",o=Yt(()=>({direction:ke.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>j.day.value===xl?a.div(oe.value,6).times(.8333333333333334).add(a.div(a.add(O.coal.value,1).log10(),a.log10(1e9)).clamp(0,1).div(6)):1,display:N(()=>j.day.value===xl?a.lt(oe.value,6)?i(D,null,[re(oe.value),c("/6 elves")]):i(D,null,[re(O.coal.value),c("/"),re(1e9),c(" coal")]):"")})),s=Xs(()=>({thingsToReset:[he,Ct,O],onReset(){setTimeout(()=>{Ft.earned.value?(he.row1Upgrades.forEach(te=>te.bought.value=!0),he.row2Upgrades.forEach(te=>te.bought.value=!0)):je.earned.value&&(he.row1Upgrades[4].bought.value=!0,he.row2Upgrades[4].bought.value=!0),yt.earned.value&&(Ct.foundationProgress.value=100),ct.earned.value&&(O.warmerCutters.bought.value=!0,O.warmerPlanters.bought.value=!0,O.basicFertilizer.bought.value=!0,O.unlockBonfire.bought.value=!0,O.dedicatedCutters.bought.value=!0,O.dedicatedPlanters.bought.value=!0,O.betterFertilizer.bought.value=!0,O.unlockKiln.bought.value=!0,O.efficientSmelther.bought.value=!0)})}})),u=H(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>a.times(K.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>a.gt(K.books.cuttersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:$e.earned}))]),d=H(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>a.times(K.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>a.gt(K.books.plantersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:$e.earned}))]),p=H(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>a.times(K.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>a.gt(K.books.expandersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:$e.earned}))]),m=H(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>a.times(K.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>a.gt(K.books.heatedCuttersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:$e.earned}))]),w=H(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>a.times(K.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>a.gt(K.books.heatedPlantersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:$e.earned}))]),h=H(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>a.times(K.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>a.gt(K.books.fertilizerBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:$e.earned}))]),A=H(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>a.times(K.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>a.gt(K.books.smallFireBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:$e.earned}))]),v=H(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>a.times(K.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>a.gt(K.books.bonfireBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:$e.earned}))]),y=H(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>a.times(K.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>a.gt(K.books.kilnBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:$e.earned}))]),S=H(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>a.times(K.books.paperBook.amount.value,.1).add(1),description:"The Book Thief",enabled:()=>a.gt(K.books.paperBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:$e.earned}))]),x=H(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>a.times(K.books.boxBook.amount.value,.1).add(1),description:"Not a box",enabled:()=>a.gt(K.books.boxBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:$e.earned}))]),W=H(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:xe.earned})),k(()=>({multiplier:()=>a.times(K.books.clothBook.amount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>a.gt(K.books.clothBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:$e.earned}))]),[E,_]=tl(()=>[{title:"Holly Auto-Buy Frequency",modifier:u,base:10,unit:"/s",visible:ne.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:d,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:y,base:10,unit:"/s",visible:ne.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:S,base:10,unit:"/s",visible:ne.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:x,base:10,unit:"/s",visible:ne.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:W,base:10,unit:"/s",visible:ne.clothElf.bought}]),U=Q(!1),ee=N(()=>i(ht,{modelValue:U.value,"onUpdate:modelValue":te=>U.value=te},{header:()=>i("h2",null,[e,c(" Modifiers")]),body:E})),me=f(()=>{let te=a.pow(4,oe.value).times(1e6);return a.gte(oe.value,9)&&(te=a.times(te,1e15)),te});function q(te){var Et;const Nt=Ae(0),St=te.hasToggle?Ae(!1):Q(!0),Cl=f(()=>te.cooldownModifier.apply(10)),kl=gt((Et=te.canBuy)!=null?Et:!0);function Rt(It){if(ze.bought.value&&r(kl)){Nt.value=a.add(Nt.value,It);const ol=a.recip(Cl.value);(wa(te.buyable)?te.buyable:[te.buyable]).forEach(Qt=>{var fl;for(;a.gte(Nt.value,ol);)if(te.customCost==null?r(Qt.canPurchase):a.gte(Qt.resource.value,te.customCost(Qt.amount.value)))Qt.amount.value=a.add(Qt.amount.value,1),Nt.value=a.sub(Nt.value,ol),(fl=te.onAutoPurchase)==null||fl.call(te);else{Nt.value=ol;break}})}}const ze=R(()=>({...te,buyable:void 0,toggle:St,buyProgress:Nt,update:Rt,resource:O.coal,cost:me,computedAutoBuyCooldown:Cl,display:()=>({title:te.name,description:N(()=>i(D,null,[te.description,ze.bought.value?null:i(D,null,[" ",c("Training this elf will require resetting all your progress from days 1-3.")]),ze.bought.value&&te.hasToggle===!0?i(D,null,[i(Jt,{title:te.toggleDesc,"onUpdate:modelValue":It=>St.value=It,modelValue:St.value},null)]):null])),showCost:!ze.bought.value}),style:"width: 190px",onPurchase(){var It;(It=te.onPurchase)==null||It.call(te),s.reset()}}));return ze}const Ne=q({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:he.row1Buyables[0],cooldownModifier:u}),ge=q({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:he.row1Buyables[1],cooldownModifier:d}),Oe=q({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:he.row1Buyables[2],cooldownModifier:p}),De=[Ne,ge,Oe],Pe=q({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:O.heatedCutters,cooldownModifier:m}),Me=q({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:O.heatedPlanters,cooldownModifier:w}),Fe=q({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:O.moreFertilizer,cooldownModifier:h}),L=[Pe,Me,Fe],Ce=q({name:"Joy",description:"Joy will automatically purchase small fires you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased small fires automatically. Small fires will start giving a boost to ash and coal gain.",buyable:O.buildFire,cooldownModifier:A,visibility:()=>M(pt.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){Ce.toggle.value&&(O.activeFires.value=a.add(O.activeFires.value,1))},onPurchase(){j.days[4].recentlyUpdated.value=!0}}),we=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:O.buildBonfire,cooldownModifier:v,visibility:()=>M(pt.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const te=r(this.buyable.cost);O.activeFires.value=a.sub(O.activeFires.value,te).max(0),O.buildFire.amount.value=a.sub(O.buildFire.amount.value,te).max(0),we.toggle.value&&(O.activeBonfires.value=a.add(O.activeBonfires.value,1))},onPurchase(){j.days[4].recentlyUpdated.value=!0},canBuy:O.unlockBonfire.bought}),be=q({name:"Snowball",description:"Snowball will automatically purchase kilns you can afford, without actually spending any logs. You can toggle whether or not to enable the purchased kilns automatically. Kilns will start giving a boost to ash and coal gain.",buyable:O.buildKiln,cooldownModifier:y,visibility:()=>M(pt.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){be.toggle.value&&(O.activeKilns.value=a.add(O.activeKilns.value,1))},onPurchase(){j.days[4].recentlyUpdated.value=!0},canBuy:O.unlockKiln.bought}),Qe=[Ce,we,be],Ue=q({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(K.books),cooldownModifier:S,visibility:()=>M(qe.elfUpgrades.paperElf.bought.value)}),ut=q({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:Object.values(pt.buyables),cooldownModifier:x,visibility:()=>M(qe.elfUpgrades.boxElf.bought.value)}),Re=q({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[mt.buildPens,mt.betterShears,mt.fasterSpinning],cooldownModifier:W,visibility:()=>M(qe.elfUpgrades.clothElf.bought.value)}),Ut=[Ue,ut,Re],ne={cuttersElf:Ne,plantersElf:ge,expandersElf:Oe,heatedCuttersElf:Pe,heatedPlantersElf:Me,fertilizerElf:Fe,smallFireElf:Ce,bonfireElf:we,kilnElf:be,paperElf:Ue,boxElf:ut,clothElf:Re},oe=f(()=>Object.values(ne).filter(te=>te.bought.value).length),Ze=_e(()=>({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)})),je=_e(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>a.gte(oe.value,2),visibility:()=>M(Ze.earned.value)})),pe=_e(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>a.gte(oe.value,3),visibility:()=>M(je.earned.value)})),dt=_e(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(oe.value,4),visibility:()=>M(pe.earned.value)})),Ke=_e(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>a.gte(oe.value,5),visibility:()=>M(dt.earned.value)})),xe=_e(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>a.gte(oe.value,6),visibility:()=>M(Ke.earned.value)})),yt=_e(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>a.gte(oe.value,7),visibility:()=>M(xe.earned.value&&j.day.value>5)})),He=_e(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>a.gte(oe.value,8),visibility:()=>M(yt.earned.value)})),Ft=_e(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>a.gte(oe.value,9),visibility:()=>M(He.earned.value)})),$e=_e(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>a.gte(oe.value,10),visibility:()=>M(j.day.value>=10)})),ct=_e(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>a.gte(oe.value,11),visibility:()=>M($e.earned.value)})),Y=_e(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>a.gte(oe.value,12),visibility:()=>M(ct.earned.value)})),$=[Ze,je,pe,dt,Ke,xe,yt,He,Ft,$e,ct,Y],Ot={manualMilestone:Ze,researchMilestone:je,coalGainMilestone:pe,logGainMilestone:dt,forestMilestone:Ke,elvesMilestone:xe,foundationMilestone:yt,forestMilestone2:He,treeUpgradesMilestone:Ft,elvesMilestone2:$e,coalUpgradesMilestone:ct,coalGainMilestone2:Y},{collapseMilestones:nl,display:st}=la(Ot);return Te.on("update",te=>{a.lt(j.day.value,xl)||Object.values(ne).forEach(Nt=>Nt.update(te))}),Dt(()=>{j.day.value===xl&&a.gte(oe.value,6)&&a.gte(O.coal.value,1e9)&&j.completeDay()}),{name:e,color:t,elves:ne,totalElves:oe,milestones:$,collapseMilestones:nl,generalTabCollapsed:_,minWidth:700,display:N(()=>i(D,null,[i("div",null,[j.day.value===xl?`Reach ${re(6)} trained elves and ${re(1e9)} ${O.coal.displayName} to complete the day`:`${e} Complete!`," ",c("-")," ",i("button",{class:"button",style:"display: inline-block;",onClick:()=>U.value=!0},[c("Check Modifiers")])]),Z(o),Z(ee),i(ce,null,null),i("div",{style:"width: 600px"},[ye(...De),ye(...L),ye(...Qe),ye(...Ut)]),st()]))}}),dr="coal",Ja=3,O=xt(dr,function(){const e="Coal",t="#151716",l="#B2BeB5",n="var(--foreground)",o=tt(0,"coal"),s=tt(0,"ash"),u=Ae(0),d=f(()=>a.times(u.value,1e3)),p=f(()=>a.times(u.value,.1)),m=f(()=>a.times(u.value,50)),w=Se(()=>({resource:he.logs,cost(){let P=a.times(U.amount.value,r(U.cost)).plus(this.amount.value);return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),P=a.pow(.95,K.books.smallFireBook.amount.value).times(P),P.pow(1.5).times(1e4)},display:N(()=>i(D,null,[i("h3",null,[c("Small Fire")]),i("br",null,null),c("Burn 1000 logs for 0.1 coal and 50 ash"),i("br",null,null),i("br",null,null),c("Currently:"),i("br",null,null),c("-"),le(d.value),c(" logs/sec"),i("br",null,null),c("+"),le(p.value),c(" coal/sec"),i("br",null,null),c("+"),le(m.value),c(" ash/sec"),i("br",null,null),i("br",null,null),c("Cost: "),re(r(w.cost)),c(" "),w.resource.displayName])),onPurchase(){u.value=a.add(u.value,1)},style:{color:n,width:"160px"}})),{min:h,max:A,add:v,remove:y}=Vt({active:u,buyable:w}),S=tt(w.amount,"small fires"),x=Ae(0),W=f(()=>a.times(x.value,1e4)),E=f(()=>a.times(x.value,10)),_=f(()=>a.times(x.value,1e3)),U=Se(()=>({resource:S,cost(){return a.pow(.95,K.books.bonfireBook.amount.value).times(10)},display:N(()=>i(D,null,[i("h3",null,[c("Bonfire")]),i("br",null,null),c("Burn 10,000 logs for 10 coal and 1000 ash"),i("br",null,null),i("br",null,null),c("Currently:"),i("br",null,null),c("-"),le(W.value),c(" logs/sec"),i("br",null,null),c("+"),le(E.value),c(" coal/sec"),i("br",null,null),c("+"),le(_.value),c(" ash/sec"),i("br",null,null),i("br",null,null),c("Cost: "),re(r(U.cost)),c(" "),U.resource.displayName])),onPurchase(P){u.value=a.sub(u.value,P).max(0),x.value=a.add(x.value,1)},style:{color:n,width:"160px"},visibility:()=>M(pe.bought.value)})),{min:ee,max:me,add:q,remove:Ne}=Vt({buyable:U,active:x}),ge=Ae(0),Oe=f(()=>a.times(ge.value,1e6)),De=f(()=>a.times(ge.value,1e4)),Pe=f(()=>a.times(ge.value,1e4)),Me=Se(()=>({resource:he.logs,cost(){let P=this.amount.value;return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),P=a.pow(.95,K.books.kilnBook.amount.value).times(P),a.pow(1.1,P).times(1e7)},display:N(()=>i(D,null,[i("h3",null,[c("Charcoal Kiln")]),i("br",null,null),c("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),i("br",null,null),i("br",null,null),c("Currently:"),i("br",null,null),c("-"),le(Oe.value),c(" logs/sec"),i("br",null,null),c("+"),le(De.value),c(" coal/sec"),i("br",null,null),c("+"),le(Pe.value),c(" ash/sec"),i("br",null,null),i("br",null,null),c("Cost: "),re(r(Me.cost)),c(" "),Me.resource.displayName])),onPurchase(){ge.value=a.add(ge.value,1)},style:{color:n,width:"160px"},visibility:()=>M(He.bought.value)})),{min:Fe,max:L,add:Ce,remove:we}=Vt({buyable:Me,active:ge}),be=Ae(0),Qe=f(()=>a.times(a.pow(be.value,Ve.row2Upgrades[1].bought.value?2:1),5e7).times(bt.efficientDrill.bought.value?2:1)),Ue=Se(()=>({resource:bt.metal,cost(){let P=this.amount.value;return a.gte(P,100)&&(P=a.pow(P,2).div(100)),a.gte(P,1e4)&&(P=a.pow(P,2).div(1e4)),a.pow(1.15,P).times(10)},display:N(()=>i(D,null,[i("h3",null,[c("Mining Drill")]),i("br",null,null),c("Dig through the ground to find 50,000,000 coal"),i("br",null,null),i("br",null,null),c("Currently:"),i("br",null,null),c("+"),le(Qe.value),c(" coal/sec"),i("br",null,null),i("br",null,null),c("Cost: "),re(r(Ue.cost)),c(" "),Ue.resource.displayName])),onPurchase(){be.value=a.add(be.value,1)},style:{color:n,width:"160px"},visibility:()=>M(bt.coalDrill.bought.value)})),{max:ut,min:Re,add:Ut,remove:ne}=Vt({buyable:Ue,active:be}),oe=R(()=>({resource:F(o),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:n}})),Ze=R(()=>({resource:F(o),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:n}})),je=R(()=>({resource:F(s),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:n}})),pe=R(()=>({resource:S,cost:10,display:{title:"Bigger Fires",description:"Put all those fires together into a larger blaze"},onPurchase(){S.value=a.add(S.value,this.cost)},style:{color:n}})),dt=[oe,Ze,je,pe],Ke=R(()=>({resource:F(o),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:n},visibility:()=>M(pe.bought.value)})),xe=R(()=>({resource:F(o),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:n},visibility:()=>M(pe.bought.value)})),yt=R(()=>({canAfford(){return a.gte(he.logs.value,1e5)&&a.gte(s.value,1e5)},onPurchase(){he.logs.value=a.sub(he.logs.value,1e5),s.value=a.sub(s.value,1e5)},display:N(()=>i(D,null,[i("h3",null,[c("Mulched Soil")]),i("br",null,null),c("Double the bonus from Fertilized Soil"),i("br",null,null),i("br",null,null),c("Cost: "),re(1e5),c(" "),he.logs.displayName,i("br",null,null),re(1e5),c(" "),s.displayName])),style:{color:n},visibility:()=>M(pe.bought.value)})),He=R(()=>({resource:he.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:n},visibility:()=>M(pe.bought.value)})),Ft=[Ke,xe,yt,He],$e=R(()=>({resource:F(o),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:n},visibility:()=>M(Ve.depthMilestones[4].earned.value)})),ct=[$e],Y=Se(()=>({resource:F(o),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,K.books.heatedCuttersBook.amount.value).times(P),a.add(P,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:N(()=>i(D,null,[c("Cutters cut down trees "),le(te.value),c("x faster")]))},style:{color:n},visibility:()=>M(oe.bought.value)})),$=Se(()=>({resource:F(o),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,K.books.heatedPlantersBook.amount.value).times(P),a.add(P,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:N(()=>i(D,null,[c("Planters plant trees "),le(St.value),c("x faster")]))},style:{color:n},visibility:()=>M(Ze.bought.value)})),Ot=Se(()=>({resource:F(s),cost(){let P=this.amount.value;return a.gte(P,50)&&(P=a.pow(P,2).div(50)),a.gte(P,200)&&(P=a.pow(P,2).div(200)),a.gte(P,2e6)&&(P=a.pow(P,2).div(2e6)),P=a.pow(.95,K.books.fertilizerBook.amount.value).times(P),a.add(P,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:N(()=>i(D,null,[c("Trees give "),le(kl.value),c("x more logs")]))},style:{color:n},visibility:()=>M(je.bought.value)})),nl=[Y,$,Ot],st=H(()=>[J(()=>({addend(){return a.times(Y.amount.value,.25)},description:"Heated Cutters",enabled(){return a.gt(Y.amount.value,0)}})),k(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:Ke.bought}))]),te=f(()=>st.apply(1)),Nt=H(()=>[J(()=>({addend(){return a.times($.amount.value,.25)},description:"Heated Planters",enabled(){return a.gt($.amount.value,0)}})),k(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:xe.bought}))]),St=f(()=>Nt.apply(1)),Cl=H(()=>[J(()=>({addend(){return a.times(Ot.amount.value,.25)},description:"Fertilized Soil",enabled(){return a.gt(Ot.amount.value,0)}})),k(()=>({multiplier:2,description:"Mulched Soil",enabled:yt.bought}))]),kl=f(()=>Cl.apply(1)),Rt=H(()=>[J(()=>({addend(){return p.value},description:"Small Fires",enabled(){return a.gt(u.value,0)}})),J(()=>({addend(){return E.value},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),J(()=>({addend(){return De.value},description:"Charcoal Kilns",enabled(){return a.gt(ge.value,0)}})),J(()=>({addend(){return Qe.value},description:"Mining Drills",enabled(){return a.gt(be.value,0)}})),k(()=>({multiplier:2,description:"Carry coal in boxes",enabled:pt.upgrades.coalUpgrade.bought})),k(()=>({multiplier:()=>a.div(pt.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:pt.upgrades.coalUpgrade.bought})),k(()=>({multiplier:()=>a.div(w.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:Le.elves.smallFireElf.bought})),k(()=>({multiplier:()=>a.div(U.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Le.elves.bonfireElf.bought})),k(()=>({multiplier:()=>a.div(Me.amount.value,100).times(Xe.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Le.elves.kilnElf.bought})),k(()=>({multiplier:2,description:"Mining overalls",enabled:mt.metalUpgrades.metalUpgrade2.bought})),k(()=>({multiplier:3,description:"Mining helmet",enabled:mt.metalUpgrades.metalUpgrade3.bought})),k(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:mt.metalUpgrades.metalUpgrade4.bought})),k(()=>({multiplier:2,description:"12 Elves Trained",enabled:Le.milestones[11].earned})),In(()=>({exponent:1.25,description:"3 Elves Trained",enabled:Le.milestones[2].earned,supportLowNumbers:!0})),k(()=>({multiplier:()=>a.mul(Ve.depth.value,.25).add(1),description:"5m Well Depth",enabled:Ve.depthMilestones[0].earned})),k(()=>({multiplier:Ve.extractorCoal,description:"Heavy Extractor",enabled:()=>a.gt(Ve.activeExtractor.value,0)}))]),ze=f(()=>Rt.apply(0)),Et=H(()=>[J(()=>({addend(){return m.value},description:"Small Fires",enabled(){return a.gt(u.value,0)}})),J(()=>({addend(){return _.value},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),J(()=>({addend(){return Pe.value},description:"Charcoal Kilns",enabled(){return a.gt(ge.value,0)}})),k(()=>({multiplier:2,description:"Carry ash in boxes",enabled:pt.upgrades.ashUpgrade.bought})),k(()=>({multiplier:()=>a.div(pt.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:pt.upgrades.ashUpgrade.bought})),k(()=>({multiplier:()=>a.div(w.amount.value,1e3).add(1),description:"Small Fires Synergy",enabled:Le.elves.smallFireElf.bought})),k(()=>({multiplier:()=>a.div(U.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Le.elves.bonfireElf.bought})),k(()=>({multiplier:()=>a.div(Me.amount.value,100).times(Xe.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Le.elves.kilnElf.bought})),k(()=>({multiplier:4,description:"Mining boots",enabled:mt.metalUpgrades.metalUpgrade1.bought}))]),It=f(()=>Et.apply(0)),ol=H(()=>[J(()=>({addend(){return a.negate(d.value)},description:"Small Fires",enabled(){return a.gt(u.value,0)}})),J(()=>({addend(){return a.negate(W.value)},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),J(()=>({addend(){return a.negate(Oe.value)},description:"Charcoal Kilns",enabled(){return a.gt(ge.value,0)}}))]),Qt=f(()=>ol.apply(0)),[fl,Hl]=tl(()=>[{title:"Log Consumption",modifier:ol,base:0,visible(){return a.gt(u.value,0)||a.gt(x.value,0)||a.gt(ge.value,0)}},{title:"Coal Gain",modifier:Rt,base:0,visible(){return a.gt(u.value,0)||a.gt(x.value,0)||a.gt(ge.value,0)}},{title:"Ash Gain",modifier:Et,base:0,visible(){return a.gt(u.value,0)||a.gt(x.value,0)||a.gt(ge.value,0)}}]),zt=Q(!1),Ll=N(()=>i(ht,{modelValue:zt.value,"onUpdate:modelValue":P=>zt.value=P},{header:()=>i("h2",null,[e,c(" Modifiers")]),body:fl}));Te.on("update",P=>{a.lt(j.day.value,Ja)||a.times(P,Qt.value).negate().gt(he.logs.value)||(he.logs.value=a.times(P,Qt.value).plus(he.logs.value),o.value=a.times(P,ze.value).plus(o.value),s.value=a.times(P,It.value).plus(s.value),u.value=a.max(u.value,0))});const{total:_l,trackerDisplay:jl}=ll({resource:o,goal:1e7,name:e,day:Ja,color:t,modal:{show:zt,display:Ll}});return{name:e,color:t,coal:o,totalCoal:_l,computedCoalGain:ze,ash:s,activeFires:u,buildFire:w,activeBonfires:x,buildBonfire:U,activeKilns:ge,buildKiln:Me,activeDrills:be,buildDrill:Ue,warmerCutters:oe,warmerPlanters:Ze,basicFertilizer:je,unlockBonfire:pe,dedicatedCutters:Ke,dedicatedPlanters:xe,betterFertilizer:yt,unlockKiln:He,efficientSmelther:$e,heatedCutters:Y,heatedPlanters:$,moreFertilizer:Ot,computedHeatedCutterEffect:te,computedHeatedPlanterEffect:St,computedFertilizerEffect:kl,generalTabCollapsed:Hl,minWidth:700,display:N(()=>i(D,null,[Z(jl),i(ce,null,null),i(kt,{resource:o,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(ze.value,0)?`+${le(ze.value)}/s`:void 0},null),i(ce,null,null),i(kt,{resource:s,color:l,style:"margin-bottom: 0",effectDisplay:a.gt(It.value,0)?`+${le(It.value)}/s`:void 0},null),i(ce,null,null),i(Il,null,{default:()=>[i(Bt,null,{default:()=>[Z(w),i("div",null,[re(a.floor(u.value)),c("/"),re(a.floor(w.amount.value))]),ye(h,y,v,A)]}),pe.bought.value?i(D,null,[i(ce,null,null),i(Bt,null,{default:()=>[Z(U),i("div",null,[re(x.value),c("/"),re(U.amount.value)]),ye(ee,Ne,q,me)]})]):void 0,He.bought.value?i(D,null,[i(ce,null,null),i(Bt,null,{default:()=>[Z(Me),i("div",null,[re(ge.value),c("/"),re(Me.amount.value)]),ye(Fe,we,Ce,L)]})]):void 0,bt.coalDrill.bought.value?i(D,null,[i(ce,null,null),i(Bt,null,{default:()=>[Z(Ue),i("div",null,[re(be.value),c("/"),re(Ue.amount.value)]),ye(Re,ne,Ut,ut)]})]):void 0]}),i(ce,null,null),ye(...dt),ye(...Ft),ye(...ct),ye(...nl)]))}}),cr="metal",Ya=7,bt=xt(cr,function(){const e="Metal",t="#888B8D",l=tt(0,"metal ingots",void 0,!0),n=ja(l),o=tt(0,"ore"),s=ja(o),u=H(()=>[k(()=>({multiplier:5,description:"Crucible",enabled:Me.bought})),k(()=>({multiplier:1.5,description:"Industrial Crucible",enabled:()=>a.gte(be.amount.value,1)})),k(()=>({multiplier:2,description:"Industrial Furnace",enabled:L.bought})),k(()=>({multiplier:()=>a.add(ut.value,1),description:"Hotter Forges",enabled:()=>a.gte(Ue.amount.value,1)})),k(()=>({multiplier:2,description:"Carry metal in boxes",enabled:pt.row2Upgrades.metalUpgrade.bought})),k(()=>({multiplier:Xe.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Xe.dyes.purple.amount.value,1)})),k(()=>({multiplier:()=>a.add(mt.cloth.value,1).log10().plus(1),description:"Glistening Paint",enabled:Xe.upgrades.redDyeUpg.bought}))]),d=f(()=>u.apply(.1)),p=H(()=>[J(()=>({addend:()=>a.times(be.amount.value,10),description:"Industrial Crucibles",enabled:()=>a.gte(be.amount.value,1)})),k(()=>({multiplier:2,description:"Efficient Crucibles",enabled:O.efficientSmelther.bought})),k(()=>({multiplier:()=>a.mul(Ve.activeSmelter.value,Ve.oilEffectiveness.value).add(1),description:"Oil Smelter",enabled:()=>a.gt(Ve.activeSmelter.value,0)})),k(()=>({multiplier:Xe.boosts.purple2,description:"Purple Dye Boost 2",enabled:()=>a.gte(Xe.dyes.purple.amount.value,1)})),k(()=>({multiplier:()=>a.add(qe.activeRefinery.value,1).sqrt(),description:"De Louvre",enabled:Xe.upgrades.redDyeUpg2.bought}))]),m=f(()=>p.apply(0)),w=H(()=>[k(()=>({multiplier:3,description:"Efficient Crucibles",enabled:O.efficientSmelther.bought})),k(()=>({multiplier:()=>a.add(Ve.activeBurner.value,1).mul(Ve.oilEffectiveness.value),description:"Blaster Burner",enabled:Ve.row2Upgrades[2].bought}))]),h=f(()=>w.apply(1)),A=1e10,v=f(()=>a.min(o.value,a.div(O.coal.value,A)).floor().max(0)),y=Mt(()=>({display:N(()=>{const pe=a.gte(v.value,1)?v.value:a.add(v.value,1);return i(D,null,[i("span",{style:"font-size: large"},[c("Smelt "),de(a.times(v.value,d.value))," ",l.displayName]),i("br",null,null),i("span",{style:"font-size: large"},[c("Cost: "),se(pe),c(" "),o.displayName,c(";")," ",se(a.times(pe,A)),c(" "),O.coal.displayName])])}),canClick:()=>a.gte(v.value,1),onClick(){!r(this.canClick)||S(v.value)},style:{width:"600px",minHeight:"unset"}}));function S(pe,dt=1){const[Ke,xe,yt]=[a.times(pe,d.value).times(dt),pe,a.times(pe,A)];l.value=a.add(l.value,Ke),o.value=a.sub(o.value,xe),O.coal.value=a.sub(O.coal.value,yt)}const x=H(()=>[J(()=>({addend:()=>we.amount.value,description:"Mining Drills",enabled:()=>a.gte(we.amount.value,1)})),k(()=>({multiplier:()=>a.mul(Ve.depth.value,.05).add(1),description:"25m Well Depth",enabled:Ve.depthMilestones[2].earned})),k(()=>({multiplier:Ve.extractorOre,description:"Heavy Extractor",enabled:()=>a.gt(Ve.activeExtractor.value,0)})),k(()=>({multiplier:2,description:"Carry ore in boxes",enabled:pt.row2Upgrades.oreUpgrade.bought}))]),W=f(()=>x.apply(1)),E=H(()=>[k(()=>({multiplier:2,description:"A Simple Pickaxe",enabled:De.bought})),k(()=>({multiplier:2,description:"Double Pickaxe",enabled:Pe.bought})),k(()=>({multiplier:2.5,description:"Mining Drills",enabled:()=>a.gte(we.amount.value,1)})),k(()=>({multiplier:2,description:"Efficient Drills",enabled:Ce.bought})),k(()=>({multiplier:2,description:"Oil the Mining Drills",enabled:Ve.row2Upgrades[1].bought}))]),_=f(()=>E.apply(a.recip(ee))),U=Ae(0),ee=10,me=Yt(()=>({width:400,height:25,direction:ke.Right,fillStyle:{backgroundColor:t},progress:()=>U.value})),q=H(()=>[J(()=>({addend:W})),k(()=>({multiplier:_}))]),Ne=f(()=>q.apply(0)),ge=H(()=>[J(()=>({addend:Ne})),J(()=>({addend:()=>a.negate(m.value),enabled:Qe}))]),Oe=f(()=>ge.apply(0)),De=R(()=>({resource:F(l),cost:.1,display:{title:"A Simple Pickaxe",description:"Make a simple pickaxe to help mine faster.<br/><br/>Halve the time to mine more ore"}})),Pe=R(()=>({resource:F(l),cost:.1,display:{title:"Double Pickaxe",description:"This is too slow. What if you swung two pickaxes at once?<br/><br/>Halve the time to mine ore, again"},visibility:()=>M(Pe.bought.value)})),Me=R(()=>({resource:F(l),cost:1,display:{title:"Crucible",description:"Smelting this all by hand is rather painful, and a lot of the metal is left in the slag. A small crucible should help a lot!<br/><br/>Increase the metal extracted per ore by 5x"},visibility:()=>M(Me.bought.value||a.div(s.value,d.value).plus(n.value).gte(1))})),Fe=R(()=>({resource:F(l),cost:0,display:{title:"Coal Drilling",description:"These mining drills are pretty powerful, mining more ore than you can actually smelt. Could be worth making some to mine coal instead"},visibility:()=>M(a.gte(we.amount.value,1)&&(Fe.bought.value||j.days[7].opened.value||a.lt(O.computedCoalGain.value,a.times(W.value,_.value).times(A)))),onPurchase(){j.days[2].recentlyUpdated.value=!0}})),L=R(()=>({canAfford(){return a.gte(l.value,50)&&a.gte(O.coal.value,1e11)},onPurchase(){l.value=a.sub(l.value,50),O.coal.value=a.sub(O.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/>${de(1e11)} ${O.coal.displayName}`}})),Ce=R(()=>({resource:F(l),cost:1e5,display:{title:"Efficient Drills",description:"Use metal and a bunch of R&D to make drilling stuff faster. Double coal and ore mining speed."},visibility:()=>M(Ve.depthMilestones[4].earned.value)})),we=Se(()=>({resource:F(l),cost(){return a.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:N(()=>i(D,null,[c("Mine 2.5x faster. Increase ore mining amount by")," ",se(we.amount.value),c(" ore per operation")]))},visibility:()=>M(a.gte(we.amount.value,1)||a.div(s.value,d.value).plus(n.value).gte(10)),style:{width:"200px"}})),be=Se(()=>({resource:F(l),cost(){return a.pow(1.15,a.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:N(()=>i(D,null,[c("Automatically smelts")," ",se(a.times(be.amount.value,10)),c(" ore per second")]))},visibility:()=>M(a.gte(be.amount.value,1)||a.gte(we.amount.value,4)||a.gte(s.value,50)),style:{width:"200px"}})),Qe=Ae(!0),Ue=Se(()=>({resource:O.coal,cost(){return a.pow(10,this.amount.value).times(1e12)},display:{title:"Hotter Forges",description:"More coal makes the fires burn hotter, getting just a little more metal out of each bit of ore",effectDisplay:N(()=>i(D,null,[c("Gain "),se(a.times(ut.value,100)),c("% more metal per ore")]))},visibility:()=>M(a.gte(Ue.amount.value,1)||L.bought.value),style:{width:"200px"}})),ut=f(()=>a.times(Ue.amount.value,.25));Te.on("update",pe=>{U.value=a.times(pe,_.value).plus(U.value);const dt=U.value.trunc();U.value=U.value.minus(dt),o.value=a.add(o.value,a.times(dt,W.value)),Qe.value&&S(a.min(v.value,a.times(m.value,pe)),h.value)});const[Re,Ut]=tl(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(be.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:w,base:1,visible(){return a.gt(h.value,1)}},{title:"Metal per Ore",modifier:u,base:.1},{title:"Ore per Mining Operation",modifier:x,base:1},{title:"Mining Speed",modifier:E,base:.1,unit:"/s"}]),ne=Q(!1),oe=N(()=>i(ht,{modelValue:ne.value,"onUpdate:modelValue":pe=>ne.value=pe},{header:()=>i("h2",null,[e,c(" Modifiers")]),body:Re})),{total:Ze,trackerDisplay:je}=ll({resource:l,goal:25e3,name:e,day:Ya,color:t,modal:{show:ne,display:oe}});return{name:e,day:Ya,color:t,ore:o,bestOre:s,oreProgress:U,metal:l,bestMetal:n,totalMetal:Ze,simplePickaxe:De,doublePickaxe:Pe,crucible:Me,coalDrill:Fe,industrialFurnace:L,efficientDrill:Ce,oreDrill:we,industrialCrucible:be,autoSmeltEnabled:Qe,hotterForge:Ue,generalTabCollapsed:Ut,minWidth:700,display:N(()=>i(D,null,[Z(je),i(ce,null,null),i(kt,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:N(()=>i(D,null,[Qe.value&&a.gte(be.amount.value,1)?`+${pn([[m.value,"smelting speed"],[Ne.value,"ore gain"],[a.div(O.computedCoalGain.value,A),"coal gain"]],"/s",a.mul(d.value,h.value))}`:void 0]))},null),i(ce,null,null),Z(y),a.gte(be.amount.value,1)?i("div",{style:{width:"150px"}},[i(Jt,{title:"Auto Smelt",modelValue:Qe.value,"onUpdate:modelValue":pe=>Qe.value=pe},null)]):void 0,i(ce,null,null),i(kt,{resource:o,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:N(()=>i(D,null,[mn(Oe.value)]))},null),i(ce,null,null),i("div",null,[c("Currently mining "),de(W.value),c(" ore every")," ",de(a.recip(_.value)),c(" seconds")]),Z(me),i(ce,null,null),ye(De,Pe,Me,Fe,L,Ce),ye(we,be,Ue)]))}}),pr="cloth",Xa=8,mt=xt(pr,function(){const e="Cloth",t="white",l=tt(0,"cloth"),n=tt(0,"wool"),o=tt(10,"sheep"),s=Ae(0),u=Yt(()=>({direction:ke.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(s.value,Re.value)})),d=Mt(()=>({display:{title:"Breed sheep",description:N(()=>i(D,null,[c("Breed "),se(a.floor(Ue.value)),c(" sheep"),i("br",null,null),Z(u)]))},style:{minHeight:"80px"},canClick:()=>a.gte(s.value,Re.value),onClick(){if(a.lt(s.value,Re.value))return;const Y=a.floor(Ue.value);o.value=a.add(o.value,Y),s.value=0}})),p=Ae(0),m=Yt(()=>({direction:ke.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,Ze.value)})),w=Mt(()=>({display:{title:"Shear sheep",description:N(()=>i(D,null,[c("Shear up to "),se(a.floor(ne.value)),c(" sheep"),i("br",null,null),Z(m)]))},style:{minHeight:"80px"},canClick:()=>a.gte(p.value,Ze.value),onClick(){if(a.lt(p.value,Ze.value))return;const Y=a.min(o.value,ne.value).floor();n.value=a.add(n.value,Y),p.value=0}})),h=Ae(0),A=Yt(()=>({direction:ke.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,Ke.value)})),v=Mt(()=>({display:{title:"Spinning wool",description:N(()=>i(D,null,[c("Spin "),se(a.floor(pe.value)),c(" wool"),i("br",null,null),Z(A)]))},style:{minHeight:"80px"},canClick:()=>a.gte(h.value,Ke.value),onClick(){if(a.lt(h.value,Ke.value))return;const Y=a.min(n.value,pe.value).floor();l.value=a.add(l.value,Y),n.value=a.sub(n.value,Y),h.value=0}})),y=Nl(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{d.canClick.value&&d.onClick()}})),S=Nl(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{w.canClick.value&&w.onClick()}})),x=Nl(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{v.canClick.value&&v.onClick()}})),W=Se(()=>({resource:he.logs,cost(){let Y=this.amount.value;return a.gte(Y,100)&&(Y=a.pow(Y,2).div(100)),Y=a.pow(.95,K.books.clothBook.amount.value).times(Y),a.pow(1.5,Y).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),E=Se(()=>({resource:bt.metal,cost(){let Y=this.amount.value;return a.gte(Y,100)&&(Y=a.pow(Y,2).div(100)),Y=a.pow(.95,K.books.clothBook.amount.value).times(Y),a.pow(1.4,Y).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),_=Se(()=>({resource:K.paper,cost(){let Y=this.amount.value;return a.gte(Y,100)&&(Y=a.pow(Y,2).div(100)),Y=a.pow(.95,K.books.clothBook.amount.value).times(Y),a.pow(1.3,Y).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),U=R(()=>({resource:F(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),ee=R(()=>({resource:F(n),cost:150,visibility:()=>M(U.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),me=R(()=>({resource:F(o),cost:200,visibility:()=>M(ee.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),Ne={treesUpgrade4:R(()=>({resource:F(l),cost:1e3,visibility:()=>M(qe.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x log gain"}})),treesUpgrade3:me,treesUpgrade2:ee,treesUpgrade1:U},ge=R(()=>({resource:F(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),Oe=R(()=>({resource:F(n),cost:225,visibility:()=>M(ge.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),De=R(()=>({resource:F(o),cost:300,visibility:()=>M(Oe.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),Me={metalUpgrade4:R(()=>({resource:F(l),cost:2e3,visibility:()=>M(qe.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:De,metalUpgrade2:Oe,metalUpgrade1:ge},Fe=R(()=>({resource:F(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),L=R(()=>({resource:F(n),cost:200,visibility:()=>M(Fe.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),Ce=R(()=>({resource:F(o),cost:400,visibility:()=>M(L.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),be={paperUpgrade4:R(()=>({resource:F(l),cost:4e3,visibility:()=>M(qe.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:Ce,paperUpgrade2:L,paperUpgrade1:Fe},Qe=H(()=>[J(()=>({addend:W.amount,description:"Build more pens"})),k(()=>({multiplier:()=>a.div(qe.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(qe.buyables.clothGains.amount.value,1)})),k(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:K.upgrades.clothUpgrade.bought}))]),Ue=f(()=>Qe.apply(1)),ut=H(()=>[]),Re=f(()=>ut.apply(1)),Ut=H(()=>[J(()=>({addend:E.amount,description:"Make stronger shears"})),k(()=>({multiplier:()=>a.div(qe.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(qe.buyables.clothGains.amount.value,1)})),k(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:K.upgrades.clothUpgrade.bought}))]),ne=f(()=>Ut.apply(1)),oe=H(()=>[]),Ze=f(()=>oe.apply(1)),je=H(()=>[J(()=>({addend:_.amount,description:"Learn how to spin"})),k(()=>({multiplier:()=>a.div(qe.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(qe.buyables.clothGains.amount.value,1)})),k(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:K.upgrades.clothUpgrade.bought}))]),pe=f(()=>je.apply(1)),dt=H(()=>[]),Ke=f(()=>dt.apply(1)),[xe,yt]=tl(()=>[{title:"Sheep Gain",modifier:Qe,base:1},{title:"Sheep Breeding Cooldown",modifier:ut,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:Ut,base:1},{title:"Shearing Cooldown",modifier:oe,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:je,base:1},{title:"Spinning Cooldown",modifier:dt,base:1,visible:!1,unit:"s"}]),He=Q(!1),Ft=N(()=>i(ht,{modelValue:He.value,"onUpdate:modelValue":Y=>He.value=Y},{header:()=>i("h2",null,[e,c(" Modifiers")]),body:xe}));Te.on("update",Y=>{a.lt(j.day.value,Xa)||(a.gte(s.value,Re.value)?s.value=Re.value:(s.value=a.add(s.value,Y),d.isHolding.value&&d.onClick()),a.gte(p.value,Ze.value)?p.value=Ze.value:(p.value=a.add(p.value,Y),w.isHolding.value&&w.onClick()),a.gte(h.value,Ke.value)?h.value=Ke.value:(h.value=a.add(h.value,Y),v.isHolding.value&&v.onClick()))});const{total:$e,trackerDisplay:ct}=ll({resource:l,goal:1e3,name:e,day:Xa,color:t,textColor:"var(--feature-foreground)",modal:{show:He,display:Ft}});return{name:e,color:t,cloth:l,totalCloth:$e,wool:n,sheep:o,buildPens:W,betterShears:E,fasterSpinning:_,treesUpgrades:Ne,metalUpgrades:Me,paperUpgrades:be,generalTabCollapsed:yt,breedingProgress:s,shearingProgress:p,spinningProgress:h,breedSheepHK:y,shearSheepHK:S,spinWoolHK:x,minWidth:700,display:N(()=>i(D,null,[Z(ct),i(ce,null,null),i(kt,{resource:l,style:"margin-bottom: 0"},null),i(kt,{resource:n,style:"margin-bottom: 0"},null),i(kt,{resource:o,style:"margin-bottom: 0"},null),ye(d,w,v),ye(W,E,_),i(ce,null,null),i(Il,null,{default:()=>[Ht(...Object.values(Ne)),Ht(...Object.values(Me)),Ht(...Object.values(be))]})]))}}),mr="paper",ya=5,K=xt(mr,function(){const e="Paper",t="#E8DCB8",l=tt(0,"paper"),n=tt(f(()=>a.min(a.div(he.logs.value,1e9),a.div(O.ash.value,1e6))),"pulp"),o=Dn(()=>({scaling:xa(1,1.2),baseResource:n,gainResource:F(l),roundUpCost:!0,spend(L,Ce){he.logs.value=a.sub(he.logs.value,a.times(Ce,1e9)),O.ash.value=a.sub(O.ash.value,a.times(Ce,1e6))},gainModifier:Ne})),s=Mt(()=>({display:N(()=>{const L=a.gte(o.actualGain.value,1)?o.currentAt.value:o.nextAt.value;return i(D,null,[i("span",{style:"font-size: large"},[c("Create "),re(o.currentGain.value),c(" "),l.displayName]),i("br",null,null),i("span",{style:"font-size: large"},[c("Cost: "),Vl(he.logs,L),c(" "),n.displayName,c(" ("),re(a.times(L,1e9)),c(" "),he.logs.displayName,c(";")," ",re(a.times(L,1e6)),c(" "),O.ash.displayName,c(")")])])}),canClick:()=>a.gte(o.actualGain.value,1),onClick(){!r(this.canClick)||o.convert()},style:"width: 600px; min-height: unset"}));function u(L){const Ce=Se(()=>({...L,display:{title:L.name,description:`Print a copy of "${L.name}", which ${L.elfName} will use to improve their skills! Each copy printed will reduce the "${L.buyableName}" price scaling by 0.95x and make ${L.elfName} purchase +10% faster!`,effectDisplay:N(()=>i(D,null,[le(a.pow(.95,Ce.amount.value)),c("x price scaling,")," ",le(a.div(Ce.amount.value,10).add(1)),c("x auto-purchase speed")])),showAmount:!1},resource:F(l),cost(){let we=this.amount.value;return(L.elfName==="Star"||L.elfName==="Bell")&&(we=a.pow(we,2)),a.gte(we,100)&&(we=a.pow(we,2).div(100)),a.gte(we,1e4)&&(we=a.pow(we,2).div(1e4)),we=a.pow(.95,x.amount.value).times(we),a.pow(5,we).times(10)},style:"width: 600px"}));return Ce}const d=u({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),p=u({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),m=u({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),w=u({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),h=u({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),A=u({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),v=u({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>M(Le.elves.smallFireElf.bought.value)}),y=u({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>M(Le.elves.bonfireElf.bought.value)}),S=u({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>M(Le.elves.kilnElf.bought.value)}),x=u({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>M(Le.elves.paperElf.bought.value)}),W=u({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>M(Le.elves.boxElf.bought.value)}),E=u({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>M(Le.elves.clothElf.bought.value)}),_={cuttersBook:d,plantersBook:p,expandersBook:m,heatedCuttersBook:w,heatedPlantersBook:h,fertilizerBook:A,smallFireBook:v,bonfireBook:y,kilnBook:S,paperBook:x,boxBook:W,clothBook:E},U=R(()=>({resource:F(l),cost:1e8,visibility:()=>M(qe.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),ee=R(()=>({resource:F(l),cost:1e9,visibility:()=>M(qe.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),me=R(()=>({resource:F(l),cost:1e10,visibility:()=>M(qe.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),q={clothUpgrade:U,drillingUpgrade:ee,oilUpgrade:me},Ne=H(()=>[k(()=>({multiplier:2,description:"Scholar's shoes",enabled:mt.paperUpgrades.paperUpgrade1.bought})),k(()=>({multiplier:2,description:"Scholar's slacks",enabled:mt.paperUpgrades.paperUpgrade2.bought})),k(()=>({multiplier:2,description:"Scholar's jacket",enabled:mt.paperUpgrades.paperUpgrade3.bought})),k(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:mt.paperUpgrades.paperUpgrade4.bought})),k(()=>({multiplier:Xe.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Xe.dyes.yellow.amount.value,1)}))]),[ge,Oe]=tl(()=>[{title:"Paper Gain",modifier:Ne,base:1}]),De=Q(!1),Pe=N(()=>i(ht,{modelValue:De.value,"onUpdate:modelValue":L=>De.value=L},{header:()=>i("h2",null,[e,c(" Modifiers")]),body:ge}));Te.on("update",L=>{a.lt(j.day.value,ya)||(l.value=a.times(L,qe.buyables.passivePaper.amount.value).times(o.currentGain.value).div(100).add(l.value))});const{total:Me,trackerDisplay:Fe}=ll({resource:l,goal:5e3,name:e,day:ya,color:t,textColor:"var(--feature-foreground)",modal:{show:De,display:Pe}});return{name:e,day:ya,color:t,paper:l,totalPaper:Me,paperConversion:o,books:_,upgrades:q,generalTabCollapsed:Oe,minWidth:700,display:N(()=>i(D,null,[Z(Fe),i(ce,null,null),i(kt,{resource:l,color:t,style:"margin-bottom: 0"},null),i(ce,null,null),Z(s),i(ce,null,null),ye(...Object.values(q)),i(ce,null,null),Ht(...Object.values(_))]))}}),gr="boxes",ba=6,pt=xt(gr,function(){const e="Boxes",t="#964B00",l=tt(0,"boxes"),n=Dn(()=>({scaling:xa(1e10,1),baseResource:he.logs,gainResource:F(l),roundUpCost:!0})),o=Mt(()=>({display:N(()=>i(D,null,[i("span",{style:"font-size: large"},[c("Create "),re(n.currentGain.value),c(" "),l.displayName]),i("br",null,null),i("span",{style:"font-size: large"},[c("Cost:")," ",Vl(he.logs,a.gte(n.actualGain.value,1)?n.currentAt.value:n.nextAt.value)," ",he.logs.displayName])])),canClick:()=>a.gte(n.actualGain.value,1),onClick(){!r(this.canClick)||n.convert()},style:"width: 600px; min-height: unset"})),s=R(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){j.days[3].recentlyUpdated.value=!0},resource:F(l),cost:100})),u=R(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){j.days[3].recentlyUpdated.value=!0},resource:F(l),cost:1e3})),d=R(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){j.days[3].recentlyUpdated.value=!0},resource:F(l),cost:4e3})),p={logsUpgrade:s,ashUpgrade:u,coalUpgrade:d},m=R(()=>({resource:F(l),cost:1e8,visibility:()=>M(qe.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),w=R(()=>({resource:F(l),cost:1e9,visibility:()=>M(qe.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),h=R(()=>({resource:F(l),cost:1e10,visibility:()=>M(qe.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),A={oreUpgrade:m,metalUpgrade:w,plasticUpgrade:h},v=Se(()=>({display:{title:"Carry more logs",description:"Use boxes to carry even more logs, boosting their gain",effectDisplay:N(()=>i(D,null,[le(a.div(v.amount.value,2).add(1)),c("x")]))},resource:F(l),cost(){let _=this.amount.value;return _=a.pow(.95,K.books.boxBook.amount.value).times(_),a.pow(3,_).times(100).div(Xe.boosts.orange2.value)},visibility:()=>M(s.bought.value)})),y=Se(()=>({display:{title:"Carry more ash",description:"Use boxes to carry even more ash, boosting its gain",effectDisplay:N(()=>i(D,null,[le(a.div(y.amount.value,2).add(1)),c("x")]))},resource:F(l),cost(){let _=this.amount.value;return _=a.pow(.95,K.books.boxBook.amount.value).times(_),a.pow(5,_).times(1e3).div(Xe.boosts.orange2.value)},visibility:()=>M(u.bought.value)})),S=Se(()=>({display:{title:"Carry more coal",description:"Use boxes to carry even more coal, boosting its gain",effectDisplay:N(()=>i(D,null,[le(a.div(S.amount.value,2).add(1)),c("x")]))},resource:F(l),cost(){let _=this.amount.value;return _=a.pow(.95,K.books.boxBook.amount.value).times(_),a.pow(7,_).times(1e3).div(Xe.boosts.orange2.value)},visibility:()=>M(d.bought.value)})),x={logBoxesBuyable:v,ashBoxesBuyable:y,coalBoxesBuyable:S};Te.on("update",_=>{a.lt(j.day.value,ba)||(l.value=a.times(_,qe.buyables.passiveBoxes.amount.value).times(n.currentGain.value).div(100).add(l.value))});const{total:W,trackerDisplay:E}=ll({resource:l,goal:5e4,name:e,day:ba,color:t});return{name:e,day:ba,color:t,boxes:l,totalBoxes:W,boxesConversion:n,upgrades:p,row2Upgrades:A,buyables:x,minWidth:700,display:N(()=>i(D,null,[Z(E),i(ce,null,null),i(kt,{resource:l,color:t,style:"margin-bottom: 0"},null),i(ce,null,null),Z(o),i(ce,null,null),ye(...Object.values(p)),ye(...Object.values(A)),ye(...Object.values(x))]))}}),fr="trees",Za=1,en=.1,he=xt(fr,function(){const e="Trees",t="#4BDC13",l="green",n=tt(0,"logs"),o=tt(0,"saplings"),s=Q(0),u=H(()=>[J(()=>({addend:()=>a.times(q.amount.value,10),description:"Expand Forest",enabled:_.bought})),J(()=>({addend:()=>a.div(Ct.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Ct.milestones.morePlantsMilestone1.earned})),k(()=>({multiplier:2,description:"5 Elves Trained",enabled:Le.milestones[4].earned})),k(()=>({multiplier:2,description:"8 Elves Trained",enabled:Le.milestones[7].earned})),k(()=>({multiplier:4,description:"Lumberjack Boots",enabled:mt.treesUpgrades.treesUpgrade1.bought})),J(()=>({addend:Xe.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>a.gte(Xe.dyes.blue.amount.value,1)}))]),d=tt(f(()=>a.sub(u.apply(10),o.value)),"trees"),p=f(()=>u.apply(10)),m=R(()=>({resource:F(n),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),w=R(()=>({resource:F(n),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),h=R(()=>({resource:F(n),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),A=R(()=>({resource:F(n),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),v=R(()=>({resource:F(n),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),y=[m,w,h,A,v],S=R(()=>({resource:F(n),cost:50,visibility:()=>M(v.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),x=R(()=>({resource:F(n),cost:50,visibility:()=>M(v.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),W=R(()=>({resource:F(n),cost:150,visibility:()=>M(v.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),E=R(()=>({resource:F(n),cost:150,visibility:()=>M(v.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),_=R(()=>({resource:F(n),cost:300,visibility:()=>M(v.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),U=[S,x,W,E,_],ee=Se(()=>({resource:F(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,K.books.cuttersBook.amount.value).times($),a.times(100,$).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>M(_.bought.value)})),me=Se(()=>({resource:F(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,K.books.plantersBook.amount.value).times($),a.times(100,$).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>M(_.bought.value)})),q=Se(()=>({resource:F(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,K.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:()=>M(_.bought.value)})),Ne=[ee,me,q],ge=H(()=>[J(()=>({addend:1,description:"Wooden Fingers",enabled:m.bought})),J(()=>({addend:Fe,description:"Smart Knives",enabled:W.bought}))]),Oe=f(()=>ge.apply(1)),De=H(()=>[k(()=>({multiplier:.5,description:"Sharper Fingers",enabled:S.bought})),k(()=>({multiplier:()=>a.pow(.5,Le.totalElves.value),description:"1 Elf Trained",enabled:Le.milestones[0].earned}))]),Pe=f(()=>De.apply(1)),Me=H(()=>[J(()=>({addend:1,description:"Automated Knives",enabled:h.bought})),J(()=>({addend:ee.amount,description:"Generic Cutters",enabled:_.bought})),J(()=>({addend:()=>a.div(Ct.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Ct.milestones.autoCutMilestone1.earned})),k(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Ct.milestones.autoCutMilestone2.earned})),k(()=>({multiplier:2,description:"Warmer Cutters",enabled:O.warmerCutters.bought})),k(()=>({multiplier:O.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>a.gt(O.heatedCutters.amount.value,0)})),k(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:mt.treesUpgrades.treesUpgrade2.bought}))]),Fe=f(()=>Me.apply(0)),L=H(()=>[J(()=>({addend:1,description:"Leafy Fingers",enabled:w.bought})),J(()=>({addend:Ue,description:"Smart Spades",enabled:E.bought}))]),Ce=f(()=>L.apply(1)),we=H(()=>[k(()=>({multiplier:.5,description:"Greener Fingers",enabled:x.bought})),k(()=>({multiplier:()=>a.pow(.5,Le.totalElves.value),description:"1 Elf Trained",enabled:Le.milestones[0].earned}))]),be=f(()=>we.apply(1)),Qe=H(()=>[J(()=>({addend:1,description:"Automated Spade",enabled:A.bought})),J(()=>({addend:()=>a.div(me.amount.value,2),description:"Generic Planters",enabled:_.bought})),J(()=>({addend:()=>a.div(Ct.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Ct.milestones.autoPlantMilestone1.earned})),k(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Ct.milestones.autoPlantMilestone2.earned})),k(()=>({multiplier:2,description:"Warmer Planters",enabled:O.warmerPlanters.bought})),k(()=>({multiplier:O.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>a.gt(O.heatedPlanters.amount.value,0)})),k(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:mt.treesUpgrades.treesUpgrade3.bought}))]),Ue=f(()=>Qe.apply(0)),ut=H(()=>[k(()=>({multiplier:1.25,description:"Research I",enabled:v.bought})),k(()=>({multiplier:1.25,description:"Research II",enabled:_.bought})),k(()=>({multiplier:()=>a.div(Ct.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Ct.milestones.logGainMilestone1.earned})),k(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Ct.milestones.logGainMilestone2.earned})),k(()=>({multiplier:1.25,description:"Ashy Soil",enabled:O.basicFertilizer.bought})),k(()=>({multiplier:O.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>a.gt(O.moreFertilizer.amount.value,0)})),k(()=>({multiplier:2,description:"4 Elves Trained",enabled:Le.milestones[3].earned})),k(()=>({multiplier:2,description:"Carry logs in boxes",enabled:pt.upgrades.logsUpgrade.bought})),k(()=>({multiplier:()=>a.div(pt.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:pt.upgrades.logsUpgrade.bought})),k(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:mt.treesUpgrades.treesUpgrade4.bought})),k(()=>({multiplier:f(()=>a.add(Fe.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:Xe.upgrades.blueDyeUpg.bought})),In(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Ct.milestones.logGainMilestone3.earned}))]),Re=Ae(0),Ut=Yt(()=>({direction:ke.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(Re.value,Pe.value)})),ne=Mt(()=>({display:{title:"Cut trees",description:N(()=>i(D,null,[c("Cut down up to "),re(a.floor(Oe.value))," ",c("tree"),a.eq(Oe.value,1)?"":"s",c(" at once!"),i("br",null,null),Z(Ut)]))},style:{minHeight:"80px"},canClick:()=>a.gte(d.value,1)&&a.gte(Re.value,Pe.value),onClick(){if(a.lt(Re.value,Pe.value))return;const $=a.floor(a.min(d.value,a.times(Oe.value,a.div(Re.value,Pe.value).floor())));n.value=a.add(n.value,a.times(ut.apply(1),$)),o.value=a.add(o.value,$),Re.value=0}})),oe=Ae(0),Ze=Yt(()=>({direction:ke.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,be.value)})),je=Mt(()=>({display:{title:"Plant trees",description:N(()=>i(D,null,[c("Plant up to "),re(a.floor(Ce.value))," ",c("tree"),a.eq(Ce.value,1)?"":"s",c(" at once!"),i("br",null,null),Z(Ze)]))},style:{minHeight:"80px"},canClick:()=>a.gte(o.value,1)&&a.gte(oe.value,be.value),onClick(){if(a.lt(oe.value,be.value))return;const $=a.floor(a.min(o.value,a.times(Ce.value,a.div(oe.value,be.value).floor())));o.value=a.sub(o.value,$),oe.value=0}})),[pe,dt]=tl(()=>[{title:"Logs per Tree",modifier:ut,base:1,visible:v.bought},{title:"Manual Cutting Amount",modifier:ge,base:1,visible:m.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:De,base:1,visible:m.bought,unit:"s"},{title:"Manual Planting Amount",modifier:L,base:1,visible:w.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:we,base:1,visible:w.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:Me,base:0,visible:h.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:Qe,base:0,visible:A.bought,unit:"/s"},{title:"Forest Size",modifier:u,base:10,visible:_.bought}]),Ke=Q(!1),xe=N(()=>i(ht,{modelValue:Ke.value,"onUpdate:modelValue":$=>Ke.value=$},{header:()=>i("h2",null,[e,c(" Modifiers")]),body:pe}));Te.on("update",$=>{if(a.lt(j.day.value,Za))return;a.gte(Re.value,Pe.value)?Re.value=Pe.value:(Re.value=a.add(Re.value,$),ne.isHolding.value&&ne.onClick()),a.gte(oe.value,be.value)?oe.value=be.value:(oe.value=a.add(oe.value,$),je.isHolding.value&&je.onClick());const Ot=a.min(d.value,a.times(Fe.value,$)),nl=a.mul(ut.apply(1),Ot),st=a.div(nl,$);s.value=a.mul(st,en).add(a.mul(s.value,a.dOne.sub(en))),n.value=a.add(n.value,nl),o.value=a.add(o.value,Ot);const te=a.min(o.value,a.times(Ue.value,$));o.value=a.sub(o.value,te)});const yt=f(()=>a.sub(Fe.value,Ue.value)),He=f(()=>a.sub(Ue.value,Fe.value)),Ft=Nl(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{ne.canClick.value&&ne.onClick()}})),$e=Nl(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{je.canClick.value&&je.onClick()}})),{total:ct,trackerDisplay:Y}=ll({resource:n,goal:1e4,name:e,day:Za,color:l,modal:{show:Ke,display:xe}});return{name:e,color:t,logs:n,totalLogs:ct,trees:d,saplings:o,cutTree:ne,plantTree:je,cutTreeHK:Ft,plantTreeHK:$e,row1Upgrades:y,row2Upgrades:U,row1Buyables:Ne,manualCutProgress:Re,manualPlantProgress:oe,generalTabCollapsed:dt,minWidth:700,display:N(()=>i(D,null,[Z(Y),i(ce,null,null),i(kt,{resource:n,color:t,style:"margin-bottom: 0",productionDisplay:a.gt(Fe.value,0)?`+${le(s.value)}/s average<br/>equilibrium: +${gn([[Fe.value,"cutting speed"],[Ue.value,"planting speed"],[a.mul(p.value,20),"forest cap"]],"/s",ut.apply(1))}`:void 0},null),i(kt,{resource:o,color:l,style:"margin-bottom: 0",productionDisplay:Zl(yt.value)},null),i(kt,{resource:d,color:l,style:"margin-bottom: 0",productionDisplay:Zl(He.value)},null),i(ce,null,null),ye(ne,je),i("div",null,[c("Tip: You can hold down on actions to perform them automatically")]),i(ce,null,null),ye(...y),ye(...U),ye(...Ne)]))}});var Pn="./assets/tree.35808197.png",Un="./assets/sws.714ad454.png",Fn="data:image/png;base64,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",Rn="./assets/elf.9fbfa563.png",Tn="./assets/paperStacks.4c96ec8c.png",On="data:image/png;base64,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",Qn="./assets/metal.7407f5d1.png",$n="./assets/cloth.7bcd7f37.png",Gn="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==",Vn="./assets/plastic.b8ac74ff.png",qn="data:image/png;base64,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";const j=xt("main",function(){const e=Ae(1),t=f(()=>(+new Date(new Date().getFullYear(),11,e.value)-z.time)/1e3),l=Q(!1),n=Q(-1),o=Q(""),s=Q();function u(m){const w=Ae(!1),h=Ae(!1);return _t(()=>{const A=m(),v=gt(A.shouldNotify),y=gt(()=>r(v)||r(h));return{...A,opened:w,shouldNotify:y,recentlyUpdated:h,[ml]:ts,[gl]:function(){const{day:S,layer:x,symbol:W,opened:E,shouldNotify:_,story:U,completedStory:ee,recentlyUpdated:me}=this;return{day:S,symbol:W,layer:x,opened:E,recentlyUpdated:me,shouldNotify:_,onOpenLore(){var ge,Oe;const q=j.day.value>S;n.value=q?S-1:-1;const Ne=r((Oe=(ge=wt[x!=null?x:"trees"])==null?void 0:ge.name)!=null?Oe:"");o.value=q?`${Ne} - Completed!`:Ne,s.value=q?`${U}<hr style="
|
|
margin: 10px 0;"/>${ee}`:U,l.value=!0},onOpenLayer(){if(me.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(z.tabs.includes(x!=null?x:"trees")){const q=z.tabs.lastIndexOf(x!=null?x:"trees");z.tabs.splice(q,1)}else z.tabs.push(x!=null?x:"trees"),j.minimized.value=!0;else z.tabs.splice(1,1/0,x!=null?x:"trees")},onUnlockLayer(){x&&(E.value=!0,setTimeout(()=>{var q,Ne;n.value=-1,o.value=r((Ne=(q=wt[x!=null?x:"trees"])==null?void 0:q.name)!=null?Ne:""),s.value=U,z.devSpeed=null,l.value=!0},1e3))}}}}})}const d=[u(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Pn,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!"})),u(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Un,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!"})),u(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Fn,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!"})),u(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:Rn,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!"})),u(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Tn,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!"})),u(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:On,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!"})),u(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:Qn,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!"})),u(()=>({day:8,shouldNotify:!1,layer:"cloth",symbol:$n,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!"})),u(()=>({day:9,shouldNotify:!1,layer:"oil",symbol:Gn,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!"})),u(()=>({day:10,shouldNotify:!1,layer:"plastic",symbol:Vn,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!"})),u(()=>({day:11,shouldNotify:!1,layer:"dyes",symbol:qn,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..."})),u(()=>({day:12,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),u(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""}))];function p(){n.value=e.value-1,o.value="Day Complete!",s.value=d[e.value-1].completedStory,l.value=!0,e.value++,j.minimized.value=!1,z.devSpeed=0}return{name:"Calendar",days:d,day:e,timeUntilNewDay:t,loreScene:n,loreTitle:o,loreBody:s,showLoreModal:l,completeDay:p,minWidth:700,display:N(()=>i(D,null,[z.devSpeed===0?i("div",null,[c("Game Paused")]):null,z.devSpeed&&z.devSpeed!==1?i("div",null,[c("Dev Speed: "),le(z.devSpeed),c("x")]):null,z.offlineTime?i("div",null,[c("Offline Time: "),sa(z.offlineTime)]):null,i(ce,null,null),i("div",{class:"advent"},[d.reduce((m,w)=>(m[m.length-1].length===4&&m.push([]),m[m.length-1].push(w),m),[[]]).map(m=>ye(...m))])]))}}),vr=e=>[j,he,Ct,O,Le,K,pt,bt,mt,Ve,qe,Xe],Ua=f(()=>!1);function hr(e,t){t.offlineProd=!1}var yr=Object.freeze(Object.defineProperty({__proto__:null,main:j,getInitialLayers:vr,hasWon:Ua,fixOldSave:hr},Symbol.toStringTag,{value:"Module"}));const br={class:"scene"},wr=["src"],Ar=["src"],Cr=["src"],kr=["src"],_r=["src"],Sr=["src"],Er=["src"],Br={key:7,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},Nr=["src"],Ir=["src"],Mr=["src"],Dr=["src"],xr=ue({__name:"Scene",props:{day:null},setup(e){return(t,l)=>(C(),I("div",br,[e.day>=7?(C(),I("img",{key:0,src:r($n),class:"scene-item",style:{left:"4%",bottom:"3%",width:"40px",height:"40px"}},null,8,wr)):T("",!0),e.day>=0?(C(),I("img",{key:1,src:r(Pn),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,Ar)):T("",!0),e.day>=1?(C(),I("img",{key:2,src:r(Un),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,Cr)):T("",!0),e.day>=2?(C(),I("img",{key:3,src:r(Fn),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,kr)):T("",!0),e.day>=6?(C(),I("img",{key:4,src:r(Qn),class:"scene-item",style:{left:"72%",bottom:"8%",width:"40px",height:"40px"}},null,8,_r)):T("",!0),e.day>=8?(C(),I("img",{key:5,src:r(Gn),class:"scene-item",style:{left:"80%",bottom:"6%"}},null,8,Sr)):T("",!0),e.day>=3?(C(),I("img",{key:6,src:r(Rn),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,Er)):T("",!0),e.day>=4?(C(),I("div",Br,[e.day>=4?(C(),I("img",{key:0,src:r(Tn),class:"scene-item"},null,8,Nr)):T("",!0),e.day>=5?(C(),I("img",{key:1,src:r(On),class:"scene-item"},null,8,Ir)):T("",!0),e.day>=9?(C(),I("img",{key:2,src:r(Vn),class:"scene-item"},null,8,Mr)):T("",!0),e.day>=10?(C(),I("img",{key:3,src:r(qn),class:"scene-item"},null,8,Dr)):T("",!0)])):T("",!0)]))}});var Pr=Be(xr,[["__scopeId","data-v-47b4d886"]]);const Ur=ue({components:{Context:hn},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:V(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:V(Number,String),required:!0},name:{type:V(String),required:!0},color:V(String),minimizable:V(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:l,minimized:n,minWidth:o,tab:s}=vt(e),u=ta(t),d=f(()=>Ie.allowGoBack&&l.value>0&&!n.value);function p(){z.tabs.splice(r(e.index),1)}wl(()=>w(n.value,r(o.value))),jt([n,Ri(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,y=s.value();y!=null&&(h?(y.style.flexGrow="0",y.style.flexShrink="0",y.style.width="60px",y.style.minWidth=y.style.flexBasis="",y.style.margin="0"):(y.style.flexGrow="",y.style.flexShrink="",y.style.width="",y.style.minWidth=y.style.flexBasis=v,y.style.margin=""))}return{component:u,showGoBack:d,updateNodes:m,unref:r,goBack:p}}});function Fr(e,t,l,n,o,s){const u=cl("Context");return C(),I("div",{class:"layer-container",style:ot({"--layer-color":e.unref(e.color)})},[e.showGoBack?(C(),I("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...d)=>e.goBack&&e.goBack(...d))},"\u274C")):T("",!0),e.minimized.value?(C(),I("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=d=>e.minimized.value=!1)},[g("div",null,fe(e.unref(e.name)),1)])):(C(),I("div",{key:2,class:lt(["layer-tab",{showGoBack:e.showGoBack}])},[i(u,{onUpdateNodes:e.updateNodes},{default:X(()=>[(C(),ae(We(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(C(),I("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=d=>e.minimized.value=!0)}," \u25BC ")):T("",!0)],4)}var Rr=Be(Ur,[["render",Fr],["__scopeId","data-v-0158bec3"]]);const Hn=e=>(Zt("data-v-4b4bda40"),e=e(),el(),e),Tr=Hn(()=>g("h2",null,"Changelog",-1)),Or=Hn(()=>g("details",{open:""},[g("summary",null,[c("v0.0 Initial Commit - "),g("time",null,"2021-09-04")]),c(" 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)),Qr=ue({__name:"Changelog",setup(e,{expose:t}){const l=Q(!1);return t({open(){l.value=!0}}),(n,o)=>(C(),ae(ht,{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=s=>l.value=s)},{header:X(()=>[Tr]),body:X(()=>[Or]),_:1},8,["modelValue"]))}});var $r=Be(Qr,[["__scopeId","data-v-4b4bda40"]]),Gr=ue({props:{element:Object,display:{type:V(Object,String,Function),required:!0},style:V(Object,String,Array),classes:V(Object),direction:V(String),xoffset:V(String),yoffset:V(String),pinned:Object},setup(e){const{element:t,display:l,pinned:n}=vt(e),o=Q(!1),s=f(()=>(rt(n)||o.value)&&u.value),u=pl(l),d=Tt(Ee(N(()=>{const w=rt(t);return w==null?"":Lt(w)})));function p(w){const h=n;w.shiftKey&&h&&(h.value=!h.value,w.stopPropagation(),w.preventDefault())}const m=f(()=>rt(n)&&$l[Ye.theme].showPin);return{Direction:ke,isHovered:o,isShown:s,comp:u,elementComp:d,unref:r,togglePinned:p,showPin:m}}});const Vr={key:0,class:"material-icons pinned"};function qr(e,t,l,n,o,s){return C(),I("div",{class:lt(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=u=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=u=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...u)=>e.togglePinned&&e.togglePinned(...u))},[qt(e.$slots,"default",{},void 0,!0),e.elementComp?(C(),ae(We(e.elementComp),{key:0})):T("",!0),i(oa,{name:"fade"},{default:X(()=>{var u;return[e.isShown?(C(),I("div",{key:0,class:lt(["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:ot([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(u=e.unref(e.style))!=null?u:{}])},[e.showPin?(C(),I("span",Vr,"push_pin")):T("",!0),e.comp?(C(),ae(We(e.comp),{key:1})):T("",!0)],6)):T("",!0)]}),_:1})],34)}var at=Be(Gr,[["render",qr],["__scopeId","data-v-6102fa3a"]]);const Hr={class:"info-modal-header"},Lr=["src","alt"],jr={class:"info-modal-title"},Wr={key:0},Kr=c(" - "),zr={key:0},Jr={key:0},Yr=g("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),Xr=g("br",null,null,-1),Zr=g("br",null,null,-1),eu=["href"],tu=g("span",{class:"material-icons info-modal-discord"},"discord",-1),lu=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"),c(" The Paper Pilot Community ")])],-1),au=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"),c(" The Modding Tree ")])],-1),nu=g("br",null,null,-1);var ou=ue({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const l=e,{title:n,logo:o,author:s,discordName:u,discordLink:d,versionNumber:p,versionTitle:m}=Ie,w=vt(l),h=Q(!1),A=f(()=>sa(z.timePlayed)),v=f(()=>Ee(N(()=>i(D,null,[En.map(Z)]))));t({open(){h.value=!0}});function y(){var S;(S=r(w.changelog))==null||S.open()}return(S,x)=>(C(),ae(ht,{class:"info-modal",modelValue:h.value,"onUpdate:modelValue":x[0]||(x[0]=W=>h.value=W)},{header:X(()=>[g("div",Hr,[r(o)?(C(),I("img",{key:0,class:"info-modal-logo",src:r(o),alt:r(n)},null,8,Lr)):T("",!0),g("div",jr,[g("h2",null,"- "+fe(r(n))+" -",1),g("h4",null,[c(" - v"+fe(r(p)),1),r(m)?(C(),I("span",Wr,": "+fe(r(m)),1)):T("",!0),Kr])])])]),body:X(({shown:W})=>[W?(C(),I("div",zr,[r(s)?(C(),I("div",Jr,"By "+fe(r(s)),1)):T("",!0),Yr,Xr,g("div",{class:"link",onClick:y},"Changelog"),Zr,g("div",null,[r(d)?(C(),I("a",{key:0,href:r(d),class:"info-modal-discord-link",target:"_blank"},[tu,c(" "+fe(r(u)),1)],8,eu)):T("",!0)]),lu,au,nu,g("div",null,"Time Played: "+fe(r(A)),1),(C(),ae(We(r(v))))])):T("",!0)]),_:1},8,["modelValue"]))}});const Ln=e=>(Zt("data-v-0d685451"),e=e(),el(),e),iu=Ln(()=>g("h2",null,"Options",-1)),su=Ln(()=>g("hr",null,null,-1));var ru=ue({__name:"Options",setup(e,{expose:t}){const l=Q(!1);t({open(){l.value=!0}});const n=Object.keys($l).map(v=>({label:fn(v),value:v})),o=f(()=>Ee(N(()=>i(D,null,[Sn.map(Z)])))),{showTPS:s,theme:u}=vt(Ye),{autosave:d,usingLog:p}=vt(z),m=f({get(){return z.devSpeed===0},set(v){z.devSpeed=v?0:null}}),w=N(()=>i("span",null,[c("Autosave"),i(at,{display:"Save-specific"},{default:()=>[c("*")]})])),h=N(()=>i("span",null,[c("Pause game"),i(at,{display:"Save-specific"},{default:()=>[c("*")]})])),A=N(()=>i("span",null,[c("Use log for progress bar"),i(at,{display:"Save-specific"},{default:()=>[c("*")]})]));return(v,y)=>(C(),ae(ht,{modelValue:l.value,"onUpdate:modelValue":y[5]||(y[5]=S=>l.value=S)},{header:X(()=>[iu]),body:X(()=>[i(Pa,{title:"Theme",options:r(n),modelValue:r(u),"onUpdate:modelValue":y[0]||(y[0]=S=>nt(u)?u.value=S:null)},null,8,["options","modelValue"]),(C(),ae(We(r(o)))),i(Jt,{title:"Show TPS",modelValue:r(s),"onUpdate:modelValue":y[1]||(y[1]=S=>nt(s)?s.value=S:null)},null,8,["modelValue"]),su,i(Jt,{title:r(w),modelValue:r(d),"onUpdate:modelValue":y[2]||(y[2]=S=>nt(d)?d.value=S:null)},null,8,["title","modelValue"]),r(Ie).enablePausing?(C(),ae(Jt,{key:0,title:r(h),modelValue:r(m),"onUpdate:modelValue":y[3]||(y[3]=S=>nt(m)?m.value=S:null)},null,8,["title","modelValue"])):T("",!0),i(Jt,{title:r(A),modelValue:r(p),"onUpdate:modelValue":y[4]||(y[4]=S=>nt(p)?p.value=S:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var uu=Be(ru,[["__scopeId","data-v-0d685451"]]);const du=["onSubmit"],cu={class:"field"},pu={key:0,class:"field-title"},mu=["placeholder"],gu=ue({__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=pl(Wt(l,"title"),"span"),o=Tt(null);aa(()=>{var p;(p=o.value)==null||p.focus()});const s=f({get(){return r(l.modelValue)||""},set(p){t("update:modelValue",p)}});function u(){t("submit")}function d(){l.submitOnBlur!==!1?t("submit"):t("cancel")}return(p,m)=>(C(),I("form",{onSubmit:Fl(u,["prevent"])},[g("div",cu,[r(n)?(C(),I("span",pu,[(C(),ae(We(r(n))))])):T("",!0),e.textArea?(C(),ae(r(co),{key:1,modelValue:r(s),"onUpdate:modelValue":m[0]||(m[0]=w=>nt(s)?s.value=w:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:d,ref_key:"field",ref:o},null,8,["modelValue","placeholder","maxHeight"])):na((C(),I("input",{key:2,type:"text","onUpdate:modelValue":m[1]||(m[1]=w=>nt(s)?s.value=w:null),placeholder:e.placeholder,class:lt({fullWidth:!e.title}),onBlur:d,ref_key:"field",ref:o},null,42,mu)),[[no,r(s)]])])],40,du))}});var jn=Be(gu,[["__scopeId","data-v-67b44a54"]]);const fu={key:0},vu=["onClick","disabled"],hu={key:0},yu=["onClick"],bu=ue({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const n=vt(e),o=Q(!1);jt(o,d=>{t("confirmingChanged",d)});function s(){if(r(n.skipConfirm)){t("click");return}o.value&&t("click"),o.value=!o.value}function u(){o.value=!1}return(d,p)=>(C(),I("span",{class:lt(["container",{confirming:o.value}])},[o.value?(C(),I("span",fu,"Are you sure?")):T("",!0),g("button",{onClick:Fl(s,["stop"]),class:"button danger",disabled:e.disabled},[o.value?(C(),I("span",hu,"Yes")):qt(d.$slots,"default",{key:1},void 0,!0)],8,vu),o.value?(C(),I("button",{key:1,class:"button",onClick:Fl(u,["stop"])},"No",8,yu)):T("",!0)],2))}});var wu=Be(bu,[["__scopeId","data-v-2f8ef34c"]]);const Au=["onClick"],Cu=ue({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=Q(!1),n=Q(null);function o(){t("click"),n.value&&clearTimeout(n.value),l.value=!1,wl(()=>{l.value=!0,n.value=setTimeout(()=>l.value=!1,500)})}return(s,u)=>(C(),I("button",{onClick:Fl(o,["stop"]),class:lt(["feedback",{activated:l.value,left:e.left}])},[qt(s.$slots,"default",{},void 0,!0)],10,Au))}});var ku=Be(Cu,[["__scopeId","data-v-01a1b95c"]]);const al=e=>(Zt("data-v-5285ac49"),e=e(),el(),e),_u=al(()=>g("div",{class:"handle material-icons"},"drag_handle",-1)),Su={key:0,class:"actions"},Eu=al(()=>g("span",{class:"material-icons"},"content_paste",-1)),Bu=al(()=>g("span",{class:"material-icons"},"content_copy",-1)),Nu=al(()=>g("span",{class:"material-icons"},"edit",-1)),Iu=al(()=>g("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Mu={key:1,class:"actions"},Du=al(()=>g("span",{class:"material-icons"},"check",-1)),xu=al(()=>g("span",{class:"material-icons"},"close",-1)),Pu={key:2,class:"details"},Uu={class:"save-version"},Fu=al(()=>g("br",null,null,-1)),Ru={key:0},Tu={key:1},Ou={key:3,class:"details"},Qu={key:4,class:"details error"},$u=al(()=>g("br",null,null,-1)),Gu=ue({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const l=e,{save:n}=vt(l),o=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=Q(!1),u=Q(!1),d=Q("");jt(s,()=>d.value=n.value.name||"");const p=f(()=>n.value&&n.value.id===z.id),m=f(()=>p.value?z.time:n.value&&n.value.time||0),w=ta(f(()=>{var A,v,y,S;return`Day ${(S=(y=(v=(A=n.value)==null?void 0:A.layers)==null?void 0:v.main)==null?void 0:y.day)!=null?S:1}`}));function h(){t("editName",d.value),s.value=!1}return(A,v)=>(C(),I("div",{class:lt(["save",{active:r(p)}])},[_u,s.value?(C(),I("div",Mu,[g("button",{onClick:h,class:"button"},[i(at,{display:"Save",direction:r(ke).Left,class:"info"},{default:X(()=>[Du]),_:1},8,["direction"])]),g("button",{onClick:v[5]||(v[5]=y=>s.value=!s.value),class:"button"},[i(at,{display:"Cancel",direction:r(ke).Left,class:"info"},{default:X(()=>[xu]),_:1},8,["direction"])])])):(C(),I("div",Su,[r(n).error==null&&!u.value?(C(),ae(ku,{key:0,onClick:v[0]||(v[0]=y=>t("export")),class:"button",left:""},{default:X(()=>[i(at,{display:"Export",direction:r(ke).Left,class:"info"},{default:X(()=>[Eu]),_:1},8,["direction"])]),_:1})):T("",!0),r(n).error==null&&!u.value?(C(),I("button",{key:1,onClick:v[1]||(v[1]=y=>t("duplicate")),class:"button"},[i(at,{display:"Duplicate",direction:r(ke).Left,class:"info"},{default:X(()=>[Bu]),_:1},8,["direction"])])):T("",!0),r(n).error==null&&!u.value?(C(),I("button",{key:2,onClick:v[2]||(v[2]=y=>s.value=!s.value),class:"button"},[i(at,{display:"Edit Name",direction:r(ke).Left,class:"info"},{default:X(()=>[Nu]),_:1},8,["direction"])])):T("",!0),i(wu,{disabled:r(p),onClick:v[3]||(v[3]=y=>t("delete")),onConfirmingChanged:v[4]||(v[4]=y=>u.value=y)},{default:X(()=>[i(at,{display:"Delete",direction:r(ke).Left,class:"info"},{default:X(()=>[Iu]),_:1},8,["direction"])]),_:1},8,["disabled"])])),r(n).error==null&&!s.value?(C(),I("div",Pu,[g("button",{class:"button open",onClick:v[6]||(v[6]=y=>t("open"))},[g("h3",null,fe(r(n).name),1)]),g("span",Uu,"v"+fe(r(n).modVersion),1),Fu,r(m)?(C(),I("div",Ru,"Last played "+fe(r(o).format(r(m))),1)):T("",!0),r(w)?(C(),I("div",Tu,[(C(),ae(We(r(w))))])):T("",!0)])):r(n).error==null&&s.value?(C(),I("div",Ou,[i(jn,{modelValue:d.value,"onUpdate:modelValue":v[7]||(v[7]=y=>d.value=y),class:"editname",onSubmit:h},null,8,["modelValue"])])):(C(),I("div",Qu,[c(" Error: Failed to load save with id "+fe(r(n).id),1),$u,c(fe(r(n).error),1)]))],2))}});var Vu=Be(Gu,[["__scopeId","data-v-5285ac49"]]);const Fa=e=>(Zt("data-v-3b9991aa"),e=e(),el(),e),qu=Fa(()=>g("h2",null,"Saves Manager",-1)),Hu={class:"modal-footer"},Lu={class:"field"},ju=Fa(()=>g("span",{class:"field-title"},"Create Save",-1)),Wu={class:"field-buttons"},Ku={class:"footer"},zu=Fa(()=>g("div",{style:{"flex-grow":"1"}},null,-1)),Ju=ue({__name:"SavesManager",setup(e,{expose:t}){const l=Q(!1),n=Q(null);t({open(){l.value=!0}});const o=Q(!1),s=Q(""),u=Q(null);jt(s,E=>{E?wl(()=>{try{if(E[0]!=="{")if(E[0]==="e")E=decodeURIComponent(escape(atob(E)));else if(E[0]==="\u1BE1")E=rl.decompressFromUTF16(E);else{console.warn("Unable to determine preset encoding",E),o.value=!0;return}const _=JSON.parse(E);if(typeof _!="object"){o.value=!0;return}const U=zl();_.id=U,Gt(_),s.value="",o.value=!1,Ye.saves.push(U)}catch{o.value=!0}}):o.value=!1});let d={},p=Q(Object.keys(d).reduce((E,_)=>(E.push({label:_.split("/").slice(-1)[0].slice(0,-4),value:d[_]}),E),[]));const m=ia({});function w(E){if(m[E]==null){let _=localStorage.getItem(E);if(_==null)m[E]={error:"Save doesn't exist in localStorage",id:E};else if(_==="dW5kZWZpbmVk")m[E]={error:"Save is undefined",id:E};else try{if(_[0]!=="{")if(_[0]==="e")_=decodeURIComponent(escape(atob(_)));else if(_[0]==="\u1BE1")_=rl.decompressFromUTF16(_);else return console.warn("Unable to determine preset encoding",_),o.value=!0,m[E]={error:"Unable to determine preset encoding",id:E},m[E];m[E]={...JSON.parse(_),id:E}}catch(U){m[E]={error:U,id:E},console.warn(`SavesManager: Failed to load info about save with id ${E}:
|
|
${U}
|
|
${_}`)}}return m[E]}jt(l,E=>{E&&Object.keys(m).forEach(_=>delete m[_])});const h=f(()=>Ye.saves.reduce((E,_)=>(E[_]=w(_),E),{}));function A(E){let _;switch(z.id===E?_=Cn(z[Je]):_=JSON.stringify(h.value[E]),Ie.exportEncoding){default:console.warn(`Unknown save encoding: ${Ie.exportEncoding}. Defaulting to lz`);case"lz":_=rl.compressToUTF16(_);break;case"base64":_=btoa(unescape(encodeURIComponent(_)));break;case"plain":break}const U=document.createElement("textarea");U.value=_,document.body.appendChild(U),U.select(),U.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(U)}function v(E){z.id===E&&Gt();const _={...h.value[E],id:zl()};Gt(_),Ye.saves.push(_.id)}function y(E){Ye.saves=Ye.saves.filter(_=>_!==E),localStorage.removeItem(E),m[E]=void 0}function S(E){h.value[z.id].time=z.time,Gt(),m[z.id]=void 0,bl(h.value[E]),m[E]=void 0}function x(E){if(u.value=E,wl(()=>{u.value=null}),E[0]!=="{")if(E[0]==="e")E=decodeURIComponent(escape(atob(E)));else if(E[0]==="\u1BE1")E=rl.decompressFromUTF16(E);else{console.warn("Unable to determine preset encoding",E);return}const _=JSON.parse(E);_.id=zl(),Gt(_),Ye.saves.push(_.id),S(_.id)}function W(E,_){const U=h.value[E];U&&(U.name=_,z.id===E?(z.name=_,Gt()):(Gt(U),m[E]=void 0))}return(E,_)=>(C(),ae(ht,{modelValue:l.value,"onUpdate:modelValue":_[4]||(_[4]=U=>l.value=U),ref_key:"modal",ref:n},{header:X(()=>[qu]),body:X(({shown:U})=>[U?(C(),ae(r(uo),{key:0,list:r(Ye).saves,handle:".handle",itemKey:ee=>ee},{item:X(({element:ee})=>[i(Vu,{save:r(h)[ee],onOpen:me=>S(ee),onExport:me=>A(ee),onEditName:me=>W(ee,me),onDuplicate:me=>v(ee),onDelete:me=>y(ee)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):T("",!0)]),footer:X(()=>[g("div",Hu,[i(jn,{modelValue:s.value,"onUpdate:modelValue":_[0]||(_[0]=U=>s.value=U),title:"Import Save",placeholder:"Paste your save here!",class:lt({importingFailed:o.value})},null,8,["modelValue","class"]),g("div",Lu,[ju,g("div",Wu,[g("button",{class:"button",onClick:_[1]||(_[1]=U=>S(r(Bl)().id))},"New Game"),Object.keys(r(p)).length>0?(C(),ae(Pa,{key:0,options:r(p),modelValue:u.value,"onUpdate:modelValue":_[2]||(_[2]=U=>x(U)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):T("",!0)])]),g("div",Ku,[zu,g("button",{class:"button modal-default-button",onClick:_[3]||(_[3]=U=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Wn=Be(Ju,[["__scopeId","data-v-3b9991aa"]]);const Pt=e=>(Zt("data-v-8495e562"),e=e(),el(),e),Yu=["src","alt"],Xu={key:1,class:"title"},Zu=Pt(()=>g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),ed={class:"discord"},td={class:"discord-links"},ld={key:0},ad=["href"],nd=Pt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),od=Pt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),id={href:"https://forums.moddingtree.com/",target:"_blank"},sd=Pt(()=>g("span",{class:"material-icons"},"forum",-1)),rd=Pt(()=>g("span",{class:"material-icons"},"info",-1)),ud=Pt(()=>g("span",{class:"material-icons"},"library_books",-1)),dd=Pt(()=>g("span",{class:"material-icons"},"settings",-1)),cd=Pt(()=>g("span",{class:"material-icons"},"library_books",-1)),pd=Pt(()=>g("span",{class:"material-icons"},"settings",-1)),md=Pt(()=>g("span",{class:"material-icons"},"info",-1)),gd={href:"https://forums.moddingtree.com/",target:"_blank"},fd=Pt(()=>g("span",{class:"material-icons"},"forum",-1)),vd={class:"discord"},hd={class:"discord-links"},yd={key:0},bd=["href"],wd=Pt(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Ad=Pt(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Cd=ue({__name:"Nav",setup(e){const t=Q(null),l=Q(null),n=Q(null),o=Q(null),{useHeader:s,banner:u,title:d,discordName:p,discordLink:m,versionNumber:w}=Ie;function h(){window.open(m,"mywindow")}return(A,v)=>(C(),I(D,null,[r(s)?(C(),I("div",Al({key:0,class:"nav"},A.$attrs),[r(u)?(C(),I("img",{key:0,src:r(u),class:"banner",alt:r(d)},null,8,Yu)):(C(),I("div",Xu,fe(r(d)),1)),g("div",{onClick:v[0]||(v[0]=y=>{var S;return(S=o.value)==null?void 0:S.open()}),class:"version-container"},[i(at,{display:"Changelog",direction:r(ke).Down,class:"version"},{default:X(()=>[g("span",null,"v"+fe(r(w)),1)]),_:1},8,["direction"])]),Zu,g("div",ed,[g("span",{onClick:h,class:"material-icons"},"discord"),g("ul",td,[r(m)?(C(),I("li",ld,[g("a",{href:r(m),target:"_blank"},fe(r(p)),9,ad)])):T("",!0),nd,od])]),g("div",null,[g("a",id,[i(at,{display:"Forums",direction:r(ke).Down,yoffset:"5px"},{default:X(()=>[sd]),_:1},8,["direction"])])]),g("div",{onClick:v[1]||(v[1]=y=>{var S;return(S=t.value)==null?void 0:S.open()})},[i(at,{display:"Info",direction:r(ke).Down,class:"info"},{default:X(()=>[rd]),_:1},8,["direction"])]),g("div",{onClick:v[2]||(v[2]=y=>{var S;return(S=l.value)==null?void 0:S.open()})},[i(at,{display:"Saves",direction:r(ke).Down,xoffset:"-20px"},{default:X(()=>[ud]),_:1},8,["direction"])]),g("div",{onClick:v[3]||(v[3]=y=>{var S;return(S=n.value)==null?void 0:S.open()})},[i(at,{display:"Options",direction:r(ke).Down,xoffset:"-66px"},{default:X(()=>[dd]),_:1},8,["direction"])])],16)):(C(),I("div",Al({key:1,class:"overlay-nav"},A.$attrs),[g("div",{onClick:v[4]||(v[4]=y=>{var S;return(S=o.value)==null?void 0:S.open()}),class:"version-container"},[i(at,{display:"Changelog",direction:r(ke).Right,xoffset:"25%",class:"version"},{default:X(()=>[g("span",null,"v"+fe(r(w)),1)]),_:1},8,["direction"])]),g("div",{onClick:v[5]||(v[5]=y=>{var S;return(S=l.value)==null?void 0:S.open()})},[i(at,{display:"Saves",direction:r(ke).Right},{default:X(()=>[cd]),_:1},8,["direction"])]),g("div",{onClick:v[6]||(v[6]=y=>{var S;return(S=n.value)==null?void 0:S.open()})},[i(at,{display:"Options",direction:r(ke).Right},{default:X(()=>[pd]),_:1},8,["direction"])]),g("div",{onClick:v[7]||(v[7]=y=>{var S;return(S=t.value)==null?void 0:S.open()})},[i(at,{display:"Info",direction:r(ke).Right},{default:X(()=>[md]),_:1},8,["direction"])]),g("div",null,[g("a",gd,[i(at,{display:"Forums",direction:r(ke).Right,xoffset:"7px"},{default:X(()=>[fd]),_:1},8,["direction"])])]),g("div",vd,[g("span",{onClick:h,class:"material-icons"},"discord"),g("ul",hd,[r(m)?(C(),I("li",yd,[g("a",{href:r(m),target:"_blank"},fe(r(p)),9,bd)])):T("",!0),wd,Ad])])],16)),i(ou,{ref_key:"info",ref:t,changelog:o.value},null,8,["changelog"]),i(Wn,{ref_key:"savesManager",ref:l},null,512),i(uu,{ref_key:"options",ref:n},null,512),i($r,{ref_key:"changelog",ref:o},null,512)],64))}});var Kn=Be(Cd,[["__scopeId","data-v-8495e562"]]);const Ra=e=>(Zt("data-v-248e2ebb"),e=e(),el(),e),kd={class:"inner-tab"},_d={key:1},Sd=Ra(()=>g("br",null,null,-1)),Ed=c(" You can help continue the "),Bd=Ra(()=>g("i",null,"advent",-1)),Nd=c("ure at: "),Id=Ra(()=>g("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[g("span",{class:"material-icons info-modal-discord"},"discord"),c(" The Paper Pilot Community ")],-1)),Md=ue({__name:"Game",setup(e){const t=Wt(z,"tabs"),l=f(()=>Object.keys(wt)),n=Ie.useHeader,o=pl(j.loreBody);function s(u){const{display:d,minimized:p,minWidth:m,name:w,color:h,minimizable:A,nodes:v}=u;return{display:d,minimized:p,minWidth:m,name:w,color:h,minimizable:A,nodes:v}}return(u,d)=>(C(),I("div",{class:lt(["tabs-container",{useHeader:r(n)}])},[(C(!0),I(D,null,an(r(t),(p,m)=>{var w,h;return C(),I("div",{key:m,class:lt(["tab",r((w=r(wt)[p])==null?void 0:w.classes)]),ref_for:!0,ref:`tab-${m}`,style:ot(r((h=r(wt)[p])==null?void 0:h.style))},[m===0&&!r(n)?(C(),ae(Kn,{key:0})):T("",!0),g("div",kd,[r(l).includes(p)?(C(),ae(Rr,Al({key:0},s(r(wt)[p]),{index:m,tab:()=>{var A;return(A=u.$refs[`tab-${m}`])==null?void 0:A[0]}}),null,16,["index","tab"])):(C(),ae(We(p),{key:1,index:m},null,8,["index"]))])],6)}),128)),i(ht,{modelValue:r(j).showLoreModal.value,"onUpdate:modelValue":d[0]||(d[0]=p=>r(j).showLoreModal.value=p)},{header:X(()=>[g("h2",null,fe(r(j).loreTitle.value),1)]),body:X(()=>[r(o)?(C(),ae(We(r(o)),{key:0})):T("",!0),r(j).loreScene.value!==-1?(C(),I("div",_d,[i(Pr,{day:r(j).loreScene.value},null,8,["day"]),Sd,Ed,Bd,Nd,Id])):T("",!0)]),_:1},8,["modelValue"])],2))}});var Dd=Be(Md,[["__scopeId","data-v-248e2ebb"]]);const ql=e=>(Zt("data-v-4a50ce42"),e=e(),el(),e),xd={class:"game-over-modal-header"},Pd=["src","alt"],Ud={class:"game-over-modal-title"},Fd=ql(()=>g("h2",null,"Congratulations!",-1)),Rd={key:0},Td=ql(()=>g("br",null,null,-1)),Od=ql(()=>g("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),Qd=ql(()=>g("br",null,null,-1)),$d=["href"],Gd=ql(()=>g("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),Vd=ue({__name:"GameOverScreen",setup(e){const{title:t,logo:l,discordName:n,discordLink:o,versionNumber:s,versionTitle:u}=Ie,d=f(()=>sa(z.timePlayed)),p=f(()=>Ua.value&&!z.keepGoing),m=Wt(z,"autosave");function w(){z.keepGoing=!0}function h(){bl(Bl())}return(A,v)=>(C(),ae(ht,{"model-value":r(p)},{header:X(()=>[g("div",xd,[r(l)?(C(),I("img",{key:0,class:"game-over-modal-logo",src:r(l),alt:r(t)},null,8,Pd)):T("",!0),g("div",Ud,[Fd,g("h4",null,"You've beaten "+fe(r(t))+" v"+fe(r(s))+": "+fe(r(u)),1)])])]),body:X(({shown:y})=>[y?(C(),I("div",Rd,[g("div",null,"It took you "+fe(r(d))+" to beat the game.",1),Td,Od,Qd,g("div",null,[g("a",{href:r(o),class:"game-over-modal-discord-link"},[Gd,c(" "+fe(r(n)),1)],8,$d)]),i(Jt,{title:"Autosave",modelValue:r(m),"onUpdate:modelValue":v[0]||(v[0]=S=>nt(m)?m.value=S:null)},null,8,["modelValue"])])):T("",!0)]),footer:X(()=>[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 qd=Be(Vd,[["__scopeId","data-v-4a50ce42"]]);const ca=e=>(Zt("data-v-3de07c06"),e=e(),el(),e),Hd=ca(()=>g("div",{class:"nan-modal-header"},[g("h2",null,"NaN value detected!")],-1)),Ld={key:0},jd=ca(()=>g("br",null,null,-1)),Wd=["href"],Kd=ca(()=>g("span",{class:"material-icons nan-modal-discord"},"discord",-1)),zd=ca(()=>g("br",null,null,-1)),Jd={class:"nan-footer"},Yd=ue({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:l}=Ie,n=Wt(z,"autosave"),o=Wt(et,"hasNaN"),s=Q(null),u=f(()=>{var v;return(v=et.NaNPath)==null?void 0:v.join(".")}),d=f(()=>{var v;return(v=et.NaNPath)==null?void 0:v.slice(-1)[0]}),p=f(()=>et.NaNReceiver&&d.value?et.NaNReceiver[d.value]:null),m=f({get(){return z.devSpeed===0},set(v){z.devSpeed=v?null:0}});function w(){et.NaNReceiver&&d.value&&(et.NaNReceiver[d.value]=new a(0),et.hasNaN=!1)}function h(){et.NaNReceiver&&d.value&&(et.NaNReceiver[d.value]=new a(1),et.hasNaN=!1)}function A(){et.NaNReceiver&&d.value&&(et.NaNReceiver[d.value]=new a(NaN),et.hasNaN=!1)}return(v,y)=>(C(),I(D,null,[i(ht,Al({modelValue:r(o),"onUpdate:modelValue":y[4]||(y[4]=S=>nt(o)?o.value=S:null)},v.$attrs),{header:X(()=>[Hd]),body:X(()=>[g("div",null,[c(' Attempted to assign "'+fe(r(u))+'" to NaN',1),r(p)?(C(),I("span",Ld,fe(" ")+"(previously "+fe(r(le)(r(p)))+")",1)):T("",!0),c(". Auto-saving has been "+fe(r(n)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),jd,g("div",null,[g("a",{href:r(l),class:"nan-modal-discord-link"},[Kd,c(" "+fe(r(t)),1)],8,Wd)]),zd,i(Jt,{title:"Autosave",modelValue:r(n),"onUpdate:modelValue":y[0]||(y[0]=S=>nt(n)?n.value=S:null)},null,8,["modelValue"]),r(Ie).enablePausing?(C(),ae(Jt,{key:0,title:"Pause game",modelValue:r(m),"onUpdate:modelValue":y[1]||(y[1]=S=>nt(m)?m.value=S:null)},null,8,["modelValue"])):T("",!0)]),footer:X(()=>[g("div",Jd,[g("button",{onClick:y[2]||(y[2]=S=>{var x;return(x=s.value)==null?void 0:x.open()}),class:"button"},"Open Saves Manager"),g("button",{onClick:w,class:"button"},"Set to 0"),g("button",{onClick:h,class:"button"},"Set to 1"),r(p)&&r(a).neq(r(p),0)&&r(a).neq(r(p),1)?(C(),I("button",{key:0,onClick:y[3]||(y[3]=S=>o.value=!1),class:"button"}," Set to previous ")):T("",!0),g("button",{onClick:A,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),i(Wn,{ref_key:"savesManager",ref:s},null,512)],64))}});var Xd=Be(Yd,[["__scopeId","data-v-3de07c06"]]);const Zd={key:0,class:"tpsDisplay"},ec={key:0,class:"low"},tc=ue({__name:"TPS",setup(e){const t=f(()=>a.div(et.lastTenTicks.length,et.lastTenTicks.reduce((s,u)=>s+u,0))),l=Q([]);Dt(()=>{l.value.push(Math.round(t.value.toNumber())),l.value.length>10&&(l.value=l.value.slice(1))});const n=f(()=>l.value.reduce((s,u)=>a.max(s,u),0)),o=f(()=>a.sub(t.value,n.value).gt(1));return(s,u)=>r(t).isNan()?T("",!0):(C(),I("div",Zd,[c(" TPS: "+fe(r(re)(r(t)))+" ",1),i(oa,{name:"fade"},{default:X(()=>[r(o)?(C(),I("span",ec,fe(r(re)(r(n))),1)):T("",!0)]),_:1})]))}});var lc=Be(tc,[["__scopeId","data-v-46a3ed5b"]]);var ac=ue({__name:"App",setup(e){const t=Ie.useHeader,l=f(()=>$l[Ye.theme].variables),n=Wt(Ye,"showTPS"),o=f(()=>Ee(N(()=>i(D,null,[Di.map(Z)]))));return(s,u)=>(C(),I(D,null,[g("div",{id:"modal-root",style:ot(r(l))},null,4),g("div",{class:lt(["app",{useHeader:r(t)}]),style:ot(r(l))},[r(t)?(C(),ae(Kn,{key:0})):T("",!0),i(Dd),r(r(n))?(C(),ae(lc,{key:1})):T("",!0),i(qd),i(Xd),(C(),ae(We(r(o))))],6)],64))}});var nc=Be(ac,[["__scopeId","data-v-580927bb"]]);function oc(e={}){const{immediate:t=!1,onNeedRefresh:l,onOfflineReady:n,onRegistered:o,onRegisterError:s}=e;let u,d;const p=async(m=!0)=>{m&&(u==null||u.addEventListener("controlling",w=>{w.isUpdate&&window.location.reload()})),d&&d.waiting&&await mo(d.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){u=new po("./sw.js",{scope:"./",type:"classic"}),u.addEventListener("activated",m=>{m.isUpdate||n==null||n()});{const m=()=>{l==null||l()};u.addEventListener("waiting",m),u.addEventListener("externalwaiting",m)}u.register({immediate:t}).then(m=>{d=m,o==null||o(m)}).catch(m=>{s==null||s(m)})}return p}function ic(e={}){const{immediate:t=!0,onNeedRefresh:l,onOfflineReady:n,onRegistered:o,onRegisterError:s}=e,u=Q(!1),d=Q(!1);return{updateServiceWorker:oc({immediate:t,onNeedRefresh(){u.value=!0,l==null||l()},onOfflineReady(){d.value=!0,n==null||n()},onRegistered:o,onRegisterError:s}),offlineReady:d,needRefresh:u}}document.title=Ie.title;window.projInfo=Ie;if(Ie.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 Ei();const{globalBus:e}=await Yl(()=>Promise.resolve().then(function(){return ui}),void 0),{startGameLoop:t}=await Yl(()=>import("./gameLoop.f07ccbd2.js"),["assets/gameLoop.f07ccbd2.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=oo(nc);e.emit("setupVue",l),l.mount("#app"),wl(()=>{const n=on(),{updateServiceWorker:o}=ic({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(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{a as D,Yl as _,et as a,Ie as b,yr as c,Te as g,Ia as l,z as p,Ye as s};
|