/* empty css */import"./vue.92681fcb.js";import{Zasb,lasxi,aaasGe,tasse,ayasOn,arasDl,aEasC,a0asR,aKasZl,a1asV,O,aGasVn,AasTi,_asge,a8ast,b6asCe,b8asYn,bsasCs,Casm,aqas_l,buasdn,bbasNn,Tasvt,a7aso,uasXn,jasjt,bvasQn,qasZn,b1asyl,GasCi,aCasws,wasnl,b2asDi,aoasJt,IasJi,aNashi,$asK,JasLe,aHasRl,aFasHl,zashl,alasjn,aLasSl,Hasft,aJasgs,bnasCt,braswt,beasgt}from"./@vue.4ce677c2.js";import{casOs}from"./nanoevents.1080beb7.js";import{LasFl}from"./lz-string.731cedc5.js";import{iasOt}from"./is-plain-object.906d88e8.js";import{YasYt}from"./vue-next-select.a2bfab1d.js";import{sasNt,uasYs}from"./vue-toastification.6f567382.js";import{DasXt}from"./vuedraggable.7949458c.js";import{pasMt}from"./vue-textarea-autosize.35804eaf.js";import{vasxt,nasGt}from"./workbox-window.8d14e8b7.js";import"./sortablejs.29100d8a.js";constFt=function(){constl=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(constaofdocument.querySelectorAll('link[rel="modulepreload"]'))s(a);newMutationObserver(a=>{for(constIofa)if(I.type==="childList")for(constrofI.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});functionn(a){constI={};returna.integrity&&(I.integrity=a.integrity),a.referrerpolicy&&(I.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?I.credentials="include":a.crossorigin==="anonymous"?I.credentials="omit":I.credentials="same-origin",I}functions(a){if(a.ep)return;a.ep=!0;constI=n(a);fetch(a.href,I)}};Ft();constkt="modulepreload",Is={},zt="./",Jn=function(l,n){return!n||n.length===0?l():Promise.all(n.map(s=>{if(s=`${zt}${s}`,sinIs)return;Is[s]=!0;consta=s.endsWith(".css"),I=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${I}`))return;constr=document.createElement("link");if(r.rel=a?"stylesheet":kt,a||(r.as="script",r.crossOrigin=""),r.href=s,document.head.appendChild(r),a)returnnewPromise((d,u)=>{r.addEventListener("load",d),r.addEventListener("error",()=>u(newError(`Unable to preload CSS for ${s}`)))})})).then(()=>l())},St="./projInfo-schema.json",Rt="Advent Incremental",Ht="An incremental game you play a day at a time, leading up to Christmas!",Lt="advent-incremental",Qt="thepaperpilot and friends",Tt="",Ut="",Et="0.5",At="Initial Commit",Bt=!0,Dt=!1,_t=2,Pt=!0,qt=null,$t="",Kt=["main"],ea=3600,ia=0,la=!0,na="base64";varni={$schema:St,title:Rt,description:Ht,id:Lt,author:Qt,discordName:Tt,discordLink:Ut,versionNumber:Et,versionTitle:At,allowGoBack:Bt,defaultShowSmall:Dt,defaultDecimalsShown:_t,useHeader:Pt,banner:qt,logo:$t,initialTabs:Kt,maxTickLength:ea,offlineLimit:ia,enablePausing:la,exportEncoding:na};constkn=17,sa=9e15,ta=Math.log10(9e15),aa=1/9e15,oa=308,ma=-324,rs=5,Ia=function(){conste=[];for(letn=ma+1;n<=oa;n++)e.push(Number("1e"+n));constl=323;returnfunction(n){returne[n+l]}}(),El=[2,Math.E,3,4,5,6,7,8,9,10],ra=[[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.1670905356972
Tryingtopop${n.id}`;return cl.pop(),de(n,"color"),de(n,"display"),de(n,"name"),Li(n,"name",n.id),de(n,"minWidth"),Li(n,"minWidth",600),de(n,"minimizable"),Li(n,"minimizable",!0),de(n,"minimizedDisplay"),n})}function Ls(e,l){if(console.info("Adding layer",e.id),Ri[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Ri[e.id]);return}Li(l,"layers",{}),l.layers[e.id]==null&&(l.layers[e.id]={}),Ri[e.id]=e,ui.emit("addLayer",e,l.layers[e.id])}function Ha(e){return Ri[e]}function Qs(e){console.info("Removing layer",e.id),ui.emit("removeLayer",e),Ri[e.id]=void 0}function La(e){Qs(e),Ls(e,Je)}function Qa(e){const l=se(!1);return{openModal:()=>l.value=!0,modal:f(()=>t(Gi,{modelValue:l.value,"onUpdate:modelValue":n=>l.value=n},{header:()=>t("h2",null,[m(e.name)]),body:m(e.display)}))}}ui.on("update",function(l){Object.values(Ri).forEach(n=>{n==null||n.emit("preUpdate",l)}),Object.values(Ri).forEach(n=>{n==null||n.emit("update",l)}),Object.values(Ri).forEach(n=>{n==null||n.emit("postUpdate",l)})});var Ta=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Bn,UnregisterNodeInjectionKey:Dn,NodesInjectionKey:_n,BoundsInjectionKey:Pn,layers:Ri,persistentRefs:$l,addingLayers:cl,createLayer:Ai,addLayer:Ls,getLayer:Ha,removeLayer:Qs,reloadLayer:La,setupLayerModal:Qa},Symbol.toStringTag,{value:"Module"}));const qn=Symbol("PersistentState"),zl=Symbol("DefaultValue"),wn=Symbol("StackTrace"),Ts=Symbol("Deleted"),cn=Symbol("NonPersistent"),rn=Symbol("SaveDataPath");function Ua(){var e;return((e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(l=>l.trim()).join(`
`))||""}function Se(e){const l=xi(e)?e:se(e);l[qn]=l,l[zl]=xi(e)?e.value:e,l[wn]=Ua(),l[Ts]=!1;const n=b({get(){return l.value},set(s){l.value=s}});return n[zl]=l[zl],l[cn]=n,l[rn]=void 0,cl.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",l,`
Createdat:
`+l[wn]):$l[cl[cl.length-1]].add(l),l}function Ea(e){return e&&typeof e=="object"&&qn in e}function Q(e){return e[cn]}ui.on("addLayer",(e,l)=>{const n=[],s=(a,I=[])=>{let r=!1;return Object.keys(a).forEach(d=>{let u=a[d];if(u&&typeof u=="object")if(wi in u&&(u=u[wi]),Ea(u)){if(r=!0,u[Ts]){console.warn("Deleted persistent ref present in returned object. Ignoring...",u,`
Createdat:
`+u[wn]);return}$l[e.id].delete(u);const c=[e.id,...I,d];u[rn]!=null&&JSON.stringify(c)!==JSON.stringify(u[rn])&&console.error(`Persistentrefisbeingsavedto\`${c.join(".")}\` when it's already present at \`${u[rn].join(".")}\`. This can cause unexpected behavior when loading saves between updates.`,u),u[rn]=c;constj=I.reduce((W,y)=>(yinW||(W[y]={}),W[y]),l),h=j[d];j[d]=u[qn],jt(j)?h!=null?j[d]=h:j[d]=u[zl]:h!=null?j[d].value=h:j[d].value=u[zl]}else!(uinstanceofi)&&!xi(u)&&!n.includes(u)&&(typeofu.type=="symbol"&&n.push(u),s(u,[...I,d])&&(Qn(u)&&!Qn(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.",wiina?a[wi]:a,d):r=!0))}),r};s(e[wi]),$l[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,`
Createdat:
`+a[wn])}),$l[e.id].clear()});const wi=Symbol("ProxyState"),ql=Symbol("ProxyPath");function _i(e,l={}){const n=l;let s=!1;function a(){return s||(Object.assign(n,e(n)),s=!0),n}return new Proxy(n,{get(I,r){if(r===wi)return a();const d=a()[r];return d&&typeof d=="object"&&cn in d?d[cn]:d},set(I,r,d){return a()[r]=d,!0},has(I,r){return r===wi?!0:Reflect.has(a(),r)},ownKeys(){return Reflect.ownKeys(a())},getOwnPropertyDescriptor(I,r){return s||(Object.assign(n,e(n)),s=!0),Object.getOwnPropertyDescriptor(I,r)}})}var Xi=window.state=Xn({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Us=Zn({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{},autoPause:!0});function Es(e){return JSON.stringify(e,(l,n)=>m(n))}const As={get(e,l){var s;if(l===wi||l===ql)return e[l];const n=e[wi][l];if(l!=="value"&&(Ot(n)||Array.isArray(n))){if(n!==((s=e[l])==null?void 0:s[wi])){const a=[...e[ql],l];e[l]=new Proxy({[wi]:n,[ql]:a},As)}return e[l]}return n},set(e,l,n,s){if(!Xi.hasNaN&&(typeof n=="number"&&isNaN(n)||n instanceof i&&(isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag)))){const a=e[wi][l];if(!(typeof a=="number"&&isNaN(a)||a instanceof i&&(isNaN(a.sign)||isNaN(a.layer)||isNaN(a.mag))))throw Us.autosave=!1,Xi.hasNaN=!0,Xi.NaNPath=[...e[ql],l],Xi.NaNReceiver=s,console.error("Attempted to set NaN value",[...e[ql],l],e[wi]),"Attempted to set NaN value. See above for details"}return e[wi][l]=n,!0},ownKeys(e){return Reflect.ownKeys(e[wi])},has(e,l){return Reflect.has(e[wi],l)},getOwnPropertyDescriptor(e,l){return Object.getOwnPropertyDescriptor(e[wi],l)}};var Je=window.player=new Proxy({[wi]:Us,[ql]:["player"]},As);function Bs(e={}){return Object.assign({id:`${ni.id}-0`,name:"Default Save",tabs:ni.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:ni.id,modVersion:ni.versionNumber,layers:{}},e)}function Ki(e){const l=Fl.compressToUTF16(Es(e!=null?e:Je[wi]));return localStorage.setItem((e!=null?e:Je[wi]).id,l),l}async function Aa(){Da();try{let e=localStorage.getItem(Zi.active);if(e==null){await Bl(Kl());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 l=JSON.parse(e);if(l.modID!==ni.id){await Bl(Kl());return}l.id=Zi.active,await Bl(l)}catch(e){console.error(`Failedtoloadsave.Fallingbacktonewsave.
Cost:50${n.displayName}<br/>${Me(1e11)}${_.coal.displayName}`}})),U=T(()=>({resource:Q(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:()=>p(ae.depthMilestones[4].earned.value)})),Ie=He(()=>({resource:Q(n),cost(){let A=new i(this.amount.value);A=i.pow(.95,F.books.metalBook.totalAmount.value).times(A);let B=i.pow(1.15,A).times(10);return v.elfTraining.clothElfTraining.milestones[4].earned.value&&(B=i.div(B,i.add(ae.depth.value,1).sqrt())),v.elfTraining.metalElfTraining.milestones[3].earned.value&&(B=i.div(B,10)),B},inverseCost(A){v.elfTraining.metalElfTraining.milestones[3].earned.value&&(A=i.mul(A,10)),v.elfTraining.clothElfTraining.milestones[4].earned.value&&(A=i.mul(A,i.add(ae.depth.value,1).sqrt()));let B=i.div(A,10).log(1.15);return B=B.div(i.pow(.95,F.books.metalBook.totalAmount.value)),i.isNaN(B)?i.dZero:B.floor().max(0)},display:{title:"Metal Drill",description:"An automated machine to help you mine more ore, faster",effectDisplay:f(()=>t(O,null,[o("Mine 2.5x faster. Increase ore mining amount by")," ",xe(Ie.amount.value),o(" ore per operation")]))},visibility:()=>p(i.gte(Ie.amount.value,1)||i.div(I.value,d.value).plus(s.value).gte(10)),style:{width:"200px"}})),$=He(()=>({resource:Q(n),cost(){let A=new i(this.amount.value);A=i.pow(.95,F.books.metalBook.totalAmount.value).times(A);let B=i.pow(1.15,i.times(A,10)).times(10);return v.elfTraining.clothElfTraining.milestones[4].earned.value&&(B=i.div(B,i.add(ae.depth.value,1).sqrt())),v.elfTraining.metalElfTraining.milestones[3].earned.value&&(B=i.div(B,10)),B},inverseCost(A){v.elfTraining.metalElfTraining.milestones[3].earned.value&&(A=i.mul(A,10)),v.elfTraining.clothElfTraining.milestones[4].earned.value&&(A=i.mul(A,i.add(ae.depth.value,1).sqrt()));let B=i.div(A,10).log(1.15).div(10);return B=B.div(i.pow(.95,F.books.metalBook.totalAmount.value)),i.isNaN(B)?i.dZero:B.floor().max(0)},display:{title:"Industrial Crucible",description:"A giant automated crucible furnace, letting you smelt ore faster",effectDisplay:f(()=>t(O,null,[o("Automatically smelts")," ",xe(i.times($.amount.value,10)),o(" ore per second")]))},visibility:()=>p(i.gte($.amount.value,1)||i.gte(Ie.amount.value,4)||i.gte(I.value,50)),style:{width:"200px"}})),ze=Se(!0),Ye=He(()=>({resource:_.coal,cost(){let A=new i(this.amount.value);A=i.pow(.95,F.books.metalBook.totalAmount.value).times(A);let B=i.pow(10,A).times(1e12);return v.elfTraining.clothElfTraining.milestones[4].earned.value&&(B=i.div(B,i.add(ae.depth.value,1).sqrt())),v.elfTraining.metalElfTraining.milestones[3].earned.value&&(B=i.div(B,10)),B},inverseCost(A){v.elfTraining.metalElfTraining.milestones[3].earned.value&&(A=i.mul(A,10)),v.elfTraining.clothElfTraining.milestones[4].earned.value&&(A=i.mul(A,i.add(ae.depth.value,1).sqrt()));let B=i.div(A,1e12).log(10);return B=B.div(i.pow(.95,F.books.metalBook.totalAmount.value)),i.isNaN(B)?i.dZero:B.floor().max(0)},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:f(()=>t(O,null,[o("Gain "),xe(i.times(Oi.value,100)),o("% more metal per ore")]))},visibility:()=>p(i.gte(Ye.amount.value,1)||je.bought.value),style:{width:"200px"}})),Oi=b(()=>i.times(Ye.amount.value,.25));ui.on("update",A=>{G.value=i.times(A,g.value).plus(G.value);const B=G.value.trunc();G.value=G.value.minus(B),a.value=i.add(a.value,i.times(B,ne.value)),ze.value&&x(i.min(y.value,i.times(c.value,A)),h.value)});const[qe,$e]=al(()=>[{title:"Auto Smelt Speed",modifier:u,base:0,unit:"/s",visible(){return i.gt($.amount.value,0)}},{title:"Auto Smelt Multiplier",modifier:j,base:1,visible(){return i.gt(h.value,1)}},{title:"Metal per Ore",modifier:r,base:.1},{title:"Ore per Mining Operation",modifier:M,base:1},{title:"Mining Speed",modifier:Y,base:.1,unit:"/s"}]),fe=se(!1),Vi=f(()=>t(Gi,{modelValue:fe.value,"onUpdate:modelValue":A=>fe.value=A},{header:()=>t("h2",null,[e,o(" Modifiers")]),body:qe})),{total:Be,trackerD
margin:10px0;"/>${P}`:G,n.value=!0},onOpenLayer(){if(E.value=!1,window.matchMedia("(min-width:1468px)").matches)if(Je.tabs.includes(M!=null?M:"trees")){const D=Je.tabs.lastIndexOf(M!=null?M:"trees");Je.tabs.splice(D,1)}else Je.tabs.push(M!=null?M:"trees"),L.minimized.value=!0;else Je.tabs.splice(1,1/0,M!=null?M:"trees");Ri[M!=null?M:"trees"].minimized.value=!1},onUnlockLayer(){M&&(Y.value=!0,setTimeout(()=>{var D,Ze;s.value=-1,a.value=m((Ze=(D=Ri[M!=null?M:"trees"])==null?void 0:D.name)!=null?Ze:""),I.value=G,Je.autoPause&&(Je.devSpeed=null),n.value=!0},1e3))}}}}})}const d=[r(()=>({day:1,shouldNotify:!1,layer:"trees",symbol:dt,story:"Ohno!SantaforgotaboutChristmasandit's only 25 days away! He'saskedforyourhelpduetoyourhistorygettinglargequantitiesofthingsinshortamountsoftime.Unfortunatelyyou're really starting from scratch here - let'sstartwithgettingwood,whichyou'll need for everything from building workshops to wrapping paper to many of the toys themselves!",completedStory:"Santa looks at all the wood you'vegatheredandtellsyouyou've done well! He says you should take the rest of the day off so you'rerefreshedfortomorrow's work. Good Job!"})),r(()=>({day:2,shouldNotify:!1,layer:"workshop",symbol:rt,story:"Santa looked over your tree farm and was impressed with how much you could accomplish in just one day. Today'sgoalistogetaworkshopbuiltupfortheelvestoworkin-andapparently,theyneedquitealotofspacetowork!",completedStory:"Theworkshopcomplete,Santaonceagaindismissesyoufortheday.Withastrongfoundation,thisworkshopshouldsufficeforsupportingfutureworktowardthisimpossiblemission.GoodJob!"})),r(()=>({day:3,shouldNotify:!1,layer:"coal",symbol:lt,story:"Santatellsyouthatunfortunatelytherearequiteafewnaughtychildrenouttherethisyear,andhe'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'vegatheredandtellsyouyou've done well! He says you should take the rest of the day off so you'rerefreshedfortomorrow's work. Good Job!"})),r(()=>({day:4,shouldNotify:!1,layer:"elves",symbol:st,story:"Alright, it seems you finally have enough things set up to start bringing in the elves! Unfortunately, it seems they'llneedtoberetrainedonhowtohelp,sincethey'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!"})),r(()=>({day:5,shouldNotify:!1,layer:"paper",symbol:mt,story:"With the elves trained, we'realmostreadytostartworkingonthesepresents!Justacouplemorepre-reqsfirst,startingwithturningallthiswoodintowoodpulpandfinallyintopaper,whichwillberequiredforwrappingpaperlateronbutinthemeantimecanbeusedtohelpwriteguideswhichwillhelptheseelvescontinuetheireducation!",completedStory:"Youlookuponyourriversofbookpulpasyouhandoutstacksofpaperstoelvestoreadthrough.You've continued getting closer and closer to preparing for Christmas, and can go to bed satisfied with your progress. Good Job!"})),r(()=>({day:6,shouldNotify:!1,layer:"boxes",symbol:et,story:"You watch all these elves carrying incredibly large loads just in their open elf-sized hands, and realize there'sprobablyabetterway.Youneedtoputthetoysinboxesanyways,sowhydon'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!"})),r(()=>({day:7,shouldNotify:!1,layer:"metal",symbol:at,story:"You woke up ready to make some toys, before realizing most toys these days are made out of more than just wood! You'resureyou're close to really getting to work, but there'safewmorematerialsyou'regoingtoneed-likemetal!Lo
Learnmoreatwww.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await Aa();const{globalBus:e}=await Jn(()=>Promise.resolve().then(function(){return Ya}),void 0),{startGameLoop:l}=await Jn(()=>import("./gameLoop.5c7fbff9.js"),["assets/gameLoop.5c7fbff9.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=gt(Xd);e.emit("setupVue",n),n.mount("#app"),Dl(()=>{const s=Ys(),{updateServiceWorker:a}=xd({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(I){I&&setInterval(()=>I.update(),60*60*1e3)}})}),l()});export{i as D,Jn as _,Xi as a,ni as b,Em as c,ui as g,$n as l,Je as p,Zi as s};