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

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

Halve the time to mine ore, again"},visibility:()=>b(Ce.bought.value)})),Fe=q(()=>({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!

Increase the metal extracted per ore by 5x"},visibility:()=>b(Fe.bought.value||a.div(s.value,d.value).plus(i.value).gte(1))})),qe=q(()=>({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:()=>b(a.gte(ve.amount.value,1)&&(qe.bought.value||O.days[7].opened.value||a.lt(G.computedCoalGain.value,a.times(W.value,_.value).times(w)))),onPurchase(){O.days[2].recentlyUpdated.value=!0}})),z=q(()=>({canAfford(){return a.gte(l.value,50)&&a.gte(G.coal.value,1e11)},onPurchase(){l.value=a.sub(l.value,50),G.coal.value=a.sub(G.coal.value,1e11)},display:{title:"Industrial Furnace",description:`Moving smelting out of the open air and into a dedicated furnace should make efficiency even better. Double metal gained per ore

Cost: 50 ${l.displayName}
${be(1e11)} ${G.coal.displayName}`}})),he=q(()=>({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:()=>b(Ye.depthMilestones[4].earned.value)})),ve=Pe(()=>({resource:F(l),cost(){return a.pow(1.15,this.amount.value).times(10)},display:{title:"Mining Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:B(()=>o(M,null,[u("Mine 2.5x faster. Increase ore mining amount by")," ",ye(ve.amount.value),u(" ore per operation")]))},visibility:()=>b(a.gte(ve.amount.value,1)||a.div(s.value,d.value).plus(i.value).gte(10)),style:{width:"200px"}})),ke=Pe(()=>({resource:F(l),cost(){return a.pow(1.15,a.times(this.amount.value,10)).times(10)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:B(()=>o(M,null,[u("Automatically smelts")," ",ye(a.times(ke.amount.value,10)),u(" ore per second")]))},visibility:()=>b(a.gte(ke.amount.value,1)||a.gte(ve.amount.value,4)||a.gte(s.value,50)),style:{width:"200px"}})),xe=_e(!0),Me=Pe(()=>({resource:G.coal,cost(){return a.pow(10,this.amount.value).times(1e12)},display:{title:"Hotter Forges",description:"More coal makes the fires burn hotter, getting just a little more metal out of each bit of ore",effectDisplay:B(()=>o(M,null,[u("Gain "),ye(a.times(He.value,100)),u("% more metal per ore")]))},visibility:()=>b(a.gte(Me.amount.value,1)||z.bought.value),style:{width:"200px"}})),He=f(()=>a.times(Me.amount.value,.25));je.on("update",fe=>{T.value=a.times(fe,_.value).plus(T.value);const rt=T.value.trunc();T.value=T.value.minus(rt),n.value=a.add(n.value,a.times(rt,W.value)),xe.value&&S(a.min(v.value,a.times(m.value,fe)),y.value)});const[Qe,At]=il(()=>[{title:"Auto Smelt Speed",modifier:p,base:0,unit:"/s",visible(){return a.gt(ke.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:h,base:1,visible(){return a.gt(y.value,1)}},{title:"Metal per Ore",modifier:c,base:.1},{title:"Ore per Mining Operation",modifier:x,base:1},{title:"Mining Speed",modifier:N,base:.1,unit:"/s"}]),L=j(!1),K=B(()=>o(wt,{modelValue:L.value,"onUpdate:modelValue":fe=>L.value=fe},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:Qe})),{total:se,trackerDisplay:We}=dl({resource:l,goal:25e3,name:e,day:li,color:t,modal:{show:L,display:K}});return{name:e,day:li,color:t,ore:n,bestOre:s,oreProgress:T,metal:l,bestMetal:i,totalMetal:se,simplePickaxe:Be,doublePickaxe:Ce,crucible:Fe,coalDrill:qe,industrialFurnace:z,efficientDrill:he,oreDrill:ve,industrialCrucible:ke,autoSmeltEnabled:xe,hotterForge:Me,generalTabCollapsed:At,minWidth:700,display:B(()=>o(M,null,[le(We),o(we,null,null),o(It,{resource:l,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(M,null,[xe.value&&a.gte(ke.amount.value,1)?`+${gi([[m.value,"smelting speed"],[Ae.value,"ore gain"],[a.div(G.computedCoalGain.value,w),"coal gain"]],"/s",a.mul(d.value,y.value))}`:void 0]))},null),o(we,null,null),le(E),a.gte(ke.amount.value,1)?o("div",{style:{width:"150px"}},[o(sl,{title:"Auto Smelt",modelValue:xe.value,"onUpdate:modelValue":fe=>xe.value=fe},null)]):void 0,o(we,null,null),o(It,{resource:n,color:t,style:"margin-bottom: 0",sticky:!1,productionDisplay:B(()=>o(M,null,[yi($e.value)]))},null),o(we,null,null),o("div",null,[u("Currently mining "),be(W.value),u(" ore every")," ",be(a.recip(_.value)),u(" seconds")]),le(me),o(we,null,null),ze(Be,Ce,Fe,qe,z,he),ze(ve,ke,Me)]))}}),_r="coal",ai=3,G=Tt(_r,function(){const e="Coal",t="#151716",l="#B2BeB5",i="var(--foreground)",n=pt(0,"coal"),s=pt(0,"ash"),c=_e(0),d=f(()=>a.times(c.value,1e3)),p=f(()=>a.times(c.value,.1)),m=f(()=>a.times(c.value,50)),h=Pe(()=>({resource:ce.logs,cost(){let U=a.times(T.amount.value,r(T.cost)).plus(this.amount.value);return a.gte(U,100)&&(U=a.pow(U,2).div(100)),a.gte(U,1e4)&&(U=a.pow(U,2).div(1e4)),U=a.pow(.95,Z.books.smallFireBook.amount.value).times(U),U.pow(1.5).times(1e4)},display:B(()=>o(M,null,[o("h3",null,[u("Small Fire")]),o("br",null,null),u("Burn 1000 logs for 0.1 coal and 50 ash"),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("-"),H(d.value),u(" logs/sec"),o("br",null,null),u("+"),H(p.value),u(" coal/sec"),o("br",null,null),u("+"),H(m.value),u(" ash/sec"),o("br",null,null),o("br",null,null),u("Cost: "),ae(r(h.cost)),u(" "),h.resource.displayName])),onPurchase(){c.value=a.add(c.value,1)},style:{color:i,width:"160px"}})),{min:y,max:w,add:v,remove:E}=Vt({active:c,buyable:h}),S=pt(h.amount,"small fires"),x=_e(0),W=f(()=>a.times(x.value,1e4)),N=f(()=>a.times(x.value,10)),_=f(()=>a.times(x.value,1e3)),T=Pe(()=>({resource:S,cost(){return a.pow(.95,Z.books.bonfireBook.amount.value).times(10)},display:B(()=>o(M,null,[o("h3",null,[u("Bonfire")]),o("br",null,null),u("Burn 10,000 logs for 10 coal and 1000 ash"),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("-"),H(W.value),u(" logs/sec"),o("br",null,null),u("+"),H(N.value),u(" coal/sec"),o("br",null,null),u("+"),H(_.value),u(" ash/sec"),o("br",null,null),o("br",null,null),u("Cost: "),ae(r(T.cost)),u(" "),T.resource.displayName])),onPurchase(U){c.value=a.sub(c.value,U).max(0),x.value=a.add(x.value,1)},style:{color:i,width:"160px"},visibility:()=>b(fe.bought.value)})),{min:X,max:me,add:R,remove:Ae}=Vt({buyable:T,active:x}),ie=_e(0),$e=f(()=>a.times(ie.value,1e6)),Be=f(()=>a.times(ie.value,1e4)),Ce=f(()=>a.times(ie.value,1e4)),Fe=Pe(()=>({resource:ce.logs,cost(){let U=this.amount.value;return a.gte(U,100)&&(U=a.pow(U,2).div(100)),a.gte(U,1e4)&&(U=a.pow(U,2).div(1e4)),U=a.pow(.95,Z.books.kilnBook.amount.value).times(U),a.pow(1.1,U).times(1e7)},display:B(()=>o(M,null,[o("h3",null,[u("Charcoal Kiln")]),o("br",null,null),u("Burn 1,000,000 logs for 10,000 coal and 10,000 ash"),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("-"),H($e.value),u(" logs/sec"),o("br",null,null),u("+"),H(Be.value),u(" coal/sec"),o("br",null,null),u("+"),H(Ce.value),u(" ash/sec"),o("br",null,null),o("br",null,null),u("Cost: "),ae(r(Fe.cost)),u(" "),Fe.resource.displayName])),onPurchase(){ie.value=a.add(ie.value,1)},style:{color:i,width:"160px"},visibility:()=>b(Je.bought.value)})),{min:qe,max:z,add:he,remove:ve}=Vt({buyable:Fe,active:ie}),ke=_e(0),xe=f(()=>a.times(a.pow(ke.value,Ye.row2Upgrades[1].bought.value?2:1),5e7).times(it.efficientDrill.bought.value?2:1)),Me=Pe(()=>({resource:it.metal,cost(){let U=this.amount.value;return a.gte(U,100)&&(U=a.pow(U,2).div(100)),a.gte(U,1e4)&&(U=a.pow(U,2).div(1e4)),a.pow(1.15,U).times(10)},display:B(()=>o(M,null,[o("h3",null,[u("Mining Drill")]),o("br",null,null),u("Dig through the ground to find 50,000,000 coal"),o("br",null,null),o("br",null,null),u("Currently:"),o("br",null,null),u("+"),H(xe.value),u(" coal/sec"),o("br",null,null),o("br",null,null),u("Cost: "),ae(r(Me.cost)),u(" "),Me.resource.displayName])),onPurchase(){ke.value=a.add(ke.value,1)},style:{color:i,width:"160px"},visibility:()=>b(it.coalDrill.bought.value)})),{max:He,min:Qe,add:At,remove:L}=Vt({buyable:Me,active:ke}),K=q(()=>({resource:F(n),cost:5,display:{title:"Warmer Cutters",description:"Cut down twice as many trees/s"},style:{color:i}})),se=q(()=>({resource:F(n),cost:5,display:{title:"Warmer Planters",description:"Plant twice as many trees/s"},style:{color:i}})),We=q(()=>({resource:F(s),cost:5e3,display:{title:"Ashy Soil",description:"Trees give 25% more logs"},style:{color:i}})),fe=q(()=>({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:i}})),rt=[K,se,We,fe],tt=q(()=>({resource:F(n),cost:250,display:{title:"Dedicated Cutter Heaters",description:"Double the bonus from Heated Cutters"},style:{color:i},visibility:()=>b(fe.bought.value)})),Ge=q(()=>({resource:F(n),cost:250,display:{title:"Dedicated Planter Heaters",description:"Double the bonus from Heated Planters"},style:{color:i},visibility:()=>b(fe.bought.value)})),ut=q(()=>({canAfford(){return a.gte(ce.logs.value,1e5)&&a.gte(s.value,1e5)},onPurchase(){ce.logs.value=a.sub(ce.logs.value,1e5),s.value=a.sub(s.value,1e5)},display:B(()=>o(M,null,[o("h3",null,[u("Mulched Soil")]),o("br",null,null),u("Double the bonus from Fertilized Soil"),o("br",null,null),o("br",null,null),u("Cost: "),ae(1e5),u(" "),ce.logs.displayName,o("br",null,null),ae(1e5),u(" "),s.displayName])),style:{color:i},visibility:()=>b(fe.bought.value)})),Je=q(()=>({resource:ce.logs,cost:1e7,display:{title:"Efficient Fires",description:"Move the fires underground to keep the coal from turning to ash"},style:{color:i},visibility:()=>b(fe.bought.value)})),Y=[tt,Ge,ut,Je],Ie=q(()=>({resource:F(n),cost:1e19,display:{title:"Efficient Crucibles",description:"Double auto smelting speed and triple metal gain from auto smelting"},style:{color:i},visibility:()=>b(Ye.depthMilestones[4].earned.value)})),vt=[Ie],te=Pe(()=>({resource:F(n),cost(){let U=this.amount.value;return a.gte(U,50)&&(U=a.pow(U,2).div(50)),a.gte(U,200)&&(U=a.pow(U,2).div(200)),a.gte(U,2e6)&&(U=a.pow(U,2).div(2e6)),U=a.pow(.95,Z.books.heatedCuttersBook.amount.value).times(U),a.add(U,1).pow(2.5).times(10)},display:{title:"Heated Cutters",description:"Even warmer cutters cut down trees faster",effectDisplay:B(()=>o(M,null,[u("Cutters cut down trees "),H(re.value),u("x faster")]))},style:{color:i},visibility:()=>b(K.bought.value)})),J=Pe(()=>({resource:F(n),cost(){let U=this.amount.value;return a.gte(U,50)&&(U=a.pow(U,2).div(50)),a.gte(U,200)&&(U=a.pow(U,2).div(200)),a.gte(U,2e6)&&(U=a.pow(U,2).div(2e6)),U=a.pow(.95,Z.books.heatedPlantersBook.amount.value).times(U),a.add(U,1).pow(2.5).times(10)},display:{title:"Heated Planters",description:"Even warmer planters plant trees faster",effectDisplay:B(()=>o(M,null,[u("Planters plant trees "),H(Et.value),u("x faster")]))},style:{color:i},visibility:()=>b(se.bought.value)})),ht=Pe(()=>({resource:F(s),cost(){let U=this.amount.value;return a.gte(U,50)&&(U=a.pow(U,2).div(50)),a.gte(U,200)&&(U=a.pow(U,2).div(200)),a.gte(U,2e6)&&(U=a.pow(U,2).div(2e6)),U=a.pow(.95,Z.books.fertilizerBook.amount.value).times(U),a.add(U,1).pow(1.5).times(5e4)},display:{title:"Fertilized Soil",description:"More fertilizer helps trees grow bigger",effectDisplay:B(()=>o(M,null,[u("Trees give "),H(pl.value),u("x more logs")]))},style:{color:i},visibility:()=>b(We.bought.value)})),$t=[te,J,ht],dt=ee(()=>[ue(()=>({addend(){return a.times(te.amount.value,.25)},description:"Heated Cutters",enabled(){return a.gt(te.amount.value,0)}})),k(()=>({multiplier:2,description:"Dedicated Cutter Heaters",enabled:tt.bought}))]),re=f(()=>dt.apply(1)),Bt=ee(()=>[ue(()=>({addend(){return a.times(J.amount.value,.25)},description:"Heated Planters",enabled(){return a.gt(J.amount.value,0)}})),k(()=>({multiplier:2,description:"Dedicated Planter Heaters",enabled:Ge.bought}))]),Et=f(()=>Bt.apply(1)),Yt=ee(()=>[ue(()=>({addend(){return a.times(ht.amount.value,.25)},description:"Fertilized Soil",enabled(){return a.gt(ht.amount.value,0)}})),k(()=>({multiplier:2,description:"Mulched Soil",enabled:ut.bought}))]),pl=f(()=>Yt.apply(1)),Rt=ee(()=>[ue(()=>({addend(){return p.value},description:"Small Fires",enabled(){return a.gt(c.value,0)}})),ue(()=>({addend(){return N.value},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),ue(()=>({addend(){return Be.value},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}})),ue(()=>({addend(){return xe.value},description:"Mining Drills",enabled(){return a.gt(ke.value,0)}})),k(()=>({multiplier:2,description:"Carry coal in boxes",enabled:Ze.upgrades.coalUpgrade.bought})),k(()=>({multiplier:()=>a.div(Ze.buyables.coalBoxesBuyable.amount.value,2).add(1),description:"Carry more coal",enabled:Ze.upgrades.coalUpgrade.bought})),k(()=>({multiplier:()=>a.div(h.amount.value,1e4).add(1),description:"Small Fires Synergy",enabled:Ee.elves.smallFireElf.bought})),k(()=>({multiplier:()=>a.div(T.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Ee.elves.bonfireElf.bought})),k(()=>({multiplier:()=>a.div(Fe.amount.value,100).times(Ve.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Ee.elves.kilnElf.bought})),k(()=>({multiplier:2,description:"Mining overalls",enabled:at.metalUpgrades.metalUpgrade2.bought})),k(()=>({multiplier:3,description:"Mining helmet",enabled:at.metalUpgrades.metalUpgrade3.bought})),k(()=>({multiplier:4,description:"Felt-Gripped Pick",enabled:at.metalUpgrades.metalUpgrade4.bought})),k(()=>({multiplier:2,description:"12 Elves Trained",enabled:Ee.milestones[11].earned})),Ti(()=>({exponent:1.25,description:"3 Elves Trained",enabled:Ee.milestones[2].earned,supportLowNumbers:!0})),k(()=>({multiplier:()=>a.mul(Ye.depth.value,.25).add(1),description:"5m Well Depth",enabled:Ye.depthMilestones[0].earned})),k(()=>({multiplier:Ye.extractorCoal,description:"Heavy Extractor",enabled:()=>a.gt(Ye.activeExtractor.value,0)}))]),Ct=f(()=>Rt.apply(0)),kt=ee(()=>[ue(()=>({addend(){return m.value},description:"Small Fires",enabled(){return a.gt(c.value,0)}})),ue(()=>({addend(){return _.value},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),ue(()=>({addend(){return Ce.value},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}})),k(()=>({multiplier:2,description:"Carry ash in boxes",enabled:Ze.upgrades.ashUpgrade.bought})),k(()=>({multiplier:()=>a.div(Ze.buyables.ashBoxesBuyable.amount.value,2).add(1),description:"Carry more ash",enabled:Ze.upgrades.ashUpgrade.bought})),k(()=>({multiplier:()=>a.div(h.amount.value,1e3).add(1),description:"Small Fires Synergy",enabled:Ee.elves.smallFireElf.bought})),k(()=>({multiplier:()=>a.div(T.amount.value,1e3).add(1),description:"Bonfires Synergy",enabled:Ee.elves.bonfireElf.bought})),k(()=>({multiplier:()=>a.div(Fe.amount.value,100).times(Ve.boosts.green2.value).add(1),description:"Kiln Synergy",enabled:Ee.elves.kilnElf.bought})),k(()=>({multiplier:4,description:"Mining boots",enabled:at.metalUpgrades.metalUpgrade1.bought}))]),nl=f(()=>kt.apply(0)),Ot=ee(()=>[ue(()=>({addend(){return a.negate(d.value)},description:"Small Fires",enabled(){return a.gt(c.value,0)}})),ue(()=>({addend(){return a.negate(W.value)},description:"Bonfires",enabled(){return a.gt(x.value,0)}})),ue(()=>({addend(){return a.negate($e.value)},description:"Charcoal Kilns",enabled(){return a.gt(ie.value,0)}}))]),Zt=f(()=>Ot.apply(0)),[el,Al]=il(()=>[{title:"Log Consumption",modifier:Ot,base:0,visible(){return a.gt(c.value,0)||a.gt(x.value,0)||a.gt(ie.value,0)}},{title:"Coal Gain",modifier:Rt,base:0,visible(){return a.gt(c.value,0)||a.gt(x.value,0)||a.gt(ie.value,0)}},{title:"Ash Gain",modifier:kt,base:0,visible(){return a.gt(c.value,0)||a.gt(x.value,0)||a.gt(ie.value,0)}}]),ol=j(!1),Kl=B(()=>o(wt,{modelValue:ol.value,"onUpdate:modelValue":U=>ol.value=U},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:el}));je.on("update",U=>{a.lt(O.day.value,ai)||a.times(U,Zt.value).negate().gt(ce.logs.value)||(ce.logs.value=a.times(U,Zt.value).plus(ce.logs.value),n.value=a.times(U,Ct.value).plus(n.value),s.value=a.times(U,nl.value).plus(s.value),c.value=a.max(c.value,0))});const{total:Ml,trackerDisplay:Xl}=dl({resource:n,goal:1e7,name:e,day:ai,color:t,modal:{show:ol,display:Kl}});return{name:e,color:t,coal:n,totalCoal:Ml,computedCoalGain:Ct,ash:s,activeFires:c,buildFire:h,activeBonfires:x,buildBonfire:T,activeKilns:ie,buildKiln:Fe,activeDrills:ke,buildDrill:Me,warmerCutters:K,warmerPlanters:se,basicFertilizer:We,unlockBonfire:fe,dedicatedCutters:tt,dedicatedPlanters:Ge,betterFertilizer:ut,unlockKiln:Je,efficientSmelther:Ie,heatedCutters:te,heatedPlanters:J,moreFertilizer:ht,computedHeatedCutterEffect:re,computedHeatedPlanterEffect:Et,computedFertilizerEffect:pl,generalTabCollapsed:Al,minWidth:700,display:B(()=>o(M,null,[le(Xl),o(we,null,null),o(It,{resource:n,color:t,style:"margin-bottom: 0",effectDisplay:a.gt(Ct.value,0)?`+${H(Ct.value)}/s`:void 0},null),o(we,null,null),o(It,{resource:s,color:l,style:"margin-bottom: 0",effectDisplay:a.gt(nl.value,0)?`+${H(nl.value)}/s`:void 0},null),o(we,null,null),o(Tl,null,{default:()=>[o(Dt,null,{default:()=>[le(h),o("div",null,[ae(a.floor(c.value)),u("/"),ae(a.floor(h.amount.value))]),ze(y,E,v,w)]}),fe.bought.value?o(M,null,[o(we,null,null),o(Dt,null,{default:()=>[le(T),o("div",null,[ae(x.value),u("/"),ae(T.amount.value)]),ze(X,Ae,R,me)]})]):void 0,Je.bought.value?o(M,null,[o(we,null,null),o(Dt,null,{default:()=>[le(Fe),o("div",null,[ae(ie.value),u("/"),ae(Fe.amount.value)]),ze(qe,ve,he,z)]})]):void 0,it.coalDrill.bought.value?o(M,null,[o(we,null,null),o(Dt,null,{default:()=>[le(Me),o("div",null,[ae(ke.value),u("/"),ae(Me.amount.value)]),ze(Qe,L,At,He)]})]):void 0]}),o(we,null,null),Bl(rt,Y,vt),ze(...$t)]))}}),Sr="workshop",Ul=2,Mt=Tt(Sr,function(){const e="Workshop",t="#D66B02",l="#D66B02",i=pt(0,"foundation progress"),n=js(()=>({scaling:Ra(250,1.5),baseResource:ce.logs,gainResource:F(i),roundUpCost:!0,buyMax:!1,spend(ie,$e){ce.logs.value=a.sub(ce.logs.value,$e)}})),s=xt(()=>({display:B(()=>o(M,null,[o("b",{style:"font-size: x-large"},[u("Build part of the foundation")]),o("br",null,null),o("br",null,null),o("span",{style:"font-size: large"},[u("Cost:")," ",Jl(ce.logs,a.gte(n.actualGain.value,1)?n.currentAt.value:n.nextAt.value)," ",ce.logs.displayName])])),visibility:()=>b(a.lt(i.value,100)),canClick:()=>a.gte(n.actualGain.value,1)&&a.lt(i.value,100),onClick(){!r(this.canClick)||n.convert()},style:"width: 600px; min-height: unset"})),c=Pl(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{s.canClick.value&&s.onClick()}})),d=f(()=>!Ee.milestones[6].earned.value),p=P(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>a.gte(i.value,1),showPopups:d})),m=P(()=>({display:{requirement:"10% Foundation Completed",effectDisplay:"Cut an additional tree per second for each 5% of foundation completed"},shouldEarn:()=>a.gte(i.value,10),visibility:()=>b(p.earned.value),showPopups:d})),h=P(()=>({display:{requirement:"20% Foundation Completed",effectDisplay:"Plant an additional tree per second for each 10% of foundation completed"},shouldEarn:()=>a.gte(i.value,20),visibility:()=>b(m.earned.value),showPopups:d})),y=P(()=>({display:{requirement:"30% Foundation Completed",effectDisplay:"All automatic tree cutting is doubled"},shouldEarn:()=>a.gte(i.value,30),visibility:()=>b(h.earned.value),showPopups:d})),w=P(()=>({display:{requirement:"40% Foundation Completed",effectDisplay:"All automatic tree planting is doubled"},shouldEarn:()=>a.gte(i.value,40),visibility:()=>b(y.earned.value),showPopups:d})),v=P(()=>({display:{requirement:"50% Foundation Completed",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(i.value,50),visibility:()=>b(w.earned.value),showPopups:d})),E=P(()=>({display:{requirement:"75% Foundation Completed",effectDisplay:"The forest gains an extra tree for every 2% of foundation completed"},shouldEarn:()=>a.gte(i.value,75),visibility:()=>b(v.earned.value),showPopups:d})),S=P(()=>({display:{requirement:"100% Foundation Completed",effectDisplay:"Log per tree is raised to the 1.2th power"},shouldEarn:()=>a.gte(i.value,100),visibility:()=>b(E.earned.value),showPopups:d})),x=P(()=>({display:{requirement:"120% Foundation Completed",effectDisplay:"The 1% milestone is now +2% and multiplicative"},shouldEarn:()=>a.gte(i.value,120),visibility:()=>b(qt.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),W=P(()=>({display:{requirement:"140% Foundation Completed",effectDisplay:"Gain +10% metal for every 10% foundation completed"},shouldEarn:()=>a.gte(i.value,140),visibility:()=>b(qt.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),N=P(()=>({display:{requirement:"160% Foundation Completed",effectDisplay:"Gain +10% oil for every 10% foundation completed"},shouldEarn:()=>a.gte(i.value,160),visibility:()=>b(qt.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),_=P(()=>({display:{requirement:"180% Foundation Completed",effectDisplay:"Gain +10% plastic for every 10% foundation completed"},shouldEarn:()=>a.gte(i.value,180),visibility:()=>b(qt.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),T=P(()=>({display:{requirement:"200% Foundation Completed",effectDisplay:"Double paper, boxes, and all cloth actions"},shouldEarn:()=>a.gte(i.value,200),visibility:()=>b(qt.elfTraining.expandersElfTraining.milestones[2].earned.value),showPopups:d})),X={logGainMilestone1:p,autoCutMilestone1:m,autoPlantMilestone1:h,autoCutMilestone2:y,autoPlantMilestone2:w,logGainMilestone2:v,morePlantsMilestone1:E,logGainMilestone3:S,extraExpansionMilestone1:x,extraExpansionMilestone2:W,extraExpansionMilestone3:N,extraExpansionMilestone4:_,extraExpansionMilestone5:T},{collapseMilestones:me,display:R}=Hl(X),Ae=Jt(()=>({direction:De.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>O.day.value===Ul?a.div(i.value,100):1,display:B(()=>O.day.value===Ul?o(M,null,[ae(i.value),u("%")]):"")}));return Pt(()=>{O.day.value===Ul&&a.gte(i.value,100)&&O.completeDay()}),{name:e,day:Ul,color:t,foundationProgress:i,foundationConversion:n,milestones:X,collapseMilestones:me,minWidth:700,buildFoundationHK:c,display:B(()=>o(M,null,[o("div",null,[O.day.value===Ul?"Complete the foundation to complete the day":`${e} Complete!`]),le(Ae),o(we,null,null),o("div",null,[o("span",null,[u("The foundation is ")]),o("h2",{style:`color: ${t}; text-shadow: 0 0 10px ${t}`},[ae(i.value)]),u("% completed")]),a.lt(i.value,100)?o(we,null,null):null,le(s),o(we,null,null),R()]))}}),Br="elves",Rl=4,Ee=Tt(Br,function(){const e="Elves",t="red",l="#911D21",n=Jt(()=>({direction:De.Right,width:600,height:25,fillStyle:`backgroundColor: ${l}`,progress:()=>O.day.value===Rl?a.div(K.value,6).times(.8333333333333334).add(a.div(a.add(G.coal.value,1).log10(),a.log10(1e9)).clamp(0,1).div(6)):1,display:B(()=>O.day.value===Rl?a.lt(K.value,6)?o(M,null,[ae(K.value),u("/6 elves")]):o(M,null,[ae(G.coal.value),u("/"),ae(1e9),u(" coal")]):"")})),s=br(()=>({thingsToReset:[ce,Mt,G],onReset(){setTimeout(()=>{Y.earned.value?(ce.row1Upgrades.forEach(re=>re.bought.value=!0),ce.row2Upgrades.forEach(re=>re.bought.value=!0)):We.earned.value&&(ce.row1Upgrades[4].bought.value=!0,ce.row2Upgrades[4].bought.value=!0),ut.earned.value&&(Mt.foundationProgress.value=100),vt.earned.value&&(G.warmerCutters.bought.value=!0,G.warmerPlanters.bought.value=!0,G.basicFertilizer.bought.value=!0,G.unlockBonfire.bought.value=!0,G.dedicatedCutters.bought.value=!0,G.dedicatedPlanters.bought.value=!0,G.betterFertilizer.bought.value=!0,G.unlockKiln.bought.value=!0,G.efficientSmelther.bought.value=!0)})}})),c=ee(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),k(()=>({multiplier:()=>a.times(Z.books.cuttersBook.amount.value,.1).add(1),description:"Now You're Logging!",enabled:()=>a.gt(Z.books.cuttersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ie.earned}))]),d=ee(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),k(()=>({multiplier:()=>a.times(Z.books.plantersBook.amount.value,.1).add(1),description:"The Man Who Planted Trees",enabled:()=>a.gt(Z.books.plantersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ie.earned}))]),p=ee(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),k(()=>({multiplier:()=>a.times(Z.books.expandersBook.amount.value,.1).add(1),description:"Logjam",enabled:()=>a.gt(Z.books.expandersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ie.earned}))]),m=ee(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),k(()=>({multiplier:()=>a.times(Z.books.heatedCuttersBook.amount.value,.1).add(1),description:"Fahrenheit 451",enabled:()=>a.gt(Z.books.heatedCuttersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ie.earned}))]),h=ee(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),k(()=>({multiplier:()=>a.times(Z.books.heatedPlantersBook.amount.value,.1).add(1),description:"Tillamook Burn Country",enabled:()=>a.gt(Z.books.heatedPlantersBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ie.earned}))]),y=ee(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),k(()=>({multiplier:()=>a.times(Z.books.fertilizerBook.amount.value,.1).add(1),description:"The Garden Tree's Handbook",enabled:()=>a.gt(Z.books.fertilizerBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ie.earned}))]),w=ee(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),k(()=>({multiplier:()=>a.times(Z.books.smallFireBook.amount.value,.1).add(1),description:"Firestarter",enabled:()=>a.gt(Z.books.smallFireBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ie.earned}))]),v=ee(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),k(()=>({multiplier:()=>a.times(Z.books.bonfireBook.amount.value,.1).add(1),description:"An Arsonist's Guide to Writer's Homes in New England",enabled:()=>a.gt(Z.books.bonfireBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ie.earned}))]),E=ee(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),k(()=>({multiplier:()=>a.times(Z.books.kilnBook.amount.value,.1).add(1),description:"Little Fires Everywhere",enabled:()=>a.gt(Z.books.kilnBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ie.earned}))]),S=ee(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),k(()=>({multiplier:()=>a.times(Z.books.paperBook.amount.value,.1).add(1),description:"The Book Thief",enabled:()=>a.gt(Z.books.paperBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ie.earned}))]),x=ee(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),k(()=>({multiplier:()=>a.times(Z.books.boxBook.amount.value,.1).add(1),description:"Not a box",enabled:()=>a.gt(Z.books.boxBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ie.earned}))]),W=ee(()=>[k(()=>({multiplier:2,description:"6 Elves Trained",enabled:Ge.earned})),k(()=>({multiplier:()=>a.times(Z.books.clothBook.amount.value,.1).add(1),description:"Fuzzy Bee and Friends",enabled:()=>a.gt(Z.books.clothBook.amount.value,0)})),k(()=>({multiplier:2,description:"10 Elves Trained",enabled:Ie.earned}))]),[N,_]=il(()=>[{title:"Holly Auto-Buy Frequency",modifier:c,base:10,unit:"/s",visible:L.cuttersElf.bought},{title:"Ivy Auto-Buy Frequency",modifier:d,base:10,unit:"/s",visible:L.plantersElf.bought},{title:"Hope Auto-Buy Frequency",modifier:p,base:10,unit:"/s",visible:L.expandersElf.bought},{title:"Jack Auto-Buy Frequency",modifier:m,base:10,unit:"/s",visible:L.heatedCuttersElf.bought},{title:"Mary Auto-Buy Frequency",modifier:h,base:10,unit:"/s",visible:L.heatedPlantersElf.bought},{title:"Noel Auto-Buy Frequency",modifier:y,base:10,unit:"/s",visible:L.fertilizerElf.bought},{title:"Joy Auto-Buy Frequency",modifier:w,base:10,unit:"/s",visible:L.smallFireElf.bought},{title:"Faith Auto-Buy Frequency",modifier:v,base:10,unit:"/s",visible:L.bonfireElf.bought},{title:"Snowball Auto-Buy Frequency",modifier:E,base:10,unit:"/s",visible:L.kilnElf.bought},{title:"Star Auto-Buy Frequency",modifier:S,base:10,unit:"/s",visible:L.paperElf.bought},{title:"Bell Auto-Buy Frequency",modifier:x,base:10,unit:"/s",visible:L.boxElf.bought},{title:"Gingersnap Auto-Buy Frequency",modifier:W,base:10,unit:"/s",visible:L.clothElf.bought}]),T=j(!1),X=B(()=>o(wt,{modelValue:T.value,"onUpdate:modelValue":re=>T.value=re},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:N})),me=f(()=>{let re=a.pow(4,K.value).times(1e6);return a.gte(K.value,9)&&(re=a.times(re,1e15)),re});function R(re){var nl;const Bt=_e(0),Et=_e(0),Yt=re.hasToggle?_e(!1):j(!0),pl=f(()=>re.cooldownModifier.apply(10)),Rt=bt((nl=re.canBuy)!=null?nl:!0);function Ct(Ot){if(kt.bought.value&&r(Rt)){Bt.value=a.add(Bt.value,Ot);const Zt=a.recip(pl.value);Et.value+=Ot/Zt.toNumber(),(Ea(re.buyable)?re.buyable:[re.buyable]).forEach(el=>{var Al;for(;a.gte(Bt.value,Zt);)if(re.customCost==null?r(el.canPurchase):a.gte(el.resource.value,re.customCost(el.amount.value)))el.amount.value=a.add(el.amount.value,1),Bt.value=a.sub(Bt.value,Zt),(Al=re.onAutoPurchase)==null||Al.call(re);else{Bt.value=Zt;break}})}}const kt=q(()=>({...re,buyable:void 0,toggle:Yt,buyProgress:Bt,update:Ct,resource:G.coal,cost:me,computedAutoBuyCooldown:pl,amountOfTimesDone:Et,name:re.name,display:()=>({title:re.name,description:B(()=>o(M,null,[re.description,kt.bought.value?null:o(M,null,[" ",u("Training this elf will require resetting all your progress from days 1-3.")]),kt.bought.value&&re.hasToggle===!0?o(M,null,[o(sl,{title:re.toggleDesc,"onUpdate:modelValue":Ot=>Yt.value=Ot,modelValue:Yt.value},null)]):null])),showCost:!kt.bought.value}),style:"width: 190px",onPurchase(){var Ot;(Ot=re.onPurchase)==null||Ot.call(re),s.reset()}}));return kt}const Ae=R({name:"Holly",description:"Holly will automatically purchase cutters you can afford, without actually spending any logs.",buyable:ce.row1Buyables[0],cooldownModifier:c}),ie=R({name:"Ivy",description:"Ivy will automatically purchase planters you can afford, without actually spending any logs.",buyable:ce.row1Buyables[1],cooldownModifier:d}),$e=R({name:"Hope",description:"Hope will automatically purchase forest expanders you can afford, without actually spending any logs.",buyable:ce.row1Buyables[2],cooldownModifier:p}),Be=[Ae,ie,$e],Ce=R({name:"Jack",description:"Jack will automatically purchase heated cutters you can afford, without actually spending any coal.",buyable:G.heatedCutters,cooldownModifier:m}),Fe=R({name:"Mary",description:"Mary will automatically purchase heated planters you can afford, without actually spending any coal.",buyable:G.heatedPlanters,cooldownModifier:h}),qe=R({name:"Noel",description:"Noel will automatically purchase fertilized soil you can afford, without actually spending any ash.",buyable:G.moreFertilizer,cooldownModifier:y}),z=[Ce,Fe,qe],he=R({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:G.buildFire,cooldownModifier:w,visibility:()=>b(Ze.upgrades.logsUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased small fires",onAutoPurchase(){he.toggle.value&&(G.activeFires.value=a.add(G.activeFires.value,1))},onPurchase(){O.days[4].recentlyUpdated.value=!0}}),ve=R({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:G.buildBonfire,cooldownModifier:v,visibility:()=>b(Ze.upgrades.ashUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased bonfires",onAutoPurchase(){const re=r(this.buyable.cost);G.activeFires.value=a.sub(G.activeFires.value,re).max(0),G.buildFire.amount.value=a.sub(G.buildFire.amount.value,re).max(0),ve.toggle.value&&(G.activeBonfires.value=a.add(G.activeBonfires.value,1))},onPurchase(){O.days[4].recentlyUpdated.value=!0},canBuy:G.unlockBonfire.bought}),ke=R({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:G.buildKiln,cooldownModifier:E,visibility:()=>b(Ze.upgrades.coalUpgrade.bought.value),hasToggle:!0,toggleDesc:"Activate auto-purchased kilns",onAutoPurchase(){ke.toggle.value&&(G.activeKilns.value=a.add(G.activeKilns.value,1))},onPurchase(){O.days[4].recentlyUpdated.value=!0},canBuy:G.unlockKiln.bought}),xe=[he,ve,ke],Me=R({name:"Star",description:"Star will automatically purchase all books you can afford, without actually spending any paper.",buyable:Object.values(Z.books),cooldownModifier:S,visibility:()=>b(Re.elfUpgrades.paperElf.bought.value)}),He=R({name:"Bell",description:"Bell will automatically purchase all box buyables you can afford, without actually spending any boxes.",buyable:Object.values(Ze.buyables),cooldownModifier:x,visibility:()=>b(Re.elfUpgrades.boxElf.bought.value)}),Qe=R({name:"Gingersnap",description:"Gingersnap will automatically purchase all cloth buyables you can afford, without actually spending any resources.",buyable:[at.buildPens,at.betterShears,at.fasterSpinning],cooldownModifier:W,visibility:()=>b(Re.elfUpgrades.clothElf.bought.value)}),At=[Me,He,Qe],L={cuttersElf:Ae,plantersElf:ie,expandersElf:$e,heatedCuttersElf:Ce,heatedPlantersElf:Fe,fertilizerElf:qe,smallFireElf:he,bonfireElf:ve,kilnElf:ke,paperElf:Me,boxElf:He,clothElf:Qe},K=f(()=>Object.values(L).filter(re=>re.bought.value).length),se=P(()=>({display:{requirement:"1 Elf Trained",effectDisplay:"Manual cutting and planting can happen twice as often for each trained elf"},shouldEarn:()=>a.gte(K.value,1)})),We=P(()=>({display:{requirement:"2 Elves Trained",effectDisplay:"Research I & II aren't reset after training"},shouldEarn:()=>a.gte(K.value,2),visibility:()=>b(se.earned.value)})),fe=P(()=>({display:{requirement:"3 Elves Trained",effectDisplay:"Coal gain is raised to the 1.25"},shouldEarn:()=>a.gte(K.value,3),visibility:()=>b(We.earned.value)})),rt=P(()=>({display:{requirement:"4 Elves Trained",effectDisplay:"Trees give twice as many logs"},shouldEarn:()=>a.gte(K.value,4),visibility:()=>b(fe.earned.value)})),tt=P(()=>({display:{requirement:"5 Elves Trained",effectDisplay:"Forest is twice as large"},shouldEarn:()=>a.gte(K.value,5),visibility:()=>b(rt.earned.value)})),Ge=P(()=>({display:{requirement:"6 Elves Trained",effectDisplay:"Elves work twice as fast"},shouldEarn:()=>a.gte(K.value,6),visibility:()=>b(tt.earned.value)})),ut=P(()=>({display:{requirement:"7 Elves Trained",effectDisplay:"Workshop Foundation starts at 100% complete after training"},shouldEarn:()=>a.gte(K.value,7),visibility:()=>b(Ge.earned.value&&O.day.value>5)})),Je=P(()=>({display:{requirement:"8 Elves Trained",effectDisplay:"Forest is twice as large (again)"},shouldEarn:()=>a.gte(K.value,8),visibility:()=>b(ut.earned.value)})),Y=P(()=>({display:{requirement:"9 Elves Trained",effectDisplay:"Trees upgrades aren't reset after training"},shouldEarn:()=>a.gte(K.value,9),visibility:()=>b(Je.earned.value)})),Ie=P(()=>({display:{requirement:"10 Elves Trained",effectDisplay:"Elves work twice as fast (again)"},shouldEarn:()=>a.gte(K.value,10),visibility:()=>b(O.day.value>=10)})),vt=P(()=>({display:{requirement:"11 Elves Trained",effectDisplay:"Coal upgrades aren't reset after training"},shouldEarn:()=>a.gte(K.value,11),visibility:()=>b(Ie.earned.value)})),te=P(()=>({display:{requirement:"12 Elves Trained",effectDisplay:"Double coal gain"},shouldEarn:()=>a.gte(K.value,12),visibility:()=>b(vt.earned.value)})),J=[se,We,fe,rt,tt,Ge,ut,Je,Y,Ie,vt,te],ht={manualMilestone:se,researchMilestone:We,coalGainMilestone:fe,logGainMilestone:rt,forestMilestone:tt,elvesMilestone:Ge,foundationMilestone:ut,forestMilestone2:Je,treeUpgradesMilestone:Y,elvesMilestone2:Ie,coalUpgradesMilestone:vt,coalGainMilestone2:te},{collapseMilestones:$t,display:dt}=Hl(ht);return je.on("update",re=>{a.lt(O.day.value,Rl)||Object.values(L).forEach(Bt=>Bt.update(re))}),Pt(()=>{O.day.value===Rl&&a.gte(K.value,6)&&a.gte(G.coal.value,1e9)&&O.completeDay()}),{name:e,color:t,elves:L,totalElves:K,milestones:J,collapseMilestones:$t,generalTabCollapsed:_,minWidth:700,display:B(()=>o(M,null,[o("div",null,[O.day.value===Rl?`Reach ${ae(6)} trained elves and ${ae(1e9)} ${G.coal.displayName} to complete the day`:`${e} Complete!`," ",u("-")," ",o("button",{class:"button",style:"display: inline-block;",onClick:()=>T.value=!0},[u("Check Modifiers")])]),le(n),le(X),o(we,null,null),o("div",{style:"width: 600px"},[Bl(Be,z,xe,At)]),dt()]))}}),Nr="management",Ol=12,qt=Tt(Nr,()=>{const e="Management",t="green",l=Jt(()=>({direction:De.Right,width:600,height:25,fillStyle:`backgroundColor: ${t}`,progress:()=>O.day.value===Ol?i.value/(Ee.totalElves.value*5):1,display:B(()=>O.day.value===Ol?o(M,null,[ae(i.value),u("/"),ae(Ee.totalElves.value*5)," ",u("elf levels")]):"")})),i=f(()=>{let Y=0;for(const Ie of Object.values(At))Y+=Ie.level.value;return Y}),n=q(()=>({display:{title:"Teach the Elves",description:"The Elves probably need to be taught if they're to do better. Maybe you'll build a school so you can teach them?"},resource:ce.logs,cost:1e21})),s=q(()=>({display:{title:"Add a Classroom?",description:"Yay, you have a school. Too bad it has pretty much nothing in it. Maybe you could add some classrooms to make it less boring and more enticing to the Elves?"},resource:Ze.boxes,style:"width: 150px",cost:1e13})),c=ee(()=>[k(()=>({multiplier:()=>We.value,description:"Classroom Effect",enabled:()=>s.bought.value}))]),d=c.apply(1);function p(Y,Ie,...vt){const te=_e(0),J=f(()=>a.pow(10,ht.value).mul(1e4)),ht=f(()=>a.min(a.mul(9,te.value).div(1e4).add(1).log10().floor(),K.amount.value).toNumber()),$t=f(()=>a.sub(te.value,a.pow(10,ht.value).sub(1).div(9).mul(1e4))),dt=Jt(()=>({direction:De.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div($t.value,J.value)})),{collapseMilestones:re,display:Bt}=Hl(Ie),Et=ee(()=>[k(()=>({multiplier:d,description:"Global XP Multiplier"})),...vt]),Yt=f(()=>Et.apply(1));return xt(()=>({display:{title:Y.name,description:B(()=>o(M,null,[Y.name,u(" is currently at level "),ae(ht.value),u("! They have achieved a total of "),H(te.value),u(" XP, and have")," ",H($t.value),u("/"),H(J.value),u(" XP. They buy buyables "),ae(Y.computedAutoBuyCooldown.value),u(" times per second, gaining")," ",a.gte(ht.value,K.amount.value)?0:H(a.mul(Yt.value,Y.computedAutoBuyCooldown.value))," ",u("XP/sec.")," ",a.gte(ht.value,K.amount.value)?o("div",{style:"color: red"},[u("This elf cannot gain any XP because it has exceeded the maximum level from schools.")]):void 0,X.value!==Y.name?"Click to see this elf's milestones.":void 0,le(dt)]))},style:"width: 190px",onClick(){X.value=Y.name},canClick(){return X.value!==Y.name},state:re,displayMilestone:Bt,level:ht,exp:te,milestones:Ie,timeForExp:Y.computedAutoBuyCooldown,amountOfTimesDone:Y.amountOfTimesDone,elfXPGainComputed:Yt,elfXPGain:Et}))}const m=[P(()=>({display:{requirement:"Holly Level 1",effectDisplay:"Cutting speed multiplies log gain."},shouldEarn:()=>R.level.value>=1})),P(()=>({display:{requirement:"Holly Level 2",effectDisplay:"Holly now buys max."},visibility:()=>b(m[0].earned.value),shouldEarn:()=>R.level.value>=2})),P(()=>({display:{requirement:"Holly Level 3",effectDisplay:"Cutting speed multiplies cloth gain, wool gain (increasing the requirement as well), and sheep gain."},visibility:()=>b(m[1].earned.value),shouldEarn:()=>R.level.value>=3})),P(()=>({display:{requirement:"Holly Level 4",effectDisplay:"Multiply cutting speed by 1.1 per day completed"},visibility:()=>b(m[2].earned.value&&O.day.value>=13),shouldEarn:()=>R.level.value>=4})),P(()=>({display:{requirement:"Holly Level 5",effectDisplay:"Reduce workshop expansion cost by ^0.95"},visibility:()=>b(m[3].earned.value&&O.day.value>=13),shouldEarn:()=>R.level.value>=5}))],h=[P(()=>({display:{requirement:"Ivy Level 1",effectDisplay:"Planters are now twice as efficent."},shouldEarn:()=>Ae.level.value>=1})),P(()=>({display:{requirement:"Ivy Level 2",effectDisplay:"Ivy now buys max."},visibility:()=>b(h[0].earned.value),shouldEarn:()=>Ae.level.value>=2})),P(()=>({display:{requirement:"Ivy Level 3",effectDisplay:"2^(log(logs)^0.2) multiplies planting speed"},visibility:()=>b(h[1].earned.value),shouldEarn:()=>Ae.level.value>=3})),P(()=>({display:{requirement:"Ivy Level 4",effectDisplay:"Divide planter cost by 10"},visibility:()=>b(h[2].earned.value&&O.day.value>=13),shouldEarn:()=>Ae.level.value>=4})),P(()=>({display:{requirement:"Ivy Level 5",effectDisplay:"Boost planting/cutting speed based on which is falling behind"},visibility:()=>b(h[3].earned.value&&O.day.value>=13),shouldEarn:()=>Ae.level.value>=5}))],y=[P(()=>({display:{requirement:"Hope Level 1",effectDisplay:"Planting speed boosts forest size"},shouldEarn:()=>ie.level.value>=1})),P(()=>({display:{requirement:"Hope Level 2",effectDisplay:"Hope now buys max."},visibility:()=>b(y[0].earned.value),shouldEarn:()=>ie.level.value>=2})),P(()=>({display:{requirement:"Hope Level 3",effectDisplay:"The workshop can be expanded past 100%, but costs scale faster."},visibility:()=>b(y[1].earned.value),shouldEarn:()=>ie.level.value>=3})),P(()=>({display:{requirement:"Hope Level 4",effectDisplay:"Unlock an elf that autobuys mining drills."},visibility:()=>b(y[2].earned.value&&O.day.value>=13),shouldEarn:()=>ie.level.value>=4})),P(()=>({display:{requirement:"Hope Level 5",effectDisplay:"Unlock an elf that autobuys metal buyables."},visibility:()=>b(y[3].earned.value&&O.day.value>=13),shouldEarn:()=>ie.level.value>=5}))],w=[P(()=>({display:{requirement:"Jack Level 1",effectDisplay:"Heated cutters are less expensive."},shouldEarn:()=>Be.level.value>=1})),P(()=>({display:{requirement:"Jack Level 2",effectDisplay:"Coal gain is raised to the ^1.05"},visibility:()=>b(w[0].earned.value),shouldEarn:()=>Be.level.value>=2})),P(()=>({display:{requirement:"Jack Level 3",effectDisplay:"Jack now buys max."},visibility:()=>b(w[1].earned.value),shouldEarn:()=>Be.level.value>=3})),P(()=>({display:{requirement:"Jack Level 4",effectDisplay:"Oil gain is multiplied based on total elf levels."},visibility:()=>b(w[2].earned.value&&O.day.value>=13),shouldEarn:()=>Be.level.value>=4})),P(()=>({display:{requirement:"Jack Level 5",effectDisplay:"Unlock an elf that autobuys oil buyables."},visibility:()=>b(w[3].earned.value&&O.day.value>=13),shouldEarn:()=>Be.level.value>=5}))],v=[P(()=>({display:{requirement:"Mary Level 1",effectDisplay:"Heated planters are less expensive."},shouldEarn:()=>Ce.level.value>=1})),P(()=>({display:{requirement:"Mary Level 2",effectDisplay:"Double tree planting speed"},visibility:()=>b(v[0].earned.value),shouldEarn:()=>Ce.level.value>=2})),P(()=>({display:{requirement:"Mary Level 3",effectDisplay:"Mary now buys max."},visibility:()=>b(v[1].earned.value),shouldEarn:()=>Ce.level.value>=3})),P(()=>({display:{requirement:"Mary Level 4",effectDisplay:"Metal gain is raised to the 1.1."},visibility:()=>b(v[2].earned.value&&O.day.value>=13),shouldEarn:()=>Ce.level.value>=4})),P(()=>({display:{requirement:"Mary Level 5",effectDisplay:"Auto smelting speed is multiplied by (total XP/1000)^0.5"},visibility:()=>b(v[3].earned.value&&O.day.value>=13),shouldEarn:()=>Ce.level.value>=5}))],E=[P(()=>({display:{requirement:"Noel Level 1",effectDisplay:"Log gain is increased based on total elf level."},shouldEarn:()=>Ce.level.value>=1})),P(()=>({display:{requirement:"Noel Level 2",effectDisplay:"Fertilized soil is less expensive"},visibility:()=>b(E[0].earned.value),shouldEarn:()=>Ce.level.value>=2})),P(()=>({display:{requirement:"Noel Level 3",effectDisplay:"Divide the mining drill cost based on total logs produced"},visibility:()=>b(E[1].earned.value),shouldEarn:()=>Ce.level.value>=3})),P(()=>({display:{requirement:"Noel Level 4",effectDisplay:"Plastic\xB2 subtracts from oil refinery cost"},visibility:()=>b(E[2].earned.value&&O.day.value>=13),shouldEarn:()=>Ce.level.value>=4})),P(()=>({display:{requirement:"Noel Level 5",effectDisplay:"Unlock an elf that autobuys drills and extractors"},visibility:()=>b(E[3].earned.value&&O.day.value>=13),shouldEarn:()=>Ce.level.value>=5}))],S=[P(()=>({display:{requirement:"Joy Level 1",effectDisplay:"Multiply small fire efficiency by 5."},shouldEarn:()=>z.level.value>=1})),P(()=>({display:{requirement:"Joy Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>b(S[0].earned.value),shouldEarn:()=>z.level.value>=2})),P(()=>({display:{requirement:"Joy Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>b(S[1].earned.value),shouldEarn:()=>z.level.value>=3})),P(()=>({display:{requirement:"Joy Level 4",effectDisplay:"Metal gain is boosted by heavy drills"},visibility:()=>b(S[2].earned.value&&O.day.value>=13),shouldEarn:()=>z.level.value>=4})),P(()=>({display:{requirement:"Joy Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>b(S[3].earned.value&&O.day.value>=13),shouldEarn:()=>z.level.value>=5}))],x=[P(()=>({display:{requirement:"Faith Level 1",effectDisplay:"Multiply bonfire efficiency by 5."},shouldEarn:()=>he.level.value>=1})),P(()=>({display:{requirement:"Faith Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>b(x[0].earned.value),shouldEarn:()=>he.level.value>=2})),P(()=>({display:{requirement:"Faith Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>b(x[1].earned.value),shouldEarn:()=>he.level.value>=3})),P(()=>({display:{requirement:"Faith Level 4",effectDisplay:"Oil gain is boosted by heavy drill drills"},visibility:()=>b(x[2].earned.value&&O.day.value>=13),shouldEarn:()=>he.level.value>=4})),P(()=>({display:{requirement:"Faith Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>b(x[3].earned.value&&O.day.value>=13),shouldEarn:()=>he.level.value>=5}))],W=[P(()=>({display:{requirement:"Snowball Level 1",effectDisplay:"Multiply kiln efficiency by 5."},shouldEarn:()=>ve.level.value>=1})),P(()=>({display:{requirement:"Snowball Level 2",effectDisplay:"Raise ash gain to the 1.1"},visibility:()=>b(W[0].earned.value),shouldEarn:()=>ve.level.value>=2})),P(()=>({display:{requirement:"Snowball Level 3",effectDisplay:"Mining drill is 2x more powerful"},visibility:()=>b(W[1].earned.value),shouldEarn:()=>ve.level.value>=3})),P(()=>({display:{requirement:"Snowball Level 4",effectDisplay:"Plastic gain is boosted by heavy extractors"},visibility:()=>b(W[2].earned.value&&O.day.value>=13),shouldEarn:()=>ve.level.value>=4})),P(()=>({display:{requirement:"Snowball Level 5",effectDisplay:"Raise Industrial Crucible's effect to the 1.1"},visibility:()=>b(W[3].earned.value&&O.day.value>=13),shouldEarn:()=>ve.level.value>=5}))],N=[P(()=>({display:{requirement:"Star Level 1",effectDisplay:"Book cost is divided by total books bought."},shouldEarn:()=>xe.level.value>=1})),P(()=>({display:{requirement:"Star Level 2",effectDisplay:"Paper requires 10x less ash"},visibility:()=>b(N[0].earned.value),shouldEarn:()=>xe.level.value>=2})),P(()=>({display:{requirement:"Star Level 3",effectDisplay:"Book cost scaling 5x -> 4x"},visibility:()=>b(N[1].earned.value),shouldEarn:()=>xe.level.value>=3})),P(()=>({display:{requirement:"Star Level 4",effectDisplay:"0.95^(total books) multiplies XP requirement"},visibility:()=>b(N[2].earned.value&&O.day.value>=13),shouldEarn:()=>xe.level.value>=4})),P(()=>({display:{requirement:"Star Level 5",effectDisplay:"Gain 5 free books for all level 5 elves"},visibility:()=>b(N[3].earned.value&&O.day.value>=13),shouldEarn:()=>xe.level.value>=5}))],_=[P(()=>({display:{requirement:"Bell Level 1",effectDisplay:"Every box buyable adds sqrt(level) levels to same-row box buyables."},shouldEarn:()=>Me.level.value>=1})),P(()=>({display:{requirement:"Bell Level 2",effectDisplay:"Box gain ^1.1"},visibility:()=>b(_[0].earned.value),shouldEarn:()=>Me.level.value>=2})),P(()=>({display:{requirement:"Bell Level 3",effectDisplay:"All box buyables scaling bases -1"},visibility:()=>b(_[1].earned.value),shouldEarn:()=>Me.level.value>=3})),P(()=>({display:{requirement:"Bell Level 4",effectDisplay:"Unlock a second row of box buyables"},visibility:()=>b(_[2].earned.value&&O.day.value>=13),shouldEarn:()=>Me.level.value>=4})),P(()=>({display:{requirement:"Bell Level 5",effectDisplay:"Unlock another row of box upgrades"},visibility:()=>b(_[3].earned.value&&O.day.value>=13),shouldEarn:()=>Me.level.value>=5}))],T=[P(()=>({display:{requirement:"Gingersnap Level 1",effectDisplay:"Multiply all primary dye colors by ln(cloth+e)."},shouldEarn:()=>He.level.value>=1})),P(()=>({display:{requirement:"Gingersnap Level 2",effectDisplay:"Multiply all cloth actions by log(dye sum + 10)"},visibility:()=>b(T[0].earned.value),shouldEarn:()=>He.level.value>=2})),P(()=>({display:{requirement:"Gingersnap Level 3",effectDisplay:"Double all dye colors and cloth actions, but reset all dyes."},visibility:()=>b(T[1].earned.value),shouldEarn:()=>He.level.value>=3})),P(()=>({display:{requirement:"Gingersnap Level 4",effectDisplay:"sqrt(classrooms)/2+1 multiplies ALL dye gain, but reset all dyes."},visibility:()=>b(T[2].earned.value&&O.day.value>=13),shouldEarn:()=>He.level.value>=4})),P(()=>({display:{requirement:"Gingersnap Level 5",effectDisplay:"Well depth divides metal machine costs"},visibility:()=>b(T[3].earned.value&&O.day.value>=13),shouldEarn:()=>He.level.value>=5}))],X=_e("Holly"),me=B(()=>{const Y=Object.values(At).find(Ie=>Ie.display.title===X.value);return Y==null?(console.warn("This should not happen.",X.value),""):o(M,null,[X.value,u("'s milestones: "),Y.displayMilestone()])}),R=p(Ee.elves.cuttersElf,m),Ae=p(Ee.elves.plantersElf,h),ie=p(Ee.elves.expandersElf,y),$e=[R,Ae,ie],Be=p(Ee.elves.heatedCuttersElf,w),Ce=p(Ee.elves.heatedPlantersElf,v),Fe=p(Ee.elves.fertilizerElf,E),qe=[Be,Ce,Fe],z=p(Ee.elves.smallFireElf,S),he=p(Ee.elves.bonfireElf,x),ve=p(Ee.elves.kilnElf,W),ke=[z,he,ve],xe=p(Ee.elves.paperElf,N),Me=p(Ee.elves.boxElf,_),He=p(Ee.elves.clothElf,T),Qe=[xe,Me,He],At={cutterElfTraining:R,planterElfTraining:Ae,expandersElfTraining:ie,heatedCutterElfTraining:Be,heatedPlanterElfTraining:Ce,fertilizerElfTraining:Fe,smallfireElfTraining:z,bonfireElfTraining:he,kilnElfTraining:ve,paperElfTraining:xe,boxElfTraining:Me,clothElfTraining:He};je.on("update",()=>{if(!(O.day.value=1&&(Y.amountOfTimesDone.value-=Ie,a.lt(Y.level.value,K.amount.value)&&(Y.exp.value=a.mul(Y.elfXPGainComputed.value,Ie).add(Y.exp.value)))}});const L=f(()=>{const Y=a.pow(10,K.amount.value);return{wood:Y.mul(1e21),coal:Y.mul(1e32),paper:Y.mul(1e19),boxes:Y.mul(1e13),metalIngots:Y.mul(1e12),cloth:Y.mul(1e4),plastic:Y.mul(1e6),dye:a.add(K.amount.value,1).mul(1e4)}}),K=Pe(()=>({display:B(()=>o(M,null,[o("h3",null,[u("Build a School")]),o("div",null,[u("You gotta start somewhere, right? Each school increases the maximum level for elves by 1. Maximum of 5.")]),o("div",null,[u("You have "),ae(K.amount.value),u(" schools.")]),o("div",null,[u("They are currently letting elves learn up to level")," ",ae(K.amount.value),u(".")]),o("div",null,[u("Costs "),H(L.value.wood),u(" logs, "),H(L.value.coal)," ",u("coal, "),H(L.value.paper),u(" paper, "),H(L.value.boxes)," ",u("boxes, "),H(L.value.metalIngots),u(" metal ingots,")," ",H(L.value.cloth),u(" cloth, "),H(L.value.plastic)," ",u("plastic, and requires "),H(L.value.dye),u(" of red, yellow, and blue dye")])])),canPurchase(){return L.value.wood.lte(ce.logs.value)&&L.value.coal.lte(G.coal.value)&&L.value.paper.lte(Z.paper.value)&&L.value.boxes.lte(Ze.boxes.value)&&L.value.metalIngots.lte(it.metal.value)&&L.value.cloth.lte(at.cloth.value)&&L.value.plastic.lte(Re.plastic.value)&&L.value.dye.lte(Ve.dyes.blue.amount.value)&&L.value.dye.lte(Ve.dyes.red.amount.value)&&L.value.dye.lte(Ve.dyes.yellow.amount.value)},onPurchase(){ce.logs.value=a.sub(ce.logs.value,L.value.wood),G.coal.value=a.sub(G.coal.value,L.value.coal),Z.paper.value=a.sub(Z.paper.value,L.value.paper),Ze.boxes.value=a.sub(Ze.boxes.value,L.value.boxes),it.metal.value=a.sub(it.metal.value,L.value.metalIngots),at.cloth.value=a.sub(at.cloth.value,L.value.cloth),Re.plastic.value=a.sub(Re.plastic.value,L.value.plastic),this.amount.value=a.add(this.amount.value,1)},purchaseLimit:5,visibility:f(()=>b(n.bought.value)),style:"width: 600px"})),se=f(()=>{const Y=a.add(K.amount.value,1).pow(1.5);return{wood:Y.mul(1e21),coal:Y.mul(1e32),paper:Y.mul(1e19),boxes:Y.mul(1e13),metalIngots:Y.mul(1e12),cloth:Y.mul(1e4),plastic:Y.mul(1e6),dye:Y.mul(1e4)}}),We=f(()=>a.add(fe.amount.value,1).sqrt()),fe=Pe(()=>({display:B(()=>o(M,null,[o("h3",null,[u("Build a Classroom")]),o("div",null,[u("Hopefully it makes the school a bit less boring. Multiplies elves' XP gain by")," ",o(Oa,null,{default:()=>[u("Classrooms + 1")]}),u(".")]),o("div",null,[u("You have "),ae(K.amount.value),u(" classrooms.")]),o("div",null,[u("They are currently multiplying elves' XP gain by "),H(We.value)]),o("div",null,[u("Costs "),H(se.value.wood),u(" logs,")," ",H(se.value.coal),u(" coal, "),H(se.value.paper)," ",u("paper, "),H(se.value.boxes),u(" boxes,")," ",H(se.value.metalIngots),u(" metal ingots,")," ",H(se.value.cloth),u(" cloth, "),H(se.value.plastic)," ",u("plastic, and requires "),H(se.value.dye),u(" of red, yellow, and blue dye")])])),canPurchase(){return se.value.wood.lte(ce.logs.value)&&se.value.coal.lte(G.coal.value)&&se.value.paper.lte(Z.paper.value)&&se.value.boxes.lte(Ze.boxes.value)&&se.value.metalIngots.lte(it.metal.value)&&se.value.cloth.lte(at.cloth.value)&&se.value.plastic.lte(Re.plastic.value)&&se.value.dye.lte(Ve.dyes.blue.amount.value)&&se.value.dye.lte(Ve.dyes.red.amount.value)&&se.value.dye.lte(Ve.dyes.yellow.amount.value)},onPurchase(){ce.logs.value=a.sub(ce.logs.value,se.value.wood),G.coal.value=a.sub(G.coal.value,se.value.coal),Z.paper.value=a.sub(Z.paper.value,se.value.paper),Ze.boxes.value=a.sub(Ze.boxes.value,se.value.boxes),it.metal.value=a.sub(it.metal.value,se.value.metalIngots),at.cloth.value=a.sub(at.cloth.value,se.value.cloth),Re.plastic.value=a.sub(Re.plastic.value,se.value.plastic),this.amount.value=a.add(this.amount.value,1)},visibility:f(()=>b(s.bought.value)),style:"width: 600px"})),rt=mr({training:()=>({tab:wa(()=>({display:B(()=>o(M,null,[Bl($e,qe,ke,Qe),o(we,null,null),me()]))})),display:"Elf Training"}),teaching:()=>({tab:wa(()=>({display:B(()=>o(M,null,[le(K),u(" "),le(fe)," ",Bl([n,s])]))})),display:"The Schools"}),info:()=>({tab:wa(()=>({display:B(()=>o(M,null,[u("Each elf gains experience points (XP) every time they perform their action (they don't have to buy anything though). When they get enough XP, they can level up, granting special rewards.")]))})),display:"Info"})}),[tt,Ge]=il(()=>[{title:"Global XP Gain",modifier:c,unit:" XP"},{title:"Holly XP Gain per Action",modifier:R.elfXPGain,unit:" XP"},{title:"Ivy XP Gain per Action",modifier:Ae.elfXPGain,unit:" XP"},{title:"Hope XP Gain per Action",modifier:ie.elfXPGain,unit:" XP"},{title:"Jack XP Gain per Action",modifier:Be.elfXPGain,unit:" XP"},{title:"Mary XP Gain per Action",modifier:Ce.elfXPGain,unit:" XP"},{title:"Noel XP Gain per Action",modifier:Fe.elfXPGain,unit:" XP"},{title:"Joy XP Gain per Action",modifier:z.elfXPGain,unit:" XP"},{title:"Faith XP Gain per Action",modifier:he.elfXPGain,unit:" XP"},{title:"Snowball XP Gain per Action",modifier:ve.elfXPGain,unit:" XP"},{title:"Star XP Gain per Action",modifier:xe.elfXPGain,unit:" XP"},{title:"Bell XP Gain per Action",modifier:Me.elfXPGain,unit:" XP"},{title:"Gingersnap XP Gain per Action",modifier:He.elfXPGain,unit:" XP"}]),ut=j(!1),Je=B(()=>o(wt,{modelValue:ut.value,"onUpdate:modelValue":Y=>ut.value=Y},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:tt}));return{name:e,day:Ol,color:t,minWidth:700,elfTraining:At,currentShown:X,tabs:rt,generalTabCollapsed:Ge,teaching:n,schools:K,classrooms:fe,classroomUpgrade:s,display:B(()=>o(M,null,[O.day.value===Ol?"Get all elves to level 5.":`${e} Complete!`,u(" -"),o("button",{class:"button",style:"display: inline-block;",onClick:()=>ut.value=!0},[u("Check Modifiers")]),le(Je),le(l),le(rt)]))}}),Mr="cloth",ii=8,at=Tt(Mr,function(){const e="Cloth",t="white",l=pt(0,"cloth"),i=pt(0,"wool"),n=pt(10,"sheep"),s=_e(0),c=Jt(()=>({direction:De.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,Qe.value)})),d=xt(()=>({display:{title:"Breed sheep",description:B(()=>o(M,null,[u("Breed "),ye(a.floor(Me.value)),u(" sheep"),o("br",null,null),le(c)]))},style:{minHeight:"80px"},canClick:()=>a.gte(s.value,Qe.value),onClick(){if(a.lt(s.value,Qe.value))return;const te=a.floor(Me.value);n.value=a.add(n.value,te),s.value=0}})),p=_e(0),m=Jt(()=>({direction:De.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,se.value)})),h=xt(()=>({display:{title:"Shear sheep",description:B(()=>o(M,null,[u("Shear up to "),ye(a.floor(L.value)),u(" sheep"),o("br",null,null),le(m)]))},style:{minHeight:"80px"},canClick:()=>a.gte(p.value,se.value),onClick(){if(a.lt(p.value,se.value))return;const te=a.min(n.value,L.value).floor();i.value=a.add(i.value,te),p.value=0}})),y=_e(0),w=Jt(()=>({direction:De.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(y.value,tt.value)})),v=xt(()=>({display:{title:"Spinning wool",description:B(()=>o(M,null,[u("Spin "),ye(a.floor(fe.value)),u(" wool"),o("br",null,null),le(w)]))},style:{minHeight:"80px"},canClick:()=>a.gte(y.value,tt.value),onClick(){if(a.lt(y.value,tt.value))return;const te=a.min(i.value,fe.value).floor();l.value=a.add(l.value,te),i.value=a.sub(i.value,te),y.value=0}})),E=Pl(()=>({key:"b",description:'Press the "Breed Sheep" button',onPress:()=>{d.canClick.value&&d.onClick()}})),S=Pl(()=>({key:"h",description:'Press the "Shear Sheep" button',onPress:()=>{h.canClick.value&&h.onClick()}})),x=Pl(()=>({key:"s",description:'Press the "Spin Wool" button',onPress:()=>{v.canClick.value&&v.onClick()}})),W=Pe(()=>({resource:ce.logs,cost(){let te=this.amount.value;return a.gte(te,100)&&(te=a.pow(te,2).div(100)),te=a.pow(.95,Z.books.clothBook.amount.value).times(te),a.pow(1.5,te).times(1e14)},display:{title:"Build more pens",description:"Breed +1 sheep at once"}})),N=Pe(()=>({resource:it.metal,cost(){let te=this.amount.value;return a.gte(te,100)&&(te=a.pow(te,2).div(100)),te=a.pow(.95,Z.books.clothBook.amount.value).times(te),a.pow(1.4,te).times(1e4)},display:{title:"Make stronger shears",description:"Shear +1 sheep at once"}})),_=Pe(()=>({resource:Z.paper,cost(){let te=this.amount.value;return a.gte(te,100)&&(te=a.pow(te,2).div(100)),te=a.pow(.95,Z.books.clothBook.amount.value).times(te),a.pow(1.3,te).times(1e6)},display:{title:"Learn how to spin",description:"Spin +1 wool at once"}})),T=q(()=>({resource:F(l),cost:100,display:{title:"Lumberjack Boots",description:"Quadruple log gain"}})),X=q(()=>({resource:F(i),cost:150,visibility:()=>b(T.bought.value),display:{title:"Lumberjack Jeans",description:"Quadruple trees cut"}})),me=q(()=>({resource:F(n),cost:200,visibility:()=>b(X.bought.value),display:{title:"Lumberjack Plaid",description:"Quadruple trees planted"}})),Ae={treesUpgrade4:q(()=>({resource:F(l),cost:1e3,visibility:()=>b(Re.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Axe",description:"10x log gain"}})),treesUpgrade3:me,treesUpgrade2:X,treesUpgrade1:T},ie=q(()=>({resource:F(l),cost:150,display:{title:"Mining boots",description:"Quadruple ash gain"}})),$e=q(()=>({resource:F(i),cost:225,visibility:()=>b(ie.bought.value),display:{title:"Mining overalls",description:"Double coal gain"}})),Be=q(()=>({resource:F(n),cost:300,visibility:()=>b($e.bought.value),display:{title:"Mining helmet",description:"Triple coal gain"}})),Fe={metalUpgrade4:q(()=>({resource:F(l),cost:2e3,visibility:()=>b(Re.upgrades.clothTools.bought.value),display:{title:"Felt-Gripped Pick",description:"Quadruple coal gain"}})),metalUpgrade3:Be,metalUpgrade2:$e,metalUpgrade1:ie},qe=q(()=>({resource:F(l),cost:200,display:{title:"Scholar's shoes",description:"Double paper gain"}})),z=q(()=>({resource:F(i),cost:200,visibility:()=>b(qe.bought.value),display:{title:"Scholar's slacks",description:"Double paper gain"}})),he=q(()=>({resource:F(n),cost:400,visibility:()=>b(z.bought.value),display:{title:"Scholar's jacket",description:"Double paper gain"}})),ke={paperUpgrade4:q(()=>({resource:F(l),cost:4e3,visibility:()=>b(Re.upgrades.clothTools.bought.value),display:{title:"Felt Elbow Pads",description:"10x paper gain"}})),paperUpgrade3:he,paperUpgrade2:z,paperUpgrade1:qe},xe=ee(()=>[ue(()=>({addend:W.amount,description:"Build more pens"})),k(()=>({multiplier:()=>a.div(Re.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Re.buyables.clothGains.amount.value,1)})),k(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:Z.upgrades.clothUpgrade.bought}))]),Me=f(()=>xe.apply(1)),He=ee(()=>[]),Qe=f(()=>He.apply(1)),At=ee(()=>[ue(()=>({addend:N.amount,description:"Make stronger shears"})),k(()=>({multiplier:()=>a.div(Re.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Re.buyables.clothGains.amount.value,1)})),k(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:Z.upgrades.clothUpgrade.bought})),k(()=>({multiplier:()=>a.add(ce.computedAutoCuttingAmount.value,1).log10().add(1),description:"Holly Level 3",enabled:qt.elfTraining.cutterElfTraining.milestones[2].earned}))]),L=f(()=>At.apply(1)),K=ee(()=>[]),se=f(()=>K.apply(1)),We=ee(()=>[ue(()=>({addend:_.amount,description:"Learn how to spin"})),k(()=>({multiplier:()=>a.div(Re.buyables.clothGains.amount.value,10).add(1),description:"Plastic Shepherd",enabled:()=>a.gte(Re.buyables.clothGains.amount.value,1)})),k(()=>({multiplier:2,description:"Shepherding for Dummies",enabled:Z.upgrades.clothUpgrade.bought})),k(()=>({multiplier:()=>a.add(ce.computedAutoCuttingAmount.value,1).log10().add(1),description:"Holly Level 3",enabled:qt.elfTraining.cutterElfTraining.milestones[2].earned}))]),fe=f(()=>We.apply(1)),rt=ee(()=>[]),tt=f(()=>rt.apply(1)),[Ge,ut]=il(()=>[{title:"Sheep Gain",modifier:xe,base:1},{title:"Sheep Breeding Cooldown",modifier:He,base:1,visible:!1,unit:"s"},{title:"Shearing Amount",modifier:At,base:1},{title:"Shearing Cooldown",modifier:K,base:1,visible:!1,unit:"s"},{title:"Spinning Amount",modifier:We,base:1},{title:"Spinning Cooldown",modifier:rt,base:1,visible:!1,unit:"s"}]),Je=j(!1),Y=B(()=>o(wt,{modelValue:Je.value,"onUpdate:modelValue":te=>Je.value=te},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:Ge}));je.on("update",te=>{a.lt(O.day.value,ii)||(a.gte(s.value,Qe.value)?s.value=Qe.value:(s.value=a.add(s.value,te),d.isHolding.value&&d.onClick()),a.gte(p.value,se.value)?p.value=se.value:(p.value=a.add(p.value,te),h.isHolding.value&&h.onClick()),a.gte(y.value,tt.value)?y.value=tt.value:(y.value=a.add(y.value,te),v.isHolding.value&&v.onClick()))});const{total:Ie,trackerDisplay:vt}=dl({resource:l,goal:1e3,name:e,day:ii,color:t,textColor:"var(--feature-foreground)",modal:{show:Je,display:Y}});return{name:e,color:t,cloth:l,totalCloth:Ie,wool:i,sheep:n,buildPens:W,betterShears:N,fasterSpinning:_,treesUpgrades:Ae,metalUpgrades:Fe,paperUpgrades:ke,generalTabCollapsed:ut,breedingProgress:s,shearingProgress:p,spinningProgress:y,breedSheepHK:E,shearSheepHK:S,spinWoolHK:x,minWidth:700,display:B(()=>o(M,null,[le(vt),o(we,null,null),o(It,{resource:l,style:"margin-bottom: 0"},null),o(It,{resource:i,style:"margin-bottom: 0"},null),o(It,{resource:n,style:"margin-bottom: 0"},null),ze(d,h,v),ze(W,N,_),o(we,null,null),o(Tl,null,{default:()=>[jt(...Object.values(Ae)),jt(...Object.values(Fe)),jt(...Object.values(ke))]})]))}}),Ir="paper",Ca=5,Z=Tt(Ir,function(){const e="Paper",t="#E8DCB8",l=pt(0,"paper"),i=pt(f(()=>a.min(a.div(ce.logs.value,1e9),a.div(G.ash.value,1e6))),"pulp"),n=Ui(()=>({scaling:Ra(1,1.2),baseResource:i,gainResource:F(l),roundUpCost:!0,spend(z,he){ce.logs.value=a.sub(ce.logs.value,a.times(he,1e9)),G.ash.value=a.sub(G.ash.value,a.times(he,1e6))},gainModifier:Ae})),s=xt(()=>({display:B(()=>{const z=a.gte(n.actualGain.value,1)?n.currentAt.value:n.nextAt.value;return o(M,null,[o("span",{style:"font-size: large"},[u("Create "),ae(n.currentGain.value),u(" "),l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[u("Cost: "),Jl(ce.logs,z),u(" "),i.displayName,u(" ("),ae(a.times(z,1e9)),u(" "),ce.logs.displayName,u(";")," ",ae(a.times(z,1e6)),u(" "),G.ash.displayName,u(")")])])}),canClick:()=>a.gte(n.actualGain.value,1),onClick(){!r(this.canClick)||n.convert()},style:"width: 600px; min-height: unset"}));function c(z){const he=Pe(()=>({...z,display:{title:z.name,description:`Print a copy of "${z.name}", which ${z.elfName} will use to improve their skills! Each copy printed will reduce the "${z.buyableName}" price scaling by 0.95x and make ${z.elfName} purchase +10% faster!`,effectDisplay:B(()=>o(M,null,[H(a.pow(.95,he.amount.value)),u("x price scaling,")," ",H(a.div(he.amount.value,10).add(1)),u("x auto-purchase speed")])),showAmount:!1},resource:F(l),cost(){let ve=this.amount.value;return(z.elfName==="Star"||z.elfName==="Bell")&&(ve=a.pow(ve,2)),a.gte(ve,100)&&(ve=a.pow(ve,2).div(100)),a.gte(ve,1e4)&&(ve=a.pow(ve,2).div(1e4)),ve=a.pow(.95,x.amount.value).times(ve),a.pow(5,ve).times(10)},style:"width: 600px"}));return he}const d=c({name:"Now You're Logging!",elfName:"Holly",buyableName:"Generic Cutters"}),p=c({name:"The Man Who Planted Trees",elfName:"Ivy",buyableName:"Generic Planters"}),m=c({name:"Logjam",elfName:"Hope",buyableName:"Expand Forest"}),h=c({name:"Fahrenheit 451",elfName:"Jack",buyableName:"Heated Cutters"}),y=c({name:"Tillamook Burn Country",elfName:"Mary",buyableName:"Heated Planters"}),w=c({name:"The Garden Tree's Handbook",elfName:"Noel",buyableName:"Fertilized Soil"}),v=c({name:"Firestarter",elfName:"Joy",buyableName:"Small Fire",visibility:()=>b(Ee.elves.smallFireElf.bought.value)}),E=c({name:"An Arsonist's Guide to Writer's Homes in New England",elfName:"Faith",buyableName:"Bonfire",visibility:()=>b(Ee.elves.bonfireElf.bought.value)}),S=c({name:"Little Fires Everywhere",elfName:"Snowball",buyableName:"Kiln",visibility:()=>b(Ee.elves.kilnElf.bought.value)}),x=c({name:"The Book Thief",elfName:"Star",buyableName:"Paper Buyables",visibility:()=>b(Ee.elves.paperElf.bought.value)}),W=c({name:"Not a box",elfName:"Bell",buyableName:"Box Buyables",visibility:()=>b(Ee.elves.boxElf.bought.value)}),N=c({name:"Fuzzy Bee and Friends",elfName:"Gingersnap",buyableName:"Cloth Buyables",visibility:()=>b(Ee.elves.clothElf.bought.value)}),_={cuttersBook:d,plantersBook:p,expandersBook:m,heatedCuttersBook:h,heatedPlantersBook:y,fertilizerBook:w,smallFireBook:v,bonfireBook:E,kilnBook:S,paperBook:x,boxBook:W,clothBook:N},T=q(()=>({resource:F(l),cost:1e8,visibility:()=>b(Re.upgrades.paperTools.bought.value),display:{title:"Shepherding for Dummies",description:"Double effectiveness of all cloth actions"}})),X=q(()=>({resource:F(l),cost:1e9,visibility:()=>b(Re.upgrades.paperTools.bought.value),display:{title:"Guide to drilling",description:"Double drilling power"}})),me=q(()=>({resource:F(l),cost:1e10,visibility:()=>b(Re.upgrades.paperTools.bought.value),display:{title:"Oil and where to find it",description:"Double oil gain"}})),R={clothUpgrade:T,drillingUpgrade:X,oilUpgrade:me},Ae=ee(()=>[k(()=>({multiplier:2,description:"Scholar's shoes",enabled:at.paperUpgrades.paperUpgrade1.bought})),k(()=>({multiplier:2,description:"Scholar's slacks",enabled:at.paperUpgrades.paperUpgrade2.bought})),k(()=>({multiplier:2,description:"Scholar's jacket",enabled:at.paperUpgrades.paperUpgrade3.bought})),k(()=>({multiplier:10,description:"Felt Elbow Pads",enabled:at.paperUpgrades.paperUpgrade4.bought})),k(()=>({multiplier:Ve.boosts.yellow1,description:"Yellow Dye Boost 1",enabled:()=>a.gte(Ve.dyes.yellow.amount.value,1)}))]),[ie,$e]=il(()=>[{title:"Paper Gain",modifier:Ae,base:1}]),Be=j(!1),Ce=B(()=>o(wt,{modelValue:Be.value,"onUpdate:modelValue":z=>Be.value=z},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:ie}));je.on("update",z=>{a.lt(O.day.value,Ca)||(l.value=a.times(z,Re.buyables.passivePaper.amount.value).times(n.currentGain.value).div(100).add(l.value))});const{total:Fe,trackerDisplay:qe}=dl({resource:l,goal:5e3,name:e,day:Ca,color:t,textColor:"var(--feature-foreground)",modal:{show:Be,display:Ce}});return{name:e,day:Ca,color:t,paper:l,totalPaper:Fe,paperConversion:n,books:_,upgrades:R,generalTabCollapsed:$e,minWidth:700,display:B(()=>o(M,null,[le(qe),o(we,null,null),o(It,{resource:l,color:t,style:"margin-bottom: 0"},null),o(we,null,null),le(s),o(we,null,null),ze(...Object.values(R)),o(we,null,null),jt(...Object.values(_))]))}}),Dr="boxes",ka=6,Ze=Tt(Dr,function(){const e="Boxes",t="#964B00",l=pt(0,"boxes"),i=Ui(()=>({scaling:Ra(1e10,1),baseResource:ce.logs,gainResource:F(l),roundUpCost:!0})),n=xt(()=>({display:B(()=>o(M,null,[o("span",{style:"font-size: large"},[u("Create "),ae(i.currentGain.value),u(" "),l.displayName]),o("br",null,null),o("span",{style:"font-size: large"},[u("Cost:")," ",Jl(ce.logs,a.gte(i.actualGain.value,1)?i.currentAt.value:i.nextAt.value)," ",ce.logs.displayName])])),canClick:()=>a.gte(i.actualGain.value,1),onClick(){!r(this.canClick)||i.convert()},style:"width: 600px; min-height: unset"})),s=q(()=>({display:{title:"Carry logs in boxes",description:"Double log gain and unlock a new elf for training"},onPurchase(){O.days[3].recentlyUpdated.value=!0},resource:F(l),cost:100})),c=q(()=>({display:{title:"Carry ash in boxes",description:"Double ash gain and unlock a new elf for training"},onPurchase(){O.days[3].recentlyUpdated.value=!0},resource:F(l),cost:1e3})),d=q(()=>({display:{title:"Carry coal in boxes",description:"Double coal gain and unlock a new elf for training"},onPurchase(){O.days[3].recentlyUpdated.value=!0},resource:F(l),cost:4e3})),p={logsUpgrade:s,ashUpgrade:c,coalUpgrade:d},m=q(()=>({resource:F(l),cost:1e8,visibility:()=>b(Re.upgrades.boxTools.bought.value),display:{title:"Carry ore in boxes",description:"Double ore per mining op"}})),h=q(()=>({resource:F(l),cost:1e9,visibility:()=>b(Re.upgrades.boxTools.bought.value),display:{title:"Carry metal in boxes",description:"Double ore purity"}})),y=q(()=>({resource:F(l),cost:1e10,visibility:()=>b(Re.upgrades.boxTools.bought.value),display:{title:"Carry plastic in boxes",description:"Double plastic gain"}})),w={oreUpgrade:m,metalUpgrade:h,plasticUpgrade:y},v=q(()=>({resource:F(l),cost:1e16,visibility:()=>b(qt.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry cloth in boxes",description:"Double all cloth actions"}})),E=q(()=>({resource:F(l),cost:1e17,visibility:()=>b(qt.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry dye in boxes",description:"Double all dye gain"}})),S=q(()=>({resource:F(l),cost:1e18,visibility:()=>b(qt.elfTraining.boxElfTraining.milestones[4].earned.value),display:{title:"Carry experience in boxes???",description:"Double xp gain"}})),x={clothUpgrade:v,dyeUpgrade:E,xpUpgrade:S},W=Pe(()=>({display:{title:"Carry more logs",description:"Use boxes to carry even more logs, boosting their gain",effectDisplay:B(()=>o(M,null,[H(a.div(W.amount.value,2).add(1)),u("x")]))},resource:F(l),cost(){let R=this.amount.value;return R=a.pow(.95,Z.books.boxBook.amount.value).times(R),a.pow(3,R).times(100).div(Ve.boosts.orange2.value)},visibility:()=>b(s.bought.value)})),N=Pe(()=>({display:{title:"Carry more ash",description:"Use boxes to carry even more ash, boosting its gain",effectDisplay:B(()=>o(M,null,[H(a.div(N.amount.value,2).add(1)),u("x")]))},resource:F(l),cost(){let R=this.amount.value;return R=a.pow(.95,Z.books.boxBook.amount.value).times(R),a.pow(5,R).times(1e3).div(Ve.boosts.orange2.value)},visibility:()=>b(c.bought.value)})),_=Pe(()=>({display:{title:"Carry more coal",description:"Use boxes to carry even more coal, boosting its gain",effectDisplay:B(()=>o(M,null,[H(a.div(_.amount.value,2).add(1)),u("x")]))},resource:F(l),cost(){let R=this.amount.value;return R=a.pow(.95,Z.books.boxBook.amount.value).times(R),a.pow(7,R).times(1e3).div(Ve.boosts.orange2.value)},visibility:()=>b(d.bought.value)})),T={logBoxesBuyable:W,ashBoxesBuyable:N,coalBoxesBuyable:_};je.on("update",R=>{a.lt(O.day.value,ka)||(l.value=a.times(R,Re.buyables.passiveBoxes.amount.value).times(i.currentGain.value).div(100).add(l.value))});const{total:X,trackerDisplay:me}=dl({resource:l,goal:5e4,name:e,day:ka,color:t});return{name:e,day:ka,color:t,boxes:l,totalBoxes:X,boxesConversion:i,upgrades:p,row2Upgrades:w,row3Upgrades:x,buyables:T,minWidth:700,display:B(()=>o(M,null,[le(me),o(we,null,null),o(It,{resource:l,color:t,style:"margin-bottom: 0"},null),o(we,null,null),le(n),o(we,null,null),Bl(Object.values(p),Object.values(w),Object.values(x)),o(we,null,null),ze(...Object.values(T))]))}}),xr="trees",ni=1,oi=.1,ce=Tt(xr,function(){const e="Trees",t="#4BDC13",l="green",i=pt(0,"logs"),n=pt(0,"saplings"),s=j(0),c=ee(()=>[ue(()=>({addend:()=>a.times(R.amount.value,10),description:"Expand Forest",enabled:_.bought})),ue(()=>({addend:()=>a.div(Mt.foundationProgress.value,2),description:"75% Foundation Completed",enabled:Mt.milestones.morePlantsMilestone1.earned})),k(()=>({multiplier:2,description:"5 Elves Trained",enabled:Ee.milestones[4].earned})),k(()=>({multiplier:2,description:"8 Elves Trained",enabled:Ee.milestones[7].earned})),k(()=>({multiplier:4,description:"Lumberjack Boots",enabled:at.treesUpgrades.treesUpgrade1.bought})),ue(()=>({addend:Ve.boosts.blue1,description:"Blue Dye Boost 1",enabled:()=>a.gte(Ve.dyes.blue.amount.value,1)}))]),d=pt(f(()=>a.sub(c.apply(10),n.value)),"trees"),p=f(()=>c.apply(10)),m=q(()=>({resource:F(i),cost:10,display:{title:"Wooden Fingers",description:"Cut down an additional tree per click"}})),h=q(()=>({resource:F(i),cost:10,display:{title:"Leafy Fingers",description:"Plant an additional tree per click"}})),y=q(()=>({resource:F(i),cost:25,display:{title:"Automated Knives",description:"Cut down a tree every second"}})),w=q(()=>({resource:F(i),cost:25,display:{title:"Automated Spade",description:"Plant a tree every second"}})),v=q(()=>({resource:F(i),cost:40,display:{title:"Research I",description:"Trees give 25% more logs, and unlock more upgrades"}})),E=[m,h,y,w,v],S=q(()=>({resource:F(i),cost:50,visibility:()=>b(v.bought.value),display:{title:"Sharper Fingers",description:"Manually cut trees twice as often"}})),x=q(()=>({resource:F(i),cost:50,visibility:()=>b(v.bought.value),display:{title:"Greener Fingers",description:"Manually Plant trees twice as often"}})),W=q(()=>({resource:F(i),cost:150,visibility:()=>b(v.bought.value),display:{title:"Smart Knives",description:"Each time you manually chop trees, gain 1s of automatic tree chopping production"}})),N=q(()=>({resource:F(i),cost:150,visibility:()=>b(v.bought.value),display:{title:"Smart Spades",description:"Each time you manually plant trees, gain 1s of automatic tree planting production"}})),_=q(()=>({resource:F(i),cost:300,visibility:()=>b(v.bought.value),display:{title:"Research II",description:"Trees give 25% more logs, and unlock repeatable purchases"}})),T=[S,x,W,N,_],X=Pe(()=>({resource:F(i),cost(){let J=this.amount.value;return a.gte(J,50)&&(J=a.pow(J,2).div(50)),a.gte(J,200)&&(J=a.pow(J,2).div(200)),a.gte(J,2e6)&&(J=a.pow(J,2).div(2e6)),J=a.pow(.95,Z.books.cuttersBook.amount.value).times(J),a.times(100,J).add(200)},display:{title:"Generic Cutters",description:"Each cutter cuts down 1 tree/s"},visibility:()=>b(_.bought.value)})),me=Pe(()=>({resource:F(i),cost(){let J=this.amount.value;return a.gte(J,50)&&(J=a.pow(J,2).div(50)),a.gte(J,200)&&(J=a.pow(J,2).div(200)),a.gte(J,2e6)&&(J=a.pow(J,2).div(2e6)),J=a.pow(.95,Z.books.plantersBook.amount.value).times(J),a.times(100,J).add(200)},display:{title:"Generic Planters",description:"Each planter plants 0.5 trees/s"},visibility:()=>b(_.bought.value)})),R=Pe(()=>({resource:F(i),cost(){let J=this.amount.value;return a.gte(J,100)&&(J=a.pow(J,2).div(100)),a.gte(J,1e5)&&(J=a.pow(J,2).div(1e5)),J=a.pow(.95,Z.books.expandersBook.amount.value).times(J),a.pow(a.add(J,1),1.5).times(500)},display:{title:"Expand Forest",description:"Add 10 trees to the forest"},visibility:()=>b(_.bought.value)})),Ae=[X,me,R],ie=ee(()=>[ue(()=>({addend:1,description:"Wooden Fingers",enabled:m.bought})),ue(()=>({addend:qe,description:"Smart Knives",enabled:W.bought}))]),$e=f(()=>ie.apply(1)),Be=ee(()=>[k(()=>({multiplier:.5,description:"Sharper Fingers",enabled:S.bought})),k(()=>({multiplier:()=>a.pow(.5,Ee.totalElves.value),description:"1 Elf Trained",enabled:Ee.milestones[0].earned}))]),Ce=f(()=>Be.apply(1)),Fe=ee(()=>[ue(()=>({addend:1,description:"Automated Knives",enabled:y.bought})),ue(()=>({addend:X.amount,description:"Generic Cutters",enabled:_.bought})),ue(()=>({addend:()=>a.div(Mt.foundationProgress.value,5).floor(),description:"10% Foundation Completed",enabled:Mt.milestones.autoCutMilestone1.earned})),k(()=>({multiplier:2,description:"30% Foundation Completed",enabled:Mt.milestones.autoCutMilestone2.earned})),k(()=>({multiplier:2,description:"Warmer Cutters",enabled:G.warmerCutters.bought})),k(()=>({multiplier:G.computedHeatedCutterEffect,description:"Heated Cutters",enabled:()=>a.gt(G.heatedCutters.amount.value,0)})),k(()=>({multiplier:4,description:"Lumberjack Jeans",enabled:at.treesUpgrades.treesUpgrade2.bought}))]),qe=f(()=>Fe.apply(0)),z=ee(()=>[ue(()=>({addend:1,description:"Leafy Fingers",enabled:h.bought})),ue(()=>({addend:Me,description:"Smart Spades",enabled:N.bought}))]),he=f(()=>z.apply(1)),ve=ee(()=>[k(()=>({multiplier:.5,description:"Greener Fingers",enabled:x.bought})),k(()=>({multiplier:()=>a.pow(.5,Ee.totalElves.value),description:"1 Elf Trained",enabled:Ee.milestones[0].earned}))]),ke=f(()=>ve.apply(1)),xe=ee(()=>[ue(()=>({addend:1,description:"Automated Spade",enabled:w.bought})),ue(()=>({addend:()=>a.div(me.amount.value,2),description:"Generic Planters",enabled:_.bought})),ue(()=>({addend:()=>a.div(Mt.foundationProgress.value,10).floor(),description:"20% Foundation Completed",enabled:Mt.milestones.autoPlantMilestone1.earned})),k(()=>({multiplier:2,description:"40% Foundation Completed",enabled:Mt.milestones.autoPlantMilestone2.earned})),k(()=>({multiplier:2,description:"Warmer Planters",enabled:G.warmerPlanters.bought})),k(()=>({multiplier:G.computedHeatedPlanterEffect,description:"Heated Planters",enabled:()=>a.gt(G.heatedPlanters.amount.value,0)})),k(()=>({multiplier:4,description:"Lumberjack Plaid",enabled:at.treesUpgrades.treesUpgrade3.bought})),k(()=>({multiplier:2,description:"Ivy Level 1",enabled:qt.elfTraining.planterElfTraining.milestones[0].earned}))]),Me=f(()=>xe.apply(0)),He=ee(()=>[k(()=>({multiplier:1.25,description:"Research I",enabled:v.bought})),k(()=>({multiplier:1.25,description:"Research II",enabled:_.bought})),k(()=>({multiplier:()=>a.div(Mt.foundationProgress.value,20).add(1),description:"1% Foundation Completed",enabled:Mt.milestones.logGainMilestone1.earned})),k(()=>({multiplier:2,description:"50% Foundation Completed",enabled:Mt.milestones.logGainMilestone2.earned})),k(()=>({multiplier:1.25,description:"Ashy Soil",enabled:G.basicFertilizer.bought})),k(()=>({multiplier:G.computedFertilizerEffect,description:"Fertilized Soil",enabled:()=>a.gt(G.moreFertilizer.amount.value,0)})),k(()=>({multiplier:2,description:"4 Elves Trained",enabled:Ee.milestones[3].earned})),k(()=>({multiplier:2,description:"Carry logs in boxes",enabled:Ze.upgrades.logsUpgrade.bought})),k(()=>({multiplier:()=>a.div(Ze.buyables.logBoxesBuyable.amount.value,2).add(1),description:"Carry more logs",enabled:Ze.upgrades.logsUpgrade.bought})),k(()=>({multiplier:10,description:"Felt-Gripped Axe",enabled:at.treesUpgrades.treesUpgrade4.bought})),k(()=>({multiplier:f(()=>a.add(qe.value,1).log10().plus(1)),description:"Is Blue Dye just Water?",enabled:Ve.upgrades.blueDyeUpg.bought})),k(()=>({multiplier:f(()=>a.add(qe.value,1).log10().plus(1)),description:"Holly Level 1",enabled:qt.elfTraining.cutterElfTraining.milestones[0].earned})),Ti(()=>({exponent:1.2,description:"100% Foundation Completed",enabled:Mt.milestones.logGainMilestone3.earned}))]),Qe=_e(0),At=Jt(()=>({direction:De.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(Qe.value,Ce.value)})),L=xt(()=>({display:{title:"Cut trees",description:B(()=>o(M,null,[u("Cut down up to "),ae(a.floor($e.value))," ",u("tree"),a.eq($e.value,1)?"":"s",u(" at once!"),o("br",null,null),le(At)]))},style:{minHeight:"80px"},canClick:()=>a.gte(d.value,1)&&a.gte(Qe.value,Ce.value),onClick(){if(a.lt(Qe.value,Ce.value))return;const J=a.floor(a.min(d.value,a.times($e.value,a.div(Qe.value,Ce.value).floor())));i.value=a.add(i.value,a.times(He.apply(1),J)),n.value=a.add(n.value,J),Qe.value=0}})),K=_e(0),se=Jt(()=>({direction:De.Right,width:100,height:10,style:"margin-top: 8px",baseStyle:"margin-top: 0",fillStyle:"margin-top: 0; transition-duration: 0s",progress:()=>a.div(K.value,ke.value)})),We=xt(()=>({display:{title:"Plant trees",description:B(()=>o(M,null,[u("Plant up to "),ae(a.floor(he.value))," ",u("tree"),a.eq(he.value,1)?"":"s",u(" at once!"),o("br",null,null),le(se)]))},style:{minHeight:"80px"},canClick:()=>a.gte(n.value,1)&&a.gte(K.value,ke.value),onClick(){if(a.lt(K.value,ke.value))return;const J=a.floor(a.min(n.value,a.times(he.value,a.div(K.value,ke.value).floor())));n.value=a.sub(n.value,J),K.value=0}})),[fe,rt]=il(()=>[{title:"Logs per Tree",modifier:He,base:1,visible:v.bought},{title:"Manual Cutting Amount",modifier:ie,base:1,visible:m.bought,unit:"/click"},{title:"Manual Cutting Cooldown",modifier:Be,base:1,visible:m.bought,unit:"s"},{title:"Manual Planting Amount",modifier:z,base:1,visible:h.bought,unit:"/click"},{title:"Manual Planting Cooldown",modifier:ve,base:1,visible:h.bought,unit:"s"},{title:"Auto Cutting Amount",modifier:Fe,base:0,visible:y.bought,unit:"/s"},{title:"Auto Planting Amount",modifier:xe,base:0,visible:w.bought,unit:"/s"},{title:"Forest Size",modifier:c,base:10,visible:_.bought}]),tt=j(!1),Ge=B(()=>o(wt,{modelValue:tt.value,"onUpdate:modelValue":J=>tt.value=J},{header:()=>o("h2",null,[e,u(" Modifiers")]),body:fe}));je.on("update",J=>{if(a.lt(O.day.value,ni))return;a.gte(Qe.value,Ce.value)?Qe.value=Ce.value:(Qe.value=a.add(Qe.value,J),L.isHolding.value&&L.onClick()),a.gte(K.value,ke.value)?K.value=ke.value:(K.value=a.add(K.value,J),We.isHolding.value&&We.onClick());const ht=a.min(d.value,a.times(qe.value,J)),$t=a.mul(He.apply(1),ht),dt=a.div($t,J);s.value=a.mul(dt,oi).add(a.mul(s.value,a.dOne.sub(oi))),i.value=a.add(i.value,$t),n.value=a.add(n.value,ht);const re=a.min(n.value,a.times(Me.value,J));n.value=a.sub(n.value,re)});const ut=f(()=>a.sub(qe.value,Me.value)),Je=f(()=>a.sub(Me.value,qe.value)),Y=Pl(()=>({key:"c",description:'Press the "Cut trees" button.',onPress:()=>{L.canClick.value&&L.onClick()}})),Ie=Pl(()=>({key:"p",description:'Press the "Plant trees" button.',onPress:()=>{We.canClick.value&&We.onClick()}})),{total:vt,trackerDisplay:te}=dl({resource:i,goal:1e4,name:e,day:ni,color:l,modal:{show:tt,display:Ge}});return{name:e,color:t,logs:i,totalLogs:vt,trees:d,saplings:n,cutTree:L,plantTree:We,cutTreeHK:Y,plantTreeHK:Ie,row1Upgrades:E,row2Upgrades:T,row1Buyables:Ae,manualCutProgress:Qe,manualPlantProgress:K,generalTabCollapsed:rt,computedAutoCuttingAmount:qe,minWidth:700,display:B(()=>o(M,null,[le(te),o(we,null,null),o(It,{resource:i,color:t,style:"margin-bottom: 0",productionDisplay:a.gt(qe.value,0)?`+${H(s.value)}/s average
equilibrium: +${hi([[qe.value,"cutting speed"],[Me.value,"planting speed"],[a.mul(p.value,20),"forest cap"]],"/s",He.apply(1))}`:void 0},null),o(It,{resource:n,color:l,style:"margin-bottom: 0",productionDisplay:ia(ut.value)},null),o(It,{resource:d,color:l,style:"margin-bottom: 0",productionDisplay:ia(Je.value)},null),o(we,null,null),ze(L,We),o("div",null,[u("Tip: You can hold down on actions to perform them automatically")]),o(we,null,null),Bl(E,T),o(we,null,null),ze(...Ae)]))}});var Oi="./assets/tree.35808197.png",qi="./assets/sws.714ad454.png",Gi="data:image/png;base64,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",$i="./assets/elf.9fbfa563.png",Li="./assets/paperStacks.4c96ec8c.png",Qi="data:image/png;base64,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",Vi="./assets/metal.7407f5d1.png",Hi="./assets/cloth.7bcd7f37.png",ji="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAFxGAABcRgEUlENBAAAAG3RFWHRTb2Z0d2FyZQBDZWxzeXMgU3R1ZGlvIFRvb2zBp+F8AAAE/ElEQVR42u3dW3baMBRAURhzO4x2zO5P25WPPAhIuq99JhAsayNwbHG/rusm6f3ugEiASIBIgEiASIBIgEiASIBIgNQ+mPv9/8Fc13V3ejUeyFsUnwWMRgF5FAYoGgXkWRiQqD2QFThAUUsgq3FAIkAgESCQCJDtQCARIJAIEEAECCQCJArISSQfHRekgIxG4h4yQCBZdAyQADLi+0jlGyw/e+2dAY+7mzdqgr76ek9OQjeENgBSDUl2IO51awjkJJRXTnTWd2T/WxoCJDOSla9r1UQ7faGjMpKWmzZk+riQCUgEjOpIWu9qsmNCfOckZ3nAKxpGZSRjtv2JeCePXj0ywQBkEJZHTnLk6pERBiDDsHx1oqOAZMZREYmdFZ+YYBlXkAowABmAJuqd/LO/WwkHIDqGoxoM30F0DEhFHIBoO5CqMADRFiBwAALIA5MKDkCWTbTIk7Hj41V1HIAknmCnT06HyQxHUiDVd0+EoxeOVEA6PKMASC8caYBkmFjVn7WAoymQrBPr7ZfjTvdBwVEISPVbJcDojQMQwQGI4ABEcAAiMAARMIAAAgwggKg8FEAECSACBBBB0gsIJIAAAogAgUS+gwAiQCARHAmBQAIIIJCoGKCU+2JBAgwgkKgAFiuIQPElXZAUBgKGsiJxq4kgyQgEDFVAEgIEDlVBchwIHAIEDDVBcgQIHAIEDgEChwABRJDsBgKHAIFDgAAiQOAQIIAIEEAECCASIBIgUk4cgAgQQAQHIAKkBhBI1AXHNiCgqAOO7UAgUWUcR4DAooowQoAAo0o4woFAoqwwrCACAxCBURQIHMoMIxQIHLKCAKIGWGxeLVCyAIFD1ZAAIlAyAInG8dXgwgvJWCDfHVRYIDkKJGLCrRhEUABpB2T14EEyG0mr50F2DRokgJQHsn13C0hGImnxyO2RgSoI5N+4dMUNSLblNvlEm3a1rjSQbjiyT6iJV+0ASQYk8yRaOQ5VoACSEMjfY/t1u91+JJknv6/r+ukNoRCQDpd2AckNBRBAUgHJhgWQpDgSvpseBxI9FuVvNekOJNEqEooj4ryXv5u3+8crQOLmQYvnQSasHoCcnxdtth4FpAaQj85T0EWPK9O5BaTPl/WngDzyujPvVQVIkZMXDGT56gELIIC88NonQgFkKBBImgLJdoICkSy5gvXs658Cpdw/CgFZC+TVY+gOpRSQlJsbNwACCSDdgGz5ByEkh4DsmDhZT0AnIJAcBLJyAmUf+AAkKYF0RAIIIJBEApmwbAPSF0nqnz+oMsiAAHJ08CsO7uG7e0ts1NABSaqfga48oAeBbH8GZOWKWB1JKJBOdQEy5fI8IH2/h5RaQcp/MgAEkN3HAYhOfsyyggACSCcglZEAAggggAACCCCAAAIIIDV3cwdEp5AAAgggnYC4zKt2QFYiAUQtgaxA4l4stQbyChK3u2sEkGeRAKIxQL4DxTPpikSS5kdz3sNiVxMB8g4UG8cJkInnEhBABAggAgQQAQIIIIAAAgggkAACCCCAACJAABEggAgQAQKIAAFEgAAiQACBBBBAAAEEEEAAESCACBBABAggRqEeEEgAAQQQQAABBBBAAAFEp4FAAggggAACCCCAAAIJIAIEECXCAQgggEACCCCAAAIIIIAoAggkgAACCCBwAAIIIJAAAggggCgZEEgAgQMQQACBBBBAAAEEDkgK9wfV+oLa+LwMvQAAAABJRU5ErkJggg==",Wi="./assets/plastic.b8ac74ff.png",Ji="data:image/png;base64,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",Pr="./assets/elfManagement.436c8744.png";const O=Tt("main",function(){const e=_e(1),t=f(()=>(+new Date(new Date().getFullYear(),11,e.value)-ne.time)/1e3),l=j(!1),i=j(-1),n=j(""),s=j();function c(m){const h=_e(!1),y=_e(!1);return St(()=>{const w=m(),v=bt(w.shouldNotify),E=bt(()=>r(v)||r(y));return{...w,opened:h,shouldNotify:E,recentlyUpdated:y,[Xt]:ss,[al]:function(){const{day:S,layer:x,symbol:W,opened:N,shouldNotify:_,story:T,completedStory:X,recentlyUpdated:me}=this;return{day:S,symbol:W,layer:x,opened:N,recentlyUpdated:me,shouldNotify:_,onOpenLore(){var ie,$e;const R=O.day.value>S;i.value=R?S-1:-1;const Ae=r(($e=(ie=_t[x!=null?x:"trees"])==null?void 0:ie.name)!=null?$e:"");n.value=R?`${Ae} - Completed!`:Ae,s.value=R?`${T}
${X}`:T,l.value=!0},onOpenLayer(){if(me.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(ne.tabs.includes(x!=null?x:"trees")){const R=ne.tabs.lastIndexOf(x!=null?x:"trees");ne.tabs.splice(R,1)}else ne.tabs.push(x!=null?x:"trees"),O.minimized.value=!0;else ne.tabs.splice(1,1/0,x!=null?x:"trees")},onUnlockLayer(){x&&(N.value=!0,setTimeout(()=>{var R,Ae;i.value=-1,n.value=r((Ae=(R=_t[x!=null?x:"trees"])==null?void 0:R.name)!=null?Ae:""),s.value=T,ne.devSpeed=null,l.value=!0},1e3))}}}}})}const d=[c(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:Oi,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!"})),c(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:qi,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!"})),c(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:Gi,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!"})),c(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:$i,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they've stopped practicing for 11 months!",completedStory:"The workshop now hums with the bustling elves working on everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),c(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:Li,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!"})),c(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:Qi,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!"})),c(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:Vi,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!"})),c(()=>({day:8,shouldNotify:!1,layer:"cloth",symbol:Hi,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!"})),c(()=>({day:9,shouldNotify:!1,layer:"oil",symbol:ji,story:"Looks like you just need one more thing before the toy factory can start running: plastic! Every toy nowadays is made with plastic! But wait, how are you going to get plastic? What can make plastic? Wait that's right, oil! You figured out you might as well repurpose your coal and ore drills into something that can get you oil, but unfortunately you'll need to mine much deeper that you're currently doing, so let's get to work!",completedStory:"It took a while, but you finally got enough oil for the next step! You deserve a good rest after all this digging work - tomorrow will be a busy day! Good Job!"})),c(()=>({day:10,shouldNotify:!1,layer:"plastic",symbol:Wi,story:"Now that plenty of oil has been prepared, it's time to start refining it into plastic! This should be incredibly useful not only for toys, but making tools and other items!",completedStory:"You've started refining massive amounts of oil into slightly less massive amounts of plastic. You have a slight pang of regret thinking of the environmental impact, but ultimately decide Christmas is worth it. Good Job!"})),c(()=>({day:11,shouldNotify:!1,layer:"dyes",symbol:Ji,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..."})),c(()=>({day:12,shouldNotify:!1,layer:null,symbol:Pr,story:"You watch as the elves work, and you realize that they could probably be trained to help out better. Just then, Santa comes over to check on your progress. You reply that you're doing fine, except that the elves may need a bit of behavior management. Santa offers to help, saying that he doesn't want to leave you to do everything. Unfortunately for you, the behavior problems won't fix themselves, so let's get to work!",completedStory:""})),c(()=>({day:13,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),c(()=>({day:14,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),c(()=>({day:15,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),c(()=>({day:16,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),c(()=>({day:17,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),c(()=>({day:18,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),c(()=>({day:19,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),c(()=>({day:20,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),c(()=>({day:21,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),c(()=>({day:22,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),c(()=>({day:23,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""})),c(()=>({day:24,shouldNotify:!1,layer:null,symbol:"",story:"",completedStory:""}))];function p(){i.value=e.value-1,n.value="Day Complete!",s.value=d[e.value-1].completedStory,l.value=!0,e.value++,O.minimized.value=!1,ne.devSpeed=0}return{name:"Calendar",days:d,day:e,timeUntilNewDay:t,loreScene:i,loreTitle:n,loreBody:s,showLoreModal:l,completeDay:p,minWidth:700,display:B(()=>o(M,null,[ne.devSpeed===0?o("div",null,[u("Game Paused")]):null,ne.devSpeed&&ne.devSpeed!==1?o("div",null,[u("Dev Speed: "),H(ne.devSpeed),u("x")]):null,ne.offlineTime?o("div",null,[u("Offline Time: "),da(ne.offlineTime)]):null,o(we,null,null),o("div",{class:"advent"},[d.reduce((m,h)=>(m[m.length-1].length===4&&m.push([]),m[m.length-1].push(h),m),[[]]).map(m=>ze(...m))])]))}}),Tr=e=>[O,ce,Mt,G,Ee,Z,Ze,it,at,Ye,Re,Ve],Ga=f(()=>!1);function Fr(e,t){var l,i,n,s,c,d;e==="0.0"&&(t.offlineProd=!1,(l=t.layers)==null||delete l.management,(s=(n=(i=t.layers)==null?void 0:i.main)==null?void 0:n.days)!=null&&s[11]&&(t.layers.main.days[11].opened=!1),((d=(c=t.layers)==null?void 0:c.main)==null?void 0:d.day)===12&&(t.layers.main.day,t.devSpeed=0),t.tabs&&(t.tabs=t.tabs.filter(p=>p!=="management")))}var Ur=Object.freeze(Object.defineProperty({__proto__:null,main:O,getInitialLayers:Tr,hasWon:Ga,fixOldSave:Fr},Symbol.toStringTag,{value:"Module"}));const Rr={class:"scene"},Or=["src"],qr=["src"],Gr=["src"],$r=["src"],Lr=["src"],Qr=["src"],Vr=["src"],Hr={key:7,class:"scene-bubble",style:{left:"50%",bottom:"38%"}},jr=["src"],Wr=["src"],Jr=["src"],zr=["src"],Kr=pe({__name:"Scene",props:{day:null},setup(e){return(t,l)=>(A(),D("div",Rr,[e.day>=7?(A(),D("img",{key:0,src:r(Hi),class:"scene-item",style:{left:"4%",bottom:"3%",width:"40px",height:"40px"}},null,8,Or)):$("",!0),e.day>=0?(A(),D("img",{key:1,src:r(Oi),class:"scene-item",style:{left:"10%",bottom:"10%"}},null,8,qr)):$("",!0),e.day>=1?(A(),D("img",{key:2,src:r(qi),class:"scene-item",style:{left:"40%",bottom:"12%"}},null,8,Gr)):$("",!0),e.day>=2?(A(),D("img",{key:3,src:r(Gi),class:"scene-item",style:{left:"65%",bottom:"12%",width:"40px",height:"40px"}},null,8,$r)):$("",!0),e.day>=6?(A(),D("img",{key:4,src:r(Vi),class:"scene-item",style:{left:"72%",bottom:"8%",width:"40px",height:"40px"}},null,8,Lr)):$("",!0),e.day>=8?(A(),D("img",{key:5,src:r(ji),class:"scene-item",style:{left:"80%",bottom:"6%"}},null,8,Qr)):$("",!0),e.day>=3?(A(),D("img",{key:6,src:r($i),class:"scene-item",style:{left:"52%",bottom:"12%"}},null,8,Vr)):$("",!0),e.day>=4?(A(),D("div",Hr,[e.day>=4?(A(),D("img",{key:0,src:r(Li),class:"scene-item"},null,8,jr)):$("",!0),e.day>=5?(A(),D("img",{key:1,src:r(Qi),class:"scene-item"},null,8,Wr)):$("",!0),e.day>=9?(A(),D("img",{key:2,src:r(Wi),class:"scene-item"},null,8,Jr)):$("",!0),e.day>=10?(A(),D("img",{key:3,src:r(Ji),class:"scene-item"},null,8,zr)):$("",!0)])):$("",!0)]))}});var Xr=Ue(Kr,[["__scopeId","data-v-47b4d886"]]);const Yr=pe({components:{Context:Ai},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:i,minWidth:n,tab:s}=mt(e),c=Fl(t),d=f(()=>Oe.allowGoBack&&l.value>0&&!i.value);function p(){ne.tabs.splice(r(e.index),1)}Sl(()=>h(i.value,r(n.value))),zt([i,Lo(n)],([y,w])=>h(y,w));function m(y){e.nodes.value=y}function h(y,w){const v=typeof w=="number"||Number.isNaN(parseInt(w))?w+"px":w,E=s.value();E!=null&&(y?(E.style.flexGrow="0",E.style.flexShrink="0",E.style.width="60px",E.style.minWidth=E.style.flexBasis="",E.style.margin="0"):(E.style.flexGrow="",E.style.flexShrink="",E.style.width="",E.style.minWidth=E.style.flexBasis=v,E.style.margin=""))}return{component:c,showGoBack:d,updateNodes:m,unref:r,goBack:p}}});function Zr(e,t,l,i,n,s){const c=ll("Context");return A(),D("div",{class:"layer-container",style:nt({"--layer-color":e.unref(e.color)})},[e.showGoBack?(A(),D("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...d)=>e.goBack&&e.goBack(...d))},"\u274C")):$("",!0),e.minimized.value?(A(),D("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=d=>e.minimized.value=!1)},[g("div",null,Se(e.unref(e.name)),1)])):(A(),D("div",{key:2,class:et(["layer-tab",{showGoBack:e.showGoBack}])},[o(c,{onUpdateNodes:e.updateNodes},{default:de(()=>[(A(),oe(Xe(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(A(),D("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=d=>e.minimized.value=!0)}," \u25BC ")):$("",!0)],4)}var eu=Ue(Yr,[["render",Zr],["__scopeId","data-v-0158bec3"]]);const zi=e=>(rl("data-v-4b4bda40"),e=e(),ul(),e),tu=zi(()=>g("h2",null,"Changelog",-1)),lu=zi(()=>g("details",{open:""},[g("summary",null,[u("v0.0 Initial Commit - "),g("time",null,"2021-09-04")]),u(" 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)),au=pe({__name:"Changelog",setup(e,{expose:t}){const l=j(!1);return t({open(){l.value=!0}}),(i,n)=>(A(),oe(wt,{modelValue:l.value,"onUpdate:modelValue":n[0]||(n[0]=s=>l.value=s)},{header:de(()=>[tu]),body:de(()=>[lu]),_:1},8,["modelValue"]))}});var iu=Ue(au,[["__scopeId","data-v-4b4bda40"]]),nu=pe({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:i}=mt(e),n=j(!1),s=f(()=>(ot(i)||n.value)&&c.value),c=bl(l),d=Ft(Te(B(()=>{const h=ot(t);return h==null?"":Wt(h)})));function p(h){const y=i;h.shiftKey&&y&&(y.value=!y.value,h.stopPropagation(),h.preventDefault())}const m=f(()=>ot(i)&&Nl[lt.theme].showPin);return{Direction:De,isHovered:n,isShown:s,comp:c,elementComp:d,unref:r,togglePinned:p,showPin:m}}});const ou={key:0,class:"material-icons pinned"};function su(e,t,l,i,n,s){return A(),D("div",{class:et(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=c=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=c=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...c)=>e.togglePinned&&e.togglePinned(...c))},[Ht(e.$slots,"default",{},void 0,!0),e.elementComp?(A(),oe(Xe(e.elementComp),{key:0})):$("",!0),o(ra,{name:"fade"},{default:de(()=>{var c;return[e.isShown?(A(),D("div",{key:0,class:et(["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:nt([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(c=e.unref(e.style))!=null?c:{}])},[e.showPin?(A(),D("span",ou,"push_pin")):$("",!0),e.comp?(A(),oe(Xe(e.comp),{key:1})):$("",!0)],6)):$("",!0)]}),_:1})],34)}var ft=Ue(nu,[["render",su],["__scopeId","data-v-6102fa3a"]]);const ru={class:"info-modal-header"},uu=["src","alt"],du={class:"info-modal-title"},cu={key:0},pu=u(" - "),mu={key:0},vu={key:0},fu=g("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1),gu=g("br",null,null,-1),yu=g("br",null,null,-1),hu=["href"],bu=g("span",{class:"material-icons info-modal-discord"},"discord",-1),wu=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"),u(" 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"),u(" The Modding Tree ")])],-1),Cu=g("br",null,null,-1);var ku=pe({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const l=e,{title:i,logo:n,author:s,discordName:c,discordLink:d,versionNumber:p,versionTitle:m}=Oe,h=mt(l),y=j(!1),w=f(()=>da(ne.timePlayed)),v=f(()=>Te(B(()=>o(M,null,[Ii.map(le)]))));t({open(){y.value=!0}});function E(){var S;(S=r(h.changelog))==null||S.open()}return(S,x)=>(A(),oe(wt,{class:"info-modal",modelValue:y.value,"onUpdate:modelValue":x[0]||(x[0]=W=>y.value=W)},{header:de(()=>[g("div",ru,[r(n)?(A(),D("img",{key:0,class:"info-modal-logo",src:r(n),alt:r(i)},null,8,uu)):$("",!0),g("div",du,[g("h2",null,"- "+Se(r(i))+" -",1),g("h4",null,[u(" - v"+Se(r(p)),1),r(m)?(A(),D("span",cu,": "+Se(r(m)),1)):$("",!0),pu])])])]),body:de(({shown:W})=>[W?(A(),D("div",mu,[r(s)?(A(),D("div",vu,"By "+Se(r(s)),1)):$("",!0),fu,gu,g("div",{class:"link",onClick:E},"Changelog"),yu,g("div",null,[r(d)?(A(),D("a",{key:0,href:r(d),class:"info-modal-discord-link",target:"_blank"},[bu,u(" "+Se(r(c)),1)],8,hu)):$("",!0)]),wu,Au,Cu,g("div",null,"Time Played: "+Se(r(w)),1),(A(),oe(Xe(r(v))))])):$("",!0)]),_:1},8,["modelValue"]))}});const Ki=e=>(rl("data-v-0d685451"),e=e(),ul(),e),Eu=Ki(()=>g("h2",null,"Options",-1)),_u=Ki(()=>g("hr",null,null,-1));var Su=pe({__name:"Options",setup(e,{expose:t}){const l=j(!1);t({open(){l.value=!0}});const i=Object.keys(Nl).map(v=>({label:bi(v),value:v})),n=f(()=>Te(B(()=>o(M,null,[Mi.map(le)])))),{showTPS:s,theme:c}=mt(lt),{autosave:d,usingLog:p}=mt(ne),m=f({get(){return ne.devSpeed===0},set(v){ne.devSpeed=v?0:null}}),h=B(()=>o("span",null,[u("Autosave"),o(ft,{display:"Save-specific"},{default:()=>[u("*")]})])),y=B(()=>o("span",null,[u("Pause game"),o(ft,{display:"Save-specific"},{default:()=>[u("*")]})])),w=B(()=>o("span",null,[u("Use log for progress bar"),o(ft,{display:"Save-specific"},{default:()=>[u("*")]})]));return(v,E)=>(A(),oe(wt,{modelValue:l.value,"onUpdate:modelValue":E[5]||(E[5]=S=>l.value=S)},{header:de(()=>[Eu]),body:de(()=>[o(qa,{title:"Theme",options:r(i),modelValue:r(c),"onUpdate:modelValue":E[0]||(E[0]=S=>gt(c)?c.value=S:null)},null,8,["options","modelValue"]),(A(),oe(Xe(r(n)))),o(sl,{title:"Show TPS",modelValue:r(s),"onUpdate:modelValue":E[1]||(E[1]=S=>gt(s)?s.value=S:null)},null,8,["modelValue"]),_u,o(sl,{title:r(h),modelValue:r(d),"onUpdate:modelValue":E[2]||(E[2]=S=>gt(d)?d.value=S:null)},null,8,["title","modelValue"]),r(Oe).enablePausing?(A(),oe(sl,{key:0,title:r(y),modelValue:r(m),"onUpdate:modelValue":E[3]||(E[3]=S=>gt(m)?m.value=S:null)},null,8,["title","modelValue"])):$("",!0),o(sl,{title:r(w),modelValue:r(p),"onUpdate:modelValue":E[4]||(E[4]=S=>gt(p)?p.value=S:null)},null,8,["title","modelValue"])]),_:1},8,["modelValue"]))}});var Bu=Ue(Su,[["__scopeId","data-v-0d685451"]]);const Nu=["onSubmit"],Mu={class:"field"},Iu={key:0,class:"field-title"},Du=["placeholder"],xu=pe({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null,submitOnBlur:{type:Boolean}},emits:["update:modelValue","submit","cancel"],setup(e,{emit:t}){const l=e,i=bl(Kt(l,"title"),"span"),n=Ft(null);oa(()=>{var p;(p=n.value)==null||p.focus()});const s=f({get(){return r(l.modelValue)||""},set(p){t("update:modelValue",p)}});function c(){t("submit")}function d(){l.submitOnBlur!==!1?t("submit"):t("cancel")}return(p,m)=>(A(),D("form",{onSubmit:$l(c,["prevent"])},[g("div",Mu,[r(i)?(A(),D("span",Iu,[(A(),oe(Xe(r(i))))])):$("",!0),e.textArea?(A(),oe(r(gn),{key:1,modelValue:r(s),"onUpdate:modelValue":m[0]||(m[0]=h=>gt(s)?s.value=h:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:d,ref_key:"field",ref:n},null,8,["modelValue","placeholder","maxHeight"])):sa((A(),D("input",{key:2,type:"text","onUpdate:modelValue":m[1]||(m[1]=h=>gt(s)?s.value=h:null),placeholder:e.placeholder,class:et({fullWidth:!e.title}),onBlur:d,ref_key:"field",ref:n},null,42,Du)),[[dn,r(s)]])])],40,Nu))}});var Xi=Ue(xu,[["__scopeId","data-v-67b44a54"]]);const Pu={key:0},Tu=["onClick","disabled"],Fu={key:0},Uu=["onClick"],Ru=pe({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const i=mt(e),n=j(!1);zt(n,d=>{t("confirmingChanged",d)});function s(){if(r(i.skipConfirm)){t("click");return}n.value&&t("click"),n.value=!n.value}function c(){n.value=!1}return(d,p)=>(A(),D("span",{class:et(["container",{confirming:n.value}])},[n.value?(A(),D("span",Pu,"Are you sure?")):$("",!0),g("button",{onClick:$l(s,["stop"]),class:"button danger",disabled:e.disabled},[n.value?(A(),D("span",Fu,"Yes")):Ht(d.$slots,"default",{key:1},void 0,!0)],8,Tu),n.value?(A(),D("button",{key:1,class:"button",onClick:$l(c,["stop"])},"No",8,Uu)):$("",!0)],2))}});var Ou=Ue(Ru,[["__scopeId","data-v-2f8ef34c"]]);const qu=["onClick"],Gu=pe({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const l=j(!1),i=j(null);function n(){t("click"),i.value&&clearTimeout(i.value),l.value=!1,Sl(()=>{l.value=!0,i.value=setTimeout(()=>l.value=!1,500)})}return(s,c)=>(A(),D("button",{onClick:$l(n,["stop"]),class:et(["feedback",{activated:l.value,left:e.left}])},[Ht(s.$slots,"default",{},void 0,!0)],10,qu))}});var $u=Ue(Gu,[["__scopeId","data-v-01a1b95c"]]);const cl=e=>(rl("data-v-5285ac49"),e=e(),ul(),e),Lu=cl(()=>g("div",{class:"handle material-icons"},"drag_handle",-1)),Qu={key:0,class:"actions"},Vu=cl(()=>g("span",{class:"material-icons"},"content_paste",-1)),Hu=cl(()=>g("span",{class:"material-icons"},"content_copy",-1)),ju=cl(()=>g("span",{class:"material-icons"},"edit",-1)),Wu=cl(()=>g("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),Ju={key:1,class:"actions"},zu=cl(()=>g("span",{class:"material-icons"},"check",-1)),Ku=cl(()=>g("span",{class:"material-icons"},"close",-1)),Xu={key:2,class:"details"},Yu={class:"save-version"},Zu=cl(()=>g("br",null,null,-1)),ed={key:0},td={key:1},ld={key:3,class:"details"},ad={key:4,class:"details error"},id=cl(()=>g("br",null,null,-1)),nd=pe({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const l=e,{save:i}=mt(l),n=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),s=j(!1),c=j(!1),d=j("");zt(s,()=>d.value=i.value.name||"");const p=f(()=>i.value&&i.value.id===ne.id),m=f(()=>p.value?ne.time:i.value&&i.value.time||0),h=Fl(f(()=>{var w,v,E,S;return`Day ${(S=(E=(v=(w=i.value)==null?void 0:w.layers)==null?void 0:v.main)==null?void 0:E.day)!=null?S:1}`}));function y(){t("editName",d.value),s.value=!1}return(w,v)=>(A(),D("div",{class:et(["save",{active:r(p)}])},[Lu,s.value?(A(),D("div",Ju,[g("button",{onClick:y,class:"button"},[o(ft,{display:"Save",direction:r(De).Left,class:"info"},{default:de(()=>[zu]),_:1},8,["direction"])]),g("button",{onClick:v[5]||(v[5]=E=>s.value=!s.value),class:"button"},[o(ft,{display:"Cancel",direction:r(De).Left,class:"info"},{default:de(()=>[Ku]),_:1},8,["direction"])])])):(A(),D("div",Qu,[r(i).error==null&&!c.value?(A(),oe($u,{key:0,onClick:v[0]||(v[0]=E=>t("export")),class:"button",left:""},{default:de(()=>[o(ft,{display:"Export",direction:r(De).Left,class:"info"},{default:de(()=>[Vu]),_:1},8,["direction"])]),_:1})):$("",!0),r(i).error==null&&!c.value?(A(),D("button",{key:1,onClick:v[1]||(v[1]=E=>t("duplicate")),class:"button"},[o(ft,{display:"Duplicate",direction:r(De).Left,class:"info"},{default:de(()=>[Hu]),_:1},8,["direction"])])):$("",!0),r(i).error==null&&!c.value?(A(),D("button",{key:2,onClick:v[2]||(v[2]=E=>s.value=!s.value),class:"button"},[o(ft,{display:"Edit Name",direction:r(De).Left,class:"info"},{default:de(()=>[ju]),_:1},8,["direction"])])):$("",!0),o(Ou,{disabled:r(p),onClick:v[3]||(v[3]=E=>t("delete")),onConfirmingChanged:v[4]||(v[4]=E=>c.value=E)},{default:de(()=>[o(ft,{display:"Delete",direction:r(De).Left,class:"info"},{default:de(()=>[Wu]),_:1},8,["direction"])]),_:1},8,["disabled"])])),r(i).error==null&&!s.value?(A(),D("div",Xu,[g("button",{class:"button open",onClick:v[6]||(v[6]=E=>t("open"))},[g("h3",null,Se(r(i).name),1)]),g("span",Yu,"v"+Se(r(i).modVersion),1),Zu,r(m)?(A(),D("div",ed,"Last played "+Se(r(n).format(r(m))),1)):$("",!0),r(h)?(A(),D("div",td,[(A(),oe(Xe(r(h))))])):$("",!0)])):r(i).error==null&&s.value?(A(),D("div",ld,[o(Xi,{modelValue:d.value,"onUpdate:modelValue":v[7]||(v[7]=E=>d.value=E),class:"editname",onSubmit:y},null,8,["modelValue"])])):(A(),D("div",ad,[u(" Error: Failed to load save with id "+Se(r(i).id),1),id,u(Se(r(i).error),1)]))],2))}});var od=Ue(nd,[["__scopeId","data-v-5285ac49"]]);const $a=e=>(rl("data-v-3b9991aa"),e=e(),ul(),e),sd=$a(()=>g("h2",null,"Saves Manager",-1)),rd={class:"modal-footer"},ud={class:"field"},dd=$a(()=>g("span",{class:"field-title"},"Create Save",-1)),cd={class:"field-buttons"},pd={class:"footer"},md=$a(()=>g("div",{style:{"flex-grow":"1"}},null,-1)),vd=pe({__name:"SavesManager",setup(e,{expose:t}){const l=j(!1),i=j(null);t({open(){l.value=!0}});const n=j(!1),s=j(""),c=j(null);zt(s,N=>{N?Sl(()=>{try{if(N[0]!=="{")if(N[0]==="e")N=decodeURIComponent(escape(atob(N)));else if(N[0]==="\u1BE1")N=fl.decompressFromUTF16(N);else{console.warn("Unable to determine preset encoding",N),n.value=!0;return}const _=JSON.parse(N);if(typeof _!="object"){n.value=!0;return}const T=ea();_.id=T,Qt(_),s.value="",n.value=!1,lt.saves.push(T)}catch{n.value=!0}}):n.value=!1});let d={},p=j(Object.keys(d).reduce((N,_)=>(N.push({label:_.split("/").slice(-1)[0].slice(0,-4),value:d[_]}),N),[]));const m=ua({});function h(N){if(m[N]==null){let _=localStorage.getItem(N);if(_==null)m[N]={error:"Save doesn't exist in localStorage",id:N};else if(_==="dW5kZWZpbmVk")m[N]={error:"Save is undefined",id:N};else try{if(_[0]!=="{")if(_[0]==="e")_=decodeURIComponent(escape(atob(_)));else if(_[0]==="\u1BE1")_=fl.decompressFromUTF16(_);else return console.warn("Unable to determine preset encoding",_),n.value=!0,m[N]={error:"Unable to determine preset encoding",id:N},m[N];m[N]={...JSON.parse(_),id:N}}catch(T){m[N]={error:T,id:N},console.warn(`SavesManager: Failed to load info about save with id ${N}: ${T} ${_}`)}}return m[N]}zt(l,N=>{N&&Object.keys(m).forEach(_=>delete m[_])});const y=f(()=>lt.saves.reduce((N,_)=>(N[_]=h(_),N),{}));function w(N){let _;switch(ne.id===N?_=Si(ne[st]):_=JSON.stringify(y.value[N]),Oe.exportEncoding){default:console.warn(`Unknown save encoding: ${Oe.exportEncoding}. Defaulting to lz`);case"lz":_=fl.compressToUTF16(_);break;case"base64":_=btoa(unescape(encodeURIComponent(_)));break;case"plain":break}const T=document.createElement("textarea");T.value=_,document.body.appendChild(T),T.select(),T.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(T)}function v(N){ne.id===N&&Qt();const _={...y.value[N],id:ea()};Qt(_),lt.saves.push(_.id)}function E(N){lt.saves=lt.saves.filter(_=>_!==N),localStorage.removeItem(N),m[N]=void 0}function S(N){y.value[ne.id].time=ne.time,Qt(),m[ne.id]=void 0,_l(y.value[N]),m[N]=void 0}function x(N){if(c.value=N,Sl(()=>{c.value=null}),N[0]!=="{")if(N[0]==="e")N=decodeURIComponent(escape(atob(N)));else if(N[0]==="\u1BE1")N=fl.decompressFromUTF16(N);else{console.warn("Unable to determine preset encoding",N);return}const _=JSON.parse(N);_.id=ea(),Qt(_),lt.saves.push(_.id),S(_.id)}function W(N,_){const T=y.value[N];T&&(T.name=_,ne.id===N?(ne.name=_,Qt()):(Qt(T),m[N]=void 0))}return(N,_)=>(A(),oe(wt,{modelValue:l.value,"onUpdate:modelValue":_[4]||(_[4]=T=>l.value=T),ref_key:"modal",ref:i},{header:de(()=>[sd]),body:de(({shown:T})=>[T?(A(),oe(r(fn),{key:0,list:r(lt).saves,handle:".handle",itemKey:X=>X},{item:de(({element:X})=>[o(od,{save:r(y)[X],onOpen:me=>S(X),onExport:me=>w(X),onEditName:me=>W(X,me),onDuplicate:me=>v(X),onDelete:me=>E(X)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):$("",!0)]),footer:de(()=>[g("div",rd,[o(Xi,{modelValue:s.value,"onUpdate:modelValue":_[0]||(_[0]=T=>s.value=T),title:"Import Save",placeholder:"Paste your save here!",class:et({importingFailed:n.value})},null,8,["modelValue","class"]),g("div",ud,[dd,g("div",cd,[g("button",{class:"button",onClick:_[1]||(_[1]=T=>S(r(xl)().id))},"New Game"),Object.keys(r(p)).length>0?(A(),oe(qa,{key:0,options:r(p),modelValue:c.value,"onUpdate:modelValue":_[2]||(_[2]=T=>x(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):$("",!0)])]),g("div",pd,[md,g("button",{class:"button modal-default-button",onClick:_[3]||(_[3]=T=>l.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var Yi=Ue(vd,[["__scopeId","data-v-3b9991aa"]]);const Ut=e=>(rl("data-v-8495e562"),e=e(),ul(),e),fd=["src","alt"],gd={key:1,class:"title"},yd=Ut(()=>g("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),hd={class:"discord"},bd={class:"discord-links"},wd={key:0},Ad=["href"],Cd=Ut(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),kd=Ut(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Ed={href:"https://forums.moddingtree.com/",target:"_blank"},_d=Ut(()=>g("span",{class:"material-icons"},"forum",-1)),Sd=Ut(()=>g("span",{class:"material-icons"},"info",-1)),Bd=Ut(()=>g("span",{class:"material-icons"},"library_books",-1)),Nd=Ut(()=>g("span",{class:"material-icons"},"settings",-1)),Md=Ut(()=>g("span",{class:"material-icons"},"library_books",-1)),Id=Ut(()=>g("span",{class:"material-icons"},"settings",-1)),Dd=Ut(()=>g("span",{class:"material-icons"},"info",-1)),xd={href:"https://forums.moddingtree.com/",target:"_blank"},Pd=Ut(()=>g("span",{class:"material-icons"},"forum",-1)),Td={class:"discord"},Fd={class:"discord-links"},Ud={key:0},Rd=["href"],Od=Ut(()=>g("li",null,[g("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),qd=Ut(()=>g("li",null,[g("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Gd=pe({__name:"Nav",setup(e){const t=j(null),l=j(null),i=j(null),n=j(null),{useHeader:s,banner:c,title:d,discordName:p,discordLink:m,versionNumber:h}=Oe;function y(){window.open(m,"mywindow")}return(w,v)=>(A(),D(M,null,[r(s)?(A(),D("div",hl({key:0,class:"nav"},w.$attrs),[r(c)?(A(),D("img",{key:0,src:r(c),class:"banner",alt:r(d)},null,8,fd)):(A(),D("div",gd,Se(r(d)),1)),g("div",{onClick:v[0]||(v[0]=E=>{var S;return(S=n.value)==null?void 0:S.open()}),class:"version-container"},[o(ft,{display:"Changelog",direction:r(De).Down,class:"version"},{default:de(()=>[g("span",null,"v"+Se(r(h)),1)]),_:1},8,["direction"])]),yd,g("div",hd,[g("span",{onClick:y,class:"material-icons"},"discord"),g("ul",bd,[r(m)?(A(),D("li",wd,[g("a",{href:r(m),target:"_blank"},Se(r(p)),9,Ad)])):$("",!0),Cd,kd])]),g("div",null,[g("a",Ed,[o(ft,{display:"Forums",direction:r(De).Down,yoffset:"5px"},{default:de(()=>[_d]),_:1},8,["direction"])])]),g("div",{onClick:v[1]||(v[1]=E=>{var S;return(S=t.value)==null?void 0:S.open()})},[o(ft,{display:"Info",direction:r(De).Down,class:"info"},{default:de(()=>[Sd]),_:1},8,["direction"])]),g("div",{onClick:v[2]||(v[2]=E=>{var S;return(S=l.value)==null?void 0:S.open()})},[o(ft,{display:"Saves",direction:r(De).Down,xoffset:"-20px"},{default:de(()=>[Bd]),_:1},8,["direction"])]),g("div",{onClick:v[3]||(v[3]=E=>{var S;return(S=i.value)==null?void 0:S.open()})},[o(ft,{display:"Options",direction:r(De).Down,xoffset:"-66px"},{default:de(()=>[Nd]),_:1},8,["direction"])])],16)):(A(),D("div",hl({key:1,class:"overlay-nav"},w.$attrs),[g("div",{onClick:v[4]||(v[4]=E=>{var S;return(S=n.value)==null?void 0:S.open()}),class:"version-container"},[o(ft,{display:"Changelog",direction:r(De).Right,xoffset:"25%",class:"version"},{default:de(()=>[g("span",null,"v"+Se(r(h)),1)]),_:1},8,["direction"])]),g("div",{onClick:v[5]||(v[5]=E=>{var S;return(S=l.value)==null?void 0:S.open()})},[o(ft,{display:"Saves",direction:r(De).Right},{default:de(()=>[Md]),_:1},8,["direction"])]),g("div",{onClick:v[6]||(v[6]=E=>{var S;return(S=i.value)==null?void 0:S.open()})},[o(ft,{display:"Options",direction:r(De).Right},{default:de(()=>[Id]),_:1},8,["direction"])]),g("div",{onClick:v[7]||(v[7]=E=>{var S;return(S=t.value)==null?void 0:S.open()})},[o(ft,{display:"Info",direction:r(De).Right},{default:de(()=>[Dd]),_:1},8,["direction"])]),g("div",null,[g("a",xd,[o(ft,{display:"Forums",direction:r(De).Right,xoffset:"7px"},{default:de(()=>[Pd]),_:1},8,["direction"])])]),g("div",Td,[g("span",{onClick:y,class:"material-icons"},"discord"),g("ul",Fd,[r(m)?(A(),D("li",Ud,[g("a",{href:r(m),target:"_blank"},Se(r(p)),9,Rd)])):$("",!0),Od,qd])])],16)),o(ku,{ref_key:"info",ref:t,changelog:n.value},null,8,["changelog"]),o(Yi,{ref_key:"savesManager",ref:l},null,512),o(Bu,{ref_key:"options",ref:i},null,512),o(iu,{ref_key:"changelog",ref:n},null,512)],64))}});var Zi=Ue(Gd,[["__scopeId","data-v-8495e562"]]);const La=e=>(rl("data-v-248e2ebb"),e=e(),ul(),e),$d={class:"inner-tab"},Ld={key:1},Qd=La(()=>g("br",null,null,-1)),Vd=u(" You can help continue the "),Hd=La(()=>g("i",null,"advent",-1)),jd=u("ure at: "),Wd=La(()=>g("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link",target:"_blank"},[g("span",{class:"material-icons info-modal-discord"},"discord"),u(" The Paper Pilot Community ")],-1)),Jd=pe({__name:"Game",setup(e){const t=Kt(ne,"tabs"),l=f(()=>Object.keys(_t)),i=Oe.useHeader,n=bl(O.loreBody);function s(c){const{display:d,minimized:p,minWidth:m,name:h,color:y,minimizable:w,nodes:v}=c;return{display:d,minimized:p,minWidth:m,name:h,color:y,minimizable:w,nodes:v}}return(c,d)=>(A(),D("div",{class:et(["tabs-container",{useHeader:r(i)}])},[(A(!0),D(M,null,Sa(r(t),(p,m)=>{var h,y;return A(),D("div",{key:m,class:et(["tab",r((h=r(_t)[p])==null?void 0:h.classes)]),ref_for:!0,ref:`tab-${m}`,style:nt(r((y=r(_t)[p])==null?void 0:y.style))},[m===0&&!r(i)?(A(),oe(Zi,{key:0})):$("",!0),g("div",$d,[r(l).includes(p)?(A(),oe(eu,hl({key:0},s(r(_t)[p]),{index:m,tab:()=>{var w;return(w=c.$refs[`tab-${m}`])==null?void 0:w[0]}}),null,16,["index","tab"])):(A(),oe(Xe(p),{key:1,index:m},null,8,["index"]))])],6)}),128)),o(wt,{modelValue:r(O).showLoreModal.value,"onUpdate:modelValue":d[0]||(d[0]=p=>r(O).showLoreModal.value=p)},{header:de(()=>[g("h2",null,Se(r(O).loreTitle.value),1)]),body:de(()=>[r(n)?(A(),oe(Xe(r(n)),{key:0})):$("",!0),r(O).loreScene.value!==-1?(A(),D("div",Ld,[o(Xr,{day:r(O).loreScene.value},null,8,["day"]),Qd,Vd,Hd,jd,Wd])):$("",!0)]),_:1},8,["modelValue"])],2))}});var zd=Ue(Jd,[["__scopeId","data-v-248e2ebb"]]);const zl=e=>(rl("data-v-4a50ce42"),e=e(),ul(),e),Kd={class:"game-over-modal-header"},Xd=["src","alt"],Yd={class:"game-over-modal-title"},Zd=zl(()=>g("h2",null,"Congratulations!",-1)),ec={key:0},tc=zl(()=>g("br",null,null,-1)),lc=zl(()=>g("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),ac=zl(()=>g("br",null,null,-1)),ic=["href"],nc=zl(()=>g("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),oc=pe({__name:"GameOverScreen",setup(e){const{title:t,logo:l,discordName:i,discordLink:n,versionNumber:s,versionTitle:c}=Oe,d=f(()=>da(ne.timePlayed)),p=f(()=>Ga.value&&!ne.keepGoing),m=Kt(ne,"autosave");function h(){ne.keepGoing=!0}function y(){_l(xl())}return(w,v)=>(A(),oe(wt,{"model-value":r(p)},{header:de(()=>[g("div",Kd,[r(l)?(A(),D("img",{key:0,class:"game-over-modal-logo",src:r(l),alt:r(t)},null,8,Xd)):$("",!0),g("div",Yd,[Zd,g("h4",null,"You've beaten "+Se(r(t))+" v"+Se(r(s))+": "+Se(r(c)),1)])])]),body:de(({shown:E})=>[E?(A(),D("div",ec,[g("div",null,"It took you "+Se(r(d))+" to beat the game.",1),tc,lc,ac,g("div",null,[g("a",{href:r(n),class:"game-over-modal-discord-link"},[nc,u(" "+Se(r(i)),1)],8,ic)]),o(sl,{title:"Autosave",modelValue:r(m),"onUpdate:modelValue":v[0]||(v[0]=S=>gt(m)?m.value=S:null)},null,8,["modelValue"])])):$("",!0)]),footer:de(()=>[g("div",{class:"game-over-footer"},[g("button",{onClick:h,class:"button"},"Keep Going"),g("button",{onClick:y,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var sc=Ue(oc,[["__scopeId","data-v-4a50ce42"]]);const va=e=>(rl("data-v-3de07c06"),e=e(),ul(),e),rc=va(()=>g("div",{class:"nan-modal-header"},[g("h2",null,"NaN value detected!")],-1)),uc={key:0},dc=va(()=>g("br",null,null,-1)),cc=["href"],pc=va(()=>g("span",{class:"material-icons nan-modal-discord"},"discord",-1)),mc=va(()=>g("br",null,null,-1)),vc={class:"nan-footer"},fc=pe({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:l}=Oe,i=Kt(ne,"autosave"),n=Kt(ct,"hasNaN"),s=j(null),c=f(()=>{var v;return(v=ct.NaNPath)==null?void 0:v.join(".")}),d=f(()=>{var v;return(v=ct.NaNPath)==null?void 0:v.slice(-1)[0]}),p=f(()=>ct.NaNReceiver&&d.value?ct.NaNReceiver[d.value]:null),m=f({get(){return ne.devSpeed===0},set(v){ne.devSpeed=v?null:0}});function h(){ct.NaNReceiver&&d.value&&(ct.NaNReceiver[d.value]=new a(0),ct.hasNaN=!1)}function y(){ct.NaNReceiver&&d.value&&(ct.NaNReceiver[d.value]=new a(1),ct.hasNaN=!1)}function w(){ct.NaNReceiver&&d.value&&(ct.NaNReceiver[d.value]=new a(NaN),ct.hasNaN=!1)}return(v,E)=>(A(),D(M,null,[o(wt,hl({modelValue:r(n),"onUpdate:modelValue":E[4]||(E[4]=S=>gt(n)?n.value=S:null)},v.$attrs),{header:de(()=>[rc]),body:de(()=>[g("div",null,[u(' Attempted to assign "'+Se(r(c))+'" to NaN',1),r(p)?(A(),D("span",uc,Se(" ")+"(previously "+Se(r(H)(r(p)))+")",1)):$("",!0),u(". Auto-saving has been "+Se(r(i)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),dc,g("div",null,[g("a",{href:r(l),class:"nan-modal-discord-link"},[pc,u(" "+Se(r(t)),1)],8,cc)]),mc,o(sl,{title:"Autosave",modelValue:r(i),"onUpdate:modelValue":E[0]||(E[0]=S=>gt(i)?i.value=S:null)},null,8,["modelValue"]),r(Oe).enablePausing?(A(),oe(sl,{key:0,title:"Pause game",modelValue:r(m),"onUpdate:modelValue":E[1]||(E[1]=S=>gt(m)?m.value=S:null)},null,8,["modelValue"])):$("",!0)]),footer:de(()=>[g("div",vc,[g("button",{onClick:E[2]||(E[2]=S=>{var x;return(x=s.value)==null?void 0:x.open()}),class:"button"},"Open Saves Manager"),g("button",{onClick:h,class:"button"},"Set to 0"),g("button",{onClick:y,class:"button"},"Set to 1"),r(p)&&r(a).neq(r(p),0)&&r(a).neq(r(p),1)?(A(),D("button",{key:0,onClick:E[3]||(E[3]=S=>n.value=!1),class:"button"}," Set to previous ")):$("",!0),g("button",{onClick:w,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),o(Yi,{ref_key:"savesManager",ref:s},null,512)],64))}});var gc=Ue(fc,[["__scopeId","data-v-3de07c06"]]);const yc={key:0,class:"tpsDisplay"},hc={key:0,class:"low"},bc=pe({__name:"TPS",setup(e){const t=f(()=>a.div(ct.lastTenTicks.length,ct.lastTenTicks.reduce((s,c)=>s+c,0))),l=j([]);Pt(()=>{l.value.push(Math.round(t.value.toNumber())),l.value.length>10&&(l.value=l.value.slice(1))});const i=f(()=>l.value.reduce((s,c)=>a.max(s,c),0)),n=f(()=>a.sub(t.value,i.value).gt(1));return(s,c)=>r(t).isNan()?$("",!0):(A(),D("div",yc,[u(" TPS: "+Se(r(ae)(r(t)))+" ",1),o(ra,{name:"fade"},{default:de(()=>[r(n)?(A(),D("span",hc,Se(r(ae)(r(i))),1)):$("",!0)]),_:1})]))}});var wc=Ue(bc,[["__scopeId","data-v-46a3ed5b"]]);var Ac=pe({__name:"App",setup(e){const t=Oe.useHeader,l=f(()=>Nl[lt.theme].variables),i=Kt(lt,"showTPS"),n=f(()=>Te(B(()=>o(M,null,[Ro.map(le)]))));return(s,c)=>(A(),D(M,null,[g("div",{id:"modal-root",style:nt(r(l))},null,4),g("div",{class:et(["app",{useHeader:r(t)}]),style:nt(r(l))},[r(t)?(A(),oe(Zi,{key:0})):$("",!0),o(zd),r(r(i))?(A(),oe(wc,{key:1})):$("",!0),o(sc),o(gc),(A(),oe(Xe(r(n))))],6)],64))}});var Cc=Ue(Ac,[["__scopeId","data-v-580927bb"]]);function kc(e={}){const{immediate:t=!1,onNeedRefresh:l,onOfflineReady:i,onRegistered:n,onRegisterError:s}=e;let c,d;const p=async(m=!0)=>{m&&(c==null||c.addEventListener("controlling",h=>{h.isUpdate&&window.location.reload()})),d&&d.waiting&&await hn(d.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){c=new yn("./sw.js",{scope:"./",type:"classic"}),c.addEventListener("activated",m=>{m.isUpdate||i==null||i()});{const m=()=>{l==null||l()};c.addEventListener("waiting",m),c.addEventListener("externalwaiting",m)}c.register({immediate:t}).then(m=>{d=m,n==null||n(m)}).catch(m=>{s==null||s(m)})}return p}function Ec(e={}){const{immediate:t=!0,onNeedRefresh:l,onOfflineReady:i,onRegistered:n,onRegisterError:s}=e,c=j(!1),d=j(!1);return{updateServiceWorker:kc({immediate:t,onNeedRefresh(){c.value=!0,l==null||l()},onOfflineReady(){d.value=!0,i==null||i()},onRegistered:n,onRegisterError:s}),offlineReady:d,needRefresh:c}}document.title=Oe.title;window.projInfo=Oe;if(Oe.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 xo();const{globalBus:e}=await la(()=>Promise.resolve().then(function(){return fo}),void 0),{startGameLoop:t}=await la(()=>import("./gameLoop.27958ab4.js"),["assets/gameLoop.27958ab4.js","assets/@fontsource.c175eac8.css","assets/vue.92681fcb.js","assets/lz-string.731cedc5.js","assets/@vue.4ce677c2.js","assets/nanoevents.1080beb7.js","assets/is-plain-object.906d88e8.js","assets/vue-next-select.a2bfab1d.js","assets/vue-next-select.9e6f4164.css","assets/vue-toastification.6f567382.js","assets/vue-toastification.4b5f8ac8.css","assets/vuedraggable.7949458c.js","assets/sortablejs.29100d8a.js","assets/vue-textarea-autosize.35804eaf.js","assets/workbox-window.8d14e8b7.js"]),l=window.vue=cn(Cc);e.emit("setupVue",l),l.mount("#app"),Sl(()=>{const i=di(),{updateServiceWorker:n}=Ec({onNeedRefresh(){i.info("New content available, click here to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){n()}})},onOfflineReady(){i.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(s){s&&setInterval(()=>s.update(),60*60*1e3)}})}),t()});export{a as D,la as _,ct as a,Oe as b,Ur as c,je as g,Ta as l,ne as p,lt as s};