Advent-Incremental/assets/index.8cccabc0.js

34 lines
483 KiB
JavaScript
Raw Normal View History

/* empty css */import"./vue.92681fcb.js";import{Z as b,l as Oi,aa as Ne,t as _,ay as On,ar as Al,aE as J,a0 as F,aK as rl,a1 as V,O as w,aG as hn,A as Ri,_ as ve,a8 as t,b6 as he,b8 as gn,bs as Js,C as I,aq as Bl,bu as dn,bb as Yn,T as ht,a7 as o,u as Nn,j as Vt,bv as Ln,q as bn,b1 as qi,G as Vi,aC as fs,w as nl,b2 as Ai,ao as Wt,I as yi,aN as Zi,$ as A,J as Re,aH as kl,aF as Rl,z as ul,al as vn,aL as zl,H as vt,aJ as Cs,bn as jt,br as Jt,be as ft}from"./@vue.4ce677c2.js";import{c as ws}from"./nanoevents.1080beb7.js";import{L as Ml}from"./lz-string.731cedc5.js";import{i as Ct}from"./is-plain-object.906d88e8.js";import{Y as wt}from"./vue-next-select.a2bfab1d.js";import{s as Ot,u as Os}from"./vue-toastification.6f567382.js";import{D as gt}from"./vuedraggable.7949458c.js";import{p as Yt}from"./vue-textarea-autosize.35804eaf.js";import{v as Nt,n as Xt}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";const Mt=function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const m of a)if(m.type==="childList")for(const d of m.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function n(a){const m={};return a.integrity&&(m.integrity=a.integrity),a.referrerpolicy&&(m.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?m.credentials="include":a.crossorigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function s(a){if(a.ep)return;a.ep=!0;const m=n(a);fetch(a.href,m)}};Mt();const xt="modulepreload",os={},Gt="./",jn=function(i,n){return!n||n.length===0?i():Promise.all(n.map(s=>{if(s=`${Gt}${s}`,s in os)return;os[s]=!0;const a=s.endsWith(".css"),m=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${m}`))return;const d=document.createElement("link");if(d.rel=a?"stylesheet":xt,a||(d.as="script",d.crossOrigin=""),d.href=s,document.head.appendChild(d),a)return new Promise((r,c)=>{d.addEventListener("load",r),d.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>i())},Ft="./projInfo-schema.json",zt="Advent Incremental",kt="An incremental game you play a day at a time, leading up to Christmas!",Rt="advent-incremental",St="thepaperpilot and friends",Ht="",Lt="",Qt="0.5",Tt="Initial Commit",Ut=!0,Et=!1,At=2,Bt=!0,Dt=null,_t="",Pt=["main"],qt=3600,$t=0,Kt=!0,ea="base64";var Pe={$schema:Ft,title:zt,description:kt,id:Rt,author:St,discordName:Ht,discordLink:Lt,versionNumber:Qt,versionTitle:Tt,allowGoBack:Ut,defaultShowSmall:Et,defaultDecimalsShown:At,useHeader:Bt,banner:Dt,logo:_t,initialTabs:Pt,maxTickLength:qt,offlineLimit:$t,enablePausing:Kt,exportEncoding:ea};const Fn=17,ia=9e15,la=Math.log10(9e15),na=1/9e15,sa=308,ta=-324,Is=5,aa=function(){const e=[];for(let n=ta+1;n<=sa;n++)e.push(Number("1e"+n));const i=323;return function(n){return e[n+i]}}(),Tl=[2,Math.E,3,4,5,6,7,8,9,10],oa=[[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.167090535
Stack: ${ml}
Trying to pop ${n.id}`;return ml.pop(),se(n,"color"),se(n,"display"),se(n,"name"),Fi(n,"name",n.id),se(n,"minWidth"),Fi(n,"minWidth",600),se(n,"minimizable"),Fi(n,"minimizable",!0),se(n,"minimizedDisplay"),n})}function Ss(e,i){if(console.info("Adding layer",e.id),xi[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,xi[e.id]);return}Fi(i,"layers",{}),i.layers[e.id]==null&&(i.layers[e.id]={}),xi[e.id]=e,Ii.emit("addLayer",e,i.layers[e.id])}function Ra(e){return xi[e]}function Hs(e){console.info("Removing layer",e.id),Ii.emit("removeLayer",e),xi[e.id]=void 0}function Sa(e){Hs(e),Ss(e,pe)}function Ha(e){const i=_(!1);return{openModal:()=>i.value=!0,modal:j(()=>t(Yi,{modelValue:i.value,"onUpdate:modelValue":n=>i.value=n},{header:()=>t("h2",null,[I(e.name)]),body:I(e.display)}))}}Ii.on("update",function(i){Object.values(xi).forEach(n=>{n==null||n.emit("preUpdate",i)}),Object.values(xi).forEach(n=>{n==null||n.emit("update",i)}),Object.values(xi).forEach(n=>{n==null||n.emit("postUpdate",i)})});var La=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:En,UnregisterNodeInjectionKey:An,NodesInjectionKey:Bn,BoundsInjectionKey:Dn,layers:xi,persistentRefs:ql,addingLayers:ml,createLayer:Ti,addLayer:Ss,getLayer:Ra,removeLayer:Hs,reloadLayer:Sa,setupLayerModal:Ha},Symbol.toStringTag,{value:"Module"}));const _n=Symbol("PersistentState"),Gl=Symbol("DefaultValue"),Cn=Symbol("StackTrace"),Ls=Symbol("Deleted"),cn=Symbol("NonPersistent"),mn=Symbol("SaveDataPath");function Qa(){var e;return((e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(i=>i.trim()).join(`
`))||""}function Fe(e){const i=Oi(e)?e:_(e);i[_n]=i,i[Gl]=Oi(e)?e.value:e,i[Cn]=Qa(),i[Ls]=!1;const n=b({get(){return i.value},set(s){i.value=s}});return n[Gl]=i[Gl],i[cn]=n,i[mn]=void 0,ml.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",i,`
Created at:
`+i[Cn]):ql[ml[ml.length-1]].add(i),i}function Ta(e){return e&&typeof e=="object"&&_n in e}function R(e){return e[cn]}Ii.on("addLayer",(e,i)=>{const n=[],s=(a,m=[])=>{let d=!1;return Object.keys(a).forEach(r=>{let c=a[r];if(c&&typeof c=="object")if(vi in c&&(c=c[vi]),Ta(c)){if(d=!0,c[Ls]){console.warn("Deleted persistent ref present in returned object. Ignoring...",c,`
Created at:
`+c[Cn]);return}ql[e.id].delete(c);const u=[e.id,...m,r];c[mn]!=null&&JSON.stringify(u)!==JSON.stringify(c[mn])&&console.error(`Persistent ref is being saved to \`${u.join(".")}\` when it's already present at \`${c[mn].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,c),c[mn]=u;const h=m.reduce((W,y)=>(y in W||(W[y]={}),W[y]),i),v=h[r];h[r]=c[_n],Vt(h)?v!=null?h[r]=v:h[r]=c[Gl]:v!=null?h[r].value=v:h[r].value=c[Gl]}else!(c instanceof l)&&!Oi(c)&&!n.includes(c)&&(typeof c.type=="symbol"&&n.push(c),s(c,[...m,r])&&(Ln(c)&&!Ln(a)?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.",vi in a?a[vi]:a,r):d=!0))}),d};s(e[vi]),ql[e.id].forEach(a=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,a,`
Created at:
`+a[Cn])}),ql[e.id].clear()});const vi=Symbol("ProxyState"),Pl=Symbol("ProxyPath");function Bi(e,i={}){const n=i;let s=!1;function a(){return s||(Object.assign(n,e(n)),s=!0),n}return new Proxy(n,{get(m,d){if(d===vi)return a();const r=a()[d];return r&&typeof r=="object"&&cn in r?r[cn]:r},set(m,d,r){return a()[d]=r,!0},has(m,d){return d===vi?!0:Reflect.has(a(),d)},ownKeys(){return Reflect.ownKeys(a())},getOwnPropertyDescriptor(m,d){return s||(Object.assign(n,e(n)),s=!0),Object.getOwnPropertyDescriptor(m,d)}})}var Ci=window.state=Nn({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Qs=bn({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},autoPause:!0});function Ts(e){return JSON.stringify(e,(i,n)=>I(n))}const Us={get(e,i){var s;if(i===vi||i===Pl)return e[i];const n=e[vi][i];if(i!=="value"&&(Ct(n)||Array.isArray(n))){if(n!==((s=e[i])==null?void 0:s[vi])){const a=[...e[Pl],i];e[i]=new Proxy({[vi]:n,[Pl]:a},Us)}return e[i]}return n},set(e,i,n,s){if(!Ci.hasNaN&&(typeof n=="number"&&isNaN(n)||n instanceof l&&(isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag)))){const a=e[vi][i];if(!(typeof a=="number"&&isNaN(a)||a instanceof l&&(isNaN(a.sign)||isNaN(a.layer)||isNaN(a.mag))))throw Qs.autosave=!1,Ci.hasNaN=!0,Ci.NaNPath=[...e[Pl],i],Ci.NaNReceiver=s,console.error("Attempted to set NaN value",[...e[Pl],i],e[vi]),"Attempted to set NaN value. See above for details"}return e[vi][i]=n,!0},ownKeys(e){return Reflect.ownKeys(e[vi])},has(e,i){return Reflect.has(e[vi],i)},getOwnPropertyDescriptor(e,i){return Object.getOwnPropertyDescriptor(e[vi],i)}};var pe=window.player=new Proxy({[vi]:Qs,[Pl]:["player"]},Us);function Es(e={}){return Object.assign({id:`${Pe.id}-0`,name:"Default Save",tabs:Pe.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:Pe.id,modVersion:Pe.versionNumber,layers:{}},e)}function Pi(e){const i=Ml.compressToUTF16(Ts(e!=null?e:pe[vi]));return localStorage.setItem((e!=null?e:pe[vi]).id,i),i}async function Ua(){Aa();try{let e=localStorage.getItem(bi.active);if(e==null){await El($l());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Ml.decompressFromUTF16(e);else throw"Unable to determine save encoding";const i=JSON.parse(e);if(i.modID!==Pe.id){await El($l());return}i.id=bi.active,await El(i)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await El($l())}}function $l(){const e=Wn(),i=Es({id:e});return Pi(i),bi.saves.push(e),i}function Wn(){let e,i=0;do e=`${Pe.id}-${i++}`;while(localStorage.getItem(e));return e}const Pn=_(!1);async function El(e){console.info("Loading save",e),Pn.value=!0;const{layers:i,removeLayer:n,addLayer:s}=await jn(()=>Promise.resolve().then(function(){return La}),void 0),{fixOldSave:a,getInitialLayers:m}=await jn(()=>Promise.resolve().then(function(){return TI}),void 0);for(const d in i){const r=i[d];r&&n(r)}m(e).forEach(d=>s(d,e)),e=Es(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,Pe.offlineLimit*3600)),e.time=Date.now(),e.modVersion!==Pe.versionNumber&&(a(e.modVersion,e),e.modVersion=Pe.versionNumber),Object.assign(pe,e),bi.active=pe.id,Ii.emit("onLoad")}setInterval(()=>{pe.autosave&&Pi()},1e3);window.onbeforeunload=()=>{pe.autosave&&Pi()};window.save=Pi;const Ea=window.hardReset=async()=>{await El($l())},un=bn({active:"",saves:[],showTPS:!0,theme:Un.Nordic,unthrottled:!1,usingLog:!1,alignUnits:!1});qi(un,e=>{const i=Ml.compressToUTF16(JSON.stringify(e));localStorage.setItem(Pe.id,i)},{deep:!0});var bi=window.settings=un;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Un.Nordic,usingLog:!1,alignUnits:!1};Ii.emit("loadSettings",e),Object.assign(un,e),Ea()};function Aa(){try{let e=localStorage.getItem(Pe.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=Ml.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const i=JSON.parse(e);typeof i=="object"&&Object.assign(un,i)}Ii.emit("loadSettings",un)}catch{}}const As=bn([]);function Ba(e){As.push(e)}const Bs=bn([]);function Da(e){Bs.push(e)}const _a=bn([]),Pa={class:"table"},Ei=Ne({__name:"Column",setup(e){const i=b(()=>tn[bi.theme].mergeAdjacent);return(n,s)=>(J(),F("div",Pa,[V("div",{class:Vi(["col",{mergeAdjacent:I(i)}])},[rl(n.$slots,"default")],2)]))}}),qa={class:"table"},ln=Ne({__name:"Row",setup(e){const i=b(()=>tn[bi.theme].mergeAdjacent);return(n,s)=>(J(),F("div",qa,[V("div",{class:Vi(["row",{mergeAdjacent:I(i)}])},[rl(n.$slots,"default")],2)]))}});function qn(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Wt(e)}function De(e,i="span"){return typeof e=="function"?Ne({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${i}>${e}</${i}>`),Ne({template:e})):Ne({render:()=>({})}):e}function ce(e){if(Ol(e))return typeof e=="function"?e():De(e);const i=e[Sl];return t(i,e[Hl](),null)}function ni(...e){let i;return t(ln,null,qn(i=e.map(ce))?i:{default:()=>[i]})}function sl(...e){let i;return t(Ei,null,qn(i=e.map(ce))?i:{default:()=>[i]})}function Fl(...e){return t("div",{class:"table-grid"},[e.map(i=>t("div",{class:{["row-grid"]:!0,mergeAdjacent:tn[bi.theme].mergeAdjacent}},[i.map(ce)]))])}function cl(e){if(Ol(e))return typeof e=="function"?e():typeof e=="string"?t(w,null,[e]):t(e,null,null);const i=e[Sl];return t(i,e[Hl](),null)}function $a(...e){let i;return t(Ei,null,qn(i=e.map(cl))?i:{default:()=>[i]})}function Ol(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[rn]===!0}function Ds(e,i,n){const s=_(null),a=_(void 0);function m(c){s.value||(s.value=setInterval(r,250)),a.value=c,n&&(n.value=!0)}function d(){s.value&&(clearInterval(s.value),s.value=null),n&&(n.value=!1)}function r(){i&&i.value?i.value():e&&e.value&&e.value(a.value)}return fs(d),{start:m,stop:d,handleHolding:r}}function Ka(e,i){const n=b(()=>e.filter(s=>I(s.visibility)===gi.Visible&&i(s)));return{firstFeature:b(()=>n.value[0]),collapsedContent:j(()=>sl(...n.value.slice(1))),hasCollapsedContent:b(()=>n.value.length>1)}}function wn(e,i="div"){const n=nl();return Ai(()=>{n.value=De(Gi(e),i)}),n}function gl(e,i="div"){const n=nl(null);return Ai(()=>{const s=Gi(e);n.value=s==null?null:De(s,i)}),n}function eo(e){return b(()=>Gi(e))}function Gi(e){return I(I(e))}fu
x${U(I(a.christmas1))} to wood production
`)}]}),rainbow:n({name:"Rainbow Wrapping Paper",id:"rainbow",ratio:{red:{base:Jl,exponent:Cl+.2},green:{base:fl,exponent:wl+.1},blue:{base:Jl,exponent:Cl+.2},yellow:{base:Jl,exponent:Cl+.2},purple:{base:fl,exponent:wl+.1},orange:{base:fl,exponent:wl+.1}},background:"linear-gradient(135deg, rgba(255,0,0,1) 0%, rgba(255,0,0,1) 2%, rgba(255,155,0,1) 14%, rgba(255,155,0,1) 18%, rgba(255,254,0,1) 31%, rgba(255,254,0,1) 35%, rgba(100,244,61,1) 48%, rgba(100,244,61,1) 52%, rgba(70,218,234,1) 64%, rgba(70,218,234,1) 68%, rgba(205,0,210,1) 81%, rgba(205,0,210,1) 85%, rgba(255,0,0,1) 98%, rgba(255,0,0,1) 100%)",listedBoosts:[{desc:b(()=>`
/${U(I(a.rainbow1))} to coal buyable cost
`)}]}),jazzy:n({name:"Jazzy Wrapping Paper",id:"jazzy",ratio:{purple:{base:fl*3,exponent:wl},orange:{base:fl*3,exponent:wl}},background:"linear-gradient(90deg, rgba(255,177,0,1) 10.8%, rgba(189,69,255,1) 11.1%, rgba(189,69,255,1) 21.9%, rgba(255,177,0,1) 22.2%, rgba(255,177,0,1) 33.0%, rgba(189,69,255,1) 33.3%, rgba(189,69,255,1) 44.1%, rgba(255,177,0,1) 44.4%, rgba(255,177,0,1) 55.2%, rgba(189,69,255,1) 55.5%, rgba(189,69,255,1) 66.3%, rgba(255,177,0,1) 66.6%, rgba(255,177,0,1) 77.4%, rgba(189,69,255,1) 77.7%, rgba(189,69,255,1) 88.5%, rgba(255,177,0,1) 88.8%)",listedBoosts:[{desc:b(()=>`
-${U(I(a.jazzy1))} to elf cost scaling
`)}]}),sunshine:n({name:"Sunshine Wrapping Paper",id:"sunshine",ratio:{red:{base:Jl*2,exponent:Cl+.1},yellow:{base:Jl*2,exponent:Cl+.1},orange:{base:fl*2,exponent:wl+.05}},background:"radial-gradient(circle, rgba(238,250,0,1) 16%, rgba(250,157,0,1) 50%, rgba(255,76,76,1) 83%)",listedBoosts:[{desc:b(()=>`
x${U(I(a.sunshine1))} to paper production
`)}]}),ocean:n({name:"Ocean Wrapping Paper",id:"ocean",ratio:{blue:{base:Jl*2,exponent:Cl+.1},green:{base:fl*2,exponent:wl+.05},purple:{base:fl*2,exponent:wl+.05}},background:"linear-gradient(20deg, rgba(0,183,250,0.6) 8%, rgba(0,223,62,0.6) 12%, rgba(0,183,250,0.6) 17%, rgba(0,183,250,0.6) 27%, rgba(124,109,230,0.6) 38%, rgba(0,183,250,0.6) 46%, rgba(0,183,250,0.6) 50%, rgba(0,223,62,0.6) 53%, rgba(0,183,250,0.6) 60%, rgba(124,109,230,0.6) 67%, rgba(0,183,250,0.6) 73%, rgba(0,183,250,0.6) 84%, rgba(0,223,62,0.6) 88%, rgba(0,183,250,0.6) 91%), linear-gradient(340deg, rgba(0,183,250,0.6) 8%, rgba(0,223,62,0.6) 12%, rgba(0,183,250,0.6) 17%, rgba(0,183,250,0.6) 27%, rgba(124,109,230,0.6) 38%, rgba(0,183,250,0.6) 46%, rgba(0,183,250,0.6) 50%, rgba(0,223,62,0.6) 53%, rgba(0,183,250,0.6) 60%, rgba(124,109,230,0.6) 67%, rgba(0,183,250,0.6) 73%, rgba(0,183,250,0.6) 84%, rgba(0,223,62,0.6) 88%, rgba(0,183,250,0.6) 91%)",listedBoosts:[{desc:b(()=>`
/${U(I(a.ocean1))} to box buyable cost
`)}]}),beach:n({name:"Beach Wrapping Paper",id:"beach",ratio:{yellow:{base:Jl*3,exponent:Cl},blue:{base:Jl*3,exponent:Cl}},background:"radial-gradient(circle at 80% 10%, rgba(255,255,76,1) 8%, rgba(0,0,0,0) 21%), linear-gradient(180deg, rgba(0,255,246,1) 60%, rgba(0,255,246,0) 61%), linear-gradient(215deg, rgba(0,93,255,0) 0%, rgba(0,93,255,0) 66%, rgba(255,255,76,1) 68%), linear-gradient(180deg, rgba(0,0,0,0) 68%, rgba(0,93,255,1) 70%), linear-gradient(205deg, rgba(0,255,246,1) 0%, rgba(0,255,246,1) 100%)",listedBoosts:[{desc:b(()=>`
/${U(I(a.beach1))} to workshop cost
`)}]})},a={christmas1:b(()=>l.add(s.christmas.buyable.amount.value,1)),rainbow1:b(()=>l.pow(2,s.rainbow.buyable.amount.value)),jazzy1:b(()=>l.ln(l.add(l.ln(l.add(s.jazzy.buyable.amount.value,1)),1))),sunshine1:b(()=>l.add(s.sunshine.buyable.amount.value,1)),ocean1:b(()=>l.pow(1.5,s.ocean.buyable.amount.value)),beach1:b(()=>l.add(s.beach.buyable.amount.value,1))},m=hi(b(()=>Object.values(s).map(H=>H.buyable.amount.value).reduce(l.add,0)),"Total Wrapping Paper"),d=_(!1),r=j(()=>t(Yi,{modelValue:d.value,"onUpdate:modelValue":H=>d.value=H},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:c})),[c,u]=al(()=>[]),{total:h,trackerDisplay:v}=Vl({resource:m,goal:1e20,name:e,day:wI,color:i,textColor:"var(--feature-foreground)",modal:{show:d,display:r},ignoreTotal:!0}),W=[6,12,18,24,30,36],y=X(()=>({display:{requirement:W[0]+" Total Wrapping Paper",effectDisplay:"Double primary colour dye gain"},shouldEarn:()=>l.gte(h.value,W[0]),visibility:()=>Z(!0)})),N=X(()=>({display:{requirement:W[1]+" Total Wrapping Paper",effectDisplay:"Double secondary colour dye gain"},shouldEarn:()=>l.gte(h.value,W[1]),visibility:()=>Z(y.earned.value)})),x=X(()=>({display:{requirement:W[2]+" Total Wrapping Paper",effectDisplay:"Buy maximum primary colour dyes"},shouldEarn:()=>l.gte(h.value,W[2]),visibility:()=>Z(N.earned.value)})),M=X(()=>({display:{requirement:W[3]+" Total Wrapping Paper",effectDisplay:"Secondary colour dyes don't spend primary colour dyes"},shouldEarn:()=>l.gte(h.value,W[3]),visibility:()=>Z(x.earned.value)})),D=X(()=>({display:{requirement:W[4]+" Total Wrapping Paper",effectDisplay:"Buy maximum secondary colour dyes"},shouldEarn:()=>l.gte(h.value,W[4]),visibility:()=>Z(M.earned.value)})),O=X(()=>({display:{requirement:W[5]+" Total Wrapping Paper",effectDisplay:"Unlock a new elf to help with dyes"},shouldEarn:()=>l.gte(h.value,W[5]),visibility:()=>Z(D.earned.value)})),f={primaryBoost:y,secondaryBoost:N,buyMaxPrimary:x,secondaryNoReset:M,buyMaxSecondary:D,unlockDyeElf:O},{collapseMilestones:z,display:P}=nn(f);return{name:e,display:j(()=>t("div",{style:"width: 620px"},[ce(v),t(zi,{resource:m},null),ni(s.christmas.display,s.rainbow.display,s.jazzy.display),ni(s.christmas.buyable,s.rainbow.buyable,s.jazzy.buyable),t(We,null,null),ni(s.sunshine.display,s.ocean.display,s.beach.display),ni(s.sunshine.buyable,s.ocean.buyable,s.beach.buyable),t(We,null,null),o("button goes here"),t(We,null,null),P()])),wrappingPaper:s,totalWrappingPaper:h,generalTabCollapsed:u,boosts:a,milestones:f,collapseMilestones:z}}),OI="workshop",an=2,ai=Ti(OI,function(){const e="Workshop",i="#D66B02",n="#D66B02",s=hi(0,"foundation progress"),a=II(()=>({scaling:Zs(Zs(Kn(250,1.5),5387,1/1e10),1e20,3e8),baseResource:re.logs,gainResource:R(s),roundUpCost:!0,spend(ue,je){re.logs.value=l.sub(re.logs.value,je)},costModifier:$(()=>[p(()=>({multiplier:b(()=>ki.boosts.beach1.value),description:"Beach Wrapping Paper",enabled:b(()=>l.gt(ki.boosts.beach1.value,1))})),ll(()=>({exponent:.95,description:"Holly Level 5",enabled:g.elfTraining.cutterElfTraining.milestones[4].earned}))])})),m=Qi(()=>({display:j(()=>t(w,null,[t("b",{style:"font-size: x-large"},[o("Build "),ie(a.actualGain.value),o("% of the foundation")]),t("br",null,null),t("br",null,null),t("span",{style:"font-size: large"},[o("Cost:")," ",pn(re.logs,l.gte(a.actualGain.value,1)?a.currentAt.value:a.nextAt.value)," ",re.logs.displayName])])),visibility:()=>Z(l.lt(s.value,100)||g.elfTraining.expandersElfTraining.milestones[2].earned.value),canClick:()=>l.gte(re.logs.value,a.currentAt.value)&&(l.lt(s.value,100)||g.elfTraining.expandersElfTraining.milestones[2].earned.value),onClick(){!I(this.canClick)||a.convert()},style:"width: 600px; min-height: unset"})),d=Kl(()=>({key:"w",description:"Build part of the foundation.",onPress:()=>{m.canClick.value&&m.onClick()}})),r=b(()=>!Ge.milestones[6].earned.value),c=X(()=>({display:{requirement:"1% Foundation Completed",effectDisplay:"Trees give 5% more logs for each % of foundation completed"},shouldEarn:()=>l.gte(s.value,1),showPopups:r})),u=X(()=>({display:{req
<br/>
<br/>
Cost: 50 ${n.displayName}<br/>${fe(1e11)} ${E.coal.displayName}`}})),K=S(()=>({resource:R(n),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:()=>Z(le.depthMilestones[4].earned.value)})),me=ke(()=>({resource:R(n),cost(){let q=new l(this.amount.value);q=l.pow(.95,Q.books.metalBook.totalAmount.value).times(q);let ee=l.pow(1.15,q).times(10);return g.elfTraining.clothElfTraining.milestones[4].earned.value&&(ee=l.div(ee,l.add(le.depth.value,1).sqrt())),g.elfTraining.metalElfTraining.milestones[3].earned.value&&(ee=l.div(ee,10)),ee},display:{title:"Metal Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:j(()=>t(w,null,[o("Mine 2.5x faster. Increase ore mining amount by")," ",Ye(me.amount.value),o(" ore per operation")]))},visibility:()=>Z(l.gte(me.amount.value,1)||l.div(m.value,r.value).plus(s.value).gte(10)),style:{width:"200px"}})),Ve=ke(()=>({resource:R(n),cost(){let q=new l(this.amount.value);q=l.pow(.95,Q.books.metalBook.totalAmount.value).times(q);let ee=l.pow(1.15,l.times(q,10)).times(10);return g.elfTraining.clothElfTraining.milestones[4].earned.value&&(ee=l.div(ee,l.add(le.depth.value,1).sqrt())),g.elfTraining.metalElfTraining.milestones[3].earned.value&&(ee=l.div(ee,10)),ee},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:j(()=>t(w,null,[o("Automatically smelts")," ",Ye(l.times(Ve.amount.value,10)),o(" ore per second")]))},visibility:()=>Z(l.gte(Ve.amount.value,1)||l.gte(me.amount.value,4)||l.gte(m.value,50)),style:{width:"200px"}})),Je=Fe(!0),qe=ke(()=>({resource:E.coal,cost(){let q=new l(this.amount.value);q=l.pow(.95,Q.books.metalBook.totalAmount.value).times(q);let ee=l.pow(10,q).times(1e12);return g.elfTraining.clothElfTraining.milestones[4].earned.value&&(ee=l.div(ee,l.add(le.depth.value,1).sqrt())),g.elfTraining.metalElfTraining.milestones[3].earned.value&&(ee=l.div(ee,10)),ee},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:j(()=>t(w,null,[o("Gain "),Ye(l.times(Ee.value,100)),o("% more metal per ore")]))},visibility:()=>Z(l.gte(qe.amount.value,1)||Ze.bought.value),style:{width:"200px"}})),Ee=b(()=>l.times(qe.amount.value,.25));Ii.on("update",q=>{z.value=l.times(q,f.value).plus(z.value);const ee=z.value.trunc();z.value=z.value.minus(ee),a.value=l.add(a.value,l.times(ee,D.value)),Je.value&&x(l.min(y.value,l.times(u.value,q)),v.value)});const[$e,Be]=al(()=>[{title:"Auto Smelt Speed",modifier:c,base:0,unit:"/s",visible(){return l.gt(Ve.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:h,base:1,visible(){return l.gt(v.value,1)}},{title:"Metal per Ore",modifier:d,base:.1},{title:"Ore per Mining Operation",modifier:M,base:1},{title:"Mining Speed",modifier:O,base:.1,unit:"/s"}]),ze=_(!1),Ke=j(()=>t(Yi,{modelValue:ze.value,"onUpdate:modelValue":q=>ze.value=q},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:$e})),{total:Qe,trackerDisplay:ae}=Vl({resource:n,goal:25e3,name:e,day:hs,color:i,modal:{show:ze,display:Ke}});return{name:e,day:hs,color:i,ore:a,bestOre:m,oreProgress:z,metal:n,bestMetal:s,totalMetal:Qe,simplePickaxe:we,doublePickaxe:be,crucible:Oe,coalDrill:Xe,industrialFurnace:Ze,efficientDrill:K,oreDrill:me,industrialCrucible:Ve,autoSmeltEnabled:Je,hotterForge:qe,generalTabCollapsed:Be,minWidth:700,display:j(()=>t(w,null,[ce(ae),t(We,null,null),t(zi,{resource:n,color:i,style:"margin-bottom: 0",sticky:!1,productionDisplay:j(()=>t(w,null,[Je.value&&l.gte(Ve.amount.value,1)?`+${xs([[u.value,"smelting speed"],[oe.value,"ore gain"],[l.div(E.computedCoalGain.value,W),"coal gain"]],"/s",l.mul(r.value,v.value))}`:void 0]))},null),t(We,null,null),ce(N),l.gte(Ve.amount.value,1)?t("div",{style:{width:"150px"}},[t(hl,{title:"Auto Smelt",modelValue:Je.value,"onUpdate:modelValue":q=>Je.value=q},null)]):void 0,t(We,null,null),t(zi,{resource:a,color:i,style:"margin-bott
margin: 10px 0;"/>${P}`:z,n.value=!0},onOpenLayer(){if(H.value=!1,window.matchMedia("(min-width: 1468px)").matches)if(pe.tabs.includes(M!=null?M:"trees")){const T=pe.tabs.lastIndexOf(M!=null?M:"trees");pe.tabs.splice(T,1)}else pe.tabs.push(M!=null?M:"trees"),k.minimized.value=!0;else pe.tabs.splice(1,1/0,M!=null?M:"trees");xi[M!=null?M:"trees"].minimized.value=!1},onUnlockLayer(){M&&(O.value=!0,setTimeout(()=>{var T,oe;s.value=-1,a.value=I((oe=(T=xi[M!=null?M:"trees"])==null?void 0:T.name)!=null?oe:""),m.value=z,pe.autoPause&&(pe.devSpeed=null),n.value=!0},1e3))}}}}})}const r=[d(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:$s,story:"Oh no! Santa forgot about Christmas and it's only 25 days away! He's asked for your help due to your history getting large quantities of things in short amounts of time. Unfortunately you're really starting from scratch here - let's start with getting wood, which you'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),d(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:Ks,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today's goal is to get a workshop built up for the elves to work in - and apparently, they need quite a lot of space to work!",completedStory:"The workshop complete, Santa once again dismisses you for the day. With a strong foundation, this workshop should suffice for supporting future work toward this impossible mission. Good Job!"})),d(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:et,story:"Santa tells you that unfortunately there are quite a few naughty children out there this year, and he's going to need you to gather as much coal as you can for him to give out.",completedStory:"Santa looks at all the coal you've gathered and tells you you've done well! He says you should take the rest of the day off so you're refreshed for tomorrow's work. Good Job!"})),d(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:it,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'll need to be retrained on how to help, since they've stopped practicing for 11 months!",completedStory:"The workshop now hums with the bustling elves working on everything. They can take it from here - you deserve a break after such a long day! Good Job!"})),d(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:lt,story:"With the elves trained, we're almost ready to start working on these presents! Just a couple more pre-reqs first, starting with turning all this wood into wood pulp and finally into paper, which will be required for wrapping paper later on but in the meantime can be used to help write guides which will help these elves continue their education!",completedStory:"You look upon your rivers of book pulp as you hand out stacks of papers to elves to read through. You've continued getting closer and closer to preparing for Christmas, and can go to bed satisfied with your progress. Good Job!"})),d(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:nt,story:"You watch all these elves carrying incredibly large loads just in their open elf-sized hands, and realize there's probably a better way. You need to put the toys in boxes anyways, so why don't we get started working on those so the workers can take advantage as well?",completedStory:"Wow, those boxes are really convenient! The workshop feels more and more proper with every day. You tick another requirement on your list and start looking towards tomorrow. Good Job!"})),d(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:st,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! Lo
`,"./../../saves/Day 08 Complete.txt":"eyJpZCI6ImFkdmVudC1pbmNyZW1lbnRhbC0yIiwiZGV2U3BlZWQiOjAsIm5hbWUiOiJEZWZhdWx0IFNhdmUiLCJ0YWJzIjpbIm1haW4iLCJjbG90aCJdLCJ0aW1lIjoxNjcwOTY2MDM5MjIwLCJhdXRvc2F2ZSI6dHJ1ZSwib2ZmbGluZVByb2QiOnRydWUsIm9mZmxpbmVUaW1lIjowLCJ0aW1lUGxheWVkIjoxNDQ4MS43NzkwMDAwMDAxMzMsImtlZXBHb2luZyI6ZmFsc2UsIm1vZElEIjoiYWR2ZW50LWluY3JlbWVudGFsIiwibW9kVmVyc2lvbiI6IjAuNSIsImxheWVycyI6eyJtYWluIjp7Im1pbmltaXplZCI6ZmFsc2UsImRheXMiOnsiMCI6eyJvcGVuZWQiOnRydWUsInJlY2VudGx5VXBkYXRl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iOnsiZWFybmVkIjp0cnVlfSwibW9yZVBsYW50c01pbGVzdG9uZTEiOnsiZWFybmVkIjp0cnVlfSwibG9nR2Fpbk1pbGVzdG9uZTMiOnsiZWFybmVkIjp0cnVlfX0sImNvbGxhcHNlTWlsZXN0b25lcyI6dHJ1ZX0sImNvYWwiOnsibWluaW1pemVkIjpmYWxzZSwiY29hbCI6IjEuMTk4OTU3MzM0NjIxNDA0NmUzMiIsInRvdGFsQ29hbCI6IjEuMjUxNTEwMDAxODAxODUzNWUzMyIsImFzaCI6IjcuMDYxODA2ODk2OTU1NDQ3NWUxNiIsImFjdGl2ZUZpcmVzIjoiMCIsImJ1
${z}
${f}`)}}return u[O]}qi(n,O=>{O&&Object.keys(u).forEach(f=>delete u[f])});const v=b(()=>bi.saves.reduce((O,f)=>(O[f]=h(f),O),{}));function W(O){let f;switch(pe.id===O?f=Ts(pe[vi]):f=JSON.stringify(v.value[O]),Pe.exportEncoding){default:console.warn(`Unknown save encoding: ${Pe.exportEncoding}. Defaulting to lz`);case"lz":f=Ml.compressToUTF16(f);break;case"base64":f=btoa(unescape(encodeURIComponent(f)));break;case"plain":break}const z=document.createElement("textarea");z.value=f,document.body.appendChild(z),z.select(),z.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(z)}function y(O){pe.id===O&&Pi();const f={...v.value[O],id:Wn()};Pi(f),bi.saves.push(f.id)}function N(O){bi.saves=bi.saves.filter(f=>f!==O),localStorage.removeItem(O),u[O]=void 0}function x(O){v.value[pe.id].time=pe.time,Pi(),u[pe.id]=void 0,El(v.value[O]),u[O]=void 0}function M(O){if(d.value=O,Al(()=>{d.value=null}),O[0]!=="{")if(O[0]==="e")O=decodeURIComponent(escape(atob(O)));else if(O[0]==="\u1BE1")O=Ml.decompressFromUTF16(O);else{console.warn("Unable to determine preset encoding",O);return}const f=JSON.parse(O);f.id=Wn(),Pi(f),bi.saves.push(f.id),x(f.id)}function D(O,f){const z=v.value[O];z&&(z.name=f,pe.id===O?(pe.name=f,Pi()):(Pi(z),u[O]=void 0))}return(O,f)=>(J(),ve(Yi,{modelValue:n.value,"onUpdate:modelValue":f[4]||(f[4]=z=>n.value=z),ref_key:"modal",ref:s},{header:he(()=>[Zd]),body:he(({shown:z})=>[z?(J(),ve(I(gt),{key:0,list:I(bi).saves,handle:".handle",itemKey:P=>P},{item:he(({element:P})=>[t(bd,{save:I(v)[P],onOpen:H=>x(P),onExport:H=>W(P),onEditName:H=>D(P,H),onDuplicate:H=>y(P),onDelete:H=>N(P)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):A("",!0)]),footer:he(()=>[V("div",pd,[t(ct,{modelValue:m.value,"onUpdate:modelValue":f[0]||(f[0]=z=>m.value=z),title:"Import Save",placeholder:"Paste your save here!",class:Vi({importingFailed:a.value})},null,8,["modelValue","class"]),V("div",yd,[hd,V("div",Vd,[V("button",{class:"button",onClick:f[1]||(f[1]=z=>x(I($l)().id))},"New Game"),Object.keys(I(c)).length>0?(J(),ve(es,{key:0,options:I(c),modelValue:d.value,"onUpdate:modelValue":f[2]||(f[2]=z=>M(z)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):A("",!0)])]),V("div",Wd,[vd,V("button",{class:"button modal-default-button",onClick:f[3]||(f[3]=z=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var ut=si(jd,[["__scopeId","data-v-3b9991aa"]]);const $i=e=>(kl("data-v-8495e562"),e=e(),Rl(),e),Jd=["src","alt"],fd={key:1,class:"title"},Cd=$i(()=>V("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),wd={class:"discord"},Od={class:"discord-links"},gd={key:0},Yd=["href"],Nd=$i(()=>V("li",null,[V("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Xd=$i(()=>V("li",null,[V("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Md={href:"https://forums.moddingtree.com/",target:"_blank"},xd=$i(()=>V("span",{class:"material-icons"},"forum",-1)),Gd=$i(()=>V("span",{class:"material-icons"},"info",-1)),Fd=$i(()=>V("span",{class:"material-icons"},"library_books",-1)),zd=$i(()=>V("span",{class:"material-icons"},"settings",-1)),kd=$i(()=>V("span",{class:"material-icons"},"library_books",-1)),Rd=$i(()=>V("span",{class:"material-icons"},"settings",-1)),Sd=$i(()=>V("span",{class:"material-icons"},"info",-1)),Hd={href:"https://forums.moddingtree.com/",target:"_blank"},Ld=$i(()=>V("span",{class:"material-icons"},"forum",-1)),Qd={class:"discord"},Td={class:"discord-links"},Ud={key:0},Ed=["href"],Ad=$i(()=>V("li",null,[V("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),Bd=$i(()=>V("li",null,[V("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Dd=Ne({__name:"Nav",setup(e){const i=_(null),n=_(null),s=_(null),a=_(null),{useHeader:m,banner:d,title:r,discordName:c,discordLink:u,versionNumber:h}=Pe;function v(){window.open(u,"mywindow")}return(W,y)=>(J(),F(w,null,[I(m)?(J(),F("div",Bl({key:0,class:
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 Ua();const{globalBus:e}=await jn(()=>Promise.resolve().then(function(){return Oa}),void 0),{startGameLoop:i}=await jn(()=>import("./gameLoop.1bd0a87e.js"),["assets/gameLoop.1bd0a87e.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"]),n=window.vue=ft(Nr);e.emit("setupVue",n),n.mount("#app"),Al(()=>{const s=Os(),{updateServiceWorker:a}=Mr({onNeedRefresh(){s.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(){a()}})},onOfflineReady(){s.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(m){m&&setInterval(()=>m.update(),60*60*1e3)}})}),i()});export{l as D,jn as _,Ci as a,Pe as b,TI as c,Ii as g,Pn as l,pe as p,bi as s};